Commit bb2b021fad5183013111d7b12199ed06c50f1a87
1 parent
abea17e3
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
rename partials
Showing
14 changed files
with
160 additions
and
160 deletions
Show diff stats
plugins/community_hub/views/community_hub_plugin_public/_banner.html.erb
0 → 100644
plugins/community_hub/views/community_hub_plugin_public/_banner.rhtml
plugins/community_hub/views/community_hub_plugin_public/_embed.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | +<% extend CommunityHubPlugin::HubHelper %> | |
| 2 | + | |
| 3 | +<div class="embed"> | |
| 4 | + <span class="label">Embed / <%= _("Embed") %></span> | |
| 5 | + <textarea cols="38" | |
| 6 | + id="comment_body" | |
| 7 | + name="comment[body]" | |
| 8 | + rows="10" | |
| 9 | + class="code" | |
| 10 | + style="width: 99%;"><%= embed_code(@page) %></textarea> | |
| 11 | +</div> | |
| 0 | 12 | \ No newline at end of file | ... | ... |
plugins/community_hub/views/community_hub_plugin_public/_embed.rhtml
| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | -<% extend CommunityHubPlugin::HubHelper %> | |
| 2 | - | |
| 3 | -<div class="embed"> | |
| 4 | - <span class="label">Embed / <%= _("Embed") %></span> | |
| 5 | - <textarea cols="38" | |
| 6 | - id="comment_body" | |
| 7 | - name="comment[body]" | |
| 8 | - rows="10" | |
| 9 | - class="code" | |
| 10 | - style="width: 99%;"><%= embed_code(@page) %></textarea> | |
| 11 | -</div> | |
| 12 | 0 | \ No newline at end of file |
plugins/community_hub/views/community_hub_plugin_public/_mediation.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,87 @@ |
| 1 | +<% extend CommunityHubPlugin::HubHelper %> | |
| 2 | + | |
| 3 | +<li id="<%= mediation.id %>" class="post"> | |
| 4 | + | |
| 5 | + <ul> | |
| 6 | + <li class="time"><%= post_time(mediation.created_at) %></li> | |
| 7 | + | |
| 8 | + <li class="avatar"> | |
| 9 | + <% if mediation.source == 'twitter' %> | |
| 10 | + <%= image_tag(mediation.profile_picture, :alt => "Twitter") %> | |
| 11 | + <% elsif mediation.source == 'facebook' %> | |
| 12 | + <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> | |
| 13 | + <% else %> | |
| 14 | + <%= image_tag(profile_icon(mediation.author, :minor)) if mediation.author %> | |
| 15 | + <% end %> | |
| 16 | + </li> | |
| 17 | + <li class="message"><span class="author"><%= mediation.setting[:author_name] %>:</span> <%= mediation.body %></li> | |
| 18 | + | |
| 19 | + <% if mediator?(hub) %> | |
| 20 | + <li class="mediation-bar"> | |
| 21 | + | |
| 22 | + <ul> | |
| 23 | + | |
| 24 | + <% if mediation.source != 'twitter' && mediation.source != 'facebook' %> | |
| 25 | + | |
| 26 | + <li class="promote"> | |
| 27 | + <% if !promoted?(hub, mediation.author.id) %> | |
| 28 | + <a id="<%= mediation.id %>" href="#" onclick="promote_user(<%= mediation.id %>,<%= mediation.author.id %>); return false;"> | |
| 29 | + <img class="not-promoted" src="/plugins/community_hub/icons/hub-not-promote-icon.png" title="<%= _("User not promoted") %>" /> | |
| 30 | + </a> | |
| 31 | + <% else %> | |
| 32 | + <img class="promoted" src="/plugins/community_hub/icons/hub-not-promote-icon.png" title="<%= _("User promoted") %>" /> | |
| 33 | + <% end %> | |
| 34 | + </li> | |
| 35 | + | |
| 36 | + <% end %> | |
| 37 | + | |
| 38 | + <% if pinned_mediation?(hub, mediation.id) %> | |
| 39 | + <li class="pin"> | |
| 40 | + <img class="pinned" src="/plugins/community_hub/icons/hub-not-pinned-icon.png" title="<%= _("Message pinned")%>" /> | |
| 41 | + </li> | |
| 42 | + <% end %> | |
| 43 | + | |
| 44 | + </ul> | |
| 45 | + | |
| 46 | + </li> | |
| 47 | + <% end %> | |
| 48 | + | |
| 49 | + </ul> | |
| 50 | + | |
| 51 | + <% total_mediation_comments = mediation.comments.count %> | |
| 52 | + | |
| 53 | + <span class="comment-count"> | |
| 54 | + <%= link_to( "<span id='mediation-comment-total-#{mediation.id}'>#{total_mediation_comments}</span> " + _("Comments") , '#', | |
| 55 | + :class => 'display-comment-form', | |
| 56 | + :id => 'top-post-comment-button', | |
| 57 | + :onclick => "toogle_mediation_comments(#{mediation.id}); return false;") %> | |
| 58 | + </span> | |
| 59 | + | |
| 60 | + <script type="text/javascript"> | |
| 61 | + mediations.push( [ <%= mediation.id %>, setInterval(function() { update_mediation_comments('<%= mediation.id %>', false)}, 5000) ] ); | |
| 62 | + </script> | |
| 63 | + | |
| 64 | + <ul id="mediation-comment-list-<%=mediation.id%>" class="mediation-comment-list" style="display:none;"> | |
| 65 | + <% if mediation.accept_comments? && mediation.comments.count > 0 %> | |
| 66 | + <%= render :partial => 'community_hub_plugin_public/mediation_comment', :collection => mediation.comments %> | |
| 67 | + <% end %> | |
| 68 | + </ul> | |
| 69 | + | |
| 70 | + <% if logged_in? && mediation.accept_comments? %> | |
| 71 | + <div id='mediation-comment-form-<%=mediation.id%>' class='mediation-comment-form' style="display:none;"> | |
| 72 | + <%= render :partial => 'community_hub_plugin_public/mediation_comment_form', | |
| 73 | + :locals => { | |
| 74 | + :hub => hub, | |
| 75 | + :mediation => mediation, | |
| 76 | + :comment => Comment.new, | |
| 77 | + :url => { | |
| 78 | + :controller => :comment, | |
| 79 | + :action => :create | |
| 80 | + }, | |
| 81 | + :display_link => true, | |
| 82 | + :cancel_triggers_hide => true | |
| 83 | + } %> | |
| 84 | + </div> | |
| 85 | + <% end %> | |
| 86 | + | |
| 87 | +</li> | ... | ... |
plugins/community_hub/views/community_hub_plugin_public/_mediation.rhtml
| ... | ... | @@ -1,87 +0,0 @@ |
| 1 | -<% extend CommunityHubPlugin::HubHelper %> | |
| 2 | - | |
| 3 | -<li id="<%= mediation.id %>" class="post"> | |
| 4 | - | |
| 5 | - <ul> | |
| 6 | - <li class="time"><%= post_time(mediation.created_at) %></li> | |
| 7 | - | |
| 8 | - <li class="avatar"> | |
| 9 | - <% if mediation.source == 'twitter' %> | |
| 10 | - <%= image_tag(mediation.profile_picture, :alt => "Twitter") %> | |
| 11 | - <% elsif mediation.source == 'facebook' %> | |
| 12 | - <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> | |
| 13 | - <% else %> | |
| 14 | - <%= image_tag(profile_icon(mediation.author, :minor)) if mediation.author %> | |
| 15 | - <% end %> | |
| 16 | - </li> | |
| 17 | - <li class="message"><span class="author"><%= mediation.setting[:author_name] %>:</span> <%= mediation.body %></li> | |
| 18 | - | |
| 19 | - <% if mediator?(hub) %> | |
| 20 | - <li class="mediation-bar"> | |
| 21 | - | |
| 22 | - <ul> | |
| 23 | - | |
| 24 | - <% if mediation.source != 'twitter' && mediation.source != 'facebook' %> | |
| 25 | - | |
| 26 | - <li class="promote"> | |
| 27 | - <% if !promoted?(hub, mediation.author.id) %> | |
| 28 | - <a id="<%= mediation.id %>" href="#" onclick="promote_user(<%= mediation.id %>,<%= mediation.author.id %>); return false;"> | |
| 29 | - <img class="not-promoted" src="/plugins/community_hub/icons/hub-not-promote-icon.png" title="<%= _("User not promoted") %>" /> | |
| 30 | - </a> | |
| 31 | - <% else %> | |
| 32 | - <img class="promoted" src="/plugins/community_hub/icons/hub-not-promote-icon.png" title="<%= _("User promoted") %>" /> | |
| 33 | - <% end %> | |
| 34 | - </li> | |
| 35 | - | |
| 36 | - <% end %> | |
| 37 | - | |
| 38 | - <% if pinned_mediation?(hub, mediation.id) %> | |
| 39 | - <li class="pin"> | |
| 40 | - <img class="pinned" src="/plugins/community_hub/icons/hub-not-pinned-icon.png" title="<%= _("Message pinned")%>" /> | |
| 41 | - </li> | |
| 42 | - <% end %> | |
| 43 | - | |
| 44 | - </ul> | |
| 45 | - | |
| 46 | - </li> | |
| 47 | - <% end %> | |
| 48 | - | |
| 49 | - </ul> | |
| 50 | - | |
| 51 | - <% total_mediation_comments = mediation.comments.count %> | |
| 52 | - | |
| 53 | - <span class="comment-count"> | |
| 54 | - <%= link_to( "<span id='mediation-comment-total-#{mediation.id}'>#{total_mediation_comments}</span> " + _("Comments") , '#', | |
| 55 | - :class => 'display-comment-form', | |
| 56 | - :id => 'top-post-comment-button', | |
| 57 | - :onclick => "toogle_mediation_comments(#{mediation.id}); return false;") %> | |
| 58 | - </span> | |
| 59 | - | |
| 60 | - <script type="text/javascript"> | |
| 61 | - mediations.push( [ <%= mediation.id %>, setInterval(function() { update_mediation_comments('<%= mediation.id %>', false)}, 5000) ] ); | |
| 62 | - </script> | |
| 63 | - | |
| 64 | - <ul id="mediation-comment-list-<%=mediation.id%>" class="mediation-comment-list" style="display:none;"> | |
| 65 | - <% if mediation.accept_comments? && mediation.comments.count > 0 %> | |
| 66 | - <%= render :partial => 'community_hub_plugin_public/mediation_comment', :collection => mediation.comments %> | |
| 67 | - <% end %> | |
| 68 | - </ul> | |
| 69 | - | |
| 70 | - <% if logged_in? && mediation.accept_comments? %> | |
| 71 | - <div id='mediation-comment-form-<%=mediation.id%>' class='mediation-comment-form' style="display:none;"> | |
| 72 | - <%= render :partial => 'community_hub_plugin_public/mediation_comment_form', | |
| 73 | - :locals => { | |
| 74 | - :hub => hub, | |
| 75 | - :mediation => mediation, | |
| 76 | - :comment => Comment.new, | |
| 77 | - :url => { | |
| 78 | - :controller => :comment, | |
| 79 | - :action => :create | |
| 80 | - }, | |
| 81 | - :display_link => true, | |
| 82 | - :cancel_triggers_hide => true | |
| 83 | - } %> | |
| 84 | - </div> | |
| 85 | - <% end %> | |
| 86 | - | |
| 87 | -</li> |
plugins/community_hub/views/community_hub_plugin_public/_mediation_comment.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | +<li id="<%= mediation_comment.id %>" class="mediation-comment"> | |
| 2 | + <ul> | |
| 3 | + <li class="avatar"><%= image_tag(profile_icon(mediation_comment.author, :minor)) %></li> | |
| 4 | + <li class="message"><span class="author"><%= mediation_comment.author_name %>:</span> <%= mediation_comment.body %></li> | |
| 5 | + </ul> | |
| 6 | +</li> | |
| 0 | 7 | \ No newline at end of file | ... | ... |
plugins/community_hub/views/community_hub_plugin_public/_mediation_comment.rhtml
| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | -<li id="<%= mediation_comment.id %>" class="mediation-comment"> | |
| 2 | - <ul> | |
| 3 | - <li class="avatar"><%= image_tag(profile_icon(mediation_comment.author, :minor)) %></li> | |
| 4 | - <li class="message"><span class="author"><%= mediation_comment.author_name %>:</span> <%= mediation_comment.body %></li> | |
| 5 | - </ul> | |
| 6 | -</li> | |
| 7 | 0 | \ No newline at end of file |
plugins/community_hub/views/community_hub_plugin_public/_mediation_comment_form.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | +<% form_for :message, | |
| 2 | + :method => 'post', | |
| 3 | + :url => { | |
| 4 | + :controller => 'community_hub_plugin_public', | |
| 5 | + :action => 'new_message', | |
| 6 | + :article_id => mediation.id | |
| 7 | + } do |f| %> | |
| 8 | + <%= f.text_area(:body, | |
| 9 | + :rows => 4, | |
| 10 | + :placeholder => _('Type your comment here')) %> | |
| 11 | + <%= submit_button('add', _('Post'), :onclick => "new_mediation_comment(this,#{mediation.id}); return false;") %> | |
| 12 | +<% end %> | ... | ... |
plugins/community_hub/views/community_hub_plugin_public/_mediation_comment_form.rhtml
| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | -<% form_for :message, | |
| 2 | - :method => 'post', | |
| 3 | - :url => { | |
| 4 | - :controller => 'community_hub_plugin_public', | |
| 5 | - :action => 'new_message', | |
| 6 | - :article_id => mediation.id | |
| 7 | - } do |f| %> | |
| 8 | - <%= f.text_area(:body, | |
| 9 | - :rows => 4, | |
| 10 | - :placeholder => _('Type your comment here')) %> | |
| 11 | - <%= submit_button('add', _('Post'), :onclick => "new_mediation_comment(this,#{mediation.id}); return false;") %> | |
| 12 | -<% end %> |
plugins/community_hub/views/community_hub_plugin_public/_post.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,34 @@ |
| 1 | +<% extend CommunityHubPlugin::HubHelper %> | |
| 2 | + | |
| 3 | +<li id="<%= post.id %>" class="post"> | |
| 4 | + <ul> | |
| 5 | + <li class="time"><%= post_time(post.created_at) %></li> | |
| 6 | + <li class="avatar"> | |
| 7 | + <% if post.title == 'hub-message-twitter' %> | |
| 8 | + <%= image_tag(post.profile_picture, :alt => "Twitter") %> | |
| 9 | + <% elsif post.title == 'hub-message-facebook' %> | |
| 10 | + <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> | |
| 11 | + <% else %> | |
| 12 | + <%= image_tag(profile_icon(post.author, :minor)) if post.author %> | |
| 13 | + <% end %> | |
| 14 | + </li> | |
| 15 | + <li class="message"><span class="author"><%= post.author_name %>:</span> <%= post.body %></li> | |
| 16 | + | |
| 17 | + <% if mediator?(hub) && post.title != 'hub-message-facebook' %> | |
| 18 | + <li class="mediation-bar"> | |
| 19 | + <ul> | |
| 20 | + <li class="pin"> | |
| 21 | + <% if !pinned_message?(hub, post.id) %> | |
| 22 | + <a id="<%= post.id %>" href="#" onclick="pin_message(<%= post.id %>); return false;"> | |
| 23 | + <img class="not-pinned" src="/plugins/community_hub/icons/hub-pinned-icon.png" title="<%= _("Pin message")%>" /> | |
| 24 | + </a> | |
| 25 | + <% else %> | |
| 26 | + <img class="pinned" src="/plugins/community_hub/icons/hub-not-pinned-icon.png" title="<%= _("Message pinned")%>" /> | |
| 27 | + <% end %> | |
| 28 | + </li> | |
| 29 | + </ul> | |
| 30 | + </li> | |
| 31 | + <% end %> | |
| 32 | + | |
| 33 | + </ul> | |
| 34 | +</li> | ... | ... |
plugins/community_hub/views/community_hub_plugin_public/_post.rhtml
| ... | ... | @@ -1,34 +0,0 @@ |
| 1 | -<% extend CommunityHubPlugin::HubHelper %> | |
| 2 | - | |
| 3 | -<li id="<%= post.id %>" class="post"> | |
| 4 | - <ul> | |
| 5 | - <li class="time"><%= post_time(post.created_at) %></li> | |
| 6 | - <li class="avatar"> | |
| 7 | - <% if post.title == 'hub-message-twitter' %> | |
| 8 | - <%= image_tag(post.profile_picture, :alt => "Twitter") %> | |
| 9 | - <% elsif post.title == 'hub-message-facebook' %> | |
| 10 | - <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> | |
| 11 | - <% else %> | |
| 12 | - <%= image_tag(profile_icon(post.author, :minor)) if post.author %> | |
| 13 | - <% end %> | |
| 14 | - </li> | |
| 15 | - <li class="message"><span class="author"><%= post.author_name %>:</span> <%= post.body %></li> | |
| 16 | - | |
| 17 | - <% if mediator?(hub) && post.title != 'hub-message-facebook' %> | |
| 18 | - <li class="mediation-bar"> | |
| 19 | - <ul> | |
| 20 | - <li class="pin"> | |
| 21 | - <% if !pinned_message?(hub, post.id) %> | |
| 22 | - <a id="<%= post.id %>" href="#" onclick="pin_message(<%= post.id %>); return false;"> | |
| 23 | - <img class="not-pinned" src="/plugins/community_hub/icons/hub-pinned-icon.png" title="<%= _("Pin message")%>" /> | |
| 24 | - </a> | |
| 25 | - <% else %> | |
| 26 | - <img class="pinned" src="/plugins/community_hub/icons/hub-not-pinned-icon.png" title="<%= _("Message pinned")%>" /> | |
| 27 | - <% end %> | |
| 28 | - </li> | |
| 29 | - </ul> | |
| 30 | - </li> | |
| 31 | - <% end %> | |
| 32 | - | |
| 33 | - </ul> | |
| 34 | -</li> |
plugins/community_hub/views/community_hub_plugin_public/_settings.html.erb
0 → 100644
plugins/community_hub/views/community_hub_plugin_public/_settings.rhtml