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

Sites Administration

Eric Jackson edited this page May 4, 2015 · 10 revisions

Creating a New Site

To create a new site from the administrative section of either a government or a media organization, navigate to the Sites tab and click on the Add Site button.

Select a slug or short name to be used for the site. This must be unique across all sites on the platform and cannot later be edited. The public site will appear in http://serverdomain/sites/_slug_. Pages on the site are accessible via http://serverdomain/sites/_slug_/_page-short-name_.

Give the site a name - this will be used as the site title. It may be edited later.

If you are creating a site from a media organization page, you must also select a government entity that the site will be associated with. This cannot be edited later.

Click the Save button.

Main Site Administration Tabs

The administration area for a site contains three tabs.

Site Settings

This tab allows you to change the site name. Probably we will add some other information here, such as a logo, favicon, boilerplate description, contact information, etc. This will be driven by actual requirements as we discover them.

Pages

This tab allows you to create, organize and publish pages for the site.

To create a new page, click the New Page button and fill out the following information:

  • Title - this will be displayed on the public site as the page title.
  • Short Name - this will be used for the page within navigation menus.
  • Layout - select a layout to be used for the page. See below and section on creating layouts.
  • Description - a page description that will only display on administrative pages.

By default, the page will be included in navigation menus, but this may be disabled on the pages tab.

Note that configuring pages involves selecting layouts and components. These can only be created right now by a superuser (or a developer) and there is no catalog showing what they are. That's something to be added as soon as we have figured out site styling/design and have a few reasonable-looking components. I'll soon create an issue for this.

Cards

This is a straightforward interface for creating sets of cards and adding cards to them (a card must belong to a card set). The interface is not quite complete - for now, it only accepts a title and body, but we'll soon add in the image and link fields.

A drag-and-drop interface is provided to order cards within a card set. When a card set is delivered to a front-end component, this is the order in which the cards will appear.

Cards provide all of the non-budget-data content of the site. Right now the card body is just plain text. I'll probably add the ability to use Markdown (we already have a Markdown preprocessor that we can use), but I'd really prefer a WYSIWYG editor, probably either the Laravel Editor package or Redactor. I know that these integrate nicely with Laravel.

Any given front-end display component may be assigned an arbitrary number of card sets or individual cards. See sections on assigning data to components and on creating new components for more information.

Page Administration

Clicking on the title of a page on the Pages tab takes you to the administration section for that page. Clicking on the Edit button allows you to change the page short name, description or layout.

The main page allows you to add new presentation components and assign them to sections of the layout. In the example below, we use a three-part layout, have added 3 components, a simple card, a slideshow, and a multi-year table and added them to the top-left, top-right and bottom sections of the layout, respectively (the Three-Part layout and these 3 simple component types come out-of-the-box with the platform). The drop-down menus can be used to reassign components to other cells in the layout (or to leave them unassigned). Multiple components may be assigned to a single cell - they will be placed one after another on the public page.

The layout and the component assignments are illustrated at the bottom of the page.

Page admin example

Note: the layouts are based on the Bootstrap grid. See the section on creating new layouts.

Configuring a Component

Clicking the Configure link to the right of a component lets you set the configuration and data for a component. Each component defines the types of data (cards or datasets) that it expects. A component may require one more more of the following:

  • Card - The configuration interface lets you select a card set and a card within it.
  • Card Set - The configuration interface lets you select a card set.
  • Dataset - The configuration interface lets you select a single available dataset.
  • Dataset List - The configuration provides a multi-select control for selecting multiple available datasets.

See the section on creating new components for more information. Note that, at the moment, the only configuration available for components is card or dataset assignments. When/if the need for more configuration arises, we'll add to the configuration interface.