Merge branch 'master' into dependabot/bundler/devise-4.8.1

This commit is contained in:
Andrew Brown 2022-02-26 15:58:00 -06:00 committed by GitHub
commit ba362c8713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -34,7 +34,8 @@ p.long-form {
a {
display: block;
padding: 10px 20px;
padding: 10px;
padding-right: 0;
}
}

View File

@ -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 << {

View File

@ -45,11 +45,11 @@
<%= category[:label].capitalize.presence || '(blank)' %>
<% if editing && category[:percent_complete].present? %>
<% if category[:percent_complete] == 100 %>
<span class="badge green-text hide-on-med-and-down">
<span class="green-text hide-on-med-and-down" style="padding-left: 10px">
<i class="material-icons">check</i>
</span>
<% else %>
<span class="badge grey-text hide-on-med-and-down">
<span class="grey-text hide-on-med-and-down" style="padding-left: 10px">
<small><%= category[:percent_complete] %>%</small>
</span>
<% end %>

View File

@ -24,7 +24,7 @@
<span class="timestamp">
<%= 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) %>
<a class='dropdown-trigger right' href='#' data-target='dropdown-comment-<%= comment.id %>'>
<i class="material-icons">more_vert</i>
</a>