Difference between revisions of "Template:InfoBoxTemplate"

From IMAGE
Jump to: navigation, search
(104 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: {{#ask:[[-HasVersionOverview::<q>[[IsImplementationOf::{{ROOTPAGENAME}}]]</q>]]|format =count}}|0||
  </ul>
+
<tr><td class="InfoBoxCellStyleTemplate">Version Overviews</td></tr>
   </td></tr>
+
<tr><td>  
{{#ifeq:{{{IMAGEComponent|}}}|||
+
{{#ask:[[IMAGE framework version overview]]|format=ul}}
  <tr>{{InfoBoxCellStyleTemplate}}<b>Related IMAGE components</b></td></tr>
+
{{#ask:[[-HasVersionOverview::<q>[[IsImplementationOf::{{ROOTPAGENAME}}]]</q>]]|format=ul}}
  <tr><td>
+
</td></tr>
  <ul>
+
}}<!-- model of component and version
  {{#arraymaptemplate:{{{IMAGEComponent|}}}|ComponentHasIMAGEComponentTemplate|;|}}
+
-->{{#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:
}}
+
  {{#ask:[[Concept:ModelWithVersion]][[IsImplementationOf::{{ROOTPAGENAME}}]]|link=none|sep=;}}
{{#ifeq:{{{Application|}}}|||
+
  |;|yy
  <tr>{{InfoBoxCellStyleTemplate}}<b>Projects/Applications</b></td></tr>
+
  |{{#arraymap: {{#ask:[[Category:ModelVersion]][[IsVersionOf::yy]]|link=none|sep=;}}
  <tr><td>
+
    |;|xx
  <ul>
+
    |{{#ifeq:{{#ask:[[IsCurrentVersion::true]][[IsVersionOf::yy]]|link=none}}|xx
  {{#arraymaptemplate:{{{Application|}}}|ComponentHasApplicationTemplate|;|}}
+
      |<ul><li>yy (version {{#show:xx|? HasVersionNumber}})</li></ul>
  </ul>
+
      {{#ask:[[Category:AggregatedComponent]][[-IsImplementationOf::yy]]
  </td></tr>
+
        |intro=Aggregated component:|format=ul
}}
+
      }}{{#ask:[[Category:Component]][[-IsImplementationOf::yy]]
{{#ifeq:{{{ExternalModel|}}}|||
+
          |intro=Components:|format=ul}}
  <tr>{{InfoBoxCellStyleTemplate}}<b>External models</b></td></tr>
+
    |}}   
  <tr><td>
+
   |}}
  <ul>
+
| and }}
  {{#arraymaptemplate:{{{ExternalModel|}}}|ComponentHasExternalModelTemplate|;|}}
+
</td></tr><!--
  </ul>
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasIMAGEComponent|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  </td></tr>
+
<tr><td class="InfoBoxCellStyleTemplate">Related IMAGE components</td></tr>
}}
+
<tr ><td>{{#ask:[[-HasIMAGEComponent::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
{{#ifeq:{{#ask:[[Category:Computer Model]][[IsImplementationOf::{{PAGENAME}}]]|format=count}}|0||
+
</td></tr>}}
  <tr>{{InfoBoxCellStyleTemplate}}<b>Implemented in computer model</b></td></tr>
+
}}<!--
  <tr><td>
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasApplication|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  {{#ask:[[Category:Computer Model]][[IsImplementationOf::{{PAGENAME}}]]  
+
<tr><td class="InfoBoxCellStyleTemplate">Projects/Applications</td></tr>
    |format=ul
+
<tr><td>{{#ask:[[-HasApplication::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  }}</td></tr>
+
</td></tr>}}<!--
}}
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasModelDatabase|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
{{#ifeq:{{{KeyReference|}}}|||
+
<tr><td class="InfoBoxCellStyleTemplate">Models/Databases</td></tr>
  <tr>{{InfoBoxCellStyleTemplate}}<b>Key references</b></td></tr>
+
<tr><td>{{#ask:[[-HasModelDatabase::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  <tr><td>
+
</td></tr>}}<!--
  <ul>
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasOverview|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  {{#arraymaptemplate:{{{KeyReference|}}}|ComponentHasKeyReferenceTemplate|;|}}
+
<tr><td class="InfoBoxCellStyleTemplate">Relevant  overviews</td></tr>
  </ul>
+
<tr><td>{{#ask:[[-HasOverview::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  </td></tr>
+
</td></tr>}}<!--
}}
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasKeyReference|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
{{#ifeq:{{{Reference|}}}|||
+
<tr><td class="InfoBoxCellStyleTemplate">Key publications</td></tr>
  <tr>{{InfoBoxCellStyleTemplate}}<b>References</b></td></tr>
+
<tr><td><tr><td>{{#ask:[[-HasKeyReference::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  <tr><td>
+
</td></tr>}}<!--
  <ul>
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasReference|page={{FULLPAGENAME}} }}|0||
  {{#arraymaptemplate:{{{Reference|}}}|ComponentHasReferenceTemplate|;|}}
+
<tr><td class="InfoBoxCellStyleTemplate">References</td></tr>
  </ul>
+
<tr><td class="mw-collapsible mw-collapsed">
  </td></tr>
+
{{#ask:[[-HasReference::{{FULLPAGENAME}}]]|format=ul}}
 +
</td></tr>
 
}}
 
}}
 
</table>
 
</table>
 
</div>
 
</div>
|}}
+
}}<!--
</includeonly>
+
--></includeonly>

Revision as of 07:13, 1 August 2017

It should be called in the following format:

{{InfoBoxtemplate}}