Difference between revisions of "Template:User"
From cm2.liecourt.com
Line 13: | Line 13: | ||
|Name= | |Name= | ||
|Filed by= | |Filed by= | ||
+ | |be candidate= | ||
}} | }} | ||
</pre> | </pre> | ||
Line 18: | Line 19: | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
− | <div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}}|+sep=,|User={{{User|}}}|Name={{{Name|}}}|Email={{{Email|}}}|Volunteer={{{Volunteer|}}}|Tokens spent={{{Tokens spent|}}}|Pagename={{FULLPAGENAME}} }} }} | + | <div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{#ifeq:{{{Be candidate|Yes}}}|Yes|{{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}} }}|+sep=,|User={{{User|}}}|Name={{{Name|}}}|Email={{{Email|}}}|Volunteer={{{Volunteer|}}}|Tokens spent={{{Tokens spent|}}}|Pagename={{FULLPAGENAME}} }} }} |
</div> | </div> | ||
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}} | {{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}} | ||
Line 48: | Line 49: | ||
{{Item responsive |Cols={{#var:@cols|4-8}} | {{Item responsive |Cols={{#var:@cols|4-8}} | ||
|1=<b>Roles</b> | |1=<b>Roles</b> | ||
− | |2={{#arraymap:{{{Roles|}}}|,|@@|@@}} {{#ifeq:{{{Volunteer|Yes}}}|(volunteer)}} | + | |2={{#ifeq:{{{Be candidate|}}}|No|Not a candidate|{{#arraymap:{{{Roles|}}}|,|@@|@@}} {{#ifeq:{{{Volunteer|Yes}}}|(volunteer)}} }} |
}} | }} | ||
{{#widget:link|text=Edit|type=a|class=btn btn-blue|id=profile-tab|datatoggle=tab|href=#info-tab-form|role=tab|aria-controls=info-tab-form|ariaselected=false}} | {{#widget:link|text=Edit|type=a|class=btn btn-blue|id=profile-tab|datatoggle=tab|href=#info-tab-form|role=tab|aria-controls=info-tab-form|ariaselected=false}} | ||
Line 81: | Line 82: | ||
<h2>TruthTokens</h2><div id="balance"> | <h2>TruthTokens</h2><div id="balance"> | ||
<!-- | <!-- | ||
− | + | ||
− | -->{{#vardefine:@ | + | -->{{#vardefine:@balance|{{#arraydefine:$tokensavailable|{{#arraymap:{{#ttList:,}}|,|@@|@@}} }}{{#arraysize:$tokensavailable}} }} |
− | |||
− | |||
− | |||
<span class="truth-token">{{fa|gavel}}</span>× <span class="nr">{{#var:@balance}}</span> {{#tag:wsfield|Buy more|type=button|onclick=buyMore()|class=btn ml-4 btn-green|id=buy-more-button}}</div> | <span class="truth-token">{{fa|gavel}}</span>× <span class="nr">{{#var:@balance}}</span> {{#tag:wsfield|Buy more|type=button|onclick=buyMore()|class=btn ml-4 btn-green|id=buy-more-button}}</div> | ||
{{#tag:wsfield|Send to a friend|type=button|onclick=sendTokens()|class=btn |id=send-tokens}} | {{#tag:wsfield|Send to a friend|type=button|onclick=sendTokens()|class=btn |id=send-tokens}} | ||
<div id="buy-more" class="d-none"> | <div id="buy-more" class="d-none"> | ||
+ | <wsform action="addToWiki" > | ||
{{#tag:wscreate||mwwrite=Order/|mwtemplate=Order|mwoption=range:00001-99999|mwfollow=true}} | {{#tag:wscreate||mwwrite=Order/|mwtemplate=Order|mwoption=range:00001-99999|mwfollow=true}} | ||
<div><span class="truth-token">{{fa|gavel}}</span>× <wsfield type="number" min="1" class="form-control form-number" name="Tokens" value="1" /></div> | <div><span class="truth-token">{{fa|gavel}}</span>× <wsfield type="number" min="1" class="form-control form-number" name="Tokens" value="1" /></div> |
Revision as of 12:37, 22 May 2020
This is the User template. It should be called in the following format:
{{User |User= |Roles= |Name= |Filed by= |be candidate= }}