Creating views

In the previous sections we saw how to create the data model. Now we will create the user interface with that data. The first step in this is to create Views of the data Tables.

Views

In Saltcorn, a View is a specific way for a user to interact with one or more records in a Table. Views are built of the following components:

[screenshot]

  • Name: The Name describes what the view will do. For example in WikiPages, there will be ShowPage and EditPage
  • View patter: These are the basis for displaying each View. There are a few View patterns built in and more can be defined by plug-ins. The different View patterns will be covered in the next section.

  • Table: This is the Table which the view pattern is applied to. View patterns can in principle be applied to any Table.

  • Config: Configuration uses a multistep dialogue using

    • a series of forms 
    • the drag-and-drop builder
    • the choice of other views

 

 

This may appear to be fairly complicated at first, and the best way to understand it is to try setting up different configurations of a simple plug-in, such as the Todo list.

 

Create views

To create a View, click the Views option on the main menu and select "Add view"

On the Create view screen:

  • write the View name
  • choose the view pattern
  • choose the Table to apply the view
  • choose the Minimum role that is required to run the view
  • choose which page to show the view (Show on page)

Select Configure, and you will be taken into the configuration steps depending on the View patterns.

[Need to explain the Columns screen]

When Configuration is complete, you can run the view by clicking Run from on the Config menu on the Views screen.