social_stream 0.12.4 → 0.12.5
Sign up to get free protection for your applications and to get access to all the features.
- data/base/app/assets/stylesheets/base.css.scss +2 -1
- data/base/app/assets/stylesheets/footer.css.scss +1 -1
- data/base/app/assets/stylesheets/header.css.scss +3 -3
- data/base/app/assets/stylesheets/messages.css.scss +1 -0
- data/base/app/helpers/subjects_helper.rb +1 -1
- data/base/app/models/activity.rb +1 -4
- data/base/app/views/message_mailer/new_message_email.html.erb +1 -1
- data/base/app/views/message_mailer/new_message_email.text.erb +1 -1
- data/base/app/views/message_mailer/reply_message_email.html.erb +1 -1
- data/base/app/views/message_mailer/reply_message_email.text.erb +1 -1
- data/base/app/views/notification_mailer/new_notification_email.html.erb +5 -11
- data/base/app/views/notification_mailer/new_notification_email.text.erb +3 -2
- data/base/app/views/notifications/_notification.html.erb +2 -4
- data/base/app/views/notifications/activities/_follow.html.erb +10 -0
- data/base/app/views/notifications/activities/_follow.text.erb +8 -0
- data/base/app/views/notifications/activities/_like.html.erb +30 -0
- data/base/app/views/notifications/activities/_like.text.erb +23 -0
- data/base/app/views/notifications/activities/_make-friend.html.erb +10 -0
- data/base/app/views/notifications/activities/_make-friend.text.erb +7 -0
- data/base/app/views/notifications/activities/_post.html.erb +22 -0
- data/base/app/views/notifications/activities/_post.text.erb +17 -0
- data/base/app/views/notifications/activities/_update.html.erb +18 -0
- data/base/app/views/notifications/activities/_update.text.erb +15 -0
- data/base/app/views/notifications/index.js.erb +1 -1
- data/base/config/locales/en.yml +29 -13
- data/base/config/locales/es.yml +29 -13
- data/base/lib/mailboxer/notification_decoder.rb +11 -9
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/spec/factories/activity.rb +25 -0
- data/documents/app/assets/javascripts/documents.js.erb +12 -8
- data/documents/app/assets/stylesheets/show.css.scss +5 -2
- data/documents/app/views/common/_document_info.html.erb +34 -28
- data/documents/app/views/common/_edit_form.html.erb +2 -2
- data/documents/config/locales/en.yml +12 -3
- data/documents/config/locales/es.yml +11 -2
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +1 -1
- data/events/app/assets/javascripts/schedule.js +11 -11
- data/events/app/controllers/agendas_controller.rb +2 -2
- data/events/app/controllers/events_controller.rb +0 -4
- data/events/app/controllers/sessions_controller.rb +47 -34
- data/events/app/models/agenda.rb +5 -5
- data/events/app/models/event.rb +22 -13
- data/events/app/models/session.rb +1 -1
- data/events/app/views/agendas/_schedule.html.erb +2 -2
- data/events/app/views/agendas/_show.html.erb +1 -1
- data/events/app/views/events/_event.html.erb +4 -4
- data/events/app/views/events/_sessions_edit.html.erb +6 -6
- data/events/app/views/events/new.html.erb +1 -0
- data/events/app/views/sessions/_form.html.erb +4 -4
- data/events/app/views/sessions/_new.html.erb +2 -2
- data/events/app/views/sessions/_show.html.erb +2 -2
- data/events/config/locales/en.yml +17 -0
- data/events/config/locales/es.yml +17 -0
- data/events/db/migrate/20110910161707_create_social_stream_events.rb +4 -4
- data/events/db/migrate/20111102145626_add_more_fields_to_events.rb +1 -1
- data/events/db/migrate/20111104165944_add_more_fields_to_sessions.rb +13 -0
- data/events/db/migrate/20111104182420_add_details_to_events.rb +44 -0
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/social_stream-events.gemspec +1 -1
- data/events/vendor/assets/javascripts/jquery.ad-gallery.js +7 -7
- data/events/vendor/assets/javascripts/jquery.ad-gallery.pack.js +1 -1
- data/lib/social_stream/version.rb +1 -1
- data/presence/app/assets/images/emoticons/beer.png +0 -0
- data/presence/app/assets/images/emoticons/clock.png +0 -0
- data/presence/app/assets/images/emoticons/face-raspberry.png +0 -0
- data/presence/app/assets/images/emoticons/face-sad.png +0 -0
- data/presence/app/assets/images/emoticons/face-smile.png +0 -0
- data/presence/app/assets/images/emoticons/face-tired.png +0 -0
- data/presence/app/assets/images/emoticons/face-wink.png +0 -0
- data/presence/app/assets/images/emoticons/present.png +0 -0
- data/presence/app/assets/images/emoticons/rain.png +0 -0
- data/presence/app/assets/images/emoticons/sun.png +0 -0
- data/presence/app/assets/javascripts/xmpp_client.js.erb +417 -38
- data/presence/app/assets/stylesheets/chat.css +20 -0
- data/presence/app/helpers/xmpp_helper.rb +1 -1
- data/presence/app/views/xmpp/_chat.html.erb +2 -0
- data/presence/app/views/xmpp/_chat_off.html.erb +13 -5
- data/presence/lib/social_stream/presence/engine.rb +1 -1
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/social_stream.gemspec +3 -3
- metadata +36 -28
- data/base/app/assets/images/boxy/boxy-ne.png +0 -0
- data/base/app/assets/images/boxy/boxy-nw.png +0 -0
- data/base/app/assets/images/boxy/boxy-se.png +0 -0
- data/base/app/assets/images/boxy/boxy-sw.png +0 -0
- data/base/app/mailers/notification_mailer.rb +0 -34
- data/base/app/views/notifications/activities/_follow_body.html.erb +0 -2
- data/base/app/views/notifications/activities/_follow_subject.html.erb +0 -5
- data/base/app/views/notifications/activities/_like_body.html.erb +0 -5
- data/base/app/views/notifications/activities/_like_subject.html.erb +0 -9
- data/base/app/views/notifications/activities/_make-friend_body.html.erb +0 -2
- data/base/app/views/notifications/activities/_make-friend_subject.html.erb +0 -5
- data/base/app/views/notifications/activities/_post_body.html.erb +0 -6
- data/base/app/views/notifications/activities/_post_subject.html.erb +0 -6
- data/base/app/views/notifications/activities/_update_body.html.erb +0 -5
- data/base/app/views/notifications/activities/_update_subject.html.erb +0 -5
@@ -10,7 +10,7 @@ img { border: 0px;}
|
|
10
10
|
div { margin: 0px; padding: 0px; font-family: Helvetica; font-size: 11px;}
|
11
11
|
.AbsWrap { width: 100%; position: relative;}
|
12
12
|
.rowWrap { width: 100%;}
|
13
|
-
a:link,a:visited { color: $main-color; text-decoration: inherit;}
|
13
|
+
a:link,a:visited { color: $main-color; font-size: inherit; text-decoration: inherit;}
|
14
14
|
a:hover { text-decoration: underline;}
|
15
15
|
.clearfloat { clear: both; height: 0px;}
|
16
16
|
h2{padding-left:10px;}
|
@@ -48,6 +48,7 @@ label.validation_error{color: $error-color;background-color: $error-background;b
|
|
48
48
|
background-image: url('btn/warning.png');}
|
49
49
|
.error, #error_explanation {border-color: $error-color; color: $error-color;background-color: $error-background;
|
50
50
|
background-image: url('btn/error.png');}
|
51
|
+
.error h2, #error_explanation h2{ color: $error-color;}
|
51
52
|
|
52
53
|
/************Forms SECTION **************/
|
53
54
|
input.other_blue{ background-color:$auxiliar-color !important; border:0px; cursor:pointer; line-height:135%;
|
@@ -4,7 +4,7 @@
|
|
4
4
|
#sponsor{width:960px;margin:0 auto;color:$details-color; }
|
5
5
|
|
6
6
|
#footer{width: 960px;margin-left: auto;margin-right: auto;padding: 0;position: relative; text-align:center;
|
7
|
-
clear:left;font-size:0.9166em;line-height:1.6363;color:$details-color;padding:0.75em 0;}
|
7
|
+
clear:left;font-size:0.9166em;line-height:1.6363;color:$details-color;padding:0.75em 0; background: $secondary-color}
|
8
8
|
#footer ul, #sponsor ul{list-style-type:none;margin:0 0.5em; }
|
9
9
|
#footer ul li,#sponsor ul li{display:inline-block;margin-right:0.25em;position:relative;}
|
10
10
|
#footer ul li#trade_mark,#sponsor ul li#trademark{font-weight:bold;color:$sentence-color;}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
@import "colors";
|
2
2
|
|
3
3
|
/****************** HEADER STRUCTURE ******/
|
4
|
-
#headerFront { width: 100%; padding: 0; background: $header-color; padding:
|
4
|
+
#headerFront { width: 100%; padding: 0; background: $header-color; padding: 0px 0px 0px 0px;}
|
5
5
|
#header_left { left: 0px; float: left; padding-left: 15px; padding-right: 5px; width:155px;}
|
6
6
|
#header_right { right: 0px; float: right; padding-right: 10px; }
|
7
|
-
.banner_top{ width: 960px; margin-left: auto; margin-right: auto; margin-top:
|
8
|
-
position: relative; }
|
7
|
+
.banner_top{ width: 960px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-bottom: 0px;
|
8
|
+
position: relative; background: $header-color; }
|
9
9
|
.banner_top_height{ height:23px;}
|
10
10
|
|
11
11
|
/********** CONTENT ************/
|
data/base/app/models/activity.rb
CHANGED
@@ -204,12 +204,9 @@ class Activity < ActiveRecord::Base
|
|
204
204
|
def notify
|
205
205
|
return true if !notificable?
|
206
206
|
#Avaible verbs: follow, like, make-friend, post, update
|
207
|
-
actionview = ActivitiesController.new.view_context
|
208
207
|
|
209
208
|
if ['like','follow','make-friend','post','update'].include? verb and !contact.reflexive?
|
210
|
-
|
211
|
-
notification_body = actionview.render :partial => 'notifications/activities/' + verb + "_body", :locals => {:activity => self}
|
212
|
-
receiver.notify(notification_subject, notification_body, self)
|
209
|
+
receiver.notify("You have a new notification", "Youre not supposed to see this", self)
|
213
210
|
end
|
214
211
|
true
|
215
212
|
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div>
|
9
9
|
<div style="padding: 10px 5px 5px 5px;">
|
10
10
|
<span style="font-weight: bold;"><%= truncate_name(@message.sender.name)%></span>
|
11
|
-
|
11
|
+
<%= t('mailboxer.message_mailer.has_sent_new.' + @receiver.subject.class.to_s.downcase, :receiver => @receiver.name) %>
|
12
12
|
</div>
|
13
13
|
<div style="position: static;padding: 5px; border: #2A3890 solid 2px; background-color: #E1EEF5; margin:10px; min-height: 125px; width: 500px;">
|
14
14
|
<div style="float:left; margin-right:7px; border: thin solid #D4E4EA; background-color: white; max-height: 119px;">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% self.class.send :include, SubjectsHelper %>
|
2
|
-
<%=truncate_name(@message.sender.name)%>
|
2
|
+
<%=truncate_name(@message.sender.name)%> <%= t('mailboxer.message_mailer.has_sent_new.' + @receiver.subject.class.to_s.downcase, :receiver => @receiver.name) %>
|
3
3
|
|
4
4
|
-----------------------------------------------
|
5
5
|
<%= @message.body.html_safe? ? @message.body : strip_tags(@message.body) %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div>
|
9
9
|
<div style="padding: 10px 5px 5px 5px;">
|
10
10
|
<span style="font-weight: bold;"><%= truncate_name(@message.sender.name)%></span>
|
11
|
-
|
11
|
+
<%= t('mailboxer.message_mailer.has_sent_reply.' + @receiver.subject.class.to_s.downcase, :receiver => @receiver.name) %>
|
12
12
|
</div>
|
13
13
|
<div style="position: static;padding: 5px; border: #2A3890 solid 2px; background-color: #E1EEF5; margin:10px; min-height: 125px; width: 500px;">
|
14
14
|
<div style="float:left; margin-right:7px; border: thin solid #D4E4EA; background-color: white; max-height: 119px;">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% self.class.send :include, SubjectsHelper %>
|
2
|
-
<%= truncate_name(@message.sender.name)%>
|
2
|
+
<%= truncate_name(@message.sender.name)%> <%= t('mailboxer.message_mailer.has_sent_reply.' + @receiver.subject.class.to_s.downcase, :receiver => @receiver.name) %>
|
3
3
|
|
4
4
|
-----------------------------------------------
|
5
5
|
"<%= @message.body.html_safe? ? @message.body : strip_tags(@message.body) %>"
|
@@ -9,11 +9,7 @@
|
|
9
9
|
|
10
10
|
<div style="position: static;padding: 5px; border: #2A3890 solid 2px; background-color: #E1EEF5; margin:10px; min-height: 125px; width: 500px;">
|
11
11
|
<div style="float:left; margin-right:7px; border: thin solid #D4E4EA; background-color: white; max-height: 119px;">
|
12
|
-
|
13
|
-
<img src="http://<%= ActionMailer::Base.default_url_options[:host] +User.new.logo.url(:profile)%>" >
|
14
|
-
<%else%>
|
15
|
-
<img src="http://<%= ActionMailer::Base.default_url_options[:host] +@notification.notified_object.sender.logo.url(:profile)%>" alt="<%=@notification.notified_object.sender.name%>">
|
16
|
-
<%end%>
|
12
|
+
<img src="<%= root_url + @notification.notified_object.sender.logo.url(:profile)%>" alt="<%=@notification.notified_object.sender.name%>">
|
17
13
|
</div>
|
18
14
|
<div style=" margin: 5px 5px 5px 5px;">
|
19
15
|
<p style="font-weight: bold; "><%= @notification.notified_object.sender.name %>
|
@@ -21,11 +17,9 @@
|
|
21
17
|
<br/><span style="color: #6C6D6F; font-weight: normal;"><%= @notification.notified_object.sender.profile.organization%></span>
|
22
18
|
<% end %>
|
23
19
|
</p>
|
24
|
-
<p>
|
25
|
-
<%=
|
26
|
-
|
27
|
-
<p style="text-align: justify; font-style: italic;">
|
28
|
-
<%= raw decode_notification @notification.body,@notification.notified_object %>
|
20
|
+
<p style="text-align: justify;">
|
21
|
+
<%= render :partial => "notifications/activities/#{ @notification.notified_object.verb }",
|
22
|
+
:locals =>{:activity => @notification.notified_object}%>
|
29
23
|
</p>
|
30
24
|
</div>
|
31
25
|
</div>
|
@@ -36,4 +30,4 @@
|
|
36
30
|
</div>
|
37
31
|
</div>
|
38
32
|
</body>
|
39
|
-
</html>
|
33
|
+
</html>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<% self.class.send :include, Mailboxer::NotificationDecoder %>
|
2
|
-
|
2
|
+
|
3
3
|
-----------------------------------------------
|
4
|
-
<%=
|
4
|
+
<%= render :partial => "notifications/activities/#{ @notification.notified_object.verb }",
|
5
|
+
:locals =>{:activity => @notification.notified_object}%>
|
5
6
|
-----------------------------------------------
|
6
7
|
Visit <%= notifications_url %> and check all your notifications.
|
@@ -16,11 +16,9 @@
|
|
16
16
|
</div>
|
17
17
|
</div>
|
18
18
|
<div class="content_right">
|
19
|
-
<div class="subject">
|
20
|
-
<%= raw decode_notification notification.subject,notification.notified_object %>
|
21
|
-
</div>
|
22
19
|
<div class="briefing">
|
23
|
-
<%=
|
20
|
+
<%= render :partial => "notifications/activities/#{ notification.notified_object.verb }",
|
21
|
+
:locals =>{:activity => notification.notified_object} %>
|
24
22
|
</div>
|
25
23
|
<div class="clearfloat">
|
26
24
|
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="subject">
|
2
|
+
<%= raw t('notification.follow.'+ activity.receiver.subject.class.to_s.underscore,
|
3
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject)),
|
4
|
+
:who => t('notification.who.'+ activity.receiver.subject.class.to_s.underscore,
|
5
|
+
:name => truncate_name(activity.receiver.name))) %>
|
6
|
+
</div>
|
7
|
+
<div class="briefing">
|
8
|
+
<%= link_to(t('notification.confirm', :sender => truncate_name(activity.sender.name)),
|
9
|
+
edit_contact_url(activity.receiver.contact_to!(activity.sender),:s => activity.receiver.slug)) %>
|
10
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= raw t('notification.follow.'+ activity.receiver.subject.class.to_s.underscore,
|
2
|
+
:sender => truncate_name(activity.sender.name),
|
3
|
+
:who => t('notification.who.'+ activity.receiver.subject.class.to_s.underscore,
|
4
|
+
:name => truncate_name(activity.receiver.name))) %>
|
5
|
+
-----------------------------------------------
|
6
|
+
<%= t('notification.look', :sender => truncate_name(activity.sender.name))%>: <%=polymorphic_url(activity.sender.subject)%>
|
7
|
+
<%= t('notification.confirm', :sender => truncate_name(activity.sender.name)) %> <%= edit_contact_url(activity.receiver.contact_to!(activity.sender),
|
8
|
+
:s => activity.receiver.slug)%>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<% if activity.direct_object.is_a? Actor or activity.direct_object.respond_to? :actor %>
|
2
|
+
<div class="subject">
|
3
|
+
<%= raw t('notification.fan',
|
4
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject)),
|
5
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
6
|
+
:receiver => truncate_name(activity.receiver.name)))%>
|
7
|
+
</div>
|
8
|
+
<div class="briefing">
|
9
|
+
<%= raw t('notification.look',
|
10
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject))) %>
|
11
|
+
</div>
|
12
|
+
<% else %>
|
13
|
+
<div class="subject">
|
14
|
+
<%= raw t('notification.like.'+ activity.receiver.subject.class.to_s.underscore,
|
15
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject)),
|
16
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
17
|
+
:receiver => truncate_name(activity.receiver.name)),
|
18
|
+
:thing => link_to(t(activity.direct_object.class.to_s.underscore+'.name'),
|
19
|
+
polymorphic_url( activity.direct_object))) %>
|
20
|
+
</div>
|
21
|
+
<div class="briefing">
|
22
|
+
<% if activity.direct_object.respond_to? :text %>
|
23
|
+
"<%= link_to(activity.direct_object.text.truncate(100, :separator =>' '),
|
24
|
+
polymorphic_url( activity.direct_object))%>"
|
25
|
+
<% else%>
|
26
|
+
<%= link_to(t('notification.watch_it'),
|
27
|
+
polymorphic_url( activity.direct_object))%>
|
28
|
+
<%end%>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% if activity.direct_object.is_a? Actor or activity.direct_object.respond_to? :actor %>
|
2
|
+
<%= raw t('notification.fan',
|
3
|
+
:sender => truncate_name(activity.sender.name),
|
4
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
5
|
+
:receiver => truncate_name(activity.receiver.name)))%>
|
6
|
+
-----------------------------------------------
|
7
|
+
<% else %>
|
8
|
+
<%= raw t('notification.like.'+ activity.receiver.subject.class.to_s.underscore,
|
9
|
+
:sender => truncate_name(activity.sender.name),
|
10
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
11
|
+
:receiver => truncate_name(activity.receiver.name)),
|
12
|
+
:thing => t(activity.direct_object.class.to_s.underscore+'.name')) %>
|
13
|
+
-----------------------------------------------
|
14
|
+
<% if activity.direct_object.respond_to? :text %>
|
15
|
+
"<%= activity.direct_object.text.truncate(100, :separator =>' ')%>"
|
16
|
+
<%= t('notification.all_text', :url => polymorphic_url(activity.direct_object))%>
|
17
|
+
<% else%>
|
18
|
+
--><%= t('notification.watch', :url => polymorphic_url( activity.direct_object))%>
|
19
|
+
<%end%>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<%= raw t('notification.look',
|
23
|
+
:sender => truncate_name(activity.sender.name)) %>: <%=polymorphic_url(activity.sender.subject)%>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="subject">
|
2
|
+
<%= raw t('notification.makefriend.'+ activity.receiver.subject.class.to_s.underscore,
|
3
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject)),
|
4
|
+
:who => t('notification.who.'+ activity.receiver.subject.class.to_s.underscore,
|
5
|
+
:name => truncate_name(activity.receiver.name))) %>
|
6
|
+
</div>
|
7
|
+
<div class="briefing">
|
8
|
+
<%= raw t('notification.look',
|
9
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject))) %>
|
10
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= raw t('notification.makefriend.'+ activity.receiver.subject.class.to_s.underscore,
|
2
|
+
:sender => truncate_name(activity.sender.name),
|
3
|
+
:who => t('notification.who.'+ activity.receiver.subject.class.to_s.underscore,
|
4
|
+
:name => truncate_name(activity.receiver.name))) %>
|
5
|
+
-----------------------------------------------
|
6
|
+
<%= raw t('notification.look',
|
7
|
+
:sender => link_to(truncate_name(activity.sender.name), polymorphic_url(activity.sender.subject))) %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="subject">
|
2
|
+
<%= raw t('notification.post.'+ activity.receiver.subject.class.to_s.underscore,
|
3
|
+
:sender => link_to(truncate_name(activity.sender.name),
|
4
|
+
polymorphic_url(activity.sender.subject)),
|
5
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
6
|
+
:receiver => truncate_name(activity.receiver.name)),
|
7
|
+
:thing => link_to(t(activity.direct_object.class.to_s.underscore+'.one'),
|
8
|
+
polymorphic_url(activity.direct_object))) %>
|
9
|
+
</div>
|
10
|
+
<div class="briefing">
|
11
|
+
<% if activity.direct_object.respond_to? :text %>
|
12
|
+
"<%= link_to(activity.direct_object.text.truncate(100, :separator =>' '),
|
13
|
+
polymorphic_url(activity.direct_object))%>"
|
14
|
+
<% else%>
|
15
|
+
<%= link_to(t('notification.watch_it'),
|
16
|
+
polymorphic_url( activity.direct_object))%>
|
17
|
+
<%end%>
|
18
|
+
<% if SocialStream.activity_forms.include? :document and activity.direct_object.is_a? Document %>
|
19
|
+
|
20
|
+
<% end%>
|
21
|
+
</div>
|
22
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
<%= raw t('notification.post.'+ activity.receiver.subject.class.to_s.underscore,
|
3
|
+
:sender => truncate_name(activity.sender.name),
|
4
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
5
|
+
:receiver => truncate_name(activity.receiver.name)),
|
6
|
+
:thing => t(activity.direct_object.class.to_s.underscore+'.one')) %>
|
7
|
+
-----------------------------------------------
|
8
|
+
|
9
|
+
<% if activity.direct_object.respond_to? :text %>
|
10
|
+
"<%=activity.direct_object.text.truncate(100, :separator =>' ')%>"
|
11
|
+
--><%= t('notification.all_text', :url => polymorphic_url(activity.direct_object))%>
|
12
|
+
<% else%>
|
13
|
+
<%= t('notification.watch', :url => polymorphic_url(activity.direct_object))%>
|
14
|
+
<% end%>
|
15
|
+
|
16
|
+
<%= raw t('notification.look',
|
17
|
+
:sender => truncate_name(activity.sender.name))%>: <%=polymorphic_url(activity.sender.subject)%>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="subject">
|
2
|
+
<%= raw t('notification.update.'+ activity.receiver.subject.class.to_s.underscore,
|
3
|
+
:sender => link_to(truncate_name(activity.sender.name),
|
4
|
+
polymorphic_url(activity.sender.subject)),
|
5
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
6
|
+
:receiver => truncate_name(activity.receiver.name)),
|
7
|
+
:thing => link_to(t(activity.direct_object.class.to_s.underscore+'.one'),
|
8
|
+
polymorphic_url( activity.direct_object))) %>
|
9
|
+
</div>
|
10
|
+
<div class="briefing">
|
11
|
+
<% if activity.direct_object.respond_to? :text %>
|
12
|
+
"<%= link_to(activity.direct_object.text.truncate(100, :separator =>' '),
|
13
|
+
polymorphic_url(activity.direct_object))%>"
|
14
|
+
<% else%>
|
15
|
+
<%= link_to(t('notification.watch_it'),
|
16
|
+
polymorphic_url( activity.direct_object))%>
|
17
|
+
<%end%>
|
18
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= raw t('notification.update.'+ activity.receiver.subject.class.to_s.underscore,
|
2
|
+
:sender => truncate_name(activity.sender.name),
|
3
|
+
:whose => t('notification.whose.'+ activity.receiver.subject.class.to_s.underscore,
|
4
|
+
:receiver => truncate_name(activity.receiver.name)),
|
5
|
+
:thing => t(activity.direct_object.class.to_s.underscore+'.one')) %>
|
6
|
+
-----------------------------------------------
|
7
|
+
<% if activity.direct_object.respond_to? :text %>
|
8
|
+
"<%=activity.direct_object.text.truncate(100, :separator =>' ')%>"
|
9
|
+
--><%= t('notification.all_text', :url => polymorphic_url(activity.direct_object))%>
|
10
|
+
<% else%>
|
11
|
+
<%= t('notification.watch', :url => polymorphic_url( activity.direct_object))%>
|
12
|
+
<% end%>
|
13
|
+
|
14
|
+
<%= raw t('notification.look',
|
15
|
+
:sender => truncate_name(activity.sender.name))%>: <%=polymorphic_url(activity.sender.subject)%>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
$("#content").html("<%=escape_javascript(render :partial => 'index') %>");
|
2
2
|
$("header").html("<%=escape_javascript(render :partial => 'layouts/header') %>");
|
3
3
|
|
4
|
-
<%= location(link_to(
|
4
|
+
<%= location(link_to(t('notification.other'), notifications_path,:remote => true)+' ('+@mailbox.notifications.not_trashed.unread.count.to_s+')') %>
|
5
5
|
|
6
6
|
$('.pagination a').attr('data-remote', 'true');
|
data/base/config/locales/en.yml
CHANGED
@@ -91,6 +91,7 @@ en:
|
|
91
91
|
comment:
|
92
92
|
input: "Write a comment..."
|
93
93
|
confirm_delete: "Delete comment?"
|
94
|
+
name: "a comment"
|
94
95
|
view_all: "View all comments"
|
95
96
|
contact:
|
96
97
|
all_n: "All contacts (%{count})"
|
@@ -242,6 +243,14 @@ en:
|
|
242
243
|
subject: "Subject"
|
243
244
|
mark_as_read: "Mark as read"
|
244
245
|
message_mailer:
|
246
|
+
has_sent_new:
|
247
|
+
event: "has sent a new message to %{receiver}"
|
248
|
+
group: "has sent a new message to %{receiver}"
|
249
|
+
user: "has sent you a new message"
|
250
|
+
has_sent_reply:
|
251
|
+
event: "has sent a reply to %{receiver}"
|
252
|
+
group: "has sent a reply to %{receiver}"
|
253
|
+
user: "has sent you a reply"
|
245
254
|
subject_new: "%{subject}"
|
246
255
|
subject_reply: "%{subject}"
|
247
256
|
notification_mailer:
|
@@ -265,40 +274,46 @@ en:
|
|
265
274
|
sentbox: "Sentbox"
|
266
275
|
trash: "Trash"
|
267
276
|
notification:
|
268
|
-
|
269
|
-
|
270
|
-
user: "%{sender} added %{who} as contact."
|
271
|
-
confirm: "Confirm %{sender.name} as contact?"
|
277
|
+
all_text: "Read the whole text at %{url}"
|
278
|
+
confirm: "Confirm %{sender} as contact?"
|
272
279
|
destroy_sure: "Do you want to delete this notification?"
|
273
280
|
fan: "%{sender} is now %{whose} fan."
|
281
|
+
follow:
|
282
|
+
group: "%{sender} added %{who} as contact."
|
283
|
+
user: "%{sender} added %{who} as contact."
|
274
284
|
like:
|
275
|
-
|
276
|
-
user: "%{sender} likes %{whose} %{
|
277
|
-
look: "Take a look at %{sender
|
285
|
+
group: "%{sender} likes %{whose} %{thing}."
|
286
|
+
user: "%{sender} likes %{whose} %{thing}."
|
287
|
+
look: "Take a look at %{sender}'s wall"
|
278
288
|
makefriend:
|
279
|
-
|
289
|
+
group: "%{sender} also added %{who} as contact."
|
280
290
|
user: "%{sender} also added %{who} as contact."
|
281
291
|
one: "Notification"
|
282
292
|
other: "Notifications"
|
283
293
|
post:
|
284
|
-
|
285
|
-
user: "%{sender} added
|
294
|
+
group: "%{sender} added %{thing} in %{whose} wall."
|
295
|
+
user: "%{sender} added %{thing} in %{whose} wall."
|
286
296
|
read: "Mark as read"
|
287
297
|
read_all: "Mark all as read"
|
288
298
|
unread: "Mark as unread"
|
289
299
|
update:
|
290
|
-
|
291
|
-
user: "%{sender} updated
|
300
|
+
group: "%{sender} updated %{thing} in %{whose} wall."
|
301
|
+
user: "%{sender} updated %{thing} in %{whose} wall."
|
302
|
+
watch: "Watch it at %{url}"
|
303
|
+
watch_it: "Watch it!"
|
292
304
|
who:
|
305
|
+
group: "%{name}"
|
293
306
|
user: "you"
|
294
307
|
whose:
|
295
|
-
|
308
|
+
group: "%{receiver}'s"
|
296
309
|
user: "your"
|
297
310
|
post:
|
298
311
|
confirm_delete: "Delete post?"
|
299
312
|
form:
|
300
313
|
title: "Post"
|
301
314
|
input: "What are you doing?"
|
315
|
+
name: "post"
|
316
|
+
one: "a post"
|
302
317
|
title: "Posts"
|
303
318
|
preposition:
|
304
319
|
and: "and"
|
@@ -437,6 +452,7 @@ en:
|
|
437
452
|
sure: "Are you sure?"
|
438
453
|
time:
|
439
454
|
ago: "%{time} ago"
|
455
|
+
unknown: "Unknown"
|
440
456
|
user:
|
441
457
|
by: "By Users"
|
442
458
|
one: "User"
|
data/base/config/locales/es.yml
CHANGED
@@ -90,6 +90,7 @@ es:
|
|
90
90
|
comment:
|
91
91
|
input: "Comentar..."
|
92
92
|
confirm_delete: "¿Borrar commentario?"
|
93
|
+
name: "un comentario"
|
93
94
|
view_all: "Ver todos los comentarios"
|
94
95
|
contact:
|
95
96
|
all_n: "Todos los contactos (%{count})"
|
@@ -239,6 +240,14 @@ es:
|
|
239
240
|
subject: "Asunto"
|
240
241
|
mark_as_read: "Marcar como leido"
|
241
242
|
message_mailer:
|
243
|
+
has_sent_new:
|
244
|
+
event: "ha mandad un nuevo mensaje a %{receiver}"
|
245
|
+
group: "ha mandad un nuevo mensaje a %{receiver}"
|
246
|
+
user: "te ha mandad un nuevo mensaje"
|
247
|
+
has_sent_reply:
|
248
|
+
event: "ha mandad una respuesta a %{receiver}"
|
249
|
+
group: "ha mandad una respuesta a %{receiver}"
|
250
|
+
user: "te ha mandad una respuesta"
|
242
251
|
subject_new: "%{subject}"
|
243
252
|
subject_reply: "%{subject}"
|
244
253
|
notification_mailer:
|
@@ -262,40 +271,46 @@ es:
|
|
262
271
|
sentbox: "Salida"
|
263
272
|
trash: "Papelera"
|
264
273
|
notification:
|
265
|
-
|
266
|
-
|
267
|
-
user: "%{sender} te añadió como contacto."
|
268
|
-
confirm: "¿Confirmar contacto con %{sender.name}?"
|
274
|
+
all_text: "Lee el texto entero en %{url}"
|
275
|
+
confirm: "¿Confirmar contacto con %{sender}?"
|
269
276
|
destroy_sure: "¿Borrar notificación?"
|
270
277
|
fan: "%{sender} es ahora fan %{whose}."
|
278
|
+
follow:
|
279
|
+
group: "%{sender} añadió a %{who} como contacto."
|
280
|
+
user: "%{sender} te añadió como contacto."
|
271
281
|
like:
|
272
|
-
|
273
|
-
user: "A %{sender} le gusta tu %{
|
274
|
-
look: "
|
282
|
+
group: "A %{sender} le gusta el %{thing} %{whose}."
|
283
|
+
user: "A %{sender} le gusta tu %{thing}."
|
284
|
+
look: "Echa un vistazo al muro de %{sender}"
|
275
285
|
makefriend:
|
276
|
-
|
286
|
+
group: "%{sender} también añadió a %{who} como contacto."
|
277
287
|
user: "%{sender} también te añadió como contacto."
|
278
288
|
one: "Notificación"
|
279
289
|
other: "Notificaciones"
|
280
290
|
post:
|
281
|
-
|
282
|
-
user: "%{sender} añadió %{
|
291
|
+
group: "%{sender} añadió %{thing} en el muro %{whose}."
|
292
|
+
user: "%{sender} añadió %{thing} en tu muro."
|
283
293
|
read: "Marcar como leída"
|
284
294
|
read_all: "Marcar todas como leídas"
|
285
295
|
unread: "Marcar como no leídas"
|
286
296
|
update:
|
287
|
-
|
288
|
-
user: "%{sender} actualizó %{
|
297
|
+
group: "%{sender} actualizó %{thing} en el muro %{whose}."
|
298
|
+
user: "%{sender} actualizó %{thing} en tu muro."
|
299
|
+
watch: "Échale un vistazo en %{url}"
|
300
|
+
watch_it: "¡Échale un vistazo!"
|
289
301
|
who:
|
302
|
+
group: "%{name}"
|
290
303
|
user: "tú"
|
291
304
|
whose:
|
305
|
+
group: "de %{receiver}"
|
292
306
|
user: "tuyo"
|
293
|
-
others: "de %{receiver}"
|
294
307
|
post:
|
295
308
|
confirm_delete: "¿Borrar texto?"
|
296
309
|
form:
|
297
310
|
title: "Texto"
|
298
311
|
input: "¿Qué quieres compartir?"
|
312
|
+
name: "publicación"
|
313
|
+
one: "una publicación"
|
299
314
|
title: "Textos"
|
300
315
|
profile:
|
301
316
|
one: "Perfil"
|
@@ -432,6 +447,7 @@ es:
|
|
432
447
|
sure: "¿Seguro?"
|
433
448
|
time:
|
434
449
|
ago: "hace %{time}"
|
450
|
+
unknown: "Desconocido"
|
435
451
|
user:
|
436
452
|
by: "Por usuarios"
|
437
453
|
one: "Usuario"
|
@@ -24,10 +24,10 @@ module Mailboxer
|
|
24
24
|
if activity.direct_object.present?
|
25
25
|
object = activity.direct_object
|
26
26
|
object = object.subject if object.is_a? Actor
|
27
|
-
notification_text=notification_text.gsub(/\%\{object\}/,link_to(object.class.to_s.underscore,
|
27
|
+
notification_text=notification_text.gsub(/\%\{object\}/,link_to(t(object.class.to_s.underscore+".name"),
|
28
28
|
url_for(:controller=> object.class.to_s.underscore.pluralize, :action=> :show,
|
29
29
|
:id=> object.id, :only_path => false)))
|
30
|
-
notification_text=notification_text.gsub(/\%\{object.name\}/,object.class.to_s.underscore)
|
30
|
+
notification_text=notification_text.gsub(/\%\{object.name\}/,t(object.class.to_s.underscore+".name"))
|
31
31
|
|
32
32
|
|
33
33
|
|
@@ -44,8 +44,8 @@ module Mailboxer
|
|
44
44
|
#notification_text=notification_text.gsub(/\%\{object.image\}/,thumb_for(object)) if SocialStream.activity_forms.include? :document and object.is_a? Document
|
45
45
|
|
46
46
|
else
|
47
|
-
notification_text=notification_text.gsub(/\%\{object\}/,
|
48
|
-
notification_text=notification_text.gsub(/\%\{object.name\}/,
|
47
|
+
notification_text=notification_text.gsub(/\%\{object\}/,t('unknown'))
|
48
|
+
notification_text=notification_text.gsub(/\%\{object.name\}/,t('unknown'))
|
49
49
|
end
|
50
50
|
|
51
51
|
notification_text
|
@@ -55,7 +55,9 @@ module Mailboxer
|
|
55
55
|
return if activity.nil?
|
56
56
|
notification_text = notification_text.gsub(/\%\{sender\}/, truncate_name(activity.sender.name))
|
57
57
|
notification_text = notification_text.gsub(/\%\{confirm\}/,t('notification.confirm'))
|
58
|
-
notification_text = notification_text.gsub(/\%\{look\}/,t('notification.look')
|
58
|
+
notification_text = notification_text.gsub(/\%\{look\}/,t('notification.look') + ": "+
|
59
|
+
url_for(:controller=> activity.sender.subject.class.to_s.underscore.pluralize,
|
60
|
+
:action=> :show, :id=> activity.sender.subject.slug, :only_path => false))
|
59
61
|
notification_text = notification_text.gsub(/\%\{sender.name\}/,truncate_name(activity.sender.name))
|
60
62
|
|
61
63
|
if activity.receiver.subject.is_a?(User)
|
@@ -70,15 +72,15 @@ module Mailboxer
|
|
70
72
|
if activity.direct_object.present?
|
71
73
|
object = activity.direct_object
|
72
74
|
object = object.subject if object.is_a? Actor
|
73
|
-
notification_text=notification_text.gsub(/\%\{object\}/,object.class.to_s.underscore)
|
74
|
-
notification_text=notification_text.gsub(/\%\{object.name\}/,object.class.to_s.underscore)
|
75
|
+
notification_text=notification_text.gsub(/\%\{object\}/,t(object.class.to_s.underscore+".name"))
|
76
|
+
notification_text=notification_text.gsub(/\%\{object.name\}/,t(object.class.to_s.underscore+".name"))
|
75
77
|
notification_text=notification_text.gsub(/\%\{object.text\}/,object.text.truncate(100, :separator =>' ')) if object.respond_to? :text
|
76
78
|
|
77
79
|
#notification_text=notification_text.gsub(/\%\{object.image\}/,thumb_for(object)) if SocialStream.activity_forms.include? :document and object.is_a? Document
|
78
80
|
|
79
81
|
else
|
80
|
-
notification_text=notification_text.gsub(/\%\{object\}/,
|
81
|
-
notification_text=notification_text.gsub(/\%\{object.name\}/,
|
82
|
+
notification_text=notification_text.gsub(/\%\{object\}/,t('unknown'))
|
83
|
+
notification_text=notification_text.gsub(/\%\{object.name\}/,t('unknown'))
|
82
84
|
end
|
83
85
|
|
84
86
|
notification_text
|