Difference between revisions of "Template:Media annotation"
Jump to navigation
Jump to search
(31 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#vardefine: date|{{#if:{{{Day|}}} | + | <includeonly>{{#vardefine: date|{{#if:{{{Day|}}} |
|{{#time:Y/m/d|{{{Year|}}}-{{padleft:{{{Month|}}}|2}}-{{padleft:{{{Day|}}}|2}}}} | |{{#time:Y/m/d|{{{Year|}}}-{{padleft:{{{Month|}}}|2}}-{{padleft:{{{Day|}}}|2}}}} | ||
|{{#if: {{{Month|}}} | |{{#if: {{{Month|}}} | ||
Line 20: | Line 20: | ||
}} | }} | ||
}}<!-- | }}<!-- | ||
+ | |||
+ | -->{{#arraydefine: industries | ||
+ | |{{#arraymap:{{{Organization name|}}} | ||
+ | |; | ||
+ | |@@@ | ||
+ | |{{#ask: [[-Has subobject::@@@]][[Industry sector::+]] | ||
+ | |?Industry sector | ||
+ | |?Sub-Industry | ||
+ | |mainlabel=- | ||
+ | |headers=hide | ||
+ | |format=array | ||
+ | |sep=; | ||
+ | |propsep= > | ||
+ | |manysep=; | ||
+ | }} | ||
+ | |; | ||
+ | }} | ||
+ | |; | ||
+ | |unique | ||
+ | }}<!-- | ||
+ | |||
+ | -->{{#vardefine: stripped_fn | ||
+ | |{{#sub:{{PAGENAME}}|0|{{#expr:{{#len:{{PAGENAME}}}} - 5}}}}{{#explode:{{#sub:{{PAGENAME}}|-5}}|.|0}} | ||
+ | }}<!-- | ||
-->{{#set: | -->{{#set: | ||
Line 26: | Line 50: | ||
|Location={{{Location|}}} | |Location={{{Location|}}} | ||
|Has date={{#var: date}} | |Has date={{#var: date}} | ||
− | |Year={{{ | + | |Year={{{year|{{#if:{{#var:date}}|{{#time:Y|{{#var:date}}}}}} }}} |
|Authored by={{{Creator|}}}|+sep=; | |Authored by={{{Creator|}}}|+sep=; | ||
|Map publisher={{{Publisher|}}} | |Map publisher={{{Publisher|}}} | ||
|Newspaper title={{{Newspaper title|}}} | |Newspaper title={{{Newspaper title|}}} | ||
+ | |Newspaper section={{{Newspaper section|}}} | ||
+ | |Page number={{{Page number|}}} | ||
|Series title={{{Series title|}}} | |Series title={{{Series title|}}} | ||
|Article title={{{Article title|}}} | |Article title={{{Article title|}}} | ||
Line 36: | Line 62: | ||
|Full name={{{People|}}}|+sep=; | |Full name={{{People|}}}|+sep=; | ||
|Status={{{Status|}}} | |Status={{{Status|}}} | ||
+ | |Years active={{{Years active|}}} | ||
|Subject tag={{{Subject tags|}}}|+sep=; | |Subject tag={{{Subject tags|}}}|+sep=; | ||
+ | |Full text={{{Full text|}}} | ||
}}<!-- | }}<!-- | ||
− | -->< | + | -->{{#default_form: Media annotation}}<!-- |
− | + | ||
+ | --><div class="wcpl-infobox">[[{{FULLPAGENAME}}|class=wcpl-infobox-image|320px]] | ||
+ | <div class="wcpl-infobox-section"> | ||
+ | <div class="wcpl-infobox-section-header">{{{Media category|}}}</div> | ||
+ | <div class="wcpl-infobox-section-body"> | ||
<table class="wikitable display" style="width:100%"> | <table class="wikitable display" style="width:100%"> | ||
{{#if:{{{Creator|}}}| | {{#if:{{{Creator|}}}| | ||
Line 60: | Line 92: | ||
-->{{#if:{{#var:date}}| | -->{{#if:{{#var:date}}| | ||
<tr valign=top> | <tr valign=top> | ||
− | <td width=214>'' | + | <td width=214>''Date''</td> |
<td>{{#var:date}}</td> | <td>{{#var:date}}</td> | ||
</tr> | </tr> | ||
Line 66: | Line 98: | ||
-->{{#arraymap: | -->{{#arraymap: | ||
− | |||
Organization name | Organization name | ||
Location | Location | ||
+ | Location note | ||
Year | Year | ||
+ | Time period | ||
Newspaper title | Newspaper title | ||
+ | Newspaper section | ||
+ | Page number | ||
Series title | Series title | ||
Article title | Article title | ||
Publication title | Publication title | ||
Publisher | Publisher | ||
+ | Source | ||
+ | Digital publisher | ||
+ | Contributor | ||
+ | Rights | ||
+ | Collection | ||
+ | Image number | ||
+ | Description photo | ||
+ | Full text | ||
Object type | Object type | ||
People | People | ||
Status | Status | ||
+ | Years active | ||
Subject tags | Subject tags | ||
|\n | |\n | ||
Line 85: | Line 129: | ||
<td width=214>''@@@''</td> | <td width=214>''@@@''</td> | ||
<td>{{#switch: @@@ | <td>{{#switch: @@@ | ||
− | |People|Subject tags|Organization name=<ul class="ul-simple">{{#arraymap:{{{@@@|}}}|;|$$$|<li>{{#if:{{#show:$$$|?Modification date}}|[[$$$]]|$$$}}</li>|}}</ul> | + | |People|Subject tags|Organization name|Contributor=<ul class="ul-simple">{{#arraymap:{{{@@@|}}}|;|$$$|<li>{{#if:{{#show:$$$|?Modification date}}|[[$$$]]|$$$}}</li>|}}</ul> |
− | | | + | |Publisher|Newspaper title|Digital publisher={{#if:{{#show:{{{@@@|}}}|?Modification date}}|[[{{{@@@|}}}]]|{{{@@@|}}}}} |
+ | |#default={{{@@@|}}} | ||
}}</td> | }}</td> | ||
</tr> | </tr> | ||
+ | }}{{#ifeq: @@@|Organization name|{{#ifexpr: 0{{#arraysize: industries}} > 0| | ||
+ | <tr valign=top> | ||
+ | <td width=214>''Industry Sector''</td> | ||
+ | <td><ul class="ul-simple">{{#arrayprint: industries | ||
+ | | | ||
+ | |^^^ | ||
+ | |<li>{{#replace:^^^|>| > }}</li><!-- | ||
+ | -->{{#set: | ||
+ | |Industry sector={{#explode:^^^|>|0}} | ||
+ | |Sub-Industry={{#explode:^^^|>|1}} | ||
+ | }} | ||
+ | }}</ul></td> | ||
+ | </tr> | ||
+ | }} | ||
}} | }} | ||
| | | | ||
}} | }} | ||
</table> | </table> | ||
− | {{# | + | </div> |
− | |{{# | + | </div> |
− | + | </div> | |
− | + | {{#switch: {{{Media category|}}} | |
− | + | |Newspaper ad | |
− | + | |Newspaper clipping={{#createpageifnotex:{{{Media category|}}}:{{#var:stripped_fn}} - {{{Newspaper title|}}} {{#time: F j Y|{{#var:date}}}}| | |
− | + | <nowiki>{{</nowiki>{{{Media category|}}} | |
− | + | <nowiki>|organization_name=</nowiki>{{{Organization name|}}} | |
− | + | <nowiki>|date=</nowiki>{{#var:date}} | |
+ | <nowiki>|month=</nowiki>{{{Month|}}} | ||
+ | <nowiki>|day=</nowiki>{{{Day|}}} | ||
+ | <nowiki>|year=</nowiki>{{{Year|}}} | ||
+ | <nowiki>|newspaper_title=</nowiki>{{{Newspaper title|}}} | ||
+ | <nowiki>|newspaper_section=</nowiki>{{{Newspaper section|}}} | ||
+ | <nowiki>|page_number=</nowiki>{{{Page number|}}} | ||
+ | <nowiki>|image=</nowiki>{{PAGENAME}} | ||
+ | <nowiki>|subject_tags=</nowiki>{{{Subject tags|}}} | ||
+ | <nowiki>}}</nowiki> | ||
}} | }} | ||
− | + | |Newspaper article={{#createpageifnotex:{{{Media category|}}}:{{#var:stripped_fn}} - {{{Newspaper title|}}} {{#time: F j Y|{{#var:date}}}}| | |
− | |Newspaper | + | <nowiki>{{</nowiki>{{{Media category|}}} |
− | |||
− | |||
− | <nowiki>{{</nowiki> | ||
<nowiki>|organization_name=</nowiki>{{{Organization name|}}} | <nowiki>|organization_name=</nowiki>{{{Organization name|}}} | ||
<nowiki>|date=</nowiki>{{#var:date}} | <nowiki>|date=</nowiki>{{#var:date}} | ||
<nowiki>|newspaper_title=</nowiki>{{{Newspaper title|}}} | <nowiki>|newspaper_title=</nowiki>{{{Newspaper title|}}} | ||
+ | <nowiki>|newspaper_section=</nowiki>{{{Newspaper section|}}} | ||
+ | <nowiki>|page_number=</nowiki>{{{Page number|}}} | ||
+ | <nowiki>|series_title=</nowiki>{{{Series title|}}} | ||
+ | <nowiki>|article_title=</nowiki>{{{Article title|}}} | ||
+ | <nowiki>|author=</nowiki>{{{Creator|}}} | ||
+ | <nowiki>|month=</nowiki>{{{Month|}}} | ||
+ | <nowiki>|day=</nowiki>{{{Day|}}} | ||
+ | <nowiki>|year=</nowiki>{{{Year|}}} | ||
<nowiki>|image=</nowiki>{{PAGENAME}} | <nowiki>|image=</nowiki>{{PAGENAME}} | ||
+ | <nowiki>|subject_tags=</nowiki>{{{Subject tags|}}} | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
}} | }} | ||
}} | }} | ||
+ | </includeonly> |