Difference between revisions of "Mode-category"

From SmartHubs
Jump to: navigation, search
(Created page with "{{Semorg-generator |template-id=MOC |page-name=Mode Categories |entity-name=Mode Category |form-page-name=Categories |form-unique-number=Yes |display-title=<nowiki>{{{name}}}<...")
 
Line 14: Line 14:
 
|type=txt
 
|type=txt
 
|parameters=mandatory
 
|parameters=mandatory
 +
}}{{semorg-generator-field
 +
|id=note
 +
|property-id=NO
 +
|type=txt
 
}}
 
}}
 
}}
 
}}

Revision as of 09:10, 16 August 2021


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

Form:Semorg-mode-category

<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

Category:Semorg-mode-category

{{semorg-category}}

Template

Template:Semorg-mode-category

<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

Mode Categories

{{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" ], ] ];