Template:Article: Difference between revisions
From MoHA Wiki
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
{{#set: | {{#set: | ||
|Associated Program={{{Program|}}} | |Associated Program={{{Program|}}} | ||
|Associated Event={{{Event|}}} | |||
|Date Published={{{Date Published|}}} | |||
|Article author={{{Article authors|}}}|+sep=; | |||
}} | }} | ||
{{#ifexist: Widget:{{{Program|}}}|{{Styled category|{{{Program|}}}}}}} | {{#ifexist: Widget:{{{Program|}}}|{{Styled category|{{{Program|}}}}}}} | ||
{{#ifeq: {{{Is published|}}}|Yes|[[Category: | {{#ifeq: {{{Is published|}}}|Yes|[[Category:Published articles]]|[[Category:Unpublished articles]]}} | ||
{{#arraymap:{{{Categories|}}}|;|@@@|[[Category:@@@]]|}} | {{#arraymap:{{{Categories|}}}|;|@@@|[[Category:@@@]]{{#set: Additional category=@@@}}|}} | ||
{{#arraydefine: authors|{{{Article authors|}}}|;}} | |||
{{#arrayslice: authors_delimited | |||
|authors | |||
|0 | |||
|{{#switch: {{#arraysize: authors}} | |||
|0= | |||
|1=1 | |||
|#default={{#expr: {{#arraysize: authors}} - 1}} | |||
}} | |||
}} | |||
{{#arrayslice: authors_last | |||
|authors | |||
|-1 | |||
|1 | |||
}} | |||
</div> | |||
<div id="article-info" class="d-flex flex-column flex-lg-row justify-content-between">{{#switch: {{#arraysize: authors}} | |||
|0= | |||
|#default=<span>By {{#arrayprint: authors_delimited|, |@@@|[[@@@]]}} {{#ifexpr: 0{{#arraysize: authors}} > 1|and [[{{#arrayprint: authors_last}}]]}}</span> | |||
}}<!-- | |||
-->{{#if: {{{Event|}}} | |||
|<span>[[{{{Event|}}}]]</span> | |||
}}<!-- | |||
-->{{#if: {{{Date Published|}}} | |||
|<span>Published: {{#time: F j, Y|{{{Date Published|}}}}}</span> | |||
}} | |||
</div> | </div> | ||
</includeonly> | </includeonly> |