File: Difference between revisions
From SemanticOrganization
m (Admin moved page Attachment to File without leaving a redirect) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Semorg-generator | {{Semorg-generator | ||
|template-id= | |template-id=FI | ||
|page-name= | |page-name=Files | ||
|entity-name= | |entity-name=File | ||
|form-add-button-text=Add | |form-add-button-text=Add file | ||
|form-unique-number=No | |form-unique-number=No | ||
|rows=file,title,description | |rows=file,title,description | ||
|list-headers= | |list-headers=file-ref,file-file,file-title,file-description | ||
|template-fields={{semorg-generator-field | |template-fields={{semorg-generator-field | ||
|id=ref | |id=ref | ||
Line 29: | Line 29: | ||
|type=txt | |type=txt | ||
|parameters=input type=textarea,cols=60,rows=1,autogrow | |parameters=input type=textarea,cols=60,rows=1,autogrow | ||
}}{{semorg-generator-field | |||
|id=tag | |||
|property-id=TA | |||
|name=Tag | |||
|type=txt | |||
}} | }} | ||
}} | }} |
Latest revision as of 17:56, 1 May 2019
Messages
"semorg-file-template": "semorg-file", "semorg-form-file-add-button-text": "Add file", "semorg-form-file-template": "file", "semorg-form-file-rows": "file,title,description", "semorg-list-file-headers": "file-ref,file-file,file-title,file-description", "semorg-field-file-description-name": "Description", "semorg-field-file-description-parameters": "input type=textarea|cols=60|rows=1|autogrow", "semorg-field-file-file-name": "File name", "semorg-field-file-file-parameters": "uploadable|values from namespace=File", "semorg-field-file-link-text-name": "Link text", "semorg-field-file-link-text-parameters": "", "semorg-field-file-ref-name": "Referencing Page", "semorg-field-file-ref-parameters": "", "semorg-field-file-tag-name": "Tag", "semorg-field-file-tag-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-file-create-title}} |edit title={{int:semorg-form-file-edit-title}}<span class="d-none">: <page name></span> |page name= }}} {{semorg-form-template|file}} {{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|file|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-file-category}}]]{{#semorg-set:file |tag={{{tag|}}} |description={{{description|}}} |link-text={{{link-text|}}} |file={{{file|}}} |ref={{{ref|}}} }}{{#semorg-detail:file}}{{#semorg-table:file |tag={{{tag|}}} |description={{{description|}}} |link-text={{{link-text|}}} |file={{{file|}}} |ref={{{ref|}}} }}</includeonly>
Row Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{tag|}}}</td> <td>{{{description|}}}</td> <td>{{{link-text|}}}</td> <td>{{{file|}}}</td> <td>{{{ref|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:file |heading={{int:semorg-file-page-name}} |formlink={{#semorg-forminput:file}} |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-file-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['file'] = [ "id" => "FI","fields" => ["tag" => [ "id" => "TA","type" => "txt" ],"description" => [ "id" => "DE","type" => "txt" ],"link-text" => [ "id" => "LT","type" => "txt" ],"file" => [ "id" => "FI","type" => "wpg" ],"ref" => [ "id" => "RE","type" => "wpg" ], ] ];