Difference between revisions of "Mh-literature"
From SmartHubs
m (Admin moved page Grey-literature to Literature without leaving a redirect) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Semorg-generator | {{Semorg-generator | ||
− | |template-id= | + | |template-id=LIT |
− | |page-name= | + | |page-name=Literature |
− | |entity-name= | + | |entity-name=Literature |
− | |form-page-name= | + | |form-page-name=Literatures |
|form-unique-number=Yes | |form-unique-number=Yes | ||
|display-title=<nowiki>{{{title}}}</nowiki> | |display-title=<nowiki>{{{title}}}</nowiki> | ||
|rows=title,url,relevant-pages | |rows=title,url,relevant-pages | ||
− | |list-headers= | + | |list-headers=literature-title,literature-url |
|template-fields={{semorg-generator-field | |template-fields={{semorg-generator-field | ||
|id=title | |id=title | ||
Line 24: | Line 24: | ||
|name=Relevant Pages | |name=Relevant Pages | ||
|type=txt | |type=txt | ||
+ | }}{{semorg-generator-field | ||
+ | |id=project | ||
+ | |property-id=PR | ||
+ | |name=Project | ||
+ | |type=wpg | ||
}} | }} | ||
}} | }} |
Latest revision as of 19:58, 28 June 2021
Messages
"semorg-mh-literature-template": "semorg-mh-literature", "semorg-mh-literature-category": "semorg-mh-literature", "semorg-mh-literature-form": "semorg-mh-literature", "semorg-mh-literature-page-name": "Literature", "semorg-mh-literature-entity-name": "Literature", "semorg-form-mh-literature-create-title": "Create Literature", "semorg-form-mh-literature-edit-title": "Edit Literature", "semorg-form-mh-literature-page-name": "Literatures", "semorg-form-mh-literature-template": "mh-literature", "semorg-form-mh-literature-rows": "title,url,relevant-pages", "semorg-list-mh-literature-headers": "literature-title,literature-url", "semorg-field-mh-literature-title-name": "Title", "semorg-field-mh-literature-title-parameters": "mandatory|size=60", "semorg-field-mh-literature-url-name": "URL", "semorg-field-mh-literature-url-parameters": "", "semorg-field-mh-literature-relevant-pages-name": "Relevant Pages", "semorg-field-mh-literature-relevant-pages-parameters": "", "semorg-field-mh-literature-project-name": "Project", "semorg-field-mh-literature-project-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-mh-literature-create-title}} |edit title={{int:semorg-form-mh-literature-edit-title}}<span class="d-none">: <page name></span> |page name={{int:semorg-form-mh-literature-page-name}}/<unique number;start=1> }}} {{semorg-form-template|mh-literature}} {{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|mh-literature|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-mh-literature-category}}]]{{#semorg-set:mh-literature |title={{{title|}}} |url={{{url|}}} |relevant-pages={{{relevant-pages|}}} |project={{{project|}}} }}{{#semorg-detail:mh-literature |heading={{{title}}} }}{{#semorg-table:mh-literature |title={{{title|}}} |url={{{url|}}} |relevant-pages={{{relevant-pages|}}} |project={{{project|}}} }}</includeonly>
Row Template
Template:Semorg-mh-literature-row
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{title|}}}</td> <td>{{{url|}}}</td> <td>{{{relevant-pages|}}}</td> <td>{{{project|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-mh-literature-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:mh-literature |heading={{int:semorg-mh-literature-page-name}} |formlink={{#semorg-formlink:mh-literature}} |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-mh-literature-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['mh-literature'] = [ "id" => "LIT","fields" => ["title" => [ "id" => "TI","type" => "txt" ],"url" => [ "id" => "UR","type" => "uri" ],"relevant-pages" => [ "id" => "RP","type" => "txt" ],"project" => [ "id" => "PR","type" => "wpg" ], ] ];