diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 5bd9aedfd..25d569ff7 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1964,6 +1964,7 @@ table { table { border: 0; + margin-bottom: 0; } td { diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2346a2017..1392472c8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -3,11 +3,11 @@ class UsersController < ApplicationController load_and_authorize_resource helper_method :author? + helper_method :valid_interests_access? helper_method :author_or_admin? def show load_filtered_activity if valid_access? - load_interests if valid_interests_access? end private diff --git a/app/views/users/_proposal.html.erb b/app/views/users/_proposal.html.erb index 2a94bf021..4d8e5451b 100644 --- a/app/views/users/_proposal.html.erb +++ b/app/views/users/_proposal.html.erb @@ -1,16 +1,19 @@ - <%= link_to proposal.title, proposal, proposal.retired? ? {class: 'retired'} : {} %> + <%= link_to proposal.title, proposal, proposal.retired? ? { class: 'retired' } : {} %>
<%= proposal.summary %> - <% if author? %> + <% if can? :retire_form, proposal %> - <%= link_to t("users.proposals.send_notification"), new_proposal_notification_path(proposal_id: proposal.id), - class: 'button hollow' %> + <%= link_to t("users.proposals.send_notification"), + new_proposal_notification_path(proposal_id: proposal.id), + class: 'button hollow' %> + <% end %> + <% if can? :new, ProposalNotification, author_id: proposal.author_id %> <% if proposal.retired? %> <%= t('users.proposals.retired') %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index fb4a3d1f9..989e90aac 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -46,7 +46,7 @@

<%= t('users.show.private_activity') %>

<% end %> - <% if @user.public_interests || @authorized_current_user %> + <% if valid_interests_access? %>

<%= t('account.show.public_interests_title_list') %>

<% @user.interests.in_groups_of(10, false) do |interests_group| %>