arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

Exercise 6.10: Administration with View bulk operations

In this exercise, we'll create a way for content approvers to view all content waiting for approval, so they can quickly and easily review and publish new content.

hashtag
Prepare the site

In the current setup, content editors can create and publish job postings. We’re going to change this, so that new job postings must be reviewed by a Content Approver before being published. To do this, we’ll introduce a moderation workflow.

  1. Go to Configuration → Workflow → Workflows.

  2. Edit the existing “Editorial” workflow. We’re going to reuse the existing workflow states and transitions as-is, to match the moderation workflow of the rest of the site.

  3. Scroll down to This workflow applies to section and press Select in the Content types row.

  4. Select the Job Posting checkbox, Save the changes.

  5. Press the Save button in the Edit Editorial workflow page.

hashtag
Add the view

  1. Create a new View with the following settings:

    View name
    Admin: Submitted job postings

hashtag
Add fields

circle-check

Tip: Select multiple fields at a time and configure them sequentially.

  1. Add these fields:

    • Content: Node operations bulk form

    • Content: Authored on

Note that we did not select the “Publish content” and “Unpublish content”. Since we have a moderation workflow in place, these actions won’t work on our site.

Keep other defaults for the remaining fields. Remember to Save your changes to the View.

hashtag
Rearrange fields

Click the dropdown next to the Add button in the Fields pane and select Rearrange.

hashtag
Remove unnecessary filters

The filter Content: Published (= Yes) can be removed as we will be replacing it in the next section.

hashtag
Add moderation workflow filter

To only see Job Postings that are pending approval, add the Content: Moderation state filter. Configure the following options:

Tip: Hold down the Command key (Control for Windows) to select multiple options.

hashtag
Configure the format settings

Edit the table settings. Ensure any column that can be sortable is selected. Set the default order for Authored on to Descending.

hashtag
Add a "no results" message

Adding a “no results” message will clearly show that the view IS working properly if/when there isn’t any content waiting for approval.

  1. In the middle column, under NO RESULTS BEHAVIOR, click Add.

  2. Select Global: Text area

hashtag
Change access settings for this view

Lastly, we will change the access/permission settings for this new view, from View published content to Administer content. Note that you can only do this with a user belonging to a role that has the necessary permissions.

hashtag
Save and review

Save the view and review. Go to admin/submitted-jobs. If there are no Job Listings in Draft status you should see the screen below:

Display format

Table

Items to display

50

Use a pager

Selected

Create a menu link

No

Create a block

No

Hint: Go to Structure → Views → Add View.

  • Click Save and edit.

  • Content: State

  • Configure the Bulk operations: Available actions:

    • Delete content

    • Save content

    • Update URL alias

  • Then set the message “There are no job postings currently waiting for review!”.

  • Apply the changes.

  • Show

    Content of type: Job Posting

    Page title

    Submitted jobs

    Page path

    Select button next to Content types in Workflow
    Select Job Post
    Image of View
    Image of Rearrange fields
    Image of Rearrange fields
    Image of Remove unnecessary filters
    Image of Remove unnecessary filters
    Image of Add moderation workflow filter
    Image of Configure the format settings
    Image of Edit sortable settings
    Image of View - Access
    Image of Change access settings
    Image of No jobs waiting for review

    admin/submitted-jobs

    Customize the content administration experience

    Content editors and authors like to see common content management tasks easily and should also be able to quickly see a list of new content. There are several features you can setup to enable this.

    hashtag
    Access-restricted view

    You could create a custom view for administrators that lists all new content with quick “edit” links. You could also set up a default filter so administrators can also see unpublished content.

    Below you can see the screenshots for setting up administration permissions.

    hashtag
    Bulk operations: Content lists for administrators

    GovCMS’s default content listing shows each page of content with easy access to operations such as delete and unpublish. In some cases, site administrators will need to manage content in a bulk way, rather than individually.

    The module Views bulk operations (VBO) allows you to create custom content listings and perform bulk operations.

    GovCMS has extended the Content administration page so more content actions can be performed.

    Image of Page Access permissions
    Image of Page Access Options
    Image of Bulk operations options