social_stream-events 1.1.1 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/javascripts/social_stream/calendar.js.erb +135 -0
- data/app/assets/javascripts/social_stream/event.js +44 -0
- data/app/assets/javascripts/social_stream/events.action.js +36 -0
- data/app/assets/javascripts/social_stream/events.poster.js +23 -0
- data/app/assets/javascripts/social_stream/events.timeline.js +6 -0
- data/app/assets/javascripts/social_stream/fullcalendar.js +135 -0
- data/app/assets/javascripts/social_stream-events.js +1 -1
- data/app/assets/stylesheets/social_stream/events/calendar/_calendar.css.sass +63 -0
- data/app/assets/stylesheets/social_stream/events/calendar/_calendar_modal.css.sass +15 -0
- data/app/assets/stylesheets/social_stream/events/calendar/_calendar_sidebar.css.sass +50 -0
- data/app/assets/stylesheets/social_stream/events/calendar/layout/_calendar.css.sass +28 -0
- data/app/assets/stylesheets/social_stream/events/calendar/layout/_calendar_modal.css.sass +60 -0
- data/app/assets/stylesheets/social_stream/events/calendar/layout/_calendar_sidebar.css.sass +26 -0
- data/app/assets/stylesheets/social_stream/events/explore/layout/_explore_timeline_events.css.sass +6 -0
- data/app/assets/stylesheets/social_stream/events/header_nav/layout/_header_nav_events.css.sass +2 -0
- data/app/assets/stylesheets/social_stream/events/repository/_repository.css.sass +16 -0
- data/app/assets/stylesheets/social_stream/events/repository/layout/_repository.css.sass +24 -0
- data/app/assets/stylesheets/social_stream/events/responsive/_responsive-1200px-min.css.sass +34 -0
- data/app/assets/stylesheets/social_stream/events/responsive/_responsive-767px-max.css.sass +77 -0
- data/app/assets/stylesheets/social_stream/events/responsive/_responsive-768px-979px.css.sass +32 -0
- data/app/assets/stylesheets/social_stream/events/timeline/_timeline_events.css.sass +66 -0
- data/app/assets/stylesheets/social_stream/events/timeline/layout/_timeline_events.css.sass +70 -0
- data/app/assets/stylesheets/social_stream-events.css.sass +42 -0
- data/app/helpers/events_helper.rb +12 -1
- data/app/models/event.rb +7 -9
- data/app/overrides/layouts/_header_signed_in/icon_nav.html.erb.deface +8 -0
- data/app/overrides/settings/_index/add_rooms.html.erb.deface +6 -0
- data/app/overrides/sidebar/_show/add_calendar.html.erb.deface +5 -0
- data/app/views/events/_calendar_month.erb +3 -1
- data/app/views/events/{_event_date.html.erb → _date.html.erb} +5 -8
- data/app/views/events/{_event_date_sidebar.html.erb → _date_sidebar.html.erb} +4 -4
- data/app/views/events/{_event_details.html.erb → _details.html.erb} +11 -8
- data/app/views/events/_event.html.erb +17 -9
- data/app/views/events/_event_sidebar.html.erb +3 -3
- data/app/views/events/_form_poster.html.erb +2 -2
- data/app/views/events/_new.html.erb +11 -20
- data/app/views/events/_poster.html.erb +13 -0
- data/app/views/events/_quick_search_result.html.erb +1 -0
- data/app/views/events/_search_result.html.erb +1 -0
- data/app/views/events/_timeline.html.erb +8 -0
- data/app/views/events/create.js.erb +4 -16
- data/app/views/events/edit.js.erb +2 -2
- data/app/views/events/index.html.erb +23 -91
- data/app/views/events/index.js.erb +1 -1
- data/app/views/rooms/_form.html.erb +11 -16
- data/app/views/rooms/_index.html.erb +3 -7
- data/app/views/settings/_rooms.html.erb +11 -0
- data/app/views/sidebar/_calendar.html.erb +48 -0
- data/config/locales/en.yml +6 -0
- data/config/locales/es.yml +6 -0
- data/lib/generators/social_stream/events/install_generator.rb +2 -3
- data/lib/social_stream/events/engine.rb +0 -12
- data/lib/social_stream/events/version.rb +1 -1
- data/lib/social_stream-events.rb +3 -12
- data/lib/tasks/db/populate.rake +44 -0
- data/social_stream-events.gemspec +2 -2
- data/spec/controllers/events_controller_spec.rb +20 -0
- data/spec/views/settings_spec.rb +39 -0
- metadata +69 -44
- data/app/assets/javascripts/social_stream.calendar.js.erb +0 -104
- data/app/assets/javascripts/social_stream.event.js +0 -55
- data/app/assets/javascripts/social_stream.events.action.js +0 -31
- data/app/assets/javascripts/social_stream.events.poster.js +0 -22
- data/app/assets/stylesheets/events.css.scss +0 -218
- data/app/assets/stylesheets/social_stream-events.css +0 -3
- data/app/decorators/social_stream/base/document_decorator.rb +0 -3
- data/app/models/activity_object_property/poster.rb +0 -2
- data/app/views/events/_event_poster.html.erb +0 -9
- data/app/views/events/_sidebar_calendar.html.erb +0 -45
- data/app/views/rooms/_settings.html.erb +0 -23
- data/lib/social_stream/events/models/document.rb +0 -26
- data/lib/social_stream/views/settings/events.rb +0 -18
- data/lib/social_stream/views/sidebar/events.rb +0 -17
@@ -0,0 +1,34 @@
|
|
1
|
+
//
|
2
|
+
// Responsive: Large desktop and up
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
@media (min-width: 1200px)
|
7
|
+
#home,
|
8
|
+
#user,
|
9
|
+
#grups
|
10
|
+
.activities
|
11
|
+
.timeline
|
12
|
+
.event
|
13
|
+
.details
|
14
|
+
width: 52%
|
15
|
+
|
16
|
+
|
17
|
+
#sidebar
|
18
|
+
#month_top,
|
19
|
+
#month_bottom
|
20
|
+
font-size: 17px
|
21
|
+
#days
|
22
|
+
font-size: 15px
|
23
|
+
line-height: 22px
|
24
|
+
|
25
|
+
#suggestions,
|
26
|
+
#pendings
|
27
|
+
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
28
|
+
|
29
|
+
#explore-content
|
30
|
+
.timeline
|
31
|
+
.root
|
32
|
+
.media-body
|
33
|
+
.details
|
34
|
+
width: 79%
|
@@ -0,0 +1,77 @@
|
|
1
|
+
//
|
2
|
+
// Responsive: Landscape phone to desktop/tablet
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
@media (max-width: 767px)
|
7
|
+
|
8
|
+
#home,
|
9
|
+
#user,
|
10
|
+
#groups
|
11
|
+
.timeline
|
12
|
+
.event,
|
13
|
+
.link
|
14
|
+
.date
|
15
|
+
width: 48px
|
16
|
+
.details,
|
17
|
+
.text
|
18
|
+
margin-left: 10px
|
19
|
+
width: 50%
|
20
|
+
display: inline-block !important
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
#events
|
25
|
+
#toolbar
|
26
|
+
@extend .hidden-phone
|
27
|
+
td
|
28
|
+
.fc-button
|
29
|
+
padding: 3.5% !important
|
30
|
+
font-size: 12px !important
|
31
|
+
.fc-header-space
|
32
|
+
padding-left: 0px
|
33
|
+
.fc-header-center
|
34
|
+
h2
|
35
|
+
font-size: 17.5px
|
36
|
+
#calendar
|
37
|
+
.fc-day-number
|
38
|
+
min-height: 32px
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
// UP TO LANDSCAPE PHONE
|
44
|
+
// ---------------------
|
45
|
+
|
46
|
+
@media (max-width: 480px)
|
47
|
+
|
48
|
+
#home,
|
49
|
+
#user,
|
50
|
+
#group
|
51
|
+
.activities
|
52
|
+
.timeline
|
53
|
+
.avatar
|
54
|
+
float: left
|
55
|
+
.event,
|
56
|
+
.link
|
57
|
+
.date
|
58
|
+
.day,
|
59
|
+
.month
|
60
|
+
font-weight: bold
|
61
|
+
font-size: 15px
|
62
|
+
.poster
|
63
|
+
@include hidden-phone
|
64
|
+
.details,
|
65
|
+
.text
|
66
|
+
width: 40%
|
67
|
+
margin-left: 7px
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
#sidebarContent
|
72
|
+
#days
|
73
|
+
tr
|
74
|
+
td
|
75
|
+
font-size: 18px
|
76
|
+
padding: 3px 7px
|
77
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
//
|
2
|
+
// Responsive: Tablet to desktop
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
@media (min-width: 768px) and (max-width: 979px)
|
7
|
+
#user
|
8
|
+
.activities
|
9
|
+
.timeline
|
10
|
+
.event
|
11
|
+
.details
|
12
|
+
margin-left: 10px
|
13
|
+
@include grid-core-span(4, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
14
|
+
#sidebar
|
15
|
+
.calendar
|
16
|
+
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
17
|
+
#days tr td
|
18
|
+
padding-left: 2.5%
|
19
|
+
padding-right: 2.5%
|
20
|
+
#suggestions,
|
21
|
+
#pendings
|
22
|
+
@include grid-core-span(12, $fluidGridColumnWidth, $fluidGridGutterWidth)
|
23
|
+
|
24
|
+
#events
|
25
|
+
#toolbar
|
26
|
+
@extend .hidden-tablet
|
27
|
+
|
28
|
+
#explore-content
|
29
|
+
.timeline
|
30
|
+
.root
|
31
|
+
.media-body
|
32
|
+
width: 84%
|
@@ -0,0 +1,66 @@
|
|
1
|
+
.timeline
|
2
|
+
.media
|
3
|
+
.media-body
|
4
|
+
.event
|
5
|
+
.date
|
6
|
+
background-color: white
|
7
|
+
text-align: center
|
8
|
+
.day,
|
9
|
+
.month
|
10
|
+
font-weight: bold
|
11
|
+
font-size: 22px
|
12
|
+
.day
|
13
|
+
display: inline
|
14
|
+
.month
|
15
|
+
display: inline-block
|
16
|
+
.hour
|
17
|
+
font-size: 15px
|
18
|
+
|
19
|
+
.details
|
20
|
+
.frequency
|
21
|
+
color: #c3c3c3
|
22
|
+
font-size: 13px
|
23
|
+
.description
|
24
|
+
font-size: 12px
|
25
|
+
|
26
|
+
.follow
|
27
|
+
font-size: 12px
|
28
|
+
|
29
|
+
input
|
30
|
+
&[type="submit"]
|
31
|
+
@include border-radius (7px)
|
32
|
+
border: 1px solid #888
|
33
|
+
color: #888
|
34
|
+
@include btn-primary
|
35
|
+
.modal
|
36
|
+
.modal-body
|
37
|
+
.event
|
38
|
+
border-bottom: 1px solid #ccc
|
39
|
+
.date
|
40
|
+
background-color: white
|
41
|
+
text-align: center
|
42
|
+
.day,
|
43
|
+
.month
|
44
|
+
font-weight: bold
|
45
|
+
font-size: 22px
|
46
|
+
.day
|
47
|
+
display: inline
|
48
|
+
.month
|
49
|
+
display: inline-block
|
50
|
+
.hour
|
51
|
+
font-size: 15px
|
52
|
+
|
53
|
+
.details
|
54
|
+
.frequency
|
55
|
+
color: #c3c3c3
|
56
|
+
font-size: 13px
|
57
|
+
.description
|
58
|
+
font-size: 12px
|
59
|
+
|
60
|
+
.follow
|
61
|
+
font-size: 12px
|
62
|
+
.modal-footer
|
63
|
+
button
|
64
|
+
@include btn-primary
|
65
|
+
@include border-radius (5px)
|
66
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
.timeline
|
2
|
+
.media
|
3
|
+
.media-body
|
4
|
+
.event
|
5
|
+
.date
|
6
|
+
width: 90px
|
7
|
+
display: inline
|
8
|
+
float: left
|
9
|
+
padding-top: 6px
|
10
|
+
padding-bottom: 6px
|
11
|
+
|
12
|
+
.poster
|
13
|
+
float: left
|
14
|
+
width: 80px
|
15
|
+
display: inline-block
|
16
|
+
|
17
|
+
.details
|
18
|
+
width: 52%
|
19
|
+
display: inline-block
|
20
|
+
margin-left: 10px
|
21
|
+
.frequency
|
22
|
+
margin: 4px 0 6px
|
23
|
+
.description
|
24
|
+
p
|
25
|
+
a
|
26
|
+
display: block
|
27
|
+
.follow
|
28
|
+
margin-top: -3px
|
29
|
+
|
30
|
+
input
|
31
|
+
&[type="submit"]
|
32
|
+
@include size (22px, 110px)
|
33
|
+
@include border-radius(5px)
|
34
|
+
padding: 0px
|
35
|
+
margin-top: 5px
|
36
|
+
|
37
|
+
.modal
|
38
|
+
.modal-body
|
39
|
+
.event
|
40
|
+
clear: both
|
41
|
+
min-height: 152px
|
42
|
+
height: auto
|
43
|
+
.date
|
44
|
+
width: 90px
|
45
|
+
display: inline
|
46
|
+
float: left
|
47
|
+
padding-top: 6px
|
48
|
+
padding-bottom: 6px
|
49
|
+
.poster
|
50
|
+
float: left
|
51
|
+
width: 80px
|
52
|
+
display: inline-block
|
53
|
+
.details
|
54
|
+
width: 52%
|
55
|
+
display: inline-block
|
56
|
+
margin-left: 10px
|
57
|
+
.frequency
|
58
|
+
margin: 4px 0 6px
|
59
|
+
.description
|
60
|
+
p
|
61
|
+
a
|
62
|
+
display: block
|
63
|
+
.follow
|
64
|
+
margin-top: -3px
|
65
|
+
|
66
|
+
input
|
67
|
+
&[type="submit"]
|
68
|
+
@include size (22px, 110px)
|
69
|
+
padding: 0px
|
70
|
+
margin-top: 5px
|
@@ -0,0 +1,42 @@
|
|
1
|
+
@import "social_stream/events/calendar/calendar"
|
2
|
+
|
3
|
+
@import "social_stream/events/calendar/calendar_sidebar"
|
4
|
+
|
5
|
+
@import "social_stream/events/calendar/calendar_modal"
|
6
|
+
|
7
|
+
@import "social_stream/events/calendar/layout/calendar"
|
8
|
+
|
9
|
+
@import "social_stream/events/calendar/layout/calendar_sidebar"
|
10
|
+
|
11
|
+
@import "social_stream/events/calendar/layout/calendar_modal"
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
@import "social_stream/events/timeline/timeline_events"
|
17
|
+
|
18
|
+
@import "social_stream/events/timeline/layout/timeline_events"
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
@import "social_stream/events/explore/layout/explore_timeline_events"
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
@import "social_stream/events/header_nav/layout/header_nav_events"
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
@import "social_stream/events/repository/repository"
|
34
|
+
|
35
|
+
@import "social_stream/events/repository/layout/repository"
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
@import "social_stream/events/responsive/responsive-1200px-min"
|
41
|
+
@import "social_stream/events/responsive/responsive-767px-max"
|
42
|
+
@import "social_stream/events/responsive/responsive-768px-979px"
|
@@ -1,9 +1,20 @@
|
|
1
1
|
module EventsHelper
|
2
|
+
def sidebar_month_class(date)
|
3
|
+
case date.month <=> Date.today.month
|
4
|
+
when -1
|
5
|
+
"past"
|
6
|
+
when 0
|
7
|
+
"current"
|
8
|
+
when 1
|
9
|
+
"next"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
2
13
|
def event_timeline_thumb(event)
|
3
14
|
if event.poster.new_record?
|
4
15
|
image_tag("poster.png")
|
5
16
|
else
|
6
|
-
thumb_for(event.poster,
|
17
|
+
thumb_for(event.poster, '80x113#')
|
7
18
|
end
|
8
19
|
end
|
9
20
|
end
|
data/app/models/event.rb
CHANGED
@@ -9,6 +9,10 @@ class Event < ActiveRecord::Base
|
|
9
9
|
|
10
10
|
validate :room_belongs_to_receiver
|
11
11
|
|
12
|
+
define_index do
|
13
|
+
activity_object_index
|
14
|
+
end
|
15
|
+
|
12
16
|
def to_json(options = {})
|
13
17
|
if recurrence
|
14
18
|
st = options[:start].try(:to_date)
|
@@ -27,15 +31,9 @@ class Event < ActiveRecord::Base
|
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|
30
|
-
def poster_object
|
31
|
-
object_properties.
|
32
|
-
where('activity_object_properties.type' => 'ActivityObjectProperty::Poster').
|
33
|
-
first
|
34
|
-
end
|
35
|
-
|
36
34
|
def poster
|
37
35
|
@poster ||=
|
38
|
-
|
36
|
+
main_document ||
|
39
37
|
build_poster
|
40
38
|
end
|
41
39
|
|
@@ -54,8 +52,8 @@ class Event < ActiveRecord::Base
|
|
54
52
|
end
|
55
53
|
|
56
54
|
def build_poster
|
57
|
-
Document.new(:
|
58
|
-
:
|
55
|
+
Document.new(add_holder_event_id: id,
|
56
|
+
owner_id: owner_id)
|
59
57
|
end
|
60
58
|
|
61
59
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<!-- insert_before "code[erb-silent]:contains('SocialStream.repository_models')" -->
|
2
|
+
|
3
|
+
|
4
|
+
<li class="event">
|
5
|
+
<%= link_to polymorphic_path([current_subject, Event.new ]) do %>
|
6
|
+
<i class="icon_navbar-calendar <%= current_header_icon_class(:events) %>"></i>
|
7
|
+
<% end %>
|
8
|
+
</li>
|
@@ -1 +1,3 @@
|
|
1
|
-
<div id="
|
1
|
+
<div id="month_<%= position %>" class="month <%= sidebar_month_class(date) %>">
|
2
|
+
<%= link_to l(date, :format => "%B %Y"), polymorphic_path([profile_or_current_subject, Event.new], :date => date.to_time.to_i) %>
|
3
|
+
</div>
|
@@ -1,20 +1,17 @@
|
|
1
|
-
<div class="
|
2
|
-
<%= link_to event, :class => "
|
1
|
+
<div class="date">
|
2
|
+
<%= link_to event, :class => "date" do %>
|
3
3
|
<time datetime="<%= event.start_at.xmlschema %>">
|
4
|
-
<div class="
|
4
|
+
<div class="day">
|
5
5
|
<%= event.start_at.day %>
|
6
6
|
</div>
|
7
|
-
<div class="
|
7
|
+
<div class="month">
|
8
8
|
<%= l event.start_at, :format => "%b" %>
|
9
9
|
</div>
|
10
10
|
<% unless event.all_day? %>
|
11
|
-
<div class="
|
11
|
+
<div class="hour">
|
12
12
|
<%= l event.start_at, :format => "%H:%M" %>
|
13
13
|
</div>
|
14
14
|
<% end %>
|
15
|
-
<div class="event_frequency">
|
16
|
-
<%= event.frequency_description %>
|
17
|
-
</div>
|
18
15
|
</time>
|
19
16
|
<% end %>
|
20
17
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<div class="
|
2
|
-
<%= link_to event, :class => "
|
1
|
+
<div class="date">
|
2
|
+
<%= link_to event, :class => "date" do %>
|
3
3
|
<time datetime="<%= event.start_at.xmlschema %>">
|
4
4
|
<% unless event.all_day? %>
|
5
|
-
<div class="
|
5
|
+
<div class="hour">
|
6
6
|
<%= l event.start_at, :format => "%H:%M" %>
|
7
7
|
</div>
|
8
8
|
<% end %>
|
9
|
-
<div class="
|
9
|
+
<div class="frequency">
|
10
10
|
<%= event.frequency_description %>
|
11
11
|
</div>
|
12
12
|
</time>
|
@@ -1,21 +1,24 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="details">
|
2
2
|
<div class="title">
|
3
3
|
<%= link_to event.title, event %>
|
4
4
|
</div>
|
5
5
|
|
6
|
-
<div class="
|
7
|
-
<%=
|
6
|
+
<div class="frequency">
|
7
|
+
<%= event.frequency_description %>
|
8
8
|
</div>
|
9
9
|
|
10
|
+
<%= render partial: 'objects/timeline_description',
|
11
|
+
object: event,
|
12
|
+
as: :obj %>
|
13
|
+
|
10
14
|
<div class="follow">
|
15
|
+
<div class="follow_sentence">
|
16
|
+
<%= render :partial => 'activity_actions/follow_sentence',
|
17
|
+
:locals => { :activity_object => event.activity_object } %>
|
18
|
+
</div>
|
11
19
|
<div class="follow_form">
|
12
20
|
<%= render :partial => 'activity_actions/follow_form',
|
13
21
|
:locals => { :activity_object => event.activity_object } %>
|
14
22
|
</div>
|
15
|
-
|
16
|
-
<div class="follow_sentence">
|
17
|
-
<%= render :partial => 'activity_actions/follow_sentence',
|
18
|
-
:locals => { :activity_object => event.activity_object } %>
|
19
|
-
</div>
|
20
23
|
</div>
|
21
24
|
</div>
|
@@ -1,13 +1,21 @@
|
|
1
|
-
|
1
|
+
<div class="event">
|
2
|
+
<div class="avatar">
|
3
|
+
<%= link_to event, :title => event.title do %>
|
4
|
+
<i class="icon_50-event"></i>
|
5
|
+
<% end %>
|
6
|
+
</div>
|
2
7
|
|
3
|
-
<div class="
|
4
|
-
|
8
|
+
<div class="data">
|
9
|
+
<div class="name">
|
10
|
+
<%= link_to truncate(event.title, :length => 15), event %>
|
11
|
+
</div>
|
5
12
|
|
6
|
-
|
13
|
+
<div class="date">
|
14
|
+
<%= event.start_at.to_formatted_s(:rfc822) %>
|
15
|
+
</div>
|
7
16
|
|
17
|
+
<div class="frequency">
|
18
|
+
<%= event.frequency_description %>
|
19
|
+
</div>
|
8
20
|
</div>
|
9
|
-
|
10
|
-
<%= render :partial => "events/event_details", :locals => { :event => event } %>
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
<div class="clearfloat"></div>
|
21
|
+
</div>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%= div_for event_sidebar, :class => "event_sidebar" do %>
|
2
2
|
|
3
|
-
<%= render :partial => "events/
|
3
|
+
<%= render :partial => "events/date_sidebar", :locals => { :event => event_sidebar } %>
|
4
4
|
|
5
|
-
<%= render :partial => "events/
|
5
|
+
<%= render :partial => "events/poster", :locals => { :event => event_sidebar } %>
|
6
6
|
|
7
|
-
<%= render :partial => "events/
|
7
|
+
<%= render :partial => "events/details", :locals => { :event => event_sidebar } %>
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<div class="clearfloat"></div>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= form_for @event.poster do |f| %>
|
2
|
-
<%= f.hidden_field :
|
2
|
+
<%= f.hidden_field :add_holder_event_id %>
|
3
3
|
<%= f.hidden_field :owner_id %>
|
4
4
|
|
5
5
|
<%= f.file_field :file %>
|
6
6
|
|
7
|
-
<%= f.submit %>
|
7
|
+
<%= f.submit t('event.poster.button') %>
|
8
8
|
<% end %>
|
@@ -16,31 +16,22 @@
|
|
16
16
|
</div>
|
17
17
|
<% end %>
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
<%= f.text_field :title %>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div class="form_row">
|
25
|
-
<%= f.label :description %>
|
26
|
-
<%= f.text_area :description %>
|
27
|
-
</div>
|
19
|
+
<%= f.label :title %>
|
20
|
+
<%= f.text_field :title %>
|
28
21
|
|
22
|
+
<%= f.label :description %>
|
23
|
+
<%= f.text_area :description %>
|
29
24
|
|
30
25
|
<% if f.object.owner.rooms.any? %>
|
31
|
-
<div class="form_row">
|
32
26
|
<%= f.label :room %>
|
33
|
-
<%= f.select :room_id, f.object.owner.rooms.map{ |r| [r.name, r.id] }, { :
|
34
|
-
</div>
|
27
|
+
<%= f.select :room_id, f.object.owner.rooms.map{ |r| [r.name, r.id] }, { include_blank: true } %>
|
35
28
|
<% end %>
|
36
29
|
|
37
|
-
|
38
|
-
|
39
|
-
:locals => { :f => f }
|
40
|
-
%>
|
41
|
-
</div>
|
30
|
+
<%= render :partial => 'scheduler/form',
|
31
|
+
:locals => { :f => f } %>
|
42
32
|
|
43
|
-
|
44
|
-
|
45
|
-
|
33
|
+
<%= render partial: 'objects/form_privacy',
|
34
|
+
locals: { f: f } %>
|
35
|
+
|
36
|
+
<%= f.submit nil, { class: "btn-blue" } %>
|
46
37
|
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="poster">
|
2
|
+
<% if event.poster.new_record? %>
|
3
|
+
<%= image_tag("poster.png") %>
|
4
|
+
<% else %>
|
5
|
+
<%= image_tag thumb_file_for(event.poster, '80x113#'), "data-modal-carousel-id" => "false", "data-modal-carousel-content" => "#{ thumb_for(event.poster, 500) }" %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% if can? :update, event %>
|
9
|
+
<div class="update">
|
10
|
+
<%= link_to t('event.poster.update'), edit_event_path(event, :poster => true), :remote => true %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render event %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render event %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= div_for event do %>
|
2
|
+
|
3
|
+
<%= render :partial => "events/date", :locals => { :event => event } %>
|
4
|
+
|
5
|
+
<%= render :partial => "events/poster", :locals => { :event => event } %>
|
6
|
+
|
7
|
+
<%= render :partial => "events/details", :locals => { :event => event } %>
|
8
|
+
<% end %>
|
@@ -1,21 +1,9 @@
|
|
1
1
|
<% if @event.valid? %>
|
2
|
-
SocialStream.
|
3
|
-
|
4
|
-
var cal = SocialStream.Events.current.calendar;
|
5
|
-
|
6
|
-
jQuery.each(<%= raw Array.wrap(@event.to_json).to_json %>,
|
7
|
-
function(index, ev) {
|
8
|
-
ev.color = SocialStream.Event.color(<%= @event.room_id %>);
|
9
|
-
|
10
|
-
cal.fullCalendar('renderEvent', ev,
|
11
|
-
true // make the event "stick"
|
12
|
-
);
|
2
|
+
SocialStream.FullCalendar.create({
|
3
|
+
"events": "<%= j raw(Array.wrap(@event.to_json).to_json) %>"
|
13
4
|
});
|
14
|
-
|
15
|
-
cal.fullCalendar('unselect');
|
16
|
-
|
17
5
|
<% else %>
|
18
|
-
SocialStream.
|
6
|
+
SocialStream.FullCalendar.getFormEl().setContent("<%= escape_javascript render(partial: 'new') %>");
|
19
7
|
|
20
|
-
Scheduler.form.init(SocialStream.
|
8
|
+
Scheduler.form.init(SocialStream.FullCalendar.getFormEl().getContent().find('.scheduler_form'));
|
21
9
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if params[:poster] %>
|
2
|
-
$("#<%= dom_id @event %> .
|
3
|
-
$("#<%= dom_id @event %> .
|
2
|
+
$("#<%= dom_id @event %> .poster").hide("slow");
|
3
|
+
$("#<%= dom_id @event %> .details").hide("slow");
|
4
4
|
$("#<%= dom_id @event %>").append("<%= escape_javascript render(:partial => 'events/form_poster', :locals => { :event => @event }) %>");
|
5
5
|
<% end %>
|