Expense-report: Difference between revisions
From SemanticOrganization
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{semorg-generator | ||
|template-id=ER | |template-id=ER | ||
|entity-name=Expense report | |||
|page-name=Expense reports | |page-name=Expense reports | ||
|form-page-name=Expense reports | |form-page-name=Expense reports | ||
|form-unique-number=Yes | |form-unique-number=Yes | ||
|display-title-message=<nowiki>Expense report for $1</nowiki> | |display-title-message=<nowiki>Expense report for $1</nowiki> | ||
|rows=date,person,quarter,payment-date | |||
|template-fields={{semorg-generator-field | |template-fields={{semorg-generator-field | ||
|id=person | |id=person | ||
Line 33: | Line 34: | ||
|id=year | |id=year | ||
|property-id=YE | |property-id=YE | ||
|name=Year | |||
|type=num | |||
|parameters=size=4 | |parameters=size=4 | ||
}}{{semorg-generator-field | }}{{semorg-generator-field | ||
Line 40: | Line 43: | ||
|type=dat | |type=dat | ||
|parameters=input type=date,size=10 | |parameters=input type=date,size=10 | ||
}}{{semorg-generator-field | |||
|id=payed | |||
|property-id=PA | |||
|type=boo | |||
}} | }} | ||
}} | }} |
Latest revision as of 08:39, 21 October 2023
Messages
"semorg-expense-report-template": "semorg-expense-report",
"semorg-expense-report-category": "semorg-expense-report",
"semorg-expense-report-form": "semorg-expense-report",
"semorg-expense-report-page-name": "Expense reports",
"semorg-expense-report-entity-name": "Expense report",
"semorg-form-expense-report-create-title": "Create Expense report",
"semorg-form-expense-report-edit-title": "Edit Expense report",
"semorg-form-expense-report-page-name": "Expense reports",
"semorg-form-expense-report-template": "expense-report",
"semorg-form-expense-report-rows": "date,person,quarter,payment-date",
"semorg-list-expense-report-headers": "expense-report-month, expense-report-payment-date, expense-report-date, expense-report-quarter, expense-report-year, expense-report-payed, expense-report-person",
"semorg-field-expense-report-date-name": "Date",
"semorg-field-expense-report-date-parameters": "input type=datepicker|size=10",
"semorg-field-expense-report-month-name": "Month",
"semorg-field-expense-report-month-parameters": "size=2",
"semorg-field-expense-report-payed-name": "",
"semorg-field-expense-report-payed-parameters": "",
"semorg-field-expense-report-payment-date-name": "Payment date",
"semorg-field-expense-report-payment-date-parameters": "input type=date|size=10",
"semorg-field-expense-report-person-name": "Person",
"semorg-field-expense-report-person-parameters": "input type=combobox|values from category=semorg-person-user|mapping property=Semorg-person-name",
"semorg-field-expense-report-quarter-name": "Quarter",
"semorg-field-expense-report-quarter-parameters": "input type=dropdown|size=1|values=1|2|3|4",
"semorg-field-expense-report-year-name": "Year",
"semorg-field-expense-report-year-parameters": "size=4",,
"semorg-expense-report-displaytitle": "Expense report for $1"
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-expense-report-create-title}} |edit title={{int:semorg-form-expense-report-edit-title}}<span class="d-none">: <page name></span> |page name={{int:semorg-form-expense-report-page-name}}/<unique number;start=1> }}} {{semorg-form-template|expense-report}} {{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|expense-report|}}
Category
Category:Semorg-expense-report
{{semorg-category}}
Template
Template:Semorg-expense-report
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-expense-report-category}}]]{{#semorg-set:expense-report |month={{{month|}}} |payment-date={{{payment-date|}}} |date={{{date|}}} |quarter={{{quarter|}}} |year={{{year|}}} |payed={{{payed|}}} |person={{{person|}}} }}{{#semorg-detail:expense-report}}{{#semorg-table:expense-report |month={{{month|}}} |payment-date={{{payment-date|}}} |date={{{date|}}} |quarter={{{quarter|}}} |year={{{year|}}} |payed={{{payed|}}} |person={{{person|}}} }}</includeonly>
Row Template
Template:Semorg-expense-report-row
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{month|}}}</td> <td>{{{payment-date|}}}</td> <td>{{{date|}}}</td> <td>{{{quarter|}}}</td> <td>{{{year|}}}</td> <td>{{{payed|}}}</td> <td>{{{person|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-expense-report-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:expense-report |heading={{int:semorg-expense-report-page-name}} |formlink={{#semorg-formlink:expense-report}} |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-expense-report-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['expense-report'] = [ "id" => "ER","fields" => ["month" => [ "id" => "MO","type" => "num" ],"payment-date" => [ "id" => "PD","type" => "dat" ],"date" => [ "id" => "DA","type" => "dat" ],"quarter" => [ "id" => "QU","type" => "num" ],"year" => [ "id" => "YE","type" => "num" ],"payed" => [ "id" => "PA","type" => "boo" ],"person" => [ "id" => "PE","type" => "wpg" ], ] ];