Difference between revisions of "Template:Author"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
</noinclude><includeonly><!-- | </noinclude><includeonly><!-- | ||
--><!-- | --><!-- | ||
− | -->{{#set:First Name={{{First Name|}}}|Last Name={{{Last Name|}}}|Page Status={{{Page Status|}}}|Brief={{{Brief|}}}|}}<!-- | + | -->{{#set:First Name={{{First Name|}}}|Last Name={{{Last Name|}}}|Page Status={{{Page Status|}}}|Brief={{{Brief|}}}|Page Status={{{Page Status|Stub}}}|}}<!-- |
--><!-- | --><!-- | ||
--><!-- set DOB | --><!-- set DOB | ||
Line 33: | Line 33: | ||
-->{{#arrayprint:topicsArray||@@@@|{{#set:Has Related Topic=@@@@}}|}}<!-- | -->{{#arrayprint:topicsArray||@@@@|{{#set:Has Related Topic=@@@@}}|}}<!-- | ||
--><!-- | --><!-- | ||
− | --><!-- | + | --><!-- Calculate completion rates for each major property |
− | |||
− | |||
− | |||
− | |||
--><!-- | --><!-- | ||
+ | -->{{#vardefine: varCRSum|{{SetTextPropertyCompletionRate|propertyname=Summary|propertyvalue={{{Summary|}}}|requiredwordcount=50}}|}}<!-- | ||
+ | -->{{#vardefine: varCRHst|{{SetTextPropertyCompletionRate|propertyname=Historical Context|propertyvalue={{{Historical Context|}}}|requiredwordcount=300}}|}}<!-- | ||
+ | -->{{#vardefine: varCRMaj|{{SetTextPropertyCompletionRate|propertyname=Major Contributions|propertyvalue={{{Major Contributions|}}}|requiredwordcount=800}}|}}<!-- | ||
+ | -->{{#vardefine: varCRCrt|{{SetTextPropertyCompletionRate|propertyname=Criticism|propertyvalue={{{Criticism|}}}|requiredwordcount=150}}|}}<!-- | ||
+ | -->{{#vardefine: varCRDob|{{SetDatePropertyCompletionRate|propertyname=DOB|propertyvalueyear={{{DOB Year|}}}|propertyvaluemonth={{{DOB Month|}}}|propertyvalueday={{{DOB Day|}}}|requireddateprecision=Day}}|}}<!-- | ||
+ | --><!-- | ||
+ | --><!-- Now calculate the overall completion rate. 5 10 15 45 15 | ||
+ | --><!-- | ||
+ | -->{{#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:varCRDob}}) + (10/100 * {{#var:varCRSum}}) + (15/100 * {{#var:varCRHst}}) + (45/100 * {{#var:varCRMaj}}) + (15/100 * {{#var:varCRCrt}}) ) round 0}} }}<!-- | ||
+ | --><!-- | ||
+ | -->}}<!-- if page status | ||
+ | --><!-- store the value | ||
+ | -->{{#set: CR_Total={{#var:varCRtotal}} }}<!-- | ||
+ | --><!-- | ||
--><!-- | --><!-- | ||
--><!--{{Infobox author | --><!--{{Infobox author |
Revision as of 02:33, 9 June 2017
This is the "Author" template. It should be called in the following format:
{{Author |First Name= |Last Name= |DOB= |DOD= |Brief= |Summary= |Historical Context= |Major Contributions= |Criticism= |Related Topics= |Page Status= }}
Edit the page to see the template text.