Template:ShowEdition: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
m (Text replace - "{{PAGENAME}}" to "Category:Templates")
(replaced template:Switch with parser function #ifeq)
Line 9: Line 9:
| {{#ifeq: {{{Status}}}
| {{#ifeq: {{{Status}}}
| withdrawn |  [[Edition:CPDL {{{EdNo}}}|<b>CPDL #<font color=gray>{{{EdNo}}}</font>:</b>]] ''This edition has been'' '''withdrawn''' ''{{{reason|at the request of the {{{contributor|editor}}}}}}.''[[Category:Works with withdrawn editions]]
| withdrawn |  [[Edition:CPDL {{{EdNo}}}|<b>CPDL #<font color=gray>{{{EdNo}}}</font>:</b>]] ''This edition has been'' '''withdrawn''' ''{{{reason|at the request of the {{{contributor|editor}}}}}}.''[[Category:Works with withdrawn editions]]
| {{switch|{{IsNew|{{{posted|1901-01-01}}}}}
| {{#ifeq:{{IsNew|{{{posted|1901-01-01}}}}}
|case: yes={{filepath:NewScore.gif}} [[Category:New works| {{{posted|1901-01-01}}}]] {{switch|{{IsNew|{{{posted|1901-01-01}}}|range=30 days}}
|yes|{{filepath:NewScore.gif}} [[Category:New works| {{{posted|1901-01-01}}}]] {{#ifeq:{{IsNew|{{{posted|1901-01-01}}}|range=30 days}}
|case: yes=[[Category:Posted {{{posted|1901-01-01}}}]]
|yes|[[Category:Posted {{{posted|1901-01-01}}}]]}} <small>(Posted {{{posted|1901-01-01}}})</small> &nbsp;}} [[Edition:CPDL {{{EdNo}}}|<b>CPDL #<font color=green>{{{EdNo}}}</font>:</b>]] {{{filelinks|}}} }}
|default=
}} <small>(Posted {{{posted|1901-01-01}}})</small> &nbsp;
|default=
}} [[Edition:CPDL {{{EdNo}}}|<b>CPDL #<font color=green>{{{EdNo}}}</font>:</b>]] {{{filelinks|}}} }}
{{{orig}}}
{{{orig}}}
}}</includeonly><noinclude>This (preliminary) template displays an edition as it appears on a works page.
}}</includeonly><noinclude>This (preliminary) template displays an edition as it appears on a works page.
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 18:18, 16 June 2017

This (preliminary) template displays an edition as it appears on a works page.