Template:ModelVersionTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
(33 intermediate revisions by the same user not shown)
Line 5: Line 5:
{{ModelVersionTemplate
{{ModelVersionTemplate
|hasDescription=
|hasDescription=
|hasNamespace=
|hasVersionDocument=
|isVersionOf=
|isVersionOf=
|versionNumber=
}}
}}
</pre>
</pre>
Line 12: Line 13:
</noinclude><includeonly>
</noinclude><includeonly>
<div class="page_standard"><table class="PageWidthTableTemplate">
<div class="page_standard"><table class="PageWidthTableTemplate">
<tr><td class="PageWidthTableFirstCell">Version number:</td>
<tr><td class="PageWidthTableFirstCell">'''Version of Model:'''</td>
<td class="PageWidthTableRemainderCell">{{{versionNumber|}}}</td></tr>}
<td class="PageWidthTableRemainderCell">[[{{{isVersionOf|}}}]]</td></tr>
<tr><td class="PageWidthTableFirstCell">Current version:</td>
<tr><td class="PageWidthTableFirstCell">'''Version number:'''</td>
<td class="PageWidthTableRemainderCell">{{{IsCurrentVersion|}}}</td></tr>}
<td class="PageWidthTableRemainderCell">{{{versionNumber|}}}</td></tr>
<tr><td class="PageWidthTableFirstCell">Description:</td>
<tr><td class="PageWidthTableFirstCell">'''Current version:'''</td>
<td class="PageWidthTableRemainderCell">{{{hasDescription|}}}</td></tr>}
<td class="PageWidthTableRemainderCell">{{{isCurrentVersion|}}}</td></tr>
{{#ifeq:{{{hasNamespace|}}} |main||
<tr><td class="PageWidthTableFirstCell">'''Description:'''</td>
<tr><td class="PageWidthTableFirstCell">Model description preserved in namespace</td>
<td class="PageWidthTableRemainderCell">{{{hasDescription|}}}</td></tr>
<td class="PageWidthTableRemainderCell">{{{hasNamespace|}}}</td></tr>}
{{#ifeq:{{{hasVersionDocument|}}}|||
<tr><td class="PageWidthTableFirstCell">'''Archive of this version:'''</td>
<td class="PageWidthTableRemainderCell">{{{hasVersionDocument|}}}, [[Media:{{{hasVersionDocument|}}}| open pdf file]]</td></tr>
}}
}}
</table>
</table>


{{#ifeq:{{#show:{{PAGENAME}}|? IsCurrentVersion}}|true
{{#ifeq:{{#show:{{PAGENAME}}|?IsChanged}}|true|
|{{PAGENAME}} is the current version of [[{{{isVersionOf|}}}]]
''Changes compared to previous version:''
|{{PAGENAME}} is a previous or new version of [[{{{isVersionOf|}}}]].
{{#arraymap:
{{#ifeq:{{{hasNamespace|}}} |main||
  {{#ask:[[-Has subobject::{{PAGENAME}}]]|link=none|format=list|sep=;}}
The documentation is preserved in the {{{hasNamespace|}}} namespace.}}
  |;|zz
}}
  |{{#ask:[[zz]]|mainlabel=-
{{#ask: [[{{PAGENAME}}]]
                |? IsChangeOf
|link=none
                |? HasChangeDescription
|format=template
                |format=template
|template=DisplayChangePathTemplate
                |template=ChangeTemplate
|userparam={{{isVersionOf|}}}
                |intro=<table  class="PageWidthTableTemplate">
}}
                |outro=  </table>
 
    }}
 
    |<br/>}}
'''List of  {{{isVersionOf|}}} versions:'''
|}}
<ol>{{#arraymap:{{#ask:[[{{{isVersionOf|}}}]]|?-IsVersionOf=|mainlabel=-|link=none|format=list|sep=;}}
  |;|yy
  | <li>{{#ask:[[yy]]|?IsCurrentVersion=current version:|format=list}}</li>
  |
}}</ol>


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|}}}
}}  
}}  
[[Category:ModelVersion]]
[[Category:ModelVersion]]
</includeonly>
</includeonly>

Revision as of 20: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.