Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

#218 Dashboard list for "Entries under Review" #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion client/source/controllers/buckets_controller.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,22 @@ module.exports = class BucketsController extends Controller
model: newBucket
fields: @newFields

review: ->
@entries = new Entries

for role, i in mediator.user.get('roles')
currentBucket = mediator.buckets?.findWhere id: role.resourceId
@entries.fetch( data: { bucket: currentBucket.get('slug'), status: 'pending', add : true})

reviewBucket = new Bucket
reviewBucket.set('name','Entries under Review')

@view = new EntriesBrowser
collection: @entries
bucket: reviewBucket

browse: (params) ->
bucket = mediator.buckets?.findWhere slug: params.slug

return @bucketNotFound() unless bucket

if params.add
Expand Down
1 change: 1 addition & 0 deletions client/source/routes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = (match) ->
match 'reset/:token', 'auth#resetPassword', params: authRequired: no

match 'buckets/add', 'buckets#add'
match 'buckets/review', 'buckets#review'
match 'buckets/:slug', 'buckets#browse'
match 'buckets/:slug/add', 'buckets#browse', params: add: yes
match 'buckets/:slug/fields', 'buckets#editFields'
Expand Down
2 changes: 1 addition & 1 deletion client/source/templates/layouts/loggedin.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{#hasRole 'administrator'}}
<li><a href="/{{adminSegment}}/buckets/add">{{icon 'add'}} New Bucket</a></li>
{{/hasRole}}

<li><a href="/{{adminSegment}}/buckets/review">{{icon 'add'}} Review Entries</a></li>
{{#hasRole 'administrator'}}
<li class="divider"></li>
<li><a href="/{{adminSegment}}/routes">{{icon 'direction-sign'}} Routes</a></li>
Expand Down