Travel-expenses

From SemanticOrganization
Revision as of 10:03, 7 October 2019 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Messages

"semorg-travel-expenses-template": "semorg-travel-expenses",
"semorg-travel-expenses-category": "semorg-travel-expenses",
"semorg-travel-expenses-form": "semorg-travel-expenses",
"semorg-form-travel-expenses-create-title": "Create Travel Expenses",
"semorg-form-travel-expenses-edit-title": "Edit Travel Expenses", 
"semorg-form-travel-expenses-page-name": "Travel Expenses",

"semorg-form-travel-expenses-template": "travel-expenses",
"semorg-form-travel-expenses-rows": "allowance-day, year, allowances, duration, start-time, start, project, quarter, destination, person, means, date, distance, description, total, end-time, end, expenses, allowance-night, dates",
"semorg-list-travel-expenses-headers": "travel-expenses-allowance-day, travel-expenses-year, travel-expenses-allowances, travel-expenses-duration, travel-expenses-start-time, travel-expenses-start, travel-expenses-project, travel-expenses-quarter, travel-expenses-destination, travel-expenses-person, travel-expenses-means, travel-expenses-date, travel-expenses-distance, travel-expenses-description, travel-expenses-total, travel-expenses-end-time, travel-expenses-end, travel-expenses-expenses, travel-expenses-allowance-night, travel-expenses-dates",
"semorg-field-travel-expenses-allowance-day-name": "Allowance (Day)", 
"semorg-field-travel-expenses-allowance-day-parameters": "",
"semorg-field-travel-expenses-allowance-night-name": "Allowance (Night)", 
"semorg-field-travel-expenses-allowance-night-parameters": "",
"semorg-field-travel-expenses-allowances-name": "Allowances", 
"semorg-field-travel-expenses-allowances-parameters": "",
"semorg-field-travel-expenses-date-name": "Date", 
"semorg-field-travel-expenses-date-parameters": "",
"semorg-field-travel-expenses-dates-name": "Dates", 
"semorg-field-travel-expenses-dates-fields": "start,end",
"semorg-field-travel-expenses-description-name": "Purpose", 
"semorg-field-travel-expenses-description-parameters": "",
"semorg-field-travel-expenses-destination-name": "Destination", 
"semorg-field-travel-expenses-destination-parameters": "",
"semorg-field-travel-expenses-distance-name": "Distance", 
"semorg-field-travel-expenses-distance-parameters": "",
"semorg-field-travel-expenses-duration-name": "Duration", 
"semorg-field-travel-expenses-duration-parameters": "",
"semorg-field-travel-expenses-end-name": "End", 
"semorg-field-travel-expenses-end-parameters": "input type=datetime",
"semorg-field-travel-expenses-end-time-name": "End Time", 
"semorg-field-travel-expenses-end-time-parameters": "input type=regexp|regexp=/^[0-9 ]*:[0-9]*$/",
"semorg-field-travel-expenses-expenses-name": "Expenses", 
"semorg-field-travel-expenses-expenses-parameters": "",
"semorg-field-travel-expenses-means-name": "Means of transport", 
"semorg-field-travel-expenses-means-parameters": "",
"semorg-field-travel-expenses-person-name": "Person", 
"semorg-field-travel-expenses-person-parameters": "input type=combobox|values from category=Semorg-person-user|mapping property=Semorg-person-name",
"semorg-field-travel-expenses-project-name": "Project", 
"semorg-field-travel-expenses-project-parameters": "values from category=Semorg-project",
"semorg-field-travel-expenses-quarter-name": "Quarter", 
"semorg-field-travel-expenses-quarter-parameters": "",
"semorg-field-travel-expenses-start-name": "Start", 
"semorg-field-travel-expenses-start-parameters": "input type=datetime",
"semorg-field-travel-expenses-start-time-name": "Start Time", 
"semorg-field-travel-expenses-start-time-parameters": "input type=regexp|regexp=/^[0-9 ]*:[0-9]*$/",
"semorg-field-travel-expenses-total-name": "Total", 
"semorg-field-travel-expenses-total-parameters": "",
"semorg-field-travel-expenses-year-name": "Year", 
"semorg-field-travel-expenses-year-parameters": "",,
"semorg-travel-expenses-displaytitle": "Travel Expenses for $1"

Form

Form:Semorg-travel-expenses

<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info
   |create title={{int:semorg-form-travel-expenses-create-title}}
   |edit title={{int:semorg-form-travel-expenses-edit-title}}<span class="d-none">: <page name></span>
   |page name={{int:semorg-form-travel-expenses-page-name}}/<unique number;start=1>
}}}

{{semorg-form-template|travel-expenses}}
 
{{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|travel-expenses|}}

Category

Category:Semorg-travel-expenses

{{semorg-category}}

Template

Template:Semorg-travel-expenses

<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-travel-expenses-category}}]]{{#semorg-set:travel-expenses 
  |allowance-day={{{allowance-day|}}} 
  |year={{{year|}}} 
  |allowances={{{allowances|}}} 
  |duration={{{duration|}}} 
  |start-time={{{start-time|}}} 
  |start={{{start|}}} 
  |project={{{project|}}} 
  |quarter={{{quarter|}}} 
  |destination={{{destination|}}} 
  |person={{{person|}}} 
  |means={{{means|}}} 
  |date={{{date|}}} 
  |distance={{{distance|}}} 
  |description={{{description|}}} 
  |total={{{total|}}} 
  |end-time={{{end-time|}}} 
  |end={{{end|}}} 
  |expenses={{{expenses|}}} 
  |allowance-night={{{allowance-night|}}} 
  |dates={{{dates|}}}
}}{{#semorg-detail:travel-expenses}}{{#semorg-table:travel-expenses 
  |allowance-day={{{allowance-day|}}} 
  |year={{{year|}}} 
  |allowances={{{allowances|}}} 
  |duration={{{duration|}}} 
  |start-time={{{start-time|}}} 
  |start={{{start|}}} 
  |project={{{project|}}} 
  |quarter={{{quarter|}}} 
  |destination={{{destination|}}} 
  |person={{{person|}}} 
  |means={{{means|}}} 
  |date={{{date|}}} 
  |distance={{{distance|}}} 
  |description={{{description|}}} 
  |total={{{total|}}} 
  |end-time={{{end-time|}}} 
  |end={{{end|}}} 
  |expenses={{{expenses|}}} 
  |allowance-night={{{allowance-night|}}} 
  |dates={{{dates|}}}
}}</includeonly>

Row Template

Template:Semorg-travel-expenses-row

<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr>
<td>[[{{{target|}}}]]</td> 
<td>{{{allowance-day|}}}</td> 
<td>{{{year|}}}</td> 
<td>{{{allowances|}}}</td> 
<td>{{{duration|}}}</td> 
<td>{{{start-time|}}}</td> 
<td>{{{start|}}}</td> 
<td>{{{project|}}}</td> 
<td>{{{quarter|}}}</td> 
<td>{{{destination|}}}</td> 
<td>{{{person|}}}</td> 
<td>{{{means|}}}</td> 
<td>{{{date|}}}</td> 
<td>{{{distance|}}}</td> 
<td>{{{description|}}}</td> 
<td>{{{total|}}}</td> 
<td>{{{end-time|}}}</td> 
<td>{{{end|}}}</td> 
<td>{{{expenses|}}}</td> 
<td>{{{allowance-night|}}}</td> 
<td>{{{dates|}}}</td>
{{semorg-showedit
  |target={{{target|}}}
}}
</tr></includeonly>

Overview Page Template

Template:Semorg-travel-expenses-overview

<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:travel-expenses
  |heading={{int:semorg-travel-expenses-page-name}}
  |formlink={{#semorg-formlink:travel-expenses}}
  |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-travel-expenses-overview}}

Property Registration

Add the following line to LocalSettings.php:

$wgSemorgAdditionalProperties['travel-expenses'] = [ "id" => "TE","fields" => ["allowance-day" => [ "id" => "AD","type" => "num" ],"year" => [ "id" => "YE","type" => "num" ],"allowances" => [ "id" => "AL","type" => "num" ],"duration" => [ "id" => "DU","type" => "num" ],"start-time" => [ "id" => "ST","type" => "txt" ],"start" => [ "id" => "SD","type" => "dat" ],"project" => [ "id" => "PR","type" => "wpg" ],"quarter" => [ "id" => "QU","type" => "num" ],"destination" => [ "id" => "DS","type" => "txt" ],"person" => [ "id" => "PE","type" => "wpg" ],"means" => [ "id" => "ME","type" => "txt" ],"date" => [ "id" => "DA","type" => "dat" ],"distance" => [ "id" => "DI","type" => "num" ],"description" => [ "id" => "DE","type" => "txt" ],"total" => [ "id" => "TO","type" => "num" ],"end-time" => [ "id" => "ET","type" => "txt" ],"end" => [ "id" => "ED","type" => "dat" ],"expenses" => [ "id" => "EX","type" => "num" ],"allowance-night" => [ "id" => "AN","type" => "num" ],"dates" => [ "id" => "DT","type" => "" ], ] ];