Vacation: Difference between revisions
From SemanticOrganization
No edit summary |
m (Text replacement - "{{Generator" to "{{Semorg-generator") |
||
Line 1: | Line 1: | ||
{{ | {{Semorg-generator | ||
|template-id=VA | |template-id=VA | ||
|form-titles=Urlaub | |form-titles=Urlaub | ||
|form-page-name=Urlaube | |form-page-name=Urlaube | ||
|form-unique-number=Yes | |form-unique-number=Yes | ||
|template-fields={{ | |template-fields={{Semorg-generator-field | ||
|field-id=person | |field-id=person | ||
|field-property-id=PE | |field-property-id=PE | ||
|field-name=Name | |field-name=Name | ||
|field-type=wpg | |field-type=wpg | ||
}}{{ | }}{{Semorg-generator-field | ||
|field-id=start-date | |field-id=start-date | ||
|field-property-id=SD | |field-property-id=SD | ||
|field-name=von | |field-name=von | ||
|field-type=dat | |field-type=dat | ||
}}{{ | }}{{Semorg-generator-field | ||
|field-id=end-date | |field-id=end-date | ||
|field-property-id=ED | |field-property-id=ED | ||
|field-name=bis | |field-name=bis | ||
|field-type=dat | |field-type=dat | ||
}}{{ | }}{{Semorg-generator-field | ||
|field-id=note | |field-id=note | ||
|field-property-id=NO | |field-property-id=NO |
Revision as of 09:18, 31 October 2018
Messages
"semorg-vacation-template": "semorg-vacation", "semorg-vacation-category": "semorg-vacation", "semorg-vacation-form": "semorg-vacation", "semorg-form-vacation-create-title": "Create Urlaub", "semorg-form-vacation-edit-title": "Edit Urlaub", "semorg-form-vacation-page-name": "Urlaube", "semorg-form-vacation-template": "vacation", "semorg-form-vacation-rows": "start-date, end-date, note, person", "semorg-list-vacation-headers": "vacation-start-date, vacation-end-date, vacation-note, vacation-person", "semorg-field-vacation-end-date-name": "bis", "semorg-field-vacation-end-date-parameters": "", "semorg-field-vacation-note-name": "Anmerkungen", "semorg-field-vacation-note-parameters": "", "semorg-field-vacation-person-name": "Name", "semorg-field-vacation-person-parameters": "", "semorg-field-vacation-start-date-name": "von", "semorg-field-vacation-start-date-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-vacation-create-title}} |edit title={{int:semorg-form-vacation-edit-title}}<span class="d-none">: <page name></span> |page name={{int:semorg-form-vacation-page-name}}/<unique number;start=1> }}} {{semorg-form-template|vacation}} {{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|vacation|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-vacation-category}}]]{{#semorg-set:vacation |start-date={{{start-date|}}} |end-date={{{end-date|}}} |note={{{note|}}} |person={{{person|}}} }}{{#semorg-detail:vacation}}{{#semorg-table:vacation |start-date={{{start-date|}}} |end-date={{{end-date|}}} |note={{{note|}}} |person={{{person|}}} }}</includeonly>
Row Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{start-date|}}}</td> <td>{{{end-date|}}}</td> <td>{{{note|}}}</td> <td>{{{person|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-vacation-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:vacation |heading={{int:semorg-vacation-page-name}} |formlink={{#semorg-formlink:vacation}} |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-vacation-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['vacation'] = [ "id" => "VA","fields" => ["start-date" => [ "id" => "SD","type" => "dat" ],"end-date" => [ "id" => "ED","type" => "dat" ],"note" => [ "id" => "NO","type" => "txt" ],"person" => [ "id" => "PE","type" => "wpg" ], ] ];