Commit aa63021fbf138057dd03697e8b5a2d61f6d9baba
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branches 'AI3126-notification-plugin' and 'rails3_stable' into rails3_stable
Showing
6 changed files
with
83 additions
and
83 deletions
Show diff stats
plugins/notification/views/notification_plugin_admin/index.html.erb
0 → 100644
| @@ -0,0 +1,20 @@ | @@ -0,0 +1,20 @@ | ||
| 1 | +<h1><%= _('Notification settings')%></h1> | ||
| 2 | + | ||
| 3 | +<% form_for(:settings) do |f| %> | ||
| 4 | + | ||
| 5 | + <div id="notification-config-fields"> | ||
| 6 | + </div> | ||
| 7 | + <%= labelled_form_field _('Noitification Categories'), f.text_field(:categories) %> | ||
| 8 | + <%= button_to_remote_without_text(:add, _('Add New Category'), | ||
| 9 | + :update => 'notification-config-fields', | ||
| 10 | + :loading => '$("notification-config-fields").addClassName("loading")', | ||
| 11 | + :complete => '$("notification-config-fields").removeClassName("loading")', | ||
| 12 | + :url => { :action => 'create'}) | ||
| 13 | + %> | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + <% button_bar do %> | ||
| 17 | + <%= submit_button(:save, _('Save'), :cancel => {:action => 'create'}) %> | ||
| 18 | + <% end %> | ||
| 19 | +<% end %> | ||
| 20 | + |
plugins/notification/views/notification_plugin_admin/index.rhtml
| @@ -1,20 +0,0 @@ | @@ -1,20 +0,0 @@ | ||
| 1 | -<h1><%= _('Notification settings')%></h1> | ||
| 2 | - | ||
| 3 | -<% form_for(:settings) do |f| %> | ||
| 4 | - | ||
| 5 | - <div id="notification-config-fields"> | ||
| 6 | - </div> | ||
| 7 | - <%= labelled_form_field _('Noitification Categories'), f.text_field(:categories) %> | ||
| 8 | - <%= button_to_remote_without_text(:add, _('Add New Category'), | ||
| 9 | - :update => 'notification-config-fields', | ||
| 10 | - :loading => '$("notification-config-fields").addClassName("loading")', | ||
| 11 | - :complete => '$("notification-config-fields").removeClassName("loading")', | ||
| 12 | - :url => { :action => 'create'}) | ||
| 13 | - %> | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - <% button_bar do %> | ||
| 17 | - <%= submit_button(:save, _('Save'), :cancel => {:action => 'create'}) %> | ||
| 18 | - <% end %> | ||
| 19 | -<% end %> | ||
| 20 | - |
plugins/notification/views/notification_plugin_profile/_event.html.erb
0 → 100644
| @@ -0,0 +1,9 @@ | @@ -0,0 +1,9 @@ | ||
| 1 | +<li> | ||
| 2 | + <div class='title'><%= event.title %></div> | ||
| 3 | + <span class='created_by'> | ||
| 4 | + <%= _("%{author} on %{date}") % {:author => event.author_name, :date => show_time(event.created_at) } %> | ||
| 5 | + </span> | ||
| 6 | + <div class='body'> | ||
| 7 | + <%= event.body %> | ||
| 8 | + </div> | ||
| 9 | +</li> |
plugins/notification/views/notification_plugin_profile/_event.rhtml
| @@ -1,9 +0,0 @@ | @@ -1,9 +0,0 @@ | ||
| 1 | -<li> | ||
| 2 | - <div class='title'><%= event.title %></div> | ||
| 3 | - <span class='created_by'> | ||
| 4 | - <%= _("%{author} on %{date}") % {:author => event.author_name, :date => show_time(event.created_at) } %> | ||
| 5 | - </span> | ||
| 6 | - <div class='body'> | ||
| 7 | - <%= event.body %> | ||
| 8 | - </div> | ||
| 9 | -</li> |
plugins/notification/views/notification_plugin_profile/lobby_notes.html.erb
0 → 100644
| @@ -0,0 +1,54 @@ | @@ -0,0 +1,54 @@ | ||
| 1 | +<% extend NotificationPlugin::Helpers::ViewerHelper %> | ||
| 2 | + | ||
| 3 | +<%= lobby_notes_plugin_stylesheet %> | ||
| 4 | + | ||
| 5 | +<script type="text/javascript"> | ||
| 6 | + | ||
| 7 | +function update_stream(recursive) { | ||
| 8 | + jQuery.ajax({ | ||
| 9 | + url: '/profile/<%= params[:profile] %>/plugin/notification/lobby_notes', | ||
| 10 | + type: 'get', | ||
| 11 | + start : jQuery('#lobby-notes').addClass("loading"), | ||
| 12 | + success: function(data) { | ||
| 13 | + jQuery("#lobby-note-elements").html(data); | ||
| 14 | + jQuery("#lobby-notes").removeClass("loading"); | ||
| 15 | + }, | ||
| 16 | + error: function(ajax, stat, errorThrown) { | ||
| 17 | + } | ||
| 18 | + }); | ||
| 19 | + | ||
| 20 | + if (recursive) { | ||
| 21 | + setTimeout(function() { | ||
| 22 | + update_stream(true); | ||
| 23 | + }, 10000); | ||
| 24 | + } | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +jQuery(document).ready(function() { | ||
| 28 | + jQuery('#lobby-notes').addClass("loading"); | ||
| 29 | + | ||
| 30 | + update_stream(true); | ||
| 31 | +}); | ||
| 32 | + | ||
| 33 | +</script> | ||
| 34 | + | ||
| 35 | +<div id='lobby-notes' class='lobby-notes'> | ||
| 36 | + | ||
| 37 | + <div class='lobby-header'> | ||
| 38 | + <%= image_tag profile.profile_custom_image(:thumb) %> | ||
| 39 | + <h1> | ||
| 40 | + <%= @profile.name %> | ||
| 41 | + </h1> | ||
| 42 | + <h2><%= _("You have %s notifications (%s)") % [ @events.count, show_date(@date)] %></h2> | ||
| 43 | + <div class='before'> | ||
| 44 | + <%= | ||
| 45 | +#link_to _('Before'), {:action => 'lobby_notes'} | ||
| 46 | +%> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + | ||
| 50 | + <ul id='lobby-note-elements'> | ||
| 51 | + <%= render :partial => 'event', :collection => @events %> | ||
| 52 | + </ul> | ||
| 53 | + | ||
| 54 | +</div> |
plugins/notification/views/notification_plugin_profile/lobby_notes.rhtml
| @@ -1,54 +0,0 @@ | @@ -1,54 +0,0 @@ | ||
| 1 | -<% extend NotificationPlugin::Helpers::ViewerHelper %> | ||
| 2 | - | ||
| 3 | -<%= lobby_notes_plugin_stylesheet %> | ||
| 4 | - | ||
| 5 | -<script type="text/javascript"> | ||
| 6 | - | ||
| 7 | -function update_stream(recursive) { | ||
| 8 | - jQuery.ajax({ | ||
| 9 | - url: '/profile/<%= params[:profile] %>/plugin/notification/lobby_notes', | ||
| 10 | - type: 'get', | ||
| 11 | - start : jQuery('#lobby-notes').addClass("loading"), | ||
| 12 | - success: function(data) { | ||
| 13 | - jQuery("#lobby-note-elements").html(data); | ||
| 14 | - jQuery("#lobby-notes").removeClass("loading"); | ||
| 15 | - }, | ||
| 16 | - error: function(ajax, stat, errorThrown) { | ||
| 17 | - } | ||
| 18 | - }); | ||
| 19 | - | ||
| 20 | - if (recursive) { | ||
| 21 | - setTimeout(function() { | ||
| 22 | - update_stream(true); | ||
| 23 | - }, 10000); | ||
| 24 | - } | ||
| 25 | -} | ||
| 26 | - | ||
| 27 | -jQuery(document).ready(function() { | ||
| 28 | - jQuery('#lobby-notes').addClass("loading"); | ||
| 29 | - | ||
| 30 | - update_stream(true); | ||
| 31 | -}); | ||
| 32 | - | ||
| 33 | -</script> | ||
| 34 | - | ||
| 35 | -<div id='lobby-notes' class='lobby-notes'> | ||
| 36 | - | ||
| 37 | - <div class='lobby-header'> | ||
| 38 | - <%= image_tag profile.profile_custom_image(:thumb) %> | ||
| 39 | - <h1> | ||
| 40 | - <%= @profile.name %> | ||
| 41 | - </h1> | ||
| 42 | - <h2><%= _("You have %s notifications (%s)") % [ @events.count, show_date(@date)] %></h2> | ||
| 43 | - <div class='before'> | ||
| 44 | - <%= | ||
| 45 | -#link_to _('Before'), {:action => 'lobby_notes'} | ||
| 46 | -%> | ||
| 47 | - </div> | ||
| 48 | - </div> | ||
| 49 | - | ||
| 50 | - <ul id='lobby-note-elements'> | ||
| 51 | - <%= render :partial => 'event', :collection => @events %> | ||
| 52 | - </ul> | ||
| 53 | - | ||
| 54 | -</div> |