Role: Difference between revisions
From SemanticOrganization
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{semorg-generator | ||
|template-id=RO | |template-id=RO | ||
|page-name=Roles | |page-name=Roles | ||
Line 32: | Line 32: | ||
|name=Reason | |name=Reason | ||
|type=txt | |type=txt | ||
}}{{semorg-generator-field | |||
|id=short-staffed | |||
|property-id=SS | |||
|type=boo | |||
|input-type=checkbox | |||
|label=this role is short-staffed and needs new people | |||
}}{{semorg-generator-field | |||
|id=trainees-welcome | |||
|property-id=TW | |||
|type=boo | |||
|input-type=checkbox | |||
|label=this role welcomes new people | |||
}}{{semorg-generator-field | |||
|id=purpose | |||
|property-id=PU | |||
|name=Purpose | |||
|type=txt | |||
|input-type=textarea | |||
|parameters=rows=1 | |||
}} | }} | ||
}} | }} |
Latest revision as of 07:27, 6 October 2024
Messages
"semorg-role-template": "semorg-role", "semorg-role-category": "semorg-role", "semorg-role-form": "semorg-role", "semorg-role-page-name": "Roles", "semorg-form-role-create-title": "Create Role", "semorg-form-role-edit-title": "Edit Role", "semorg-form-role-page-name": "Rollen", "semorg-form-role-template": "role", "semorg-form-role-rows": "group, purpose, trainees-welcome, active, short-staffed, active-reason, holder, name", "semorg-list-role-headers": "role-group, role-purpose, role-trainees-welcome, role-active, role-short-staffed, role-active-reason, role-holder, role-name", "semorg-field-role-active-name": "active", "semorg-field-role-active-parameters": "input type=checkbox", "semorg-field-role-active-suffix": " active", "semorg-field-role-active-reason-name": "Reason", "semorg-field-role-active-reason-parameters": "", "semorg-field-role-group-name": "Gremium", "semorg-field-role-group-parameters": "", "semorg-field-role-holder-name": "Holder", "semorg-field-role-holder-parameters": "", "semorg-field-role-name-name": "Name", "semorg-field-role-name-parameters": "", "semorg-field-role-purpose-name": "Purpose", "semorg-field-role-purpose-parameters": "rows=1", "semorg-field-role-purpose-input-type": "textarea", "semorg-field-role-short-staffed-name": "", "semorg-field-role-short-staffed-parameters": "", "semorg-field-role-short-staffed-input-type": "checkbox", "semorg-field-role-short-staffed-label": "this role is short-staffed and needs new people", "semorg-field-role-trainees-welcome-name": "", "semorg-field-role-trainees-welcome-parameters": "", "semorg-field-role-trainees-welcome-input-type": "checkbox", "semorg-field-role-trainees-welcome-label": "this role welcomes new people",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-role-create-title}} |edit title={{int:semorg-form-role-edit-title}}<span class="d-none">: <page name></span> |page name={{int:semorg-form-role-page-name}}/<unique number;start=1> }}} {{semorg-form-template|role}} {{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|role|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-role-category}}]]{{#semorg-set:role |group={{{group|}}} |purpose={{{purpose|}}} |trainees-welcome={{{trainees-welcome|}}} |active={{{active|}}} |short-staffed={{{short-staffed|}}} |active-reason={{{active-reason|}}} |holder={{{holder|}}} |name={{{name|}}} }}{{#semorg-detail:role |heading={{{name|}}} }}{{#semorg-table:role |group={{{group|}}} |purpose={{{purpose|}}} |trainees-welcome={{{trainees-welcome|}}} |active={{{active|}}} |short-staffed={{{short-staffed|}}} |active-reason={{{active-reason|}}} |holder={{{holder|}}} |name={{{name|}}} }}</includeonly>
Row Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{group|}}}</td> <td>{{{purpose|}}}</td> <td>{{{trainees-welcome|}}}</td> <td>{{{active|}}}</td> <td>{{{short-staffed|}}}</td> <td>{{{active-reason|}}}</td> <td>{{{holder|}}}</td> <td>{{{name|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:role |heading={{int:semorg-role-page-name}} |formlink={{#semorg-formlink:role}} |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-role-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['role'] = [ "id" => "RO","fields" => ["group" => [ "id" => "GR","type" => "wpg" ],"purpose" => [ "id" => "PU","type" => "txt" ],"trainees-welcome" => [ "id" => "TW","type" => "boo" ],"active" => [ "id" => "AC","type" => "boo" ],"short-staffed" => [ "id" => "SS","type" => "boo" ],"active-reason" => [ "id" => "AR","type" => "txt" ],"holder" => [ "id" => "HO","type" => "wpg" ],"name" => [ "id" => "NA","type" => "txt" ], ] ];