Difference between revisions of "Template:ModelDocumentationTemplate"

From IAMC-Documentation
Jump to: navigation, search
m (1 revision imported)
Line 13: Line 13:
 
</pre>
 
</pre>
 
Edit the page to see the template text.
 
Edit the page to see the template text.
</noinclude><includeonly>
+
</noinclude><includeonly>{{#ifeq:{{#show:{{PAGENAME}}|? IsInPrintMode}}|true||
 
{{ProcessStateTemplate|model={{#show:{{PAGENAME}}|? IsDocumentationOf|link=none}} }}
 
{{ProcessStateTemplate|model={{#show:{{PAGENAME}}|? IsDocumentationOf|link=none}} }}
{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
+
{{ModelInfoBoxesTemplate}}
! style="text-align: center; background-color:#ccccff;"  colspan="2"|<span style="font-size: larger;">{{#ask:[[HasLevel::0]][[IsDocumentationOf::<q>[[-IsDocumentationOf::{{PAGENAME}}]]</q>]]}}</span>
+
 
|-
 
| colspan="2"|{{#arraymap:
 
  {{#ask:[[HasLevel::0]][[IsDocumentationOf.-IsDocumentationOf::{{PAGENAME}}]]|link=none|sep=;}} <!-- top page of model documentation -->
 
  |;|x0
 
  |<ul>{{#arraymap:
 
    {{#ask:[[HasParent::x0]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=list}}
 
    |;|x1
 
    |{{#ifexpr:{{#ask:[[HasParent::x1]]|format=count}}=0 <!--no children
 
      -->|<li>[[x1]]</li><!-- no children then just show, else class mw_collapse determination
 
      -->|{{#ifeq:{{PAGENAME}}|x0  <!-- actual page is x0 (root of tree) -->
 
          |<div class="mw-collapsible mw-collapsed">
 
          |{{#ifeq:{{PAGENAME}}|x1 <!--actual page is  x1 -->
 
            |<div class="mw-collapsible">
 
            |{{#ifeq:{{#ask:[[-HasParent::{{PAGENAME}}]]|link=none }}|x1 <!--actual page is child of x1 -->
 
                |<div class="mw-collapsible">
 
                |{{#ifeq:{{#ask:[[-HasParent.-HasParent::{{PAGENAME}}]]|link=none }}|x1 <!-- actual page is grandchild of x1-->
 
                  |<div class="mw-collapsible">
 
                  |<div class="mw-collapsible mw-collapsed">
 
                  }} <!-- actual page is grandchild  -->
 
              }}<!-- actual page is child -->
 
          }} <!--actual page is  x1 -->
 
          }}  <!--
 
      --><li>[[x1]]</li><!--
 
      --><div class="mw-collapsible-content"><!--
 
      --><ul>{{#arraymap:
 
            {{#ask:[[HasParent::x1]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=list}} 
 
            |;|x2
 
            |{{#ifexpr:{{#ask:[[HasParent::x2]]|format=count}}=0 <!--no children         
 
            -->|<li>[[x2]]</li> <!-- no children then just show, else class mw_collapse determination
 
            -->|{{#ifeq:{{PAGENAME}}|x1  <!-- actual page is parent  -->
 
                  |<div class="mw-collapsible mw-collapsed">
 
                  |{{#ifeq:{{PAGENAME}}|x2 <!--actual page is  x2 -->
 
                      |<div class="mw-collapsible">
 
                      |{{#ifeq:{{#ask:[[-HasParent::{{PAGENAME}}]]|link=none}}|x2 <!--actual page is child of x2 -->
 
                        |<div class="mw-collapsible">
 
                        |<div class="mw-collapsible mw-collapsed">
 
                      }}<!-- actual page is child -->
 
                    }} <!--actual page is  x1 -->
 
                }}<!--
 
              --><li>[[x2]]</li><!--
 
              --><div class="mw-collapsible-content"><!--
 
              --><ul>{{#arraymap:
 
                  {{#ask:[[HasParent::x2]]|? HasSequence-|link=none|sep=;|sort=HasSequence|format=list}} 
 
                  |;|x3
 
                  |<li>[[x3]]</li>
 
                |}}</ul></div></div> <!--closing the second level collapse -->
 
              }} <!-- end of second level children  -->         
 
          |}}</ul></div></div> <!--closing the first level collapse -->
 
        }} <!-- end of first level children  --> 
 
    |}}</ul> <!-- end x0 is root  --> 
 
  |}} <!-- end -->
 
|-
 
! style="text-align: center; background-color:#ccccff;"  colspan="2"|<span style="font-size: larger;">Corresponding documentation</span>
 
|-
 
| colspan="2"|
 
{{CorrespondingPageTemplate
 
  |{{#show:{{PAGENAME}}|? HasLevel}}
 
  |{{#show:{{PAGENAME}}|? HasSequence}}
 
  }}
 
|-
 
! style="text-align: center; background-color:#ccccff;" colspan="2"|<span style="font-size: larger;">Model information</span>
 
|-
 
! style="width:7em; vertical-align: text-top;"| Institution
 
| {{#ask:[[-isDocumentationOf::{{PAGENAME}}]]|? HasInstitution=|mainlabel=-}}  
 
|-
 
! style="vertical-align: text-top;"|Concept
 
| {{#ask:[[Category:Model]][[-isDocumentationOf::{{PAGENAME}}]]|? HasConcept=|mainlabel=-}}
 
|-
 
! style="vertical-align: text-top;"|Solution method
 
| {{#ask:[[Category:Model]][[-isDocumentationOf::{{PAGENAME}}]]|? HasSolutionMethod=|mainlabel=-}}
 
|-
 
! style="vertical-align: text-top;"|Anticipation
 
| {{#ask:[[Category:Model]][[-isDocumentationOf::{{PAGENAME}}]]|? HasAnticipation=|mainlabel=-}}
 
|}
 
 
[[Category:{{{DocumentationCategory|}}}]]<!--
 
[[Category:{{{DocumentationCategory|}}}]]<!--
 
-->{{#set:IsDocumentationOf={{{IsDocumentationOf|}}} }}<!--
 
-->{{#set:IsDocumentationOf={{{IsDocumentationOf|}}} }}<!--
Line 100: Line 26:
 
             -->|{{#set:HasParent=xx - {{{IsDocumentationOf|}}} }}<!--
 
             -->|{{#set:HasParent=xx - {{{IsDocumentationOf|}}} }}<!--
 
       -->|}} }}<!--
 
       -->|}} }}<!--
-->{{#ifeq:{{{IsEmpty|}}}||{{#set:IsEmpty=No}}|{{#set:IsEmpty={{{IsEmpty|}}} }} }}</includeonly>
+
-->{{#ifeq:{{{IsEmpty|}}}||{{#set:IsEmpty=No}}|{{#set:IsEmpty={{{IsEmpty|}}} }} }} }}</includeonly>

Revision as of 11:08, 25 February 2020

This is the "ModelDocumentationTemplate" template. It should be called in the following format:

{{ModelDocumentationTemplate
|IsDocumentationOf=
|DocumentationCategory=
|HasLevel
|HasSeq
|HasParent
|isEmpty
}}

Edit the page to see the template text.