Difference between revisions of "Template:Theory"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 17: Line 17:
 
|Prehistory=
 
|Prehistory=
 
|History=
 
|History=
 +
|Page Status=
 
}}
 
}}
 
</pre>
 
</pre>
 
Edit the page to see the template text.
 
Edit the page to see the template text.
</noinclude><includeonly>{{#set:Topic={{{Topic|}}}|Formulated Year={{{Formulated Year|}}}|Formulation Text={{{Formulation Text|}}}|Alternate Titles={{{Alternate Titles|}}}|Resource={{{Resource|}}}|Formulation File={{{Formulation File|}}}|Theory Type={{{Theory Type|}}}|}}<!--
+
</noinclude><includeonly>{{#set:Topic={{{Topic|}}}|Formulated Year={{{Formulated Year|}}}|Formulation Text={{{Formulation Text|}}}|Alternate Titles={{{Alternate Titles|}}}|Resource={{{Resource|}}}|Formulation File={{{Formulation File|}}}|Theory Type={{{Theory Type|}}}|Page Status={{{Page Status|Stub}}}|}}<!--
 
--><!--
 
--><!--
 
--><!-- set the title
 
--><!-- set the title
Line 32: Line 33:
 
-->{{#arrayunique:authorsArray}}<!--
 
-->{{#arrayunique:authorsArray}}<!--
 
-->{{#arrayprint:authorsArray||@@@@|{{#set:Has Author=@@@@}}|}}<!--
 
-->{{#arrayprint:authorsArray||@@@@|{{#set:Has Author=@@@@}}|}}<!--
 +
--><!--
 +
--><!-- Calculate completion rates for each major property
 +
--><!--
 +
-->{{#vardefine: varCRFil|{{SetTextPropertyCompletionRate|propertyname=Formulation File|propertyvalue={{{Formulation File|}}}|requiredwordcount=1|returnvalue=true}}|}}<!--
 +
-->{{#vardefine: varCRDes|{{SetTextPropertyCompletionRate|propertyname=Description|propertyvalue={{{Description|}}}|requiredwordcount=400|returnvalue=true}}|}}<!--
 +
-->{{#vardefine: varCRPre|{{SetTextPropertyCompletionRate|propertyname=Prehistory|propertyvalue={{{Prehistory|}}}|requiredwordcount=350|returnvalue=true}}|}}<!--
 +
-->{{#vardefine: varCRHst|{{SetTextPropertyCompletionRate|propertyname=History|propertyvalue={{{History|}}}|requiredwordcount=50|returnvalue=true}}|}}<!--
 +
--><!--
 +
--><!-- Now calculate the overall completion rate. 5 45 35 5
 +
--><!--
 +
-->{{#ifeq: {{{Page Status|}}}|Editor Approved<!--
 +
-->|<!-- editor approved: completion rate is always 100%
 +
  -->{{#vardefine: varCRtotal|100}}<!--
 +
  --><!--
 +
-->|<!-- not approved: calculate completion rate (90% max)
 +
  -->{{#vardefine: varCRtotal| {{#expr: ((5/100 * {{#var:varCRFil}}) + (45/100 * {{#var:varCRDes}}) + (35/100 * {{#var:varCRPre}}) + (5/100 * {{#var:varCRHst}}) ) round 0}} }}<!--
 +
  --><!--
 +
-->}}<!-- if page status
 +
--><!-- store the value
 +
-->{{#set: CR_Total={{#var:varCRtotal}} }}<!--
 +
--><!--
 
-->
 
-->
 
{{{Formulation Text|}}}<!--
 
{{{Formulation Text|}}}<!--

Revision as of 20:44, 15 June 2017

This is the "Theory" template. This template is to be used for all individual theories, including definitions, descriptive propositions, and normative propositions. It is currently used by Form:Definition, Form:Descriptive Theory, and Form:Normative Theory.

It should be called in the following format:

{{Theory
|Theory Type=
|Topic= 
|Title= //omitted for definitions; equals to Topic  
|Alternative Titles=
|Formulation Text=
|Description=
|Formulated Year=
|Authors List=
|Resource=
|Formulation File=
|Prehistory=
|History=
|Page Status=
}}

Edit the page to see the template text.