Extension:RecordAdmin

Handling records in a wiki
In a wiki the natural way of representing a record is by using template syntax in an article as in the following example:

The template (in this case Template:Member) defines how such a record should look to the public, and the corresponding article in the Form namespace (e.g. Form:Member) is used internally by administrators to manage and adjust the records. the template may not contain all the possible parameters because some of them are for internal use only, but the form needs to contain them all.

Forms
This extension was developed primarily for wikis used in business which don't allow public editing and can therefore have Raw HTML enabled, so the forms can be created using standard HTML as in the following example form. This means that normal Javascript validation techniques can be added.  Title:  Mr                Mrs Miss Ms        First names:  Surname: 
 * The class attribute is only included so that CSS rules can be applied to the form if necessary.
 * Note that there is no need for any action parameter or submit inputs, all these aspects are handled by the RecordAdmin extension.
 * This may be adjusted in future to allow other extension's like SimpleForms to make the forms so that Raw HTML isn't necessary.

Using the special page
If no type of record is specified in the special page URL parameter, then a selection of the available records is presented. This records available are obtained from finding all the template articles which are in Category:Records (the category used is set in the recordadmin-category system message). After a record type as been selected, the form for that kind of record is shown and can then be used to create new records, or define parameters used to find matching records. Note that you must surround the category link in the template in a &lt;noinclude&gt; tag so that the articles that use the template (i.e. all the records of the type the template represents) are not also categorised into Category:Records.



Searching for records
The search form works like a filter, so leaving it completely empty and then clicking search will list all members. Filling in some characters such as 123 into the phone field, then clicking search will list all members having 123 in their phone number somewhere. The results will be listed below the form in a sortable table such as in the following example image.



The fields in the search form are regular expressions, so more advanced searches can be done, for example putting ^445 into the phone field will search for all members who's phone number starts with "445".

Editing and viewing records
In the search results list, click edit to change any properties of the member, or click on a results title to go to that member's article to delete it or see its history etc.

Creating new records
If the Create button is clicked instead of Search, then the values in the form will be used to create a new record. If no value is supplied in the Record ID field when a record is created, then a unique ID will be used of the format yyyymmdd-xxxxx where y, m and d represent numbers for the year, month and day, and x are random unique digits and letters. This is useful for the kinds of records such as invoices or log entries which need no specific name.

Using the parser function
A parser function (in progress) allows sets of records of a specified type exhibiting specified parameters to be rendered in a page using the template corresponding to the record type. This is useful for example for having an article contain certain kinds of products that are currently in stock, or to list members who conform to criteria such as interests or expertise.