Menus
Menu system
Principle
The menu system is based on an xml file, in which the structure of the menus is defined. To ensure that the xml file is correct, I
defined an XML-scheme, which can be used to validate the xml file, e.g. with Eclipse.
Every main and sub menu has the following structure:
<MainMenuEntry> / <SubMenuEntry>
<LinkName>my_data</LinkName>
<PageTitle>edit_my_data</PageTitle>
<URI>main.php</URI>
<UserRight>edit_own_values</UserRight>
</MainMenuEntry> / </SubMenuEntry>
Element |
Meaning |
LinkName |
Link text in the menu |
PageTitle |
Title of the page which is called by the link |
URI |
Link to the page to be opened |
UserRight |
User right which is needed to show this menu text |
Database menus
Beside the fixed defined menus, it is also possible to define menus which are generated from the content of database tables. With this
you can for example generate menus for every committee or every status.
<DatabaseEntry>
<DatabaseTable>committee</DatabaseTable>
<DatabaseField>name</DatabaseField>
<URI>view_persons.php</URI>
<UserRight>committee.*</UserRight>
</DatabaseEntry>
Element |
Meaning |
DatabaseTable |
Name of the database table |
DatabaseField |
Name of the database field, of which the elements have to shown as menu elements |
URI |
Link to the page which has to be opened. This page is called with the table and field name and the content of the
field as parameter. In this case, this could be link view_persons.php?committee.name=board. |
UserRight |
There are two ways to define the user right needed to show this menu. The first way is identical to that of the
other menus: just write the right which is needed to view all values from this table. The second way allows to
define rights per menu entry. To do this, DatabaseTable.DatabaseField.* has to be written, so in this
case committee.name.*. Then the menu system searches for the right
DatabaseTable.DatabaseField.Value, in this case for example committee.name.board. Only when this
is found, the menu is shown. |
To make the navigation easier, not the entire menu structure is shown. Visible are only the main menus, and the sub menus of that
section in which the user currently is.
Menu structure
Currently the following main menus are defined:
- Start pagine
- My data
- View persons
- Club information
- Administration
Start page
This page shows all user rights the current user has.
My data
Here the user can view and edit his own information
View persons
This contains all lists with members, non-members and other people, sorted by function, status, etc.
Club information
Tho pages with information for members and information for board members.
Administration
In this menu all settings of Vereniging 2.0 can be viewed and changed.
|