Moderation view added
This commit is contained in:
parent
f12f61b23c
commit
b32f26a1b8
3 changed files with 23 additions and 0 deletions
|
|
@ -27,6 +27,9 @@ header
|
||||||
a href="/about" About
|
a href="/about" About
|
||||||
li.divider
|
li.divider
|
||||||
// TODO: Show link for admin/moderation view if admin is logged in
|
// 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.has-form
|
li.has-form
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
= link_to "#{current_user.email} (Logout)", destroy_user_session_path, :method => :delete
|
= link_to "#{current_user.email} (Logout)", destroy_user_session_path, :method => :delete
|
||||||
|
|
|
||||||
19
app/views/packages/moderate.slim
Normal file
19
app/views/packages/moderate.slim
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
// 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.
|
||||||
|
|
@ -14,6 +14,7 @@ Debshots::Application.routes.draw do
|
||||||
|
|
||||||
get 'packages' => 'packages#grid', as: :packages_grid
|
get 'packages' => 'packages#grid', as: :packages_grid
|
||||||
get 'packages/list' => 'packages#list', as: :packages_list
|
get 'packages/list' => 'packages#list', as: :packages_list
|
||||||
|
get 'packages/moderate' => 'packages#moderate', as: :packages_moderate
|
||||||
get 'package/:name' => 'packages#details', as: :package, name: /[^\/]+/
|
get 'package/:name' => 'packages#details', as: :package, name: /[^\/]+/
|
||||||
get 'upload', to: redirect('/packages')
|
get 'upload', to: redirect('/packages')
|
||||||
get 'upload/:name' => 'packages#upload', as: :upload_package_by_name
|
get 'upload/:name' => 'packages#upload', as: :upload_package_by_name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue