Person-ref: Difference between revisions
From SemanticOrganization
(Created page with "{{Generator |template-id=PR |template-fields={{Generator-field |field-id=name |field-property-id=NA |field-type=wpg }}{{Generator-field |field-id=role |field-property-id=RO |f...") |
m (Text replacement - "{{Generator" to "{{Semorg-generator") |
||
Line 1: | Line 1: | ||
{{ | {{Semorg-generator | ||
|template-id=PR | |template-id=PR | ||
|template-fields={{ | |template-fields={{Semorg-generator-field | ||
|field-id=name | |field-id=name | ||
|field-property-id=NA | |field-property-id=NA | ||
|field-type=wpg | |field-type=wpg | ||
}}{{ | }}{{Semorg-generator-field | ||
|field-id=role | |field-id=role | ||
|field-property-id=RO | |field-property-id=RO | ||
|field-type=txt | |field-type=txt | ||
}}{{ | }}{{Semorg-generator-field | ||
|field-id=tag | |field-id=tag | ||
|field-property-id=TG | |field-property-id=TG | ||
|field-type=txt | |field-type=txt | ||
}}{{ | }}{{Semorg-generator-field | ||
|field-id=ref | |field-id=ref | ||
|field-property-id=RF | |field-property-id=RF |
Revision as of 09:18, 31 October 2018
Messages
"semorg-person-ref-template": "semorg-person-ref", "semorg-person-ref-category": "semorg-person-ref", "semorg-person-ref-form": "semorg-person-ref", "semorg-form-person-ref-create-title": "Create Person-ref", "semorg-form-person-ref-edit-title": "Edit Person-ref", "semorg-form-person-ref-template": "person-ref", "semorg-form-person-ref-rows": "name, tag, role, ref, formerly", "semorg-list-person-ref-headers": "person-ref-name, person-ref-tag, person-ref-role, person-ref-ref, person-ref-formerly", "semorg-field-person-ref-formerly-name": "formerly", "semorg-field-person-ref-formerly-parameters": "", "semorg-field-person-ref-name-name": "", "semorg-field-person-ref-name-parameters": "", "semorg-field-person-ref-ref-name": "", "semorg-field-person-ref-ref-parameters": "", "semorg-field-person-ref-role-name": "", "semorg-field-person-ref-role-parameters": "", "semorg-field-person-ref-tag-name": "", "semorg-field-person-ref-tag-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-person-ref-create-title}} |edit title={{int:semorg-form-person-ref-edit-title}}<span class="d-none">: <page name></span> |page name= }}} {{semorg-form-template|person-ref}} {{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|person-ref|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-person-ref-category}}]]{{#semorg-set:person-ref |name={{{name|}}} |tag={{{tag|}}} |role={{{role|}}} |ref={{{ref|}}} |formerly={{{formerly|}}} }}{{#semorg-detail:person-ref}}{{#semorg-table:person-ref |name={{{name|}}} |tag={{{tag|}}} |role={{{role|}}} |ref={{{ref|}}} |formerly={{{formerly|}}} }}</includeonly>
Row Template
Template:Semorg-person-ref-row
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{name|}}}</td> <td>{{{tag|}}}</td> <td>{{{role|}}}</td> <td>{{{ref|}}}</td> <td>{{{formerly|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-person-ref-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:person-ref |heading={{int:semorg-person-ref-page-name}} |formlink={{#semorg-forminput:person-ref}} |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-person-ref-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['person-ref'] = [ "id" => "PR","fields" => ["name" => [ "id" => "NA","type" => "wpg" ],"tag" => [ "id" => "TG","type" => "txt" ],"role" => [ "id" => "RO","type" => "txt" ],"ref" => [ "id" => "RF","type" => "wpg" ],"formerly" => [ "id" => "FO","type" => "boo" ], ] ];