Role: Difference between revisions

From SemanticOrganization
Jump to: navigation, search
(Created page with "{{Generator |template-id=RO |template-fields={{Generator-field |field-id=name |field-property-id=NA |field-name=Name |field-type=txt }}{{Generator-field |field-id=group |field...")
 
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Generator
{{semorg-generator
|template-id=RO
|template-id=RO
|template-fields={{Generator-field
|page-name=Roles
|field-id=name
|form-page-name=Rollen
|field-property-id=NA
|form-unique-number=Yes
|field-name=Name
|display-title=<nowiki>{{{name|}}}</nowiki>
|field-type=txt
|template-fields={{semorg-generator-field
}}{{Generator-field
|id=name
|field-id=group
|property-id=NA
|field-property-id=GR
|name=Name
|field-name=Gremium
|type=txt
|field-type=wpg
}}{{semorg-generator-field
|id=group
|property-id=GR
|name=Gremium
|type=wpg
}}{{semorg-generator-field
|id=holder
|property-id=HO
|name=Holder
|type=wpg
}}{{semorg-generator-field
|id=active
|property-id=AC
|name=active
|type=boo
|suffix=&nbsp;active
|parameters=input type=checkbox
}}{{semorg-generator-field
|id=active-reason
|property-id=AR
|name=Reason
|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

Form:Semorg-role

<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

Category:Semorg-role

{{semorg-category}}

Template

Template:Semorg-role

<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

Template:Semorg-role-row

<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

Template:Semorg-role-overview

<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

Roles

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