A Wiki in the Desert
Log in

Difference between revisions of "Template:RequireTable"

From A Wiki in the Desert
(Test to try and reduce complexity.)
Line 12: Line 12:
 
}}}}
 
}}}}
 
}}
 
}}
<table class="smwtable-clean sortable">
+
{| class="smwtable-clean sortable"  
<tr><th>Building</th><th>Count</th>{{#ifeq: {{#var: isComplex}} | true | <th>Properties</th>}}
+
! Building !! Count {{#ifeq: {{#var: isComplex}} | true | !! Properties}}
 +
|-
 
{{#loop: i
 
{{#loop: i
 
   | 0
 
   | 0
Line 24: Line 25:
 
   }}}}
 
   }}}}
 
    
 
    
   {{#loop: j
+
   {{#arrayprint:requirements
     | 0
+
     |<br/>
     | {{ #arraysize:requirements }}
+
     | @@@@
     |
+
     |  
     <tr>
+
     {{!}}[[{{ #arrayindex: buildings | {{ #var:i }} }}]]
      <td>[[{{ #arrayindex: buildings | {{ #var:i }} }}]]</td>
+
    {{!}} style="text-align: center" {{!}} {{#show: @@@@ | ?count# }}
      <td>{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?count#= |mainlabel=- }}</td>
+
    {{#ifeq: {{#var: isComplex}} | true | {{!}} style="text-align: center" {{!}} {{#show: @@@@ | ?requires_property# }}}}
      {{#ifeq: {{#var: isComplex}} | true | <td>{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?requires_property#= |mainlabel=- }}</td>}}
+
     {{!}}-
     </tr>
 
 
   }}
 
   }}
 
}}
 
}}
</table>
+
|}

Revision as of 11:54, 5 May 2021


Building Count