Activity Creating the Management Page display

One of the benefits of Views is that we can tailor information for multiple audiences. We can have a Page display targeted at users, and another, such as the one we're about to create, for the site owners.

1. Create a new Page display.

Defaults Subz Page Attachment Block ►

Page t

2. Give this Page display a name as we did the other, to differentiate the two.

3. Next, give the display a title to show when viewed, after clicking Override, so that it only affects this display.

Mgmt Page: The title of this view

Status: using default values. [ Override ]

This title will be displayed with the viewr wherever titles are normally displayed; i.er as the page title, block title, etc.

[ Update default display] [ Cancel ]

4. Having clicked Override, you'll notice that two of the buttons swap. The button previously labeled Override is now labeled Use default, because clicking it would have your setting saved as a default setting. The button previously labeled Update default display is now labeled simply Update, because we've already chosen to override, so our updating won't affect the default settings.

5. This display will be a list of jobs, from which the title job can be clicked to view the job detail. However, because the list can eventually become lengthy, we will provide a way to sort the list in order to see jobs open for bidding, or not, or past jobs marked to display, or not. This capability is provided natively by the Views panel if we choose Table for the style. Let's do that.

6. Mark the 3 fields that will appear (Title, Bidding open and Display completed job, not the Nid field) as being sortable, and choose Title as the default sort. This will then allow the user to click the column heading for any of the three fields in order to sort by that column.

7. As there will eventually be more records than a single page can hold, elect to Override the default setting and use the pager to handle navigation between pages of data.

Mgmt Page: Use a pager for this view

Status: using overridden values. [ Use default

Pager element:

Unless you're experiencing problems with pagers related to this view, yam should leave this at 0. If us inz multiple pagers an one page yau may need to set this number ta a higher value so as notta conflict within the ?p ag e= array. Largevalues will add a I at afcnmmas tn your URLs, n avoid if possible.

8. We're going to limit access on this display to company management, so click Access, and click Override to override the default. We want to control access by Role.

9. The options window that follows lists the currently-defined roles. Choose management as the role, and that way only users with a management role will be able to access this page. Click Update.

Only the checked rules will be able to access this display, Note that users with "access all views" can see any view; regardless afrole.

10. We'll need to have a path for this display so that we can access it. Use job-list as the path.

Mgmt Page: The menu path or URL of this view http : //loca I h ost/g u i I d bu i I d ersi n c.cam/ job-list

This view wil I b e d i s p I ay ed byvisiting this path anyaursite.Vau may use "111" in yaur URL ta represent values that will be used far arguments; Far Example. "nade/lVfeed".

11. Override, and remove the argument and all existing fields except Title.

Mgmt Page: Access options Role:

D anonymous user □ authenticated user m management

12. Set the Title field to be a link to its node, so that the job name can be clicked to display the entire node.

Mgmt Page: Configure field Node: Title

Status: using overridden values. [ Use default |

Label:

Title

The label far this field that will be displayed to end users if the style requires it,

CD Exclude from display

Check th I s box to not display this B Bid, b ut stl 11 bad ¡tin the vi ew. Use this aptlan ta not show a grouping field In each record, nrwhen doing advanced ther -lg.

□ Rewrite the output of this field

If checked, you can alter the output of this field by specifying a string of text tvith replacement tokens that can use any existing field output.

CI Output this field as a link

If checked, this field will be made into a link. The destination must be given below.

D Trim this field to a maximum length

If checkedr this field be trimmed to a maximum length in characters.

E Link this field to its node This will override any other link you have set.

Update [Cancel Remove

13. Add the Node ID (Nid) as a field. We'll need it for a link.

Mgmt Page: Add fields Groups:

Provide a simple link to the node. 0 Node: Moderated

Whether or not the node is moderated. O Node: New comments

The number of new comments on the node. Wl Node: Nid

The node ID of the node. D Node: Post date

The date the node was posted. O Node: Promoted to front page

Whether or not the node is promoted to the front page.

Whether or not the node is published.

Whp-thpr nr nnf thp nnrlp iq ^firkv.

Cancel

14. The settings should be as in the following image.

Mgmt Page: Configure field Node: Nid

Status:; using overridden values. [ Use default

Label:

The label far this field that will be displayed to end users if the style requires it.

Exclude from display Check this box to not display this field, but still load it in the view. Use this option to not show a grouping field in each record, or when doing advanced theming. □

Rewrite the output of this field If checked, you can alter the output of this field by specifying a string of text with replacement tokens that can use any existing field output.

O Output this field as a link

If checked, this field will be made into a link. The destination must be given below.

0 Trim this field to a maximum length

If checked, this field be trimmed to a maximum length in characters. □

Link this field to its node

This will override any other link you have set.

15. Add the fields Content: Bidding open and Content: Display completed jobs to the list of fields.

Mgmt Page: Add fields

Groups:

ILJ Comment: View link

Provide a simple link to view the comment, Q Content: Address (field_address)

Te*t - Appears in Jobr 5u b c a ntra cto rr 5u b c a ntra cto r_a Id n Content: Bid due (field_bid_due)

Date - Appears in: Jab B Content: Bidding open (field_bidding_open) Text - Appears in: Job

□ Content: Bond able (field_bondable)

Text - Appears in: Subcontractor 5ubcontractor_ald

□ Content:; Cellular (field_cellular)

Text - Appears in: Subcontractor, 5ubcontractor_old n Content: Contact name (field_contact)

Text - Appears in: Sub contractor, 5ubcontractor_ald

□ Content: Display completed job (field_display_jabj

Mgmt Page: Add fields

Groups:

l!_J Content: Bondable (field_bondable]

Text - Appears in: Subcontractor, Subcontractor Id

□ Content: Cellular (field_cellular)

Teit - Appears In: Subcontractor, Subcontractor Id

□ Content: Contact name (field_contact)

Text - Appears in: Subcontractor, Subcontractor^ Id m Content: Display completed job (field_display_job)

Text - Appears in: Job Ö Content:: Fax (field_fax)

Text - Appears in: Subcontractor, Subcontractor^ Id

□ Content:; Job photo (field_job_photo) File - Appears in: Job

□ Content: Job photo (field_job_photo) - data File - Appears in: Job

16. Remove the default Sort (using Override) and sort on Node: Title.

Mgmt Page: Add sort criteria Groups:

Whether or nat the node is promoted ta thetTant page.

Node: Published

Whether or not the node is published,

D Node: Sticky

Whether or not the node is sticky. Wl Node: Title

The title of the node.

Node: Type

The type of a node [for example, "blog entry", "forum post", "story", etc).

The date the node was last updated.

Node: Updated/commented date

The most recent of last comment posted or node updated time,

Node revision: Created date [Add^ ¡Cancel]

17. Set the sort order to Ascending to list the titles alphabetically.

Mgmt Page: Configure sort criterion Node: Title

Status: using overridden values, j jy|t

Sort order:

B Ascending i.) Descending

18. The last thing we need to do is set the filter for this display. Remove the ones already in place (clicking Override first), keeping only one filter, which will be to select the Job node type. We don't require the nodes to be published, because the company management should be able to see Jobs they've created, but not published, as well.

Mgmt Page: Configure filter Node: Type

Status: using overridden values.

Use default

This item is currently not exposed. If you expose it users will be able to change the filter as they view it.

Expose

Operator:

Node type:

m job

□ Subcontractor

□ Subcontractor old

Update

Cancel Remove

19. We can preview the page now. Select Mgmt Page from the Display dropdown, The following screenshot shows the results.

Live preview

Display:

Mgmt Page t [ Preview"] Arguments:

Sep a rate arguments with a / as though they were a URL path

Display:

Mgmt Page t [ Preview"] Arguments:

Sep a rate arguments with a / as though they were a URL path

Titled

Bidding open

Display completed job

Freedoraa Hospital Annex

□pen for bidding

false

0 0

Post a comment