Template:Work: Difference between revisions
Jump to navigation
Jump to search
Second try's the charm Tag: Reverted |
Third time's the charm Tag: Reverted |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
{{#template_params: | {{#template_params:title (label=Title)|aliases (label=Alias(es))|subtitle (label=Subtitle)|compose_start_date (label=Composition Started)|compose_end_date (label=Composition Completed)|catalog_ids (label=Catalog ID(s))|composers (label=Composer(s))|librettists (label=Librettist(s))|authors (label=Author(s))|commissioners (label=Commissioner(s))|dedicatees (label=Dedicatee(s))|publishers (label=Publisher(s))|compose_date (label=Composed)|genres (label=Genre(s))|difficulty (label=Difficulty)|duration (label=Duration)}} | ||
title (label=Title)| | {{#cargo_declare:_table=works|title=String|aliases=List (,) of String|subtitle=String|compose_start_date=Start date|compose_end_date=End date|catalog_ids=List (,) of String|composers=List (,) of Page|librettists=List (,) of Page|authors=List (,) of Page|commissioners=List (,) of Page|dedicatees=List (,) of Page|publishers=List (,) of Page|compose_date=Date|genres=List (,) of String|difficulty=Rating|duration=String}} | ||
aliases (label=Alias(es))| | |||
subtitle (label=Subtitle)| | |||
compose_start_date (label=Composition Started)| | |||
compose_end_date (label=Composition Completed)| | |||
catalog_ids (label=Catalog ID(s))| | |||
composers (label=Composer(s))| | |||
librettists (label=Librettist(s))| | |||
authors (label=Author(s))| | |||
commissioners (label=Commissioner(s))| | |||
dedicatees (label=Dedicatee(s))| | |||
publishers (label=Publisher(s))| | |||
compose_date (label=Composed)| | |||
genres (label=Genre(s))| | |||
difficulty (label=Difficulty)| | |||
duration (label=Duration) | |||
}} | |||
{{#cargo_declare:_table=works| | |||
title=String| | |||
aliases=List (,) of String| | |||
subtitle=String| | |||
compose_start_date=Start date| | |||
compose_end_date=End date| | |||
catalog_ids=List (,) of String| | |||
composers=List (,) of Page| | |||
librettists=List (,) of Page| | |||
authors=List (,) of Page| | |||
commissioners=List (,) of Page| | |||
dedicatees=List (,) of Page| | |||
publishers=List (,) of Page| | |||
compose_date=Date| | |||
genres=List (,) of String| | |||
difficulty=Rating| | |||
duration=String | |||
}} | |||
</noinclude> | </noinclude> | ||
<includeonly>{{#cargo_store:_table=works}}<templatestyles src="Work/styles.css" /><table class="works-infobox"> | |||
<includeonly> | <tr><th colspan="2" class="works-infobox-title">{{{title|{{PAGENAME}}}}}</th></tr> | ||
{{#cargo_store:_table=works}} | {{#if:{{{subtitle|}}}|<tr><td colspan="2" class="works-infobox-subtitle">{{{subtitle}}}</td></tr>}} | ||
{{#if:{{{aliases|}}}|<tr><th>Alias(es)</th><td>{{{aliases}}}</td></tr>}} | |||
{{#if:{{{compose_start_date|}}}{{{compose_end_date|}}}|<tr><th>Composition</th><td>{{{compose_start_date|}}}{{#if:{{{compose_start_date|}}}|{{#if:{{{compose_end_date|}}}| – }}}}{{{compose_end_date|}}}</td></tr>}} | |||
{{#if:{{{compose_date|}}}|<tr><th>Composed</th><td>{{{compose_date}}}</td></tr>}} | |||
{{#if:{{{catalog_ids|}}}|<tr><th>Catalog ID(s)</th><td>{{{catalog_ids}}}</td></tr>}} | |||
{{#if:{{{subtitle|}}}| | {{#if:{{{composers|}}}|<tr><th>Composer(s)</th><td>{{#arraymap:{{{composers}}}|,|@@@|[[@@@]]|, }}</td></tr>}} | ||
{{#if:{{{librettists|}}}|<tr><th>Librettist(s)</th><td>{{#arraymap:{{{librettists}}}|,|@@@|[[@@@]]|, }}</td></tr>}} | |||
{{#if:{{{authors|}}}|<tr><th>Author(s)</th><td>{{#arraymap:{{{authors}}}|,|@@@|[[@@@]]|, }}</td></tr>}} | |||
{{#if:{{{commissioners|}}}|<tr><th>Commissioner(s)</th><td>{{#arraymap:{{{commissioners}}}|,|@@@|[[@@@]]|, }}</td></tr>}} | |||
}} | {{#if:{{{dedicatees|}}}|<tr><th>Dedicatee(s)</th><td>{{#arraymap:{{{dedicatees}}}|,|@@@|[[@@@]]|, }}</td></tr>}} | ||
{{#if:{{{publishers|}}}|<tr><th>Publisher(s)</th><td>{{#arraymap:{{{publishers}}}|,|@@@|[[@@@]]|, }}</td></tr>}} | |||
{{#if:{{{aliases|}}}| | {{#if:{{{genres|}}}|<tr><th>Genre(s)</th><td>{{{genres}}}</td></tr>}} | ||
{{ | {{#if:{{{difficulty|}}}|<tr><th>Difficulty</th><td><span class="works-stars-filled">{{padleft:|{{{difficulty}}}|★}}</span><span class="works-stars-empty">{{padleft:|{{#expr:5 - {{{difficulty}}}}}|☆}}</span></td></tr>}} | ||
{{#if:{{{duration|}}}|<tr><th>Duration</th><td>{{{duration}}}</td></tr>}} | |||
{{ | </table> | ||
[[Category:Works]]</includeonly> | |||
{{ | |||
{{ | |||
{{#if:{{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
{ | |||
{{#if:{{{ | |||
{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
{{ | |||
}} | |||
{{#if:{{{ | |||
{{ | |||
{{ | |||
}} | |||
{{#if:{{{genres|}}}| | |||
}} | |||
{{#if:{{{difficulty|}}}| | |||
{{ | |||
{{ | |||
}} | |||
{{#if:{{{duration|}}}| | |||
}} | |||
[[Category:Works]] | |||
</includeonly> | |||
Revision as of 03:02, 8 July 2026
This is the "Work" template.
It should be called in the following format:
{{Work
|title=
|aliases=
|subtitle=
|compose_start_date=
|compose_end_date=
|catalog_ids=
|composers=
|librettists=
|authors=
|commissioners=
|dedicatees=
|publishers=
|compose_date=
|genres=
|difficulty=
|duration=
}}
Edit the page to see the template text.
This template defines the table "works". View table.