Difference between revisions of "Template:ModelVersionTemplate"

From IMAGE
Jump to: navigation, search
(25 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
{{ModelVersionTemplate
 
{{ModelVersionTemplate
 
|hasDescription=
 
|hasDescription=
|hasNamespace=
+
|hasVersionDocument=
 
|isVersionOf=
 
|isVersionOf=
 
|versionNumber=
 
|versionNumber=
Line 21: Line 21:
 
<tr><td class="PageWidthTableFirstCell">'''Description:'''</td>
 
<tr><td class="PageWidthTableFirstCell">'''Description:'''</td>
 
<td class="PageWidthTableRemainderCell">{{{hasDescription|}}}</td></tr>
 
<td class="PageWidthTableRemainderCell">{{{hasDescription|}}}</td></tr>
<tr><td class="PageWidthTableFirstCell">'''Model description in namespace:'''</td>
+
{{#ifeq:{{{hasVersionDocument|}}}|||
<td class="PageWidthTableRemainderCell">{{{hasNamespace|}}}</td></tr>
+
<tr><td class="PageWidthTableFirstCell">'''Archive of this version:'''</td>
 +
<td class="PageWidthTableRemainderCell">{{{hasVersionDocument|}}}, [[Media:{{{hasVersionDocument|}}}| open pdf file]]</td></tr>
 +
}}
 
</table>
 
</table>
  
{{#ask: [[{{PAGENAME}}]]
+
{{#ifeq:{{#show:{{PAGENAME}}|?IsChanged}}|true|
|link=none
+
''Changes compared to previous version:''
|format=template
+
{{#arraymap:
|template=DisplayChangePathTemplate
+
  {{#ask:[[-Has subobject::{{PAGENAME}}]]|link=none|format=list|sep=;}}
|userparam={{{isVersionOf|}}}
+
  |;|zz
}}
+
  |{{#ask:[[zz]]|mainlabel=-
</div>
+
                |? IsChangeOf
 +
                |? HasChangeDescription
 +
                |format=template  
 +
                |template=ChangeTemplate
 +
                |intro=<table  class="PageWidthTableTemplate">
 +
                |outro=  </table>
 +
    }}
 +
    |<br/>}}
 +
|}}
  
 
See {{#show:{{{isVersionOf|}}}|? HasVersionOverview}}  
 
See {{#show:{{{isVersionOf|}}}|? HasVersionOverview}}  
 
+
</div>
 +
{{#ifeq:{{#ask:[[-Has subobject::{{PAGENAME}}]]|format=count}}
 +
|0
 +
|{{#set:IsChanged=false}}
 +
|{{#set:IsChanged=true}}
 +
}}
 
{{#set:HasDescription={{{hasDescription|}}}  
 
{{#set:HasDescription={{{hasDescription|}}}  
 
| IsCurrentVersion={{{isCurrentVersion}}}
 
| IsCurrentVersion={{{isCurrentVersion}}}
| HasNamespace={{{hasNamespace|}}}  
+
| HasVersionDocument={{{hasVersionDocument|}}}  
 
| IsVersionOf={{{isVersionOf|}}}  
 
| IsVersionOf={{{isVersionOf|}}}  
 
| HasVersionNumber={{{versionNumber|}}}
 
| HasVersionNumber={{{versionNumber|}}}

Revision as of 19:35, 31 July 2017

This is the "ModelVersionTemplate" template. It should be called in the following format:

{{ModelVersionTemplate
|hasDescription=
|hasVersionDocument=
|isVersionOf=
|versionNumber=
}}

Edit the page to see the template text.