Mode
From SmartHubs
Messages
"semorg-mode-template": "semorg-mode", "semorg-mode-category": "semorg-mode", "semorg-mode-form": "semorg-mode", "semorg-mode-page-name": "Modes", "semorg-mode-entity-name": "Mode", "semorg-form-mode-create-title": "Create Mode", "semorg-form-mode-edit-title": "Edit Mode", "semorg-form-mode-page-name": "Modes", "semorg-form-mode-template": "mode", "semorg-form-mode-rows": "name,category", "semorg-list-mode-headers": "mode-name,mode-category", "semorg-field-mode-icon-name": "", "semorg-field-mode-icon-parameters": "", "semorg-field-mode-top-level-name": "", "semorg-field-mode-top-level-parameters": "", "semorg-field-mode-name-name": "Name", "semorg-field-mode-name-parameters": "mandatory", "semorg-field-mode-category-name": "Category", "semorg-field-mode-category-parameters": "values from category=semorg-mode-category|mapping property=Semorg-mode-category-name", "semorg-field-mode-note-name": "", "semorg-field-mode-note-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info
|create title={{int:semorg-form-mode-create-title}}
|edit title={{int:semorg-form-mode-edit-title}}<span class="d-none">: <page name></span>
|page name={{int:semorg-form-mode-page-name}}/<unique number;start=1>
}}}
{{semorg-form-template|mode}}
{{semorg-form-standard-inputs}}
</includeonly>
as embedded:
Use this code, if this is not meant to be a standalone feature but rather a supplement that should be embedded in other forms. Add this line to a form definition that includes a field with the parameter holds template. The second parameter of the semorg-form-template-embed call should be the target field, specified with <feature>[<field>] (e.g. meeting-group[files] or {{int:semorg-meeting-group-template}}[files] to respect template customization).
{{semorg-form-template-embed|mode|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-mode-category}}]]{{#semorg-set:mode
|icon={{{icon|}}}
|top-level={{{top-level|}}}
|name={{{name|}}}
|category={{{category|}}}
|note={{{note|}}}
}}{{#semorg-detail:mode
|heading={{{name}}}
}}{{#semorg-table:mode
|icon={{{icon|}}}
|top-level={{{top-level|}}}
|name={{{name|}}}
|category={{{category|}}}
|note={{{note|}}}
}}</includeonly>
Row Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr>
<td>[[{{{target|}}}]]</td>
<td>{{{icon|}}}</td>
<td>{{{top-level|}}}</td>
<td>{{{name|}}}</td>
<td>{{{category|}}}</td>
<td>{{{note|}}}</td>
{{semorg-showedit
|target={{{target|}}}
}}
</tr></includeonly>
Overview Page Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:mode
|heading={{int:semorg-mode-page-name}}
|formlink={{#semorg-formlink:mode}}
|links={{{links|}}}
|query={{{query|}}}
|sort={{{sort|}}}
|order={{{order|}}}
|limit={{{limit|}}}
|filter links={{{filter links|}}}
|filters={{{filters|}}}
|category={{{category|}}}
|headers={{{headers|}}}
|row template={{{row template|}}}
|tableclass={{{tableclass|}}}
|title={{{title|}}}
|sums={{{sums|}}}
|csv={{{csv|}}}
|default={{{default|}}}
|returnto={{{returnto|}}}
|help={{{help|}}}
}}</includeonly>
Overview Page
{{semorg-mode-overview}}
Property Registration
Add the following line to LocalSettings.php:
$wgSemorgAdditionalProperties['mode'] = [ "id" => "MOD","fields" => ["icon" => [ "id" => "IC","type" => "txt" ],"top-level" => [ "id" => "TL","type" => "boo" ],"name" => [ "id" => "NA","type" => "txt" ],"category" => [ "id" => "CA","type" => "wpg" ],"note" => [ "id" => "NO","type" => "txt" ], ] ];