mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57: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
|
end
|
||||||
|
|
||||||
def count_duplicate_reports(user) do
|
def count_duplicate_reports(user) do
|
||||||
if Canada.Can.can?(user, :manage, DuplicateReport) do
|
if Canada.Can.can?(user, :edit, DuplicateReport) do
|
||||||
DuplicateReport
|
DuplicateReport
|
||||||
|> where(state: "open")
|
|> where(state: "open")
|
||||||
|> Repo.aggregate(:count, :id)
|
|> Repo.aggregate(:count, :id)
|
||||||
|
|
|
@ -118,7 +118,7 @@ defmodule Philomena.Reports do
|
||||||
end
|
end
|
||||||
|
|
||||||
def count_reports(user) do
|
def count_reports(user) do
|
||||||
if Canada.Can.can?(user, :manage, Report) do
|
if Canada.Can.can?(user, :index, Report) do
|
||||||
Report
|
Report
|
||||||
|> where(open: true)
|
|> where(open: true)
|
||||||
|> Repo.aggregate(:count, :id)
|
|> Repo.aggregate(:count, :id)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
| Replace
|
| Replace
|
||||||
a href="#" data-click-tab="administration"
|
a href="#" data-click-tab="administration"
|
||||||
i.fa.fa-toolbox>
|
i.fa.fa-toolbox>
|
||||||
| Administrate
|
| Manage
|
||||||
= if present?(@image.scratchpad) do
|
= if present?(@image.scratchpad) do
|
||||||
i.fa.fa-sticky-note.fa--important<
|
i.fa.fa-sticky-note.fa--important<
|
||||||
i.fa.fa-exclamation.fa--important
|
i.fa.fa-exclamation.fa--important
|
||||||
|
@ -89,4 +89,4 @@
|
||||||
= submit "Delete", class: "button button--state-danger button--separate-left"
|
= submit "Delete", class: "button button--state-danger button--separate-left"
|
||||||
|
|
||||||
- else
|
- 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