Difference between revisions of "Template:InfoBoxTemplate"

From IMAGE
Jump to: navigation, search
(59 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
It should be called in the following format:
 
It should be called in the following format:
 
<pre>
 
<pre>
{{InfoBoxtemplate
+
{{InfoBoxtemplate}}
|basepage
 
|subpage
 
|pageinclns
 
}}
 
 
</pre>
 
</pre>
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
check the need for an infobox on this page (most recent version is the norm)
 
check the need for an infobox on this page (most recent version is the norm)
-->{{#ifeq:{{InfoboxTestTemplate|basepage={{{basepage|}}}|subpage={{{subpage|}}} }}|0|| <!--
+
-->{{#ifeq:{{InfoboxTestTemplate|basepage={{ROOTPAGENAME}}|subpage={{SUBPAGENAME}} }}|0|| <!--
 
existing data for infobox
 
existing data for infobox
 
--><div class="InfoBoxTemplateClear"><table class="InfoBoxStyle"> <!--
 
--><div class="InfoBoxTemplateClear"><table class="InfoBoxStyle"> <!--
-->{{#ifeq:{{PropertyTestTemplate|prop=hasOverview|page=basepage|reverse=1 }}|0||
+
-->{{#ifeq: {{#ask:[[-HasVersionOverview::<q>[[IsImplementationOf::{{ROOTPAGENAME}}]]</q>]]|format =count}}|0||
{{#ifeq:{{{Overview|}}}|||
+
<tr><td class="InfoBoxCellStyleTemplate">Version Overviews</td></tr>
 +
<tr><td>
 +
{{#ask:[[IMAGE framework version overview]]|format=ul}}
 +
{{#ask:[[-HasVersionOverview::<q>[[IsImplementationOf::{{ROOTPAGENAME}}]]</q>]]|format=ul}}
 +
</td></tr>
 +
}}<!-- model of component and version
 +
-->{{#ifeq:{{PropertyTestTemplate|prop=IsImplementationOf|page={{ROOTPAGENAME}}|reverse=1 }}|0||
 +
<tr><td class="InfoBoxCellStyleTemplate">Component is implemented in:</td></tr>
 +
<tr><td>{{#arraymap:
 +
  {{#ask:[[Concept:ModelWithVersion]][[IsImplementationOf::{{ROOTPAGENAME}}]]|link=none|sep=;}}
 +
  |;|yy
 +
  |{{#arraymap: {{#ask:[[Category:ModelVersion]][[IsVersionOf::yy]]|link=none|sep=;}}
 +
    |;|xx
 +
    |{{#ifeq:{{#ask:[[IsCurrentVersion::true]][[IsVersionOf::yy]]|link=none}}|xx
 +
      |<ul><li>yy (version {{#show:xx|? HasVersionNumber}})</li></ul>
 +
      {{#ask:[[Category:AggregatedComponent]][[-IsImplementationOf::yy]]
 +
        |intro=Aggregated component:|format=ul
 +
      }}{{#ask:[[Category:Component]][[-IsImplementationOf::yy]]
 +
          |intro=Components:|format=ul}}
 +
    |}}   
 +
  |}}
 +
| and }}
 +
</td></tr><!--
 +
-->{{#ifeq:{{PropertyTestTemplate|prop=HasIMAGEComponent|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
 +
<tr><td class="InfoBoxCellStyleTemplate">Related IMAGE components</td></tr>
 +
<tr ><td>{{#ask:[[-HasIMAGEComponent::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
 +
</td></tr>}}
 +
}}<!--
 +
-->{{#ifeq:{{PropertyTestTemplate|prop=HasApplication|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
 +
<tr><td class="InfoBoxCellStyleTemplate">Projects/Applications</td></tr>
 +
<tr><td>{{#ask:[[-HasApplication::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
 +
</td></tr>}}<!--
 +
-->{{#ifeq:{{PropertyTestTemplate|prop=HasModelDatabase|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
 +
<tr><td class="InfoBoxCellStyleTemplate">Models/Databases</td></tr>
 +
<tr><td>{{#ask:[[-HasModelDatabase::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
 +
</td></tr>}}<!--
 +
-->{{#ifeq:{{PropertyTestTemplate|prop=HasOverview|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
 
<tr><td class="InfoBoxCellStyleTemplate">Relevant  overviews</td></tr>
 
<tr><td class="InfoBoxCellStyleTemplate">Relevant  overviews</td></tr>
  <tr><td>
+
<tr><td>{{#ask:[[-HasOverview::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
  <ul>
+
</td></tr>}}<!--
  {{#arraymap:{{{Overview|}}}|;|xx|<li>[[xx]]|</li>}}
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasKeyReference|page={{#titleparts: {{FULLPAGENAME}}|1}} }}|0||
  </ul></td></tr>
+
<tr><td class="InfoBoxCellStyleTemplate">Key publications</td></tr>
}}<!--
+
<tr><td><tr><td>{{#ask:[[-HasKeyReference::{{#titleparts: {{FULLPAGENAME}}|1}}]]|format=ul}}
-->{{#ifeq:{{{IMAGEComponent|}}}|||
+
</td></tr>}}<!--
  <tr><td class="InfoBoxCellStyleTemplate">Related IMAGE components</td></tr>
+
-->{{#ifeq:{{PropertyTestTemplate|prop=HasReference|page={{FULLPAGENAME}} }}|0||
  <tr ><td>
+
<tr><td class="InfoBoxCellStyleTemplate">References</td></tr>
  <ul>
+
<tr><td class="mw-collapsible mw-collapsed">
  {{#arraymap:{{{IMAGEComponent|}}}|;|xx|<li>[[xx]]|</li>}}
+
{{#ask:[[-HasReference::{{FULLPAGENAME}}]]|format=ul}}
  </ul></td></tr>
+
</td></tr>
}}<!--
 
-->{{#ifeq:{{{Application|}}}|||
 
  <tr><td class="InfoBoxCellStyleTemplate">Projects/Applications</td></tr>
 
  <tr><td>
 
  <ul>
 
  {{#arraymap:{{{Application|}}}|;|xx|<li>[[xx]]|</li>}}
 
  </ul></td></tr>
 
}}<!--
 
-->{{#ifeq:{{{Model-Database|}}}|||
 
  <tr><td class="InfoBoxCellStyleTemplate">Models/Databases</td></tr>
 
  <tr><td>
 
  <ul>
 
  {{#arraymap:{{{Model-Database|}}}|;|xx|<li>[[xx]]|</li>}}
 
  </ul></td></tr>
 
}}<!--
 
-->{{#ifeq:{{PropertyTestTemplate|prop=IsImplementationOf|page={{PAGENAME}}|reverse=1 }}|0||
 
  <tr><td class="InfoBoxCellStyleTemplate">Implemented in computer model</td></tr>
 
  <tr><td>
 
  {{#ask:[[Category:ComputerModelAndDatabase]][[IsImplementationOf::{{PAGENAME}}]]  
 
    |format=ul
 
  }}</td></tr>
 
}}<!--
 
-->{{#ifeq:{{{KeyReference|}}}|||
 
  <tr><td class="InfoBoxCellStyleTemplate">Key publications</td></tr>
 
  <tr><td>
 
  <ul>
 
  {{#arraymap:{{{KeyReference|}}}|;|xx|<li>[[xx]]|</li>}}
 
  </ul></td></tr>
 
}}<!--
 
-->{{#ifeq:{{{Reference|}}}|||
 
  <tr><td class="InfoBoxCellStyleTemplate">References</td></tr>
 
  <tr><td class="mw-collapsible mw-collapsed">
 
  <ul>
 
  {{#arraymap:{{{Reference|}}}|;|xx|<li>[[xx]]|</li>}}
 
  </ul></td></tr>
 
 
}}
 
}}
 
</table>
 
</table>

Revision as of 08:13, 1 August 2017

It should be called in the following format:

{{InfoBoxtemplate}}