mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
Merge remote-tracking branch 'origin/staff-tools'
This commit is contained in:
commit
92dd6e1edb
3 changed files with 4 additions and 4 deletions
|
@ -116,7 +116,7 @@ defmodule Philomena.DuplicateReports do
|
|||
end
|
||||
|
||||
def count_duplicate_reports(user) do
|
||||
if Canada.Can.can?(user, :manage, DuplicateReport) do
|
||||
if Canada.Can.can?(user, :edit, DuplicateReport) do
|
||||
DuplicateReport
|
||||
|> where(state: "open")
|
||||
|> Repo.aggregate(:count, :id)
|
||||
|
|
|
@ -118,7 +118,7 @@ defmodule Philomena.Reports do
|
|||
end
|
||||
|
||||
def count_reports(user) do
|
||||
if Canada.Can.can?(user, :manage, Report) do
|
||||
if Canada.Can.can?(user, :index, Report) do
|
||||
Report
|
||||
|> where(open: true)
|
||||
|> Repo.aggregate(:count, :id)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
| Replace
|
||||
a href="#" data-click-tab="administration"
|
||||
i.fa.fa-toolbox>
|
||||
| Administrate
|
||||
| Manage
|
||||
= if present?(@image.scratchpad) do
|
||||
i.fa.fa-sticky-note.fa--important<
|
||||
i.fa.fa-exclamation.fa--important
|
||||
|
@ -89,4 +89,4 @@
|
|||
= submit "Delete", class: "button button--state-danger button--separate-left"
|
||||
|
||||
- else
|
||||
= button_to "Restore", Routes.image_delete_path(@conn, :delete, @image), method: "delete", class: "button button--state-success"
|
||||
= button_to "Restore", Routes.image_delete_path(@conn, :delete, @image), method: "delete", class: "button button--state-success"
|
||||
|
|
Loading…
Reference in a new issue