ICT:FinalConfig-Chapter
Appearance
Final Configuration for the Chapter Entity
The aim is to create an interface without MediaWiki clutter and well protected to avoid confusing users with unnessessary elements on the page. The Cargo template follows what has been decided in the DBML. It is the first implementation of an entity in order to get to a final dashboard layout.
Cargo Table:
Template:Chapter
<noinclude>
Chapter data template
{{#cargo_declare:
_table=Chapters
|title=String
|code=String
|parent=Page
|sequence_number=Integer
|description=Text
|start_date=Date
|end_date=Date
|notes=Text
}}
{{#forminput:form=Chapter}}
</noinclude>
{{#cargo_store:
title={{{title|}}}
|code={{PAGENAME}}
|sequence_number={{{sequence_number|}}}
|description={{{description|}}}
|start_date={{{start_date|}}}
|end_date={{{end_date|}}}
|notes={{{notes|}}}
|parent={{{parent|}}}
}}
== {{{title|}}} ==
Once the template is created don't forget to manually force the creation of the Cargo table. If modifications are done to the table. On needs to manually update the table and then go to the Cargo interface to swap the temporary table to become the official one. Take care what is inside and outside .
Page Form:
Form:Chapter
<noinclude>
Form for creating and editing Chapter pages.
</noinclude>
{{{info
|no summary
|no preview
|no minor edit
|no watch
|no footer
}}}
{{{for template|Chapter}}}
{| class="formtable"
| Parent Chapter
| {{{field|parent
|label=Parent chapter
|input type=combobox
|values from namespace=Chapter
|existing values only
|placeholder=Top level (no parent)
}}}
|-
! Title
| {{{field|title|mandatory}}}
|-
! Code
| {{PAGENAME}}
|-
! Description
| {{{field|description|input type=textarea}}}
|-
! Start date
| {{{field|start_date|input type=datepicker|year range=1800:2100|show year dropdown|show month dropdown}}}
|-
! End date
| {{{field|end_date|input type=datepicker|year range=1800:2100|show year dropdown|show month dropdown}}}
|-
! Notes
| {{{field|notes|input type=textarea}}}
|}
{{{standard input|save}}}
{{{end template}}}
Dashboard page
Dashboard:Chapter
= 📘 Costa Sano Research CHAPTER Dashboard =
📖 [[Dashboard:Chapter/Help|Need Help?]]
{| class="wikitable sortable"
! Code !! Title !! Parent
{{#cargo_query:
tables=Chapters
|fields=_pageName,code,title,parent
|where=_pageNamespace=3004
|order by=code
|format=template
|template=ChapterRow
|named args=yes
|cache=no
}}
|}
Choose your chapter code corresponding to above table and respectiong the convention CHxx.y.z
{{#forminput:
form=Chapter
|namespace=Chapter
|button text=➕ New chapter
|returnto=Dashboard:Chapter
}}
<div style="text-align:right; font-size:90%;">
Last updated: {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} – {{CURRENTTIME}} UTC
</div>
Row transclusion Template
Template:ChapterRow
<includeonly>
|-
| {{#formlink:form=Chapter|target={{{_pageName}}}|link text={{{code}}}|returnto=Dashboard:Chapter}}
| {{{title}}}
| {{{parent}}}
</includeonly>