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.
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:
- Name: The Name describes what the view will do. For example in WikiPages, there will be ShowPage and EditPage.
ViewTemplate: These are the basis for displaying each View. There are a few ViewTemplates built in and more can be defined by plug-ins. The different ViewTemplates will be covered in the next section.
Table: This is the Table which the view template is applied to. ViewTemplates 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.
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 Template
- 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 ViewTemplates.
[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.