Topic

From SemanticOrganization
Revision as of 21:32, 2 August 2020 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Messages

"semorg-topic-template": "semorg-topic",
"semorg-topic-category": "semorg-topic",
"semorg-topic-form": "semorg-topic",
"semorg-topic-page-name": "Topics",
"semorg-topic-entity-name": "Topic",
"semorg-form-topic-create-title": "Create Topic",
"semorg-form-topic-edit-title": "Edit Topic", 
"semorg-form-topic-page-name": "Topics",

"semorg-form-topic-template": "",
"semorg-form-topic-rows": "category,name,description",
"semorg-list-topic-headers": "topic-name,topic-description",
"semorg-field-topic-category-name": "Categories", 
"semorg-field-topic-category-parameters": "input type=tokens|values from category=semorg-topic-category|mapping property=semorg-topic-category-name",
"semorg-field-topic-description-name": "Description", 
"semorg-field-topic-description-parameters": "input type=textarea|cols=60|rows=1|autogrow",
"semorg-field-topic-name-name": "Name", 
"semorg-field-topic-name-parameters": "input type=text|size=60|mandatory",
"semorg-field-topic-type-name": "Type", 
"semorg-field-topic-type-parameters": "input type=tokens|values from property=semorg-topic-type",

Form

Form:Semorg-topic

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

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

Category

Category:Semorg-topic

{{semorg-category}}

Template

Template:Semorg-topic

<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-topic-category}}]]{{#semorg-set:topic 
  |description={{{description|}}} 
  |category={{{category|}}} 
  |type={{{type|}}} 
  |name={{{name|}}}
}}{{#semorg-detail:topic
  |heading={{{name}}}
}}{{#semorg-table:topic 
  |description={{{description|}}} 
  |category={{{category|}}} 
  |type={{{type|}}} 
  |name={{{name|}}}
}}</includeonly>

Row Template

Template:Semorg-topic-row

<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr>
<td>[[{{{target|}}}]]</td> 
<td>{{{description|}}}</td> 
<td>{{{category|}}}</td> 
<td>{{{type|}}}</td> 
<td>{{{name|}}}</td>
{{semorg-showedit
  |target={{{target|}}}
}}
</tr></includeonly>

Overview Page Template

Template:Semorg-topic-overview

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

Topics

{{semorg-topic-overview}}

Property Registration

Add the following line to LocalSettings.php:

$wgSemorgAdditionalProperties['topic'] = [ "id" => "TP","fields" => ["description" => [ "id" => "DE","type" => "txt" ],"category" => [ "id" => "CA","type" => "wpg" ],"type" => [ "id" => "TY","type" => "txt" ],"name" => [ "id" => "NA","type" => "txt" ], ] ];