Commit 8e21cd98e2b9ee6fe0645dea4cc94249f2336279
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'stable' of gitlab.com:participa/noosfero into stable
Showing
4 changed files
with
11 additions
and
10 deletions
Show diff stats
plugins/comment_paragraph/public/comment_paragraph_macro.js
@@ -51,9 +51,7 @@ jQuery(document).ready(function($) { | @@ -51,9 +51,7 @@ jQuery(document).ready(function($) { | ||
51 | div.addClass('opened'); | 51 | div.addClass('opened'); |
52 | } | 52 | } |
53 | } | 53 | } |
54 | - | ||
55 | - //Hides old style ballons | ||
56 | - $("img[alt|=Comments]").hide(); | 54 | + |
57 | rangy.init(); | 55 | rangy.init(); |
58 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); | 56 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); |
59 | //Add marked text bubble | 57 | //Add marked text bubble |
plugins/comment_paragraph/public/images/comments.gif
1.66 KB
plugins/comment_paragraph/views/comment_paragraph_plugin_profile/_comment_paragraph.html.erb
1 | <div class="comments"> | 1 | <div class="comments"> |
2 | <table border="0"> | 2 | <table border="0"> |
3 | - <tr> | ||
4 | - <td width="90%"> | ||
5 | - <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>"> | ||
6 | - <%= inner_html %> | ||
7 | - </div> | ||
8 | - </td> | 3 | + <tr> |
4 | + <td width="90%"> | ||
5 | + <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>"> | ||
6 | + <%= inner_html %> | ||
7 | + </div> | ||
8 | + </td> | ||
9 | <td> | 9 | <td> |
10 | <div align="center" class="side-comments-counter" id="side_comments_counter_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="vertical-align: middle; padding-left: 3px; padding-right: 5px;"> | 10 | <div align="center" class="side-comments-counter" id="side_comments_counter_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="vertical-align: middle; padding-left: 3px; padding-right: 5px;"> |
11 | <span id="comment-count-<%= paragraph_id %>" class='comment-count'> | 11 | <span id="comment-count-<%= paragraph_id %>" class='comment-count'> |
@@ -15,10 +15,11 @@ | @@ -15,10 +15,11 @@ | ||
15 | </td> | 15 | </td> |
16 | <td valign="top"> | 16 | <td valign="top"> |
17 | <div align="center"> | 17 | <div align="center"> |
18 | + <% if logged_in? %> | ||
18 | <%= | 19 | <%= |
19 | url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_id => paragraph_id, :article_id => article_id} | 20 | url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_id => paragraph_id, :article_id => article_id} |
20 | link_to_remote( | 21 | link_to_remote( |
21 | - image_tag("/plugins/comment_paragraph/images/comments.gif"), | 22 | + '', |
22 | { | 23 | { |
23 | :url => url, | 24 | :url => url, |
24 | :method => :post, | 25 | :method => :post, |
@@ -30,6 +31,7 @@ | @@ -30,6 +31,7 @@ | ||
30 | :'data-url' => url_for(url) | 31 | :'data-url' => url_for(url) |
31 | } | 32 | } |
32 | )%> | 33 | )%> |
34 | + <% end %> | ||
33 | </div> | 35 | </div> |
34 | <div class="side-comment" id="side_comment_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="display:none"> | 36 | <div class="side-comment" id="side_comment_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="display:none"> |
35 | <div class="comment-paragraph-loading-<%= paragraph_id %>" style="position: absolute;"> | 37 | <div class="comment-paragraph-loading-<%= paragraph_id %>" style="position: absolute;"> |
plugins/community_track/lib/community_track_plugin.rb
@@ -13,6 +13,7 @@ class CommunityTrackPlugin < Noosfero::Plugin | @@ -13,6 +13,7 @@ class CommunityTrackPlugin < Noosfero::Plugin | ||
13 | end | 13 | end |
14 | 14 | ||
15 | def content_types | 15 | def content_types |
16 | + return [] if !context.kind_of?(CmsController) | ||
16 | if context.respond_to?(:params) && context.params | 17 | if context.respond_to?(:params) && context.params |
17 | types = [] | 18 | types = [] |
18 | parent_id = context.params[:parent_id] | 19 | parent_id = context.params[:parent_id] |