Vacation: Difference between revisions
From SemanticOrganization
No edit summary |
m (Text replacement - "|field-" to "|") |
||
(2 intermediate revisions by the same user not shown) | |||
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 | ||
| | |id=person | ||
| | |property-id=PE | ||
| | |name=Name | ||
| | |type=wpg | ||
}}{{ | }}{{Semorg-generator-field | ||
| | |id=start-date | ||
| | |property-id=SD | ||
| | |name=von | ||
| | |type=dat | ||
}}{{ | }}{{Semorg-generator-field | ||
| | |id=end-date | ||
| | |property-id=ED | ||
| | |name=bis | ||
| | |type=dat | ||
}}{{ | }}{{Semorg-generator-field | ||
| | |id=note | ||
| | |property-id=NO | ||
| | |name=Anmerkungen | ||
| | |type=txt | ||
}} | }} | ||
}} | }} |
Latest revision as of 14:24, 22 November 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" ], ] ];