Mode-category
From SmartHubs
Messages
"semorg-mode-category-template": "semorg-mode-category", "semorg-mode-category-category": "semorg-mode-category", "semorg-mode-category-form": "semorg-mode-category", "semorg-mode-category-page-name": "Mode Categories", "semorg-mode-category-entity-name": "Mode Category", "semorg-form-mode-category-create-title": "Create Mode Category", "semorg-form-mode-category-edit-title": "Edit Mode Category", "semorg-form-mode-category-page-name": "Categories", "semorg-form-mode-category-template": "mode-category", "semorg-form-mode-category-rows": "name", "semorg-list-mode-category-headers": "mode-category-name", "semorg-field-mode-category-note-name": "", "semorg-field-mode-category-note-parameters": "", "semorg-field-mode-category-name-name": "Name", "semorg-field-mode-category-name-parameters": "mandatory", "semorg-field-mode-category-icon-name": "", "semorg-field-mode-category-icon-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-mode-category-create-title}} |edit title={{int:semorg-form-mode-category-edit-title}}<span class="d-none">: <page name></span> |page name={{int:semorg-form-mode-category-page-name}}/<unique number;start=1> }}} {{semorg-form-template|mode-category}} {{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|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-mode-category-category}}]]{{#semorg-set:mode-category |note={{{note|}}} |name={{{name|}}} |icon={{{icon|}}} }}{{#semorg-detail:mode-category |heading={{{name}}} }}{{#semorg-table:mode-category |note={{{note|}}} |name={{{name|}}} |icon={{{icon|}}} }}</includeonly>
Row Template
Template:Semorg-mode-category-row
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{note|}}}</td> <td>{{{name|}}}</td> <td>{{{icon|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-mode-category-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:mode-category |heading={{int:semorg-mode-category-page-name}} |formlink={{#semorg-formlink:mode-category}} |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-category-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['mode-category'] = [ "id" => "MOC","fields" => ["note" => [ "id" => "NO","type" => "txt" ],"name" => [ "id" => "NA","type" => "txt" ],"icon" => [ "id" => "IC","type" => "txt" ], ] ];