Template:InfoBoxTemplate: Difference between revisions

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