Template:InfoBoxTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
 
(114 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>
<noinclude>
{{#ifexpr:{{InfoboxTestTemplate|basepage={{#titleparts: {{PAGENAME}}|1}}|subpage={{#titleparts: {{PAGENAME}}|1|2}} }}|
It should be called in the following format:
<div style="float:right; clear:right; ">
<pre>
{{InfoBoxStyleTemplate}}
{{InfoBoxtemplate}}
{{#ifeq:{{{IMAGEComponent|}}}|||
</pre>
   <tr>{{InfoBoxCellStyleTemplate}}<b>Related IMAGE components</b></td></tr>
</noinclude><includeonly><!--
  <tr><td>
check the need for an infobox on this page (most recent version is the norm)
  <ul>
-->{{#ifeq:{{InfoboxTestTemplate|basepage={{ROOTPAGENAME}}|subpage={{SUBPAGENAME}} }}|0|| <!--
  {{#arraymaptemplate:{{{IMAGEComponent|}}}|ComponentHasIMAGEComponentTemplate|;|}}
existing data for infobox
  </ul>
--><div class="InfoBoxTemplateClear"><table class="InfoBoxStyle"> <!--
  </td></tr>
-->{{#ifeq:{{PropertyTestTemplate|prop=IsImplementationOf|page={{ROOTPAGENAME}}|reverse=1 }}|0||
}}
<tr><td class="InfoBoxCellStyleTemplate">Component is implemented in:</td></tr>
{{#ifeq:{{{Application|}}}|||
<tr><td>{{#arraymap:
  <tr>{{InfoBoxCellStyleTemplate}}<b>Projects/Applications</b></td></tr>
  {{#ask:[[IsImplementationOf::{{ROOTPAGENAME}}]]|link=none|sep=;}}
  <tr><td>
  |;|yy
  <ul>
  |{{#arraymap: {{#ask:[[Category:ModelVersion]][[IsVersionOf::yy]]|link=none|sep=;}}
  {{#arraymaptemplate:{{{Application|}}}|ComponentHasApplicationTemplate|;|}}
    |;|xx
  </ul>
    |{{#ifeq:{{#ask:[[IsCurrentVersion::true]][[IsVersionOf::yy]]|link=none}}|xx
  </td></tr>
      |<ul><li>[[yy]] (version {{#ask:[[xx]]|format=Plainlist}})</li></ul>
}}
      {{#ask:[[Category:AggregatedComponent]][[-IsImplementationOf::yy]]
{{#ifeq:{{{ExternalModel|}}}|||
        |intro=Aggregated component:|format=ul
  <tr>{{InfoBoxCellStyleTemplate}}<b>External models</b></td></tr>
      }}{{#ask:[[Category:Component]][[-IsImplementationOf::yy]]
  <tr><td>
          |intro=Components:|format=ul}}
  <ul>
    |}}   
  {{#arraymaptemplate:{{{ExternalModel|}}}|ComponentHasExternalModelTemplate|;|}}
   |}}
  </ul>
| and }}
  </td></tr>
</td></tr><!--
}}
-->{{#ifeq:{{PropertyTestTemplate|prop=HasIMAGEComponent|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
{{#ifeq:{{#ask:[[Category:Computer Model]][[IsImplementationOf::{{PAGENAME}}]]|format=count}}|0||
<tr><td class="InfoBoxCellStyleTemplate">Related IMAGE components</td></tr>
  <tr>{{InfoBoxCellStyleTemplate}}<b>Implemented in computer model</b></td></tr>
<tr ><td>{{#ask:[[-HasIMAGEComponent::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  <tr><td>
</td></tr>}}
  {{#ask:[[Category:Computer Model]][[IsImplementationOf::{{PAGENAME}}]]  
}}<!--
    |format=ul
-->{{#ifeq:{{PropertyTestTemplate|prop=HasApplication|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  }}</td></tr>
<tr><td class="InfoBoxCellStyleTemplate">Projects/Applications</td></tr>
}}
<tr><td>{{#ask:[[-HasApplication::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
{{#ifeq:{{{KeyReference|}}}|||
</td></tr>}}<!--
  <tr>{{InfoBoxCellStyleTemplate}}<b>Key references</b></td></tr>
-->{{#ifeq:{{PropertyTestTemplate|prop=HasModelDatabase|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  <tr><td>
<tr><td class="InfoBoxCellStyleTemplate">Models/Databases</td></tr>
  <ul>
<tr><td>{{#ask:[[-HasModelDatabase::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  {{#arraymaptemplate:{{{KeyReference|}}}|ComponentHasKeyReferenceTemplate|;|}}
</td></tr>}}<!--
  </ul>
-->{{#ifeq:{{PropertyTestTemplate|prop=HasOverview|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  </td></tr>
<tr><td class="InfoBoxCellStyleTemplate">Relevant  overviews</td></tr>
}}
<tr><td>{{#ask:[[-HasOverview::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
{{#ifeq:{{{Reference|}}}|||
</td></tr>}}<!--
  <tr>{{InfoBoxCellStyleTemplate}}<b>References</b></td></tr>
-->{{#ifeq:{{PropertyTestTemplate|prop=HasKeyReference|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  <tr><td>
<tr><td class="InfoBoxCellStyleTemplate">Key publications</td></tr>
  <ul>
<tr><td><tr><td>{{#ask:[[-HasKeyReference::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  {{#arraymaptemplate:{{{Reference|}}}|ComponentHasReferenceTemplate|;|}}
</td></tr>}}<!--
  </ul>
-->{{#ifeq:{{PropertyTestTemplate|prop=HasReference|page={{FULLPAGENAME}} }}|0||
  </td></tr>
<tr><td class="InfoBoxCellStyleTemplate">References</td></tr>
<tr><td class="mw-collapsible mw-collapsed">
{{#ask:[[-HasReference::{{FULLPAGENAME}}]]|format=ul}}
</td></tr>
}}
}}
</table>
</table>
</div>
</div>
|}}
}}<!--
</includeonly>
--></includeonly>

Latest revision as of 16:41, 24 March 2020

It should be called in the following format:

{{InfoBoxtemplate}}