social_stream-events 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. data/GPL Affero license +663 -0
  2. data/Gemfile +9 -0
  3. data/README.rdoc +6 -0
  4. data/Rakefile +29 -0
  5. data/app/assets/images/btn/btn_certificate.png +0 -0
  6. data/app/assets/images/btn/btn_certificates.png +0 -0
  7. data/app/assets/images/btn/btn_edit.png +0 -0
  8. data/app/assets/images/btn/btn_embebed.png +0 -0
  9. data/app/assets/images/btn/btn_event.png +0 -0
  10. data/app/assets/images/btn/btn_outline.png +0 -0
  11. data/app/assets/images/btn/event.png +0 -0
  12. data/app/assets/images/btn/flyer.png +0 -0
  13. data/app/assets/images/btn/keynote.png +0 -0
  14. data/app/assets/images/btn/live.png +0 -0
  15. data/app/assets/images/btn/time.png +0 -0
  16. data/app/assets/images/btn/trash.png +0 -0
  17. data/app/assets/images/icons/IconsByGlyphish.txt +1 -0
  18. data/app/assets/images/icons/down.png +0 -0
  19. data/app/assets/images/icons/search.png +0 -0
  20. data/app/assets/images/icons/up.png +0 -0
  21. data/app/assets/images/logos/actor/event.png +0 -0
  22. data/app/assets/images/logos/contact/event.png +0 -0
  23. data/app/assets/images/logos/original/event.png +0 -0
  24. data/app/assets/images/logos/profile/event.png +0 -0
  25. data/app/assets/images/logos/representation/event.png +0 -0
  26. data/app/assets/images/tab_bottom.png +0 -0
  27. data/app/assets/javascripts/schedule.js +123 -0
  28. data/app/assets/javascripts/settings.js +20 -0
  29. data/app/assets/javascripts/social_stream-events.js +5 -0
  30. data/app/assets/stylesheets/activities.css +4 -0
  31. data/app/assets/stylesheets/fullcalendar.css +621 -0
  32. data/app/assets/stylesheets/fullcalendar.print.css +61 -0
  33. data/app/assets/stylesheets/settings.css +4 -0
  34. data/app/assets/stylesheets/social_stream-events.css +262 -0
  35. data/app/assets/stylesheets/tie.css +4 -0
  36. data/app/assets/stylesheets/users.css +4 -0
  37. data/app/controllers/activities_controller.rb +42 -0
  38. data/app/controllers/agendas_controller.rb +54 -0
  39. data/app/controllers/calendar_events_controller.rb +157 -0
  40. data/app/controllers/events_controller.rb +85 -0
  41. data/app/controllers/sessions_controller.rb +133 -0
  42. data/app/controllers/settings_controller.rb +70 -0
  43. data/app/helpers/event_helper.rb +12 -0
  44. data/app/models/agenda.rb +55 -0
  45. data/app/models/calendar_event.rb +191 -0
  46. data/app/models/calendar_event_series.rb +126 -0
  47. data/app/models/event.rb +131 -0
  48. data/app/models/session.rb +22 -0
  49. data/app/views/activities/_activity.html.erb +5 -0
  50. data/app/views/activities/_child.html.erb +18 -0
  51. data/app/views/activities/_comments.html.erb +3 -0
  52. data/app/views/activities/_index.html.erb +95 -0
  53. data/app/views/activities/_new.html.erb +29 -0
  54. data/app/views/activities/_options.html.erb +15 -0
  55. data/app/views/activities/_root.html.erb +37 -0
  56. data/app/views/activities/_wall.html.erb +5 -0
  57. data/app/views/activities/_walls.html.erb +34 -0
  58. data/app/views/activities/documents.js.erb +1 -0
  59. data/app/views/activities/index.js.erb +1 -0
  60. data/app/views/agendas/_agenda.html.erb +1 -0
  61. data/app/views/agendas/_edit.html.erb +136 -0
  62. data/app/views/agendas/_schedule.html.erb +19 -0
  63. data/app/views/agendas/_show.html.erb +81 -0
  64. data/app/views/agendas/_show_day.html.erb +6 -0
  65. data/app/views/agendas/edit.html.erb +24 -0
  66. data/app/views/agendas/event.html.erb +1 -0
  67. data/app/views/agendas/index.html.erb +0 -0
  68. data/app/views/agendas/show.html.erb +25 -0
  69. data/app/views/calendar_events/_calendar.html.erb +0 -0
  70. data/app/views/calendar_events/_edit_form.html.erb +58 -0
  71. data/app/views/calendar_events/_form.html.erb +65 -0
  72. data/app/views/calendar_events/available.html.erb +81 -0
  73. data/app/views/calendar_events/create.js.erb +18 -0
  74. data/app/views/calendar_events/edit.js.erb +1 -0
  75. data/app/views/calendar_events/index.html.erb +162 -0
  76. data/app/views/calendar_events/move.js.erb +0 -0
  77. data/app/views/calendar_events/new.js.erb +9 -0
  78. data/app/views/calendar_events/resize.js.erb +0 -0
  79. data/app/views/calendar_events/schedule.html.erb +143 -0
  80. data/app/views/documents/_mediawall.html.erb +111 -0
  81. data/app/views/events/_event.html.erb +10 -0
  82. data/app/views/events/_fields.html.erb +5 -0
  83. data/app/views/events/_form.html.erb +12 -0
  84. data/app/views/events/_jquery.html.erb +125 -0
  85. data/app/views/events/_manage.html.erb +35 -0
  86. data/app/views/events/_new.html.erb +2 -0
  87. data/app/views/events/_sessions_edit.html.erb +46 -0
  88. data/app/views/events/_sidebar_cloud.html.erb +27 -0
  89. data/app/views/events/_sidebar_index.html.erb +1 -0
  90. data/app/views/events/_sidebar_show.html.erb +5 -0
  91. data/app/views/events/agendas.html +1 -0
  92. data/app/views/events/edit.html.erb +12 -0
  93. data/app/views/events/index.html.erb +30 -0
  94. data/app/views/events/manage.html.erb +69 -0
  95. data/app/views/events/manage.js.erb +1 -0
  96. data/app/views/events/show.html.erb +34 -0
  97. data/app/views/kaminari/_first_page.html.erb +11 -0
  98. data/app/views/kaminari/_gap.html.erb +8 -0
  99. data/app/views/kaminari/_last_page.html.erb +11 -0
  100. data/app/views/kaminari/_next_page.html.erb +11 -0
  101. data/app/views/kaminari/_page.html.erb +12 -0
  102. data/app/views/kaminari/_paginator.html.erb +23 -0
  103. data/app/views/kaminari/_prev_page.html.erb +11 -0
  104. data/app/views/profiles/_outline.html.erb +81 -0
  105. data/app/views/profiles/_profile.html.erb +40 -0
  106. data/app/views/sessions/_form.html.erb +41 -0
  107. data/app/views/sessions/_new.html.erb +63 -0
  108. data/app/views/sessions/_session.html.erb +1 -0
  109. data/app/views/sessions/_show.html.erb +27 -0
  110. data/app/views/sessions/create.html.erb +3 -0
  111. data/app/views/sessions/create.js.erb +1 -0
  112. data/app/views/sessions/destroy.js.erb +2 -0
  113. data/app/views/sessions/edit.html.erb +27 -0
  114. data/app/views/sessions/index.html.erb +1 -0
  115. data/app/views/sessions/index.js.erb +1 -0
  116. data/app/views/sessions/new.html.erb +27 -0
  117. data/app/views/settings/_contacto.html.erb +24 -0
  118. data/app/views/settings/_header.html.erb +8 -0
  119. data/app/views/settings/_index.html.erb +16 -0
  120. data/app/views/settings/_manage.html.erb +25 -0
  121. data/app/views/settings/_settings.html.erb +49 -0
  122. data/app/views/settings/delete_relation.js.erb +3 -0
  123. data/app/views/settings/index.html.erb +38 -0
  124. data/app/views/settings/manage.html.erb +31 -0
  125. data/app/views/settings/show.html.erb +15 -0
  126. data/app/views/settings/update_relation.js.erb +1 -0
  127. data/app/views/toolbar/_home.html.erb +11 -0
  128. data/app/views/toolbar/_logo.html.erb +23 -0
  129. data/app/views/toolbar/_organizer.html.erb +25 -0
  130. data/app/views/toolbar/_profile.html.erb +21 -0
  131. data/app/views/toolbar/_sponsor.html.erb +18 -0
  132. data/app/views/toolbar/_suscribed.html.erb +17 -0
  133. data/app/views/users/_index.html.erb +33 -0
  134. data/app/views/users/index.html.erb +46 -0
  135. data/config/locales/en.yml +97 -0
  136. data/config/routes.rb +46 -0
  137. data/db/20110615143707_create_social_stream_events.rb +54 -0
  138. data/lib/generators/social_stream/events/install_generator.rb +24 -0
  139. data/lib/social_stream-events.rb +15 -0
  140. data/lib/social_stream/events/engine.rb +8 -0
  141. data/lib/social_stream/migrations/events.rb +25 -0
  142. data/social_stream-events.gemspec +22 -0
  143. data/vendor/assets/javascripts/fullcalendar.js +5208 -0
  144. data/vendor/assets/javascripts/gcal.js +112 -0
  145. metadata +272 -0
@@ -0,0 +1,126 @@
1
+ # == Schema Information
2
+ # Schema version: 20100330111833
3
+ #
4
+ # Table name: event_series
5
+ #
6
+ # id :integer(4) not null, primary key
7
+ # frequency :integer(4) default(1)
8
+ # period :string(255) default("months")
9
+ # starttime :datetime
10
+ # endtime :datetime
11
+ # all_day :boolean(1)
12
+ # created_at :datetime
13
+ # updated_at :datetime
14
+ #
15
+
16
+ class CalendarEventSeries < ActiveRecord::Base
17
+ attr_accessor :commit_button
18
+ attr_accessible :id, :title, :description, :starttime, :endtime, :frequency, :period, :all_day, :object_type, :object_id
19
+
20
+ validates_presence_of :frequency, :period, :starttime, :endtime
21
+ validates_presence_of :title, :description
22
+
23
+ has_many :calendar_events, :dependent => :destroy
24
+
25
+ belongs_to :object, :polymorphic => true
26
+
27
+ named_scope :object_type, lambda { |type|
28
+ type ?
29
+ { :conditions => [ "object_type = ?", type.to_s.classify ] } :
30
+ {}
31
+ }
32
+
33
+ def after_create
34
+ #create_events_until
35
+ end
36
+
37
+ def self.find_or_create(starttime, endtime, room_id)
38
+ calendar_series = self.find(:all, :conditions => [ "object_type = 'Room' AND object_id=?", room_id ] )
39
+ logger.error "*** calendar_series.size = #{calendar_series.size}"
40
+ for iterador in calendar_series
41
+ logger.error "*** iterador.id = #{iterador.id}"
42
+ if iterador.all_day
43
+ if iterador.repeat_until.nil?
44
+ indice= ((endtime - iterador.starttime)/(iterador.frequency.send(iterador.r_period(iterador.period)) )).to_i
45
+ fecha_consulta= (indice*iterador.frequency).send(iterador.r_period(iterador.period)).from_now(iterador.starttime)
46
+ fecha_consulta_end= (indice*iterador.frequency).send(iterador.r_period(iterador.period)).from_now(iterador.endtime)
47
+
48
+ logger.error "#{fecha_consulta} #{fecha_consulta_end}"
49
+ eventos= CalendarEvent.find(:all, :conditions => ["starttime =? AND calendar_event_series_id=?",fecha_consulta,iterador.id])
50
+ logger.error "tamanio #{eventos.size}"
51
+ if eventos.size == 0
52
+ CalendarEvent.create(:title=>iterador.title,:description=>iterador.description,:starttime=>fecha_consulta,:endtime=>fecha_consulta_end,:all_day=>iterador.all_day,:object_type=>'Room',:object_id=>room_id, :calendar_event_series_id=>iterador.id)
53
+ end
54
+ else
55
+ if endtime <= iterador.repeat_until
56
+ indice= ((endtime - iterador.starttime)/(iterador.frequency.send(iterador.r_period(iterador.period)) )).to_i
57
+
58
+ fecha_consulta= (indice*iterador.frequency).send(iterador.r_period(iterador.period)).from_now(iterador.starttime)
59
+ fecha_consulta_end= (indice*iterador.frequency).send(iterador.r_period(iterador.period)).from_now(iterador.endtime)
60
+ logger.error fecha_consulta
61
+ eventos= CalendarEvent.find(:all, :conditions => ["starttime =? AND calendar_event_series_id=?",fecha_consulta,iterador.id])
62
+ if eventos.size == 0
63
+ CalendarEvent.create(:title=>iterador.title,:description=>iterador.description,:starttime=>fecha_consulta,:endtime=>fecha_consulta_end,:all_day=>iterador.all_day,:object_type=>'Room',:object_id=>room_id, :calendar_event_series_id=>iterador.id)
64
+ end
65
+ end
66
+ end
67
+
68
+ else
69
+ if iterador.repeat_until.nil? || endtime <= iterador.repeat_until
70
+ indice= ((endtime - iterador.starttime)/(iterador.frequency.send(iterador.r_period(iterador.period)) )).to_i
71
+
72
+ fecha_consulta= (indice*iterador.frequency).send(iterador.r_period(iterador.period)).from_now(iterador.starttime)
73
+ fecha_consulta_end= (indice*iterador.frequency).send(iterador.r_period(iterador.period)).from_now(iterador.endtime)
74
+
75
+ logger.error fecha_consulta
76
+ eventos= CalendarEvent.find(:all, :conditions => ["starttime =? AND endtime=? AND calendar_event_series_id=?",fecha_consulta,fecha_consulta_end,iterador.id])
77
+ if eventos.size == 0
78
+ CalendarEvent.create(:title=>iterador.title,:description=>iterador.description,:starttime=>fecha_consulta,:endtime=>fecha_consulta_end,:all_day=>iterador.all_day,:object_type=>'Room',:object_id=>room_id, :calendar_event_series_id=>iterador.id)
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+
85
+ def create_events_until
86
+
87
+ st = starttime
88
+ et = endtime
89
+ p = r_period(period)
90
+ nst, net = st, et
91
+ while frequency.send(p).from_now(st) <= repeat_until
92
+ # logger.error "*** title=#{title} description=#{description} all_day=#{all_day}"
93
+ # logger.error "*** starttime=#{nst} endtime=#{net} object_id=#{object_id} object_type=#{object_type}"
94
+
95
+ #while frequency.send(p).from_now(st) <= end_time
96
+ # puts "#{nst} ::::::::: #{net}" if nst and net
97
+ self.calendar_events.create(:title => title, :description => description, :all_day => all_day, :starttime => nst, :endtime => net, :object_id => object_id, :object_type => 'Room')
98
+ nst = st = frequency.send(p).from_now(st)
99
+ net = et = frequency.send(p).from_now(et)
100
+
101
+ if period.downcase == 'monthly' or period.downcase == 'yearly'
102
+ begin
103
+ nst = DateTime.parse("#{starttime.hour}:#{starttime.min}:#{starttime.sec}, #{starttime.day}-#{st.month}-#{st.year}")
104
+ net = DateTime.parse("#{endtime.hour}:#{endtime.min}:#{endtime.sec}, #{endtime.day}-#{et.month}-#{et.year}")
105
+ rescue
106
+ nst = net = nil
107
+ end
108
+ end
109
+ end
110
+ end
111
+
112
+ def r_period(period)
113
+ case period
114
+ when 'Daily'
115
+ p = 'days'
116
+ when "Weekly"
117
+ p = 'weeks'
118
+ when "Monthly"
119
+ p = 'months'
120
+ when "Yearly"
121
+ p = 'years'
122
+ end
123
+ return p
124
+ end
125
+
126
+ end
@@ -0,0 +1,131 @@
1
+ class Event < ActiveRecord::Base
2
+ include SocialStream::Models::Subject
3
+
4
+ has_one :agenda, :dependent => :destroy
5
+ has_many :sessions, :through => :agenda
6
+
7
+ attr_accessor :_founder
8
+ attr_accessor :_participants
9
+
10
+ delegate :description, :description=, :to => :profile!
11
+
12
+ after_create :create_founder
13
+ after_create :create_participants
14
+ after_create :create_agenda
15
+
16
+ scope :live_events, lambda {
17
+ where("events.start_at <= ? AND events.end_at > ?", Time.zone.now, Time.zone.now)
18
+ }
19
+
20
+ #acts_as_conference_manager_event
21
+ def profile!
22
+ actor!.profile || actor!.build_profile
23
+ end
24
+
25
+ def followers
26
+ contact_subjects(:subject_type => :user, :direction => :received)
27
+ end
28
+
29
+ # Creates the ties between the group and the founder
30
+ def create_founder
31
+ founder =
32
+ Actor.find_by_slug(_founder) || raise("Cannot create event without founder")
33
+
34
+ sent_contacts.create! :receiver => founder,
35
+ :relation_ids => Array(relation_customs.sort.first.id)
36
+ end
37
+
38
+ # Creates the ties between the group and the participants
39
+ def create_participants
40
+ return if @_participants.blank?
41
+
42
+ @_participants.each do |participant|
43
+
44
+ participant_actor = Actor.find(participant)
45
+
46
+ sent_contacts.create! :receiver => participant_actor,
47
+ :relation_ids => Array(relation_customs.sort.first.id)
48
+ end
49
+ end
50
+
51
+ def create_agenda
52
+ agenda = Agenda.new
53
+ agenda._contact_id = self._contact_id
54
+ self.agenda = agenda
55
+ end
56
+
57
+ def days
58
+ if has_date?
59
+ (end_at.to_date - start_at.to_date).to_i + 1
60
+ else
61
+ return 0
62
+ end
63
+ end
64
+
65
+ #method to know if this event is happening now
66
+ def is_happening_now?
67
+ #first we check if start date is past and end date is future
68
+ if has_date? && start_at.past? && end_at.future?
69
+ true
70
+ else
71
+ return false
72
+ end
73
+ end
74
+
75
+
76
+ #method to know if this event has any session now
77
+ def has_session_now?
78
+ get_session_now
79
+ end
80
+
81
+ def get_session_now
82
+ #first we check if start date is past and end date is future
83
+ if is_happening_now?
84
+ #now we check the sessions
85
+ agenda.agenda_entries.each do |session|
86
+ return entry if entry.start_at.past? && entry.end_time.future?
87
+ end
88
+ end
89
+ return nil
90
+ end
91
+
92
+ #method to know if an event happens in the future
93
+ def future?
94
+ return has_date? && start_at.future?
95
+ end
96
+
97
+
98
+ #method to know if an event happens in the past
99
+ def past?
100
+ return has_date? && end_at.past?
101
+ end
102
+
103
+
104
+ def has_date?
105
+ start_at
106
+ end
107
+
108
+ def get_formatted_date
109
+ has_date? ?
110
+ I18n::localize(start_at, :format => "%A, %d %b %Y #{I18n::translate('date.at')} %H:%M. #{get_formatted_timezone}") :
111
+ I18n::t('date.undefined')
112
+ end
113
+
114
+ def get_formatted_day
115
+ has_date? ?
116
+ I18n::localize(start_at, :format => "%A, %d %b %Y #{I18n::translate('date.at')} %H:%M. #{get_formatted_timezone}") :
117
+ I18n::t('date.undefined')
118
+ end
119
+
120
+ def get_formatted_timezone
121
+ has_date? ?
122
+ "#{Time.zone.name} (#{start_at.zone}, GMT #{start_at.formatted_offset})" :
123
+ I18n::t('date.undefined')
124
+ end
125
+
126
+ #method to get the starting hour of an event in the correct format
127
+ def get_formatted_hour
128
+ has_date? ? start_at.strftime("%H:%M") : I18n::t('date.undefined')
129
+ end
130
+
131
+ end
@@ -0,0 +1,22 @@
1
+ class Session < ActiveRecord::Base
2
+ include SocialStream::Models::Object
3
+
4
+ belongs_to :agenda
5
+ has_one :event, :through => :agenda
6
+
7
+ validates_presence_of :agenda_id
8
+
9
+ acts_as_conference_manager_session
10
+ def to_fullcalendar_json
11
+ "{title: '#{name}', start: new Date(#{start_at.year},#{start_at.month-1},#{start_at.day},#{start_at.hour},#{start_at.min}),end: new Date(#{end_at.year},#{end_at.month-1},#{end_at.day},#{end_at.hour},#{end_at.min}),allDay: false}"
12
+ end
13
+
14
+ def sanitize_for_fullcalendar(string)
15
+ string.gsub("\r","").gsub("\n","<br />").gsub(/["]/, '\'')
16
+ end
17
+
18
+
19
+
20
+
21
+
22
+ end
@@ -0,0 +1,5 @@
1
+ <% if activity.is_root? %>
2
+ <%= render :partial => "activities/root", :locals => { :activity => activity } %>
3
+ <% else %>
4
+ <%= render :partial => "activities/child", :locals => { :activity => activity } %>
5
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <%= div_for activity, :class => "subactivity" do %>
2
+ <div class="actor_logo_subactivity">
3
+ <%= link_to image_tag(activity.sender_subject.logo.url(:actor),
4
+ :alt => activity.sender_subject.name),
5
+ activity.sender_subject %>
6
+ </div>
7
+ <div class="activity_content">
8
+ <div class="actor_name-activity_objects">
9
+ <%= link_to(activity.sender_subject.name, activity.sender_subject) %>
10
+ <span class="subactivity_objects">
11
+ <%= render activity.activity_objects %>
12
+ </span>
13
+ </div>
14
+ <%= render :partial => 'activities/options',
15
+ :locals => { :activity => activity } %>
16
+ </div>
17
+ <% end %>
18
+ <div class="space_comments"></div>
@@ -0,0 +1,3 @@
1
+ <div class="activity_comments" id="comments_<%= dom_id(activity) %>">
2
+ <%= render activity.comments %>
3
+ </div>
@@ -0,0 +1,95 @@
1
+ <% content_for :javascript do %>
2
+ $(function() {
3
+ /**
4
+ * the element
5
+ */
6
+ var $ui = $('#form_filter');
7
+
8
+ /**
9
+ * on focus and on click display the dropdown,
10
+ * and change the arrow image
11
+ */
12
+ /*$ui.find('.sb_down').bind('focus click',function()*/
13
+ $ui.find('.sb_down').bind('mouseover',function()
14
+ {
15
+ $ui.find('.sb_down')
16
+ .addClass('sb_up')
17
+ .removeClass('sb_down')
18
+ .andSelf()
19
+ .find('.sb_dropdown')
20
+ .show();
21
+ $ui.find('.sb_up')
22
+ .hide();
23
+ });
24
+
25
+ /**
26
+ * on mouse leave hide the dropdown,
27
+ * and change the arrow image
28
+ */
29
+ $ui.bind('mouseleave',function(){
30
+ $ui.find('.sb_up')
31
+ .addClass('sb_down')
32
+ .removeClass('sb_up')
33
+ .andSelf()
34
+ .find('.sb_dropdown')
35
+ .hide();
36
+ $ui.find('.sb_down')
37
+ .show();
38
+ });
39
+
40
+ /**
41
+ * selecting all checkboxes
42
+ */
43
+ $ui.find('.sb_dropdown').find('label[for="all"]').prev().bind('click',function(){
44
+ $(this).parent().siblings().find(':checkbox').attr('checked',this.checked).attr('disabled',this.checked);
45
+ });
46
+ });
47
+ <% end %>
48
+ <div id="wrapper_activities">
49
+ <div id="wrapper_activities_header">
50
+ <div id="activities_title" class="content_size">
51
+ <div class="activities_title_header">
52
+ <%= image_tag("btn/activity.png") %><%= t 'activity.title' %>
53
+ </div>
54
+ </div>
55
+ <%= render :partial => 'activities/new', :locals => { :receiver => owner } %>
56
+ </div>
57
+ <div id="filter_div">
58
+ <%= form_tag "/activities/documents", :method => :post ,:id=> 'form_filter', :class => "tie_form",:remote=> true do %>
59
+ <span class="sb_down">Filter</span>
60
+ <ul class="sb_dropdown" style="display:none;">
61
+ <li>
62
+ <%= check_box_tag 'types', 'all', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
63
+ <label for="all"><strong>All Categories</strong></label>
64
+ </li>
65
+ <li>
66
+ <%= check_box_tag 'types', 'Documents', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
67
+ <label for="<%=t('activity.view.documents')%>"><%=t('activity.view.documents')%></label>
68
+ </li>
69
+ <li>
70
+ <%= check_box_tag 'types', 'Audio', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
71
+ <label for="t('activity.view.audio')"><%=t('activity.view.audio')%></label>
72
+ </li>
73
+ <li>
74
+ <%= check_box_tag 'types', 'Event', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
75
+ <label for="<%=t('activity.view.event')%>"><%=t('activity.view.event')%></label>
76
+ </li>
77
+ <li>
78
+ <%= check_box_tag 'types', 'Picture', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
79
+ <label for="<%=t('activity.view.photos')%>"><%=t('activity.view.photos')%></label>
80
+ </li>
81
+ <li>
82
+ <%= check_box_tag 'types', 'Post', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
83
+ <label for="<%=t('activity.view.post')%>"><%=t('activity.view.post')%></label>
84
+ </li>
85
+ <li>
86
+ <%= check_box_tag 'types', 'Video', false, :class => 'accept_tos',:onchange=>'$(\'#form_filter\').submit();'%>
87
+ <label for="<%=t('activity.view.video')%>"><%=t('activity.view.video')%></label>
88
+ </li>
89
+ </ul>
90
+ <% end %>
91
+ </div>
92
+ <%= render :partial => 'activities/wall',
93
+ :locals => { :activities => activities } %>
94
+
95
+ </div>
@@ -0,0 +1,29 @@
1
+ <% if can? :create, new_activity(receiver) %>
2
+ <div id="activities_header" class="content_size">
3
+ <% SocialStream.activity_forms.each do |element| %>
4
+ <%= render :partial => element.to_s.pluralize+'/new',
5
+ :locals => {
6
+ :receiver => receiver
7
+ } %>
8
+ <% end %>
9
+ </div>
10
+
11
+ <div id="activity_form_select">
12
+ <% SocialStream.activity_forms.each do |element| %>
13
+ <div id="select_<%= element %>" class="activity_form_selector">
14
+ <%= image_tag "btn/#{ element }.png", :title => t("#{ element }.form.title") %>
15
+ </div>
16
+ <% end %>
17
+ </div>
18
+
19
+ <% if current_subject == receiver %>
20
+ <div id="securities"><%= select_tag :_relation_ids, options_for_select(current_subject.activity_relations(receiver).sort.map{ |r| [ r.name, r.id ] }), :id => 'security', :multiple => true, :title => t('relation_public.name') %></div>
21
+ <% end %>
22
+
23
+ <div id="activities_share_btn">
24
+ <%= submit_tag(t('share'), :class => "myButtonBlue", :id => "masterSubmitButton") %>
25
+ </div>
26
+
27
+ <% end %>
28
+
29
+
@@ -0,0 +1,15 @@
1
+ <div class="activity_options">
2
+ <ul class="activity_options" >
3
+ <% if user_signed_in? %>
4
+ <li><div class="security"><%= image_tag('btn/btn_security.png', :title => activity.audience_in_words(current_subject)) %></div></li>
5
+ <% end %>
6
+ <li><div class="post_time_ago"><%= t('time.ago', :time => time_ago_in_words(activity.created_at)) %></div></li>
7
+ <% if activity.is_root? && user_signed_in? %>
8
+ <li><div class="verb_comment"> · <%= link_to t('activity.to_comment'), "#", :class => "to_comment" %> </div></li>
9
+ <% end %>
10
+ <li><div class="verb_like" id="like_<%= dom_id(activity) %>"> · <%= link_like(activity)%></div></li>
11
+ <% if activity.delete_object_by?(current_subject) %>
12
+ <li><div class="verb_delete"> · <%= link_to t('activity.delete'), activity.direct_object , :confirm => t('confirm_delete', :scope => activity.direct_object.class.to_s.underscore), :method => :delete, :remote => true %> </div></li>
13
+ <% end %>
14
+ </ul>
15
+ </div>