Difference between revisions of "Template:PrintParentModificationsVerdict"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to print the common verdict of a modification's parent modification. The template goes through the list of all parent modifications and check...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template is used to print the common verdict of a modification's parent modification. The template goes through the list of all parent modifications and checks if at least one of them ''Not Accepted''. The possible return values are:
+
This template is used to print the common verdict of a modification's parent modifications. The template goes through the list of all the parent modifications and checks their verdicts. The possible return values are:
 
* <code><nowiki>Not Accepted</nowiki></code> - returned if at least one of the parent modifications has a verdict of ''Not Accepted'';
 
* <code><nowiki>Not Accepted</nowiki></code> - returned if at least one of the parent modifications has a verdict of ''Not Accepted'';
 
* <code><nowiki>Open</nowiki></code> - returned if no parent modification has a verdict of ''Not Accepted'' and at least one of the parent modifications is ''Open'';
 
* <code><nowiki>Open</nowiki></code> - returned if no parent modification has a verdict of ''Not Accepted'' and at least one of the parent modifications is ''Open'';
 
* <code><nowiki>Accepted</nowiki></code> - returned if all the parent modifications have been ''Accepted''.
 
* <code><nowiki>Accepted</nowiki></code> - returned if all the parent modifications have been ''Accepted''.
  
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
+
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely returns them.
  
 
'''Parameters:'''
 
'''Parameters:'''
Line 15: Line 15:
 
  -->|<!-- there are parents
 
  -->|<!-- there are parents
 
   -->{{#vardefine: varParentVerdict | Accepted}}<!-- the verdict  
 
   -->{{#vardefine: varParentVerdict | Accepted}}<!-- the verdict  
   -->{{#vardefine: varContinue | true}}<!-- if true, the loop continues
+
   -->{{#vardefine: varContinue | 1}}<!-- if 1, the loop continues
 
   --><!--
 
   --><!--
 
   -->{{#vardefine: i | 0}}<!--
 
   -->{{#vardefine: i | 0}}<!--
 
   -->{{#while:<!--
 
   -->{{#while:<!--
 +
  -->|{{#ifexpr: ({{#var: i}} < {{#arraysize: parentsArray}}) and ({{#var: varContinue}} = 1)| true}}<!--
 
   -->|<!--
 
   -->|<!--
    -->{{#ifexpr: ({{#var: i}} < {{#arraysize: parentsArray}}) and {{#var: varContinue}}| true }}<!--
+
     -->{{#switch: {{#show:{{#arrayindex: parentsArray| {{#var: i}} }}|?Verdict}}<!--
  -->|<!--
 
     -->{{#switch: {{#show:{{#arrayindex: parentsArray | {{#var: i}} }}|?Verdict}}<!--
 
 
     -->|Open=<!--
 
     -->|Open=<!--
 
       -->{{#vardefine: varParentVerdict | Open}}<!--
 
       -->{{#vardefine: varParentVerdict | Open}}<!--
      -->{{#vardefine: varContinue | false}}<!--
 
 
     -->|Accepted=<!--
 
     -->|Accepted=<!--
 
     -->|Not Accepted=<!--  
 
     -->|Not Accepted=<!--  
 
       -->{{#vardefine: varParentVerdict | Not Accepted}}<!--
 
       -->{{#vardefine: varParentVerdict | Not Accepted}}<!--
       -->{{#vardefine: varContinue | false}}<!--
+
       -->{{#vardefine: varContinue | 0}}<!--
 
     -->}}<!-- switch end
 
     -->}}<!-- switch end
 
     --><!-- increase the counter  
 
     --><!-- increase the counter  

Latest revision as of 13:17, 21 May 2017

This template is used to print the common verdict of a modification's parent modifications. The template goes through the list of all the parent modifications and checks their verdicts. The possible return values are:

  • Not Accepted - returned if at least one of the parent modifications has a verdict of Not Accepted;
  • Open - returned if no parent modification has a verdict of Not Accepted and at least one of the parent modifications is Open;
  • Accepted - returned if all the parent modifications have been Accepted.

NOTE: As any "printing" template, it doesn't store any values anywhere, but merely returns them.

Parameters:

  • |modification= - the modification whose verdict is to be printed.