Commit 91261f4b752c3f73289500957e8a5f90fd0437d4
Exists in
master
and in
29 other branches
Merge branch 'some-bug-fixes' into 'master'
Some bug fixes for Noosfero 1.3 This merge request contains a few bug fixes that were reported during pre release testing of Noosfero 1.3. See commits for reference of issues. See merge request !716
Showing
10 changed files
with
21 additions
and
12 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
@@ -27,7 +27,7 @@ class CmsController < MyProfileController | @@ -27,7 +27,7 @@ class CmsController < MyProfileController | ||
27 | 27 | ||
28 | helper_method :file_types | 28 | helper_method :file_types |
29 | 29 | ||
30 | - protect_if :except => [:suggest_an_article, :set_home_page, :edit, :destroy, :publish, :upload_files, :new] do |c, user, profile| | 30 | + protect_if :except => [:suggest_an_article, :set_home_page, :edit, :destroy, :publish, :publish_on_portal_community, :publish_on_communities, :search_communities_to_publish, :upload_files, :new] do |c, user, profile| |
31 | user && (user.has_permission?('post_content', profile) || user.has_permission?('publish_content', profile)) | 31 | user && (user.has_permission?('post_content', profile) || user.has_permission?('publish_content', profile)) |
32 | end | 32 | end |
33 | 33 | ||
@@ -288,7 +288,7 @@ class CmsController < MyProfileController | @@ -288,7 +288,7 @@ class CmsController < MyProfileController | ||
288 | task.cancel | 288 | task.cancel |
289 | end | 289 | end |
290 | if @failed.blank? | 290 | if @failed.blank? |
291 | - session[:notice] = _("Your publish request was sent successfully") | 291 | + session[:notice] = _("You published this content successfully") |
292 | if @back_to | 292 | if @back_to |
293 | redirect_to @back_to | 293 | redirect_to @back_to |
294 | else | 294 | else |
app/helpers/action_tracker_helper.rb
@@ -67,19 +67,19 @@ module ActionTrackerHelper | @@ -67,19 +67,19 @@ module ActionTrackerHelper | ||
67 | } | 67 | } |
68 | end | 68 | end |
69 | 69 | ||
70 | - def create_product_description | 70 | + def create_product_description ta |
71 | _('created the product %{title}') % { | 71 | _('created the product %{title}') % { |
72 | title: link_to(truncate(ta.get_name), ta.get_url), | 72 | title: link_to(truncate(ta.get_name), ta.get_url), |
73 | } | 73 | } |
74 | end | 74 | end |
75 | 75 | ||
76 | - def update_product_description | 76 | + def update_product_description ta |
77 | _('updated the product %{title}') % { | 77 | _('updated the product %{title}') % { |
78 | title: link_to(truncate(ta.get_name), ta.get_url), | 78 | title: link_to(truncate(ta.get_name), ta.get_url), |
79 | } | 79 | } |
80 | end | 80 | end |
81 | 81 | ||
82 | - def remove_product_description | 82 | + def remove_product_description ta |
83 | _('removed the product %{title}') % { | 83 | _('removed the product %{title}') % { |
84 | title: truncate(ta.get_name), | 84 | title: truncate(ta.get_name), |
85 | } | 85 | } |
app/views/content_viewer/view_page.html.erb
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | <% cache(@page.cache_key(params, user, language)) do %> | 31 | <% cache(@page.cache_key(params, user, language)) do %> |
32 | <div class="<%="article-body article-body-" + @page.css_class_name %>"> | 32 | <div class="<%="article-body article-body-" + @page.css_class_name %>"> |
33 | <% options = @page.image? ? {:gallery_view => true} : {} %> | 33 | <% options = @page.image? ? {:gallery_view => true} : {} %> |
34 | - <% if @page.image.present? && !@page.event? %> | 34 | + <% if @page.image.present? && !@page.event? && !@page.blog? %> |
35 | <div class="article-body-img"> | 35 | <div class="article-body-img"> |
36 | <%= image_tag(@page.image.public_filename) %> | 36 | <%= image_tag(@page.image.public_filename) %> |
37 | <p><%= @page.image.label%></p> | 37 | <p><%= @page.image.label%></p> |
app/views/profile/_create_product.html.erb
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | </div> | 3 | </div> |
4 | <div class='profile-activity-description'> | 4 | <div class='profile-activity-description'> |
5 | <p class='profile-activity-text'><%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %></p> | 5 | <p class='profile-activity-text'><%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %></p> |
6 | - <p class='profile-activity-time'><%= time_ago_as_sentence activity.created_at %></p> | 6 | + <p class='profile-activity-time'><%= time_ago_in_words activity.created_at %></p> |
7 | 7 | ||
8 | <div class='profile-wall-actions'> | 8 | <div class='profile-wall-actions'> |
9 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> | 9 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> |
app/views/profile/_favorite_enterprise.html.erb
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <p class='profile-activity-text'> | 5 | <p class='profile-activity-text'> |
6 | <%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %> | 6 | <%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %> |
7 | </p> | 7 | </p> |
8 | - <p class='profile-activity-time'><%= time_ago_as_sentence activity.created_at %></p> | 8 | + <p class='profile-activity-time'><%= time_ago_in_words activity.created_at %></p> |
9 | 9 | ||
10 | <div class='profile-wall-actions'> | 10 | <div class='profile-wall-actions'> |
11 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> | 11 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> |
app/views/profile/_remove_product.html.erb
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | </div> | 2 | </div> |
3 | <div class='profile-activity-description'> | 3 | <div class='profile-activity-description'> |
4 | <p class='profile-activity-text'><%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %></p> | 4 | <p class='profile-activity-text'><%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %></p> |
5 | - <p class='profile-activity-time'><%= time_ago_as_sentence activity.created_at %></p> | 5 | + <p class='profile-activity-time'><%= time_ago_in_words activity.created_at %></p> |
6 | 6 | ||
7 | <div class='profile-wall-actions'> | 7 | <div class='profile-wall-actions'> |
8 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> | 8 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> |
app/views/profile/_update_product.html.erb
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | </div> | 3 | </div> |
4 | <div class='profile-activity-description'> | 4 | <div class='profile-activity-description'> |
5 | <p class='profile-activity-text'><%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %></p> | 5 | <p class='profile-activity-text'><%= link_to activity.user.short_name(nil), activity.user.url %> <%= describe activity %></p> |
6 | - <p class='profile-activity-time'><%= time_ago_as_sentence activity.created_at %></p> | 6 | + <p class='profile-activity-time'><%= time_ago_in_words activity.created_at %></p> |
7 | 7 | ||
8 | <div class='profile-wall-actions'> | 8 | <div class='profile-wall-actions'> |
9 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> | 9 | <%= link_to_function(_('Remove'), 'remove_item_wall(this, \'%s\', \'%s\', \'%s\'); return false ;' % [".profile-activity-item", url_for(:profile => params[:profile], :action => :remove_activity, :activity_id => activity.id, :view => params[:view]), _('Are you sure you want to remove this activity and all its replies?')]) if logged_in? && current_person == @profile %> |
po/pt/noosfero.po
@@ -8888,7 +8888,7 @@ msgstr "Sua entrada está esperando aprovação" | @@ -8888,7 +8888,7 @@ msgstr "Sua entrada está esperando aprovação" | ||
8888 | #: app/views/blocks/profile_info_actions/_join_leave_community.html.erb:14 | 8888 | #: app/views/blocks/profile_info_actions/_join_leave_community.html.erb:14 |
8889 | #: app/views/blocks/profile_info_actions/_join_leave_community.html.erb:18 | 8889 | #: app/views/blocks/profile_info_actions/_join_leave_community.html.erb:18 |
8890 | msgid "Join this community" | 8890 | msgid "Join this community" |
8891 | -msgstr "Entrar nesta comunidade" | 8891 | +msgstr "Entrar na comunidade" |
8892 | 8892 | ||
8893 | #: app/views/blocks/profile_info_actions/_join_leave_community.html.erb:23 | 8893 | #: app/views/blocks/profile_info_actions/_join_leave_community.html.erb:23 |
8894 | msgid "Please confirm to leave the community '%{name}'" | 8894 | msgid "Please confirm to leave the community '%{name}'" |
public/designs/themes/base/style.scss
@@ -642,7 +642,6 @@ div#notice { | @@ -642,7 +642,6 @@ div#notice { | ||
642 | border-radius-topright: 0px; | 642 | border-radius-topright: 0px; |
643 | border-radius-bottomright: 0px; | 643 | border-radius-bottomright: 0px; |
644 | background-color: #cecece; | 644 | background-color: #cecece; |
645 | - width: 100%; | ||
646 | border-right: 2px solid #555753; | 645 | border-right: 2px solid #555753; |
647 | } | 646 | } |
648 | 647 |
test/functional/content_viewer_controller_test.rb
@@ -1616,4 +1616,14 @@ class ContentViewerControllerTest < ActionController::TestCase | @@ -1616,4 +1616,14 @@ class ContentViewerControllerTest < ActionController::TestCase | ||
1616 | page.reload | 1616 | page.reload |
1617 | assert_equal 1, page.hits | 1617 | assert_equal 1, page.hits |
1618 | end | 1618 | end |
1619 | + | ||
1620 | + should 'show blog image only inside blog cover' do | ||
1621 | + blog = create(Blog, :profile_id => profile.id, :name=>'testblog', :image_builder => { :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')}) | ||
1622 | + blog.save! | ||
1623 | + get :view_page, :profile => profile.identifier, :page => [blog.path] | ||
1624 | + | ||
1625 | + assert_select '.blog-cover > img', 1 | ||
1626 | + assert_select '.article-body-img > img', 0 | ||
1627 | + end | ||
1628 | + | ||
1619 | end | 1629 | end |