diff --git a/app/assets/stylesheets/content.css.scss b/app/assets/stylesheets/content.css.scss index 97363d86..c2b25ce3 100644 --- a/app/assets/stylesheets/content.css.scss +++ b/app/assets/stylesheets/content.css.scss @@ -34,7 +34,8 @@ p.long-form { a { display: block; - padding: 10px 20px; + padding: 10px; + padding-right: 0; } } diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index ec99a8d9..8d115431 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -301,6 +301,7 @@ class ContentController < ApplicationController @content = content_type.find_by(id: params[:id]) return redirect_to(root_path, notice: "You don't have permission to view that content.") if @content.nil? @serialized_content = ContentSerializer.new(@content) + return redirect_to(root_path, notice: "You don't have permission to view that content.") unless @content.updatable_by?(current_user || User.new) if user_signed_in? @navbar_actions << { diff --git a/app/views/content/display/sidebar/_categories.html.erb b/app/views/content/display/sidebar/_categories.html.erb index ed78552e..25e4c3a6 100644 --- a/app/views/content/display/sidebar/_categories.html.erb +++ b/app/views/content/display/sidebar/_categories.html.erb @@ -45,11 +45,11 @@ <%= category[:label].capitalize.presence || '(blank)' %> <% if editing && category[:percent_complete].present? %> <% if category[:percent_complete] == 100 %> - + check <% else %> - + <%= category[:percent_complete] %>% <% end %> diff --git a/app/views/share_comments/_show.html.erb b/app/views/share_comments/_show.html.erb index 89e8a0a8..0616e275 100644 --- a/app/views/share_comments/_show.html.erb +++ b/app/views/share_comments/_show.html.erb @@ -24,7 +24,7 @@ <%= time_ago_in_words comment.created_at %> ago - <% if user_signed_in? && (share.user == current_user || comment.user == current_user) %> + <% if user_signed_in? && (share.user_id == current_user.id || comment.user_id == current_user.id) %> more_vert