Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
55d27387
Commit
55d27387
authored
Mar 14, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fullcalendar.js tag page
parent
61c45fc3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
6 deletions
+42
-6
app/assets/javascripts/lib/mod-calendar.js.coffee
+11
-0
app/controllers/tags_controller.rb
+4
-1
app/decorators/tag_decorator.rb
+4
-0
app/views/layouts/application.html.slim
+3
-0
app/views/stock/show.html.slim
+1
-5
app/views/tags/events.json.jbuilder
+5
-0
app/views/tags/show.html.slim
+9
-0
config/routes.rb
+1
-0
spec/controllers/tags_controller_spec.rb
+4
-0
No files found.
app/assets/javascripts/lib/mod-calendar.js.coffee
0 → 100644
View file @
55d27387
# Desc
# カレンダーにイベントを表示する
# `.js-calendar`クラスのついた要素
# Usage:
# Example:
$
->
$
(
'.js-calendar'
).
each
->
$this
=
$
(
@
)
$this
.
fullCalendar
events
:
$this
.
data
(
'eventsUrl'
)
+
'.json'
app/controllers/tags_controller.rb
View file @
55d27387
class
TagsController
<
ApplicationController
class
TagsController
<
ApplicationController
before_action
:set_tag
,
only:
[
:show
,
:edit
,
:update
,
:destroy
,
:merge_to
,
:move_to
]
before_action
:set_tag
,
only:
[
:show
,
:edit
,
:update
,
:destroy
,
:merge_to
,
:move_to
,
:events
]
def
index
def
index
end
end
...
@@ -14,6 +14,9 @@ class TagsController < ApplicationController
...
@@ -14,6 +14,9 @@ class TagsController < ApplicationController
def
edit
def
edit
end
end
def
events
end
def
create
def
create
@tag
=
Tag
.
new
(
tag_params
)
@tag
=
Tag
.
new
(
tag_params
)
...
...
app/decorators/tag_decorator.rb
View file @
55d27387
...
@@ -20,6 +20,10 @@ class TagDecorator < Draper::Decorator
...
@@ -20,6 +20,10 @@ class TagDecorator < Draper::Decorator
h
.
edit_tag_path
(
name:
h
.
url_encode
(
model
.
name
))
h
.
edit_tag_path
(
name:
h
.
url_encode
(
model
.
name
))
end
end
def
event_tag_path
h
.
event_tag_path
(
name:
h
.
url_encode
(
model
.
name
))
end
# tagをtree viewで表示する
# tagをtree viewで表示する
def
tree_view_node
def
tree_view_node
_html
=
''
_html
=
''
...
...
app/views/layouts/application.html.slim
View file @
55d27387
...
@@ -6,6 +6,8 @@ html lang="ja"
...
@@ -6,6 +6,8 @@ html lang="ja"
meta
content
=
"width=device-width, initial-scale=1.0"
name
=
"viewport"
/
meta
content
=
"width=device-width, initial-scale=1.0"
name
=
"viewport"
/
link
href
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css"
rel
=
"stylesheet"
/
link
href
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css"
rel
=
"stylesheet"
/
link
href
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap-theme.min.css"
rel
=
"stylesheet"
/
link
href
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap-theme.min.css"
rel
=
"stylesheet"
/
link
href
=
"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.css"
rel
=
"stylesheet"
/
link
href
=
"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.print.css"
rel
=
"stylesheet"
/
=
stylesheet_link_tag
"application"
,
media:
"all"
=
stylesheet_link_tag
"application"
,
media:
"all"
=
render_style
=
render_style
=
csrf_meta_tags
=
csrf_meta_tags
...
@@ -21,6 +23,7 @@ html lang="ja"
...
@@ -21,6 +23,7 @@ html lang="ja"
script
src
=
"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
script
src
=
"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
script
src
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"
script
src
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.min.js"
javascript:
javascript:
window
.
RV
=
window
.
RV
||
{};
window
.
RV
=
window
.
RV
||
{};
window
.
RV
.
AllTags
=
JSON
.
parse
(
'
#{
raw
Tag
.
all
.
pluck
(
:name
).
to_json
}
'
);
window
.
RV
.
AllTags
=
JSON
.
parse
(
'
#{
raw
Tag
.
all
.
pluck
(
:name
).
to_json
}
'
);
...
...
app/views/stock/show.html.slim
View file @
55d27387
...
@@ -5,12 +5,8 @@
...
@@ -5,12 +5,8 @@
|
Stock
|
Stock
small
-
保存・蓄積された記事
small
-
保存・蓄積された記事
#sidebar
.col-xs-
6.col-md-4
role
=
"navigation"
#sidebar
.col-xs-
12
role
=
"navigation"
#tab-tree
.tab-pane
#tab-tree
.tab-pane
-
cache
(
'tag-tree'
,
:expires_in
=>
1
.
hour
)
do
-
cache
(
'tag-tree'
,
:expires_in
=>
1
.
hour
)
do
.list-group
.list-group
=
Tag
.
posts_exist
.
decorate
.
tree_view
=
Tag
.
posts_exist
.
decorate
.
tree_view
.col-xs-12.col-sm-6.col-md-8
#list_post
p
#posts-placeholder
style
=
"color:#aaa;font-size:30px"
<
--
Select
a
post
...
app/views/tags/events.json.jbuilder
0 → 100644
View file @
55d27387
json.array!(@tag.posts) do |post|
json.extract! post, :title
json.url post_url(post)
json.start post.created_at
end
app/views/tags/show.html.slim
View file @
55d27387
...
@@ -17,9 +17,18 @@
...
@@ -17,9 +17,18 @@
a
data-target
=
"#modal-merge"
data-toggle
=
"modal"
href
=
"#"
Merge
to
...
a
data-target
=
"#modal-merge"
data-toggle
=
"modal"
href
=
"#"
Merge
to
...
li
li
a
data-target
=
"#modal-moveUnder"
data-toggle
=
"modal"
href
=
"#"
Move
this
tag
under
...
a
data-target
=
"#modal-moveUnder"
data-toggle
=
"modal"
href
=
"#"
Move
this
tag
under
...
.row
.col-xs-8
.col-xs-8
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
|
「
#{
@tag
.
name
}
」カレンダー
.panel-body
.js-calendar
data-events-url
=
@tag
.event_tag_path
.panel.panel-default
.panel-heading
|
「
#{
@tag
.
name
}
」とは
|
「
#{
@tag
.
name
}
」とは
.panel-body
.panel-body
-
if
@tag
.
body
.
present?
-
if
@tag
.
body
.
present?
...
...
config/routes.rb
View file @
55d27387
...
@@ -2,6 +2,7 @@ Rendezvous::Application.routes.draw do
...
@@ -2,6 +2,7 @@ Rendezvous::Application.routes.draw do
post
'apis/markdown_preview'
post
'apis/markdown_preview'
post
'apis/file_receiver'
post
'apis/file_receiver'
get
'tags/:name/events'
=>
'tags#events'
,
as:
'event_tag'
root
'welcome#top'
,
as:
'root'
root
'welcome#top'
,
as:
'root'
...
...
spec/controllers/tags_controller_spec.rb
View file @
55d27387
...
@@ -6,4 +6,8 @@ describe TagsController do
...
@@ -6,4 +6,8 @@ describe TagsController do
pending
'...'
pending
'...'
end
end
describe
"GET 'events'"
do
pending
'...'
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment