Moved moderation code to new moderate controller
This commit is contained in:
parent
b32f26a1b8
commit
a153391615
12 changed files with 79 additions and 48 deletions
|
|
@ -28,8 +28,8 @@ header
|
|||
li.divider
|
||||
// TODO: Show link for admin/moderation view if admin is logged in
|
||||
- if user_signed_in?
|
||||
li class=('active' if controller_name=='packages' and action_name=='moderate')
|
||||
= link_to 'Moderate', packages_moderate_path
|
||||
li class=('active' if controller_name=='moderate')
|
||||
= link_to 'Moderate', moderate_path
|
||||
li.has-form
|
||||
- if user_signed_in?
|
||||
= link_to "#{current_user.email} (Logout)", destroy_user_session_path, :method => :delete
|
||||
|
|
|
|||
24
app/views/moderate/index.slim
Normal file
24
app/views/moderate/index.slim
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
.row
|
||||
h1 Moderation queue
|
||||
|
||||
// Progress bar
|
||||
.progress.warning role="progressbar" tabindex="0" aria-valuenow="20" aria-valuemin="0" aria-valuetext="25 percent" aria-valuemax="100"
|
||||
span.progress-meter style="width: #{@percent_moderated}%"
|
||||
p.progress-meter-text #{@percent_moderated}%
|
||||
|
||||
h2 Package: #{@package.name}
|
||||
|
||||
// Package list
|
||||
.row.packagepage
|
||||
.small-9.medium-10.columns
|
||||
- if @pending_screenshots.length>0
|
||||
- @pending_screenshots.each do |screenshot|
|
||||
.row.listview
|
||||
.small-12.columns
|
||||
.text-center
|
||||
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
|
||||
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
|
||||
.imgcaption =screenshot.caption
|
||||
|
||||
- else
|
||||
p No screenshots left in the moderation queue. Great.
|
||||
|
|
@ -23,10 +23,6 @@
|
|||
- elsif screenshot.approved
|
||||
= render(partial: 'report_dropdown', locals: {screenshot: screenshot})
|
||||
|
||||
|
||||
// Anonymous users can see their own screenshots
|
||||
/ - if not screenshot.approved
|
||||
|
||||
- else
|
||||
.row.listview
|
||||
img src='/images/dummy/no-screenshots-available.svg' width='100%' style='padding: 0 10%'
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
// TODO: Show progressbar of how far the admin went through the moderation queue
|
||||
|
||||
.row
|
||||
h1 Moderation queue
|
||||
|
||||
// Progress bar
|
||||
.progress.warning role="progressbar" tabindex="0" aria-valuenow="20" aria-valuemin="0" aria-valuetext="25 percent" aria-valuemax="100"
|
||||
span.progress-meter style="width: #{@percent_moderated}%"
|
||||
p.progress-meter-text #{@percent_moderated}%
|
||||
|
||||
// Package list
|
||||
.row.packagepage
|
||||
.small-9.medium-10.columns
|
||||
- if @pending_screenshots.length>0
|
||||
- @pending_screenshots.each do |screenshot|
|
||||
= screenshot.id
|
||||
|
||||
- else
|
||||
p No screenshots left in the moderation queue. Great.
|
||||
Loading…
Add table
Add a link
Reference in a new issue