Difference between revisions of "Policy"
From SmartHubs
(Created page with "{{Semorg-generator |template-id=POL |form-add-button-text=Add other related transport policy |form-unique-number=No |rows=title,link |template-fields={{semorg-generator-field...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
|id=hub | |id=hub | ||
|property-id=HU | |property-id=HU | ||
+ | |type=wpg | ||
}}{{semorg-generator-field | }}{{semorg-generator-field | ||
|id=link | |id=link | ||
Line 16: | Line 17: | ||
|property-id=TI | |property-id=TI | ||
|name=Title | |name=Title | ||
+ | |type=txt | ||
+ | }}{{semorg-generator-field | ||
+ | |id=summary | ||
+ | |property-id=SU | ||
+ | |name=Summary | ||
|type=txt | |type=txt | ||
}} | }} | ||
}} | }} |
Latest revision as of 11:28, 19 November 2021
Messages
"semorg-form-policy-add-button-text": "Add other related transport policy",
"semorg-form-policy-template": "policy",
"semorg-form-policy-rows": "title,link",
"semorg-list-policy-headers": "policy-title, policy-link, policy-summary, policy-hub",
"semorg-field-policy-title-name": "Title",
"semorg-field-policy-title-parameters": "",
"semorg-field-policy-link-name": "Link",
"semorg-field-policy-link-parameters": "",
"semorg-field-policy-summary-name": "Summary",
"semorg-field-policy-summary-parameters": "",
"semorg-field-policy-hub-name": "",
"semorg-field-policy-hub-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-policy-create-title}} |edit title={{int:semorg-form-policy-edit-title}}<span class="d-none">: <page name></span> |page name= }}} {{semorg-form-template|policy}} {{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|policy|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-policy-category}}]]{{#semorg-set:policy |title={{{title|}}} |link={{{link|}}} |summary={{{summary|}}} |hub={{{hub|}}} }}{{#semorg-detail:policy}}{{#semorg-table:policy |title={{{title|}}} |link={{{link|}}} |summary={{{summary|}}} |hub={{{hub|}}} }}</includeonly>
Row Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{title|}}}</td> <td>{{{link|}}}</td> <td>{{{summary|}}}</td> <td>{{{hub|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-policy-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:policy |heading={{int:semorg-policy-page-name}} |formlink={{#semorg-forminput:policy}} |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-policy-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['policy'] = [ "id" => "POL","fields" => ["title" => [ "id" => "TI","type" => "txt" ],"link" => [ "id" => "LI","type" => "uri" ],"summary" => [ "id" => "SU","type" => "txt" ],"hub" => [ "id" => "HU","type" => "wpg" ], ] ];