Difference between revisions of "Template:User"

From cm2.liecourt.com
m (Reverted edits by Maintenance script (talk) to last revision by Merel)
(Tag: Rollback)
 
(10 intermediate revisions by 3 users not shown)
Line 19: Line 19:
  
 
</noinclude><includeonly>{{#vardefine:@roles|{{#ifeq:{{{Be candidate|Yes}}}|Yes|{{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}} }} }}
 
</noinclude><includeonly>{{#vardefine:@roles|{{#ifeq:{{{Be candidate|Yes}}}|Yes|{{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}} }} }}
<div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{#if:{{#ask:[[{{FULLPAGENAME}}]][[User group::sysop]]|?User group|limit=999}}| |{{#var:@roles}} }}|+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|Nomessages={{{Nomessages|}}}|Role={{#if:{{#ask:[[{{FULLPAGENAME}}]][[User group::sysop]]|?User group|limit=999}}| |{{#var:@roles}} }}|+sep=,|User={{{User|}}}|Name={{{Name|}}}|Email={{{Email|}}}|Volunteer={{{Volunteer|}}}|Tokens spent={{{Tokens spent|}}}|Pagename={{FULLPAGENAME}}|Online since={{{Online since|}}} }} }}
 
</div>
 
</div>
 
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}}  
 
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}}  
Line 76: Line 76:
 
<h2>TruthTokens</h2><div id="balance">
 
<h2>TruthTokens</h2><div id="balance">
 
<!--
 
<!--
-->{{#vardefine:@balance|{{#ttcount:}} }}
+
-->{{#vardefine:@balance|1<!--{{#ttcount:}}--> }}
 
<span class="truth-token">{{fa|gavel}}</span>× <span class="nr">{{#var:@balance}}</span>
 
<span class="truth-token">{{fa|gavel}}</span>× <span class="nr">{{#var:@balance}}</span>
 
</div>
 
</div>
</div>
+
</div>
 
<div class="info-box">
 
<div class="info-box">
<h2>Messages</h2>
+
<h2>Online status</h2><div id="online-status">
{{#arraymap:{{#ask:[[Class::Workflow]][[Filed by::{{FULLPAGENAME}}]][[Stage::Settled]]|?Settled seen by|format=array|limit=9999}}|,|@@@|
+
<center>{{Mark online}}</center>
{{#arraydefine:@seen|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|###|###|,}} }}
 
{{#if:{{#arraysearch:@seen|{{FULLPAGENAME}} }}| |
 
{{#tag:html|<details>
 
<summary>A case you filed is settled</summary>}}
 
<div class="info-row"><b>Case ID:</b>{{#show:{{#explode:@@@|<PROP>|0}}|?Case ID|link=none}}</div>
 
<div class="info-row"><b>Suit:</b>{{#ask:[[Class::Suit]][[Workflow::{{#explode:@@@|<PROP>|0}}]]|limit=9999}}
 
</div>{{#tag:wsform|{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Settled seen by|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|###|###|,}}, {{FULLPAGENAME}}|{{FULLPAGENAME}} }} }}
 
{{#tag:wsfield||type=submit|value=Remove message|class=btn btn-green mt-4 mb-4}}
 
|action=addToWiki}}
 
{{#tag:html|</details>}} }}
 
|}}<!--
 
 
 
-->{{#arraymap:{{#ask:[[Class::Workflow]][[Jurors::{{FULLPAGENAME}}]][[Change::!none]]|?Change seen by|?Suit date|link=none|format=array|limit=9999}}|,|@@@|<!--
 
 
-->{{#arraydefine:@change|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|###|###|,}} }}
 
{{#if:{{#arraysearch:@change|{{FULLPAGENAME}} }}| |<div class="info-item">{{#tag:html|<details>
 
<summary>A case you are jurying is changed</summary>}}
 
<div class="info-row"><b>Case ID:</b>{{#show:{{#explode:@@@|<PROP>|0}}|?Case ID|link=none}}</div>
 
<div class="info-row"><b>Suit:</b>{{#ask:[[Class::Suit]][[Workflow::{{#explode:@@@|<PROP>|0}}]]|limit=9999}}</div>
 
<div class="info-row"><b>Suit date:</b>{{#explode:@@@|<PROP>|2}}</div>
 
{{#tag:wsform|{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Change seen by|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|###|###|,}}, {{FULLPAGENAME}}|{{FULLPAGENAME}} }} }}
 
{{#tag:wsfield||type=submit|value=Remove message|class=btn btn-green mt-4 mb-4}}
 
|action=addToWiki}} {{#tag:html|</details>}}
 
</div>}} |}}<!--
 
 
 
 
 
-->{{#arraymap:{{#ask:[[Class::Workflow]][[Judge::{{FULLPAGENAME}}]][[Class request::!Declined]][[Class request::!Approved]]|?Declined judge|?Filed by|?Case ID|?Lie|?Topic|?Description|?Markup|?Facts|?Locations|?Type|?Class case IDs|?Class request|?Class title|link=none|format=array|limit=9999}}|,|@@@|
 
<div class="info-item">
 
{{#tag:html|<details>
 
<summary>A case you are judging requested to join a class</summary>}}
 
<h2>Case information</h2>
 
<div class="info-row"><b>Case ID</b>{{#explode:@@@|<PROP>|3}}</div>
 
<div class="info-row"><b>Lie</b>{{#explode:@@@|<PROP>|4}}</div>
 
<div class="info-row"><b>Topic</b>{{#explode:@@@|<PROP>|5}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>
 
<div class="info-row"><b>Link</b>{{#ask:[[Class::Suit]][[Case ID::{{#explode:@@@|<PROP>|3}}]]|limit=9999|format=plainlist}}</div>
 
<h2>Class information</h2>
 
{{#ifeq:{{#explode:@@@|<PROP>|12}}|New|
 
 
 
<div class="info-row"><b>Request for new Class</b></div>
 
 
 
<div class="info-row"><b>Class title</b>{{#explode:@@@|<PROP>|13}}</div>
 
 
 
 
 
|{{#vardefine:@classinfo|{{#ask:[[Class::Workflow]][[{{#explode:@@@|<PROP>|12}}]]|?Declined judge|?Filed by|?Case ID|?Lie|?Topic|?Description|?Markup|?Facts|?Locations|?Type|?Class case IDs|?Class request|link=none|format=array|limit=9999}}}}
 
<div class="info-row"><b>Lie</b>{{#explode:{{#var:@classinfo}}|<PROP>|4}}</div>
 
<div class="info-row"><b>Topic</b>{{#explode:{{#var:@classinfo}}|<PROP>|5}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:{{#var:@classinfo}}|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:{{#var:@classinfo}}|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:{{#var:@classinfo}}|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>
 
<div class="info-row"><b>Link</b>{{#ask:[[Class::Suit]][[Case ID::{{#explode:{{#var:@classinfo}}|<PROP>|3}}]]|format=plainlist|limit=9999}}</div>
 
}}<!-- if new -->
 
<div class="d-flex">
 
{{#tag:wsform|
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Class request|value=Declined}}
 
{{#tag:wsfield||type=submit|value=Decline request|class=btn btn-red btn-half}}
 
|action=addToWiki}}
 
 
 
{{#ifeq:{{#explode:@@@|<PROP>|12}}|New|
 
 
 
{{#tag:wsform|
 
{{#tag:wscreate||mwwrite=Workflow/|mwtemplate=Workflow|mwoption=range:00001-99999 }}
 
{{#tag:wsfield||type=hidden|name=Lie|value={{#explode:@@@|<PROP>|13}} }}
 
{{#tag:wsfield||type=hidden|name=Type|value=Class }}
 
{{#tag:wsfield||type=hidden|name=Filed by|value={{#explode:@@@|<PROP>|2}} }}
 
{{#tag:wsfield||type=hidden|name=Random judge|value={{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{FULLPAGENAME}}]]|Limit=1|format=array|order=random|limit=9999}} }}
 
{{#tag:wsfield||type=hidden|name=Case ID|value=1234-{{#time: U | now}}-{{#time: U | now}} }}
 
{{#tag:wsfield||type=hidden|name=Class case IDs|value={{{Workflow|}}} }}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Class request|value=Approved}}<!--
 
-->{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Stage|value=Settled}}
 
{{#tag:wsfield||type=submit|value=Approve request|class=btn btn-green btn-half }}
 
|action=addToWiki}}
 
|{{#tag:wsform|
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Class request|value=Approved}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Stage|value=Settled}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:{{#var:@classinfo}}|<PROP>|0}}}}|template=Workflow|formfield=Class case IDs|value={{#if:{{#explode:{{#var:@classinfo}}|<PROP>|11}}| {{#arraymap:{{#explode:{{#var:@classinfo}}|<PROP>|11}}|<MANY>|###|###|,}} , {{#explode:@@@|<PROP>|0}}  |{{#explode:@@@|<PROP>|0}} }} }}
 
{{#tag:wsfield||type=submit|value=Approve request|class=btn btn-green btn-half }}
 
 
 
|action=addToWiki}}
 
}}<!-- if new -->
 
</div>
 
{{#tag:html|</details>}}
 
</div>
 
 
 
 
 
|}}<!--
 
 
 
 
 
-->{{#arraymap:{{#ask:[[Class::Workflow]][[Filed by::{{FULLPAGENAME}}]][[Plaintiff verdict::No]]|?Case ID|?Lie|link=none|format=array|limit=9999}}|,|@@@|
 
<div class="info-item">
 
{{#tag:html|<details>
 
<summary>Please fill in your plaintiff verdict</summary>}}
 
<div class="info-row"><b>Lie</b>{{#explode:@@@|<PROP>|2}}</div>
 
{{#vardefine:@partpage|{{#ask:[[Class::Participant]][[User::{{FULLPAGENAME}}]][[Workflow::{{#explode:@@@|<PROP>|0}}]]|link=none|limit=9999}} }}
 
{{#if:{{#var:@partpage}}|
 
{{#widget:link|type=a|href={{#var:@partpage}}|class=btn btn-green mt-4 mb-4|text=Create verdict}}
 
|{{#tag:wsform|
 
{{#tag:wscreate||mwwrite=Participant/|mwtemplate=Participant|mwoption=range:00001-99999|mwfollow=true }}
 
<!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Plaintiff verdict|value=Yes}}-->
 
{{#tag:wsfield||type=hidden|name=User|value={{FULLPAGENAME}} }}
 
{{#tag:wsfield||type=hidden|name=Role|value=Plaintiff }}
 
{{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|1}} }}
 
{{#tag:wsfield||type=hidden|name=Workflow|value={{#explode:@@@|<PROP>|0}} }}
 
{{#tag:wsfield||type=submit|value=Create verdict|class=btn btn-green ml-4 mt-4 mb-4}}
 
|action=addToWiki}} }}
 
{{#tag:html|</details>}}
 
 
</div>
 
</div>
|}}
 
 
{{#arraymap:{{#ask:[[Class::Workflow]][[Random judge::{{FULLPAGENAME}}]]|?Declined judge|?Filed by|?Case ID|?Lie|?Topic|?Description|?Markup|?Facts|?Locations|?Type|?Class case IDs|?Reason for judge decline|link=none|format=array|sep=$$$|limit=9999}}|$$$|@@@|
 
<div class="info-item">
 
{{#tag:html|<details>
 
<summary>You have been selected as a {{#ifeq:{{#explode:@@@|<PROP>|10}}|Class|Class&nbsp;}}Judge</summary>}}
 
<div class="d-none suit-ace">
 
{{#ifeq:{{#explode:@@@|<PROP>|10}}|Class|<h2>Class cases information</h2>{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|###|<div class="info-row">Case: ###</div>|}}|<h2>Case information</h2><div class="info-row"><b>Lie</b>{{#explode:@@@|<PROP>|4}}</div>
 
<div class="info-row"><b>Topic</b>{{#explode:@@@|<PROP>|5}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>
 
<div class="info-row"><b>Screenshot</b>{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Case file]][[Case file::{{#explode:@@@|<PROP>|3}}]]|?=|?Modification date|Format=array|link=none|limit=9999}}|,|@@@|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=attachment  |text={{fa|image}} }}<!--
 
 
-->{{Modal
 
|Targetid=image-modal-{{#var:@counter}}
 
|Dialog class=image-modal
 
|ModalHeading=Image
 
|BodyText=[[{{#explode:@@@|<PROP>|0}}]]Uploaded on: {{#explode:@@@|<PROP>|1}}
 
|FooterText={{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=btn btn-submit  |text=close}}
 
|Hide link=Yes
 
}}<!--
 
-->|}} </div>
 
<h2>Plaintiff verdict</h2>
 
{{#vardefine:@plver|{{#ask:[[Class::Verdict]][[Context::None]][[Case ID::{{#explode:@@@|<PROP>|3}}]][[Role::Plaintiff]]
 
|?Case ID
 
|?Role
 
|?User
 
|?Truth
 
|?Truth percentage
 
|?Truth text
 
|?Whole truth
 
|?Whole truth percentage
 
|?Whole truth text
 
|?Nothing But the truth
 
|?Nothing But the truth percentage
 
|?Nothing But the truth text
 
|?Deceit
 
|?Deceit percentage
 
|?Deceit text
 
|?Deceit intended
 
|?Deceit intended percentage
 
|?Deceit intended text
 
|?Motivation
 
|?Motivation percentage
 
|?Motivation text
 
|?Social acceptability
 
|?Social acceptability percentage
 
|?Social acceptability text
 
|?Label
 
|?Label percentage
 
|?Label text
 
|?-Verdict=File
 
|?-Verdict.Modification date
 
|link=none
 
|Sort=Role
 
|Order=desc
 
|Format=array
 
|Sep=$
 
|limit=9999
 
}}}}
 
<div class="info-row"><b>Is it the Truth?</b>{{#explode:{{#var:@plver}}|<PROP>|4}} <span class="percnt">{{#explode:{{#var:@plver}}|<PROP>|5}}%</span><br>{{#explode:{{#var:@plver}}|<PROP>|6}}</div>
 
<div class="info-row"><b>Is it the Whole Truth?</b>{{#explode:{{#var:@plver}}|<PROP>|7}} <span class="percnt">{{#explode:{{#var:@plver}}|<PROP>|8}}%</span><br>{{#explode:{{#var:@plver}}|<PROP>|9}}</div>
 
<div class="info-row"><b>Is it Nothing But the Truth?</b>{{#explode:{{#var:@plver}}|<PROP>|10}} <span class="percnt">{{#explode:{{#var:@plver}}|<PROP>|11}}%</span><br>{{#explode:{{#var:@plver}}|<PROP>|12}}</div>
 
<div class="info-row"><b>What is the Deceit?</b>{{#vardefine:@dc|0}}{{#arraymap:{{#explode:{{#var:@plver}}|<PROP>|13}}|,|%%%|%%% <span class="percnt">{{#explode:{{#explode:{{#var:@plver}}|<PROP>|14}}|,|{{#var:@dc}}}}%</span><br>{{#explode:{{#explode:{{#var:@plver}}|<PROP>|15}}|,|{{#var:@dc}}}} {{#vardefine:@dc|{{#expr:{{#var:@dc}} + 1}} }}|<br>}}</div>
 
<div class="info-row"><b>Is the Deceit Intended?</b>{{#explode:{{#var:@plver}}|<PROP>|16}} <span class="percnt">{{#explode:{{#var:@plver}}|<PROP>|17}}%</span><br>{{#explode:{{#var:@plver}}|<PROP>|18}}</div>
 
<div class="info-row"><b>What is the Motivation behind the Lie?</b>{{#vardefine:@mv|0}}{{#arraymap:{{#explode:{{#var:@plver}}|<PROP>|19}}|,|%%%|%%% <span class="percnt">{{#explode:{{#explode:{{#var:@plver}}|<PROP>|20}}|,|{{#var:@mv}}}}%</span><br>{{#explode:{{#explode:{{#var:@plver}}|<PROP>|21}}|,|{{#var:@mv}}}}{{#vardefine:@mv|{{#expr:{{#var:@mv}} + 1}} }} |<br>}}</div>
 
<div class="info-row"><b>What is the Social Acceptability for the lie?</b>{{#explode:{{#var:@plver}}|<PROP>|22}} <span class="percnt">{{#explode:{{#var:@plver}}|<PROP>|23}}%</span><br>{{#explode:{{#var:@plver}}|<PROP>|24}}</div>
 
<div class="info-row"><b>What is the label for the lie needed to Improve the Social Acceptability?</b>{{#explode:{{#var:@plver}}|<PROP>|25}} <span class="percnt">{{#explode:{{#var:@plver}}|<PROP>|26}}%</span><br>{{#explode:{{#var:@plver}}|<PROP>|27}}</div>}}</div>
 
{{#if:{{#explode:@@@|<PROP>|12}}|<h2>Former selected judge declined</h2>
 
<div class="info-row"><b>Reason</b>{{#explode:@@@|<PROP>|12}}</div>}}
 
{{#tag:wsform|<h2>Reason for decline</h2>
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}} }}|template=Workflow|formfield=Random judge|value={{#ask:[[User group::icol-user]][[Class::Member]]{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}[[!{{#explode:@@@|<PROP>|2}}]][[!{{FULLPAGENAME}}]][[Role::Judge]]|Limit=1|searchlabel=|format=array|order=random}}}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}} }}|template=Workflow|formfield=Declined judge|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}} }}|template=Workflow|formfield=Reason for judge decline}}
 
{{#tag:wsfield||type=textarea|placeholder=Reason|name=Reason for judge decline|class=form-control mb-4}}
 
{{#tag:wsfield||type=submit|value=Save|class=btn btn-green}}
 
|action=addToWiki|class=d-none pb-4|id=dec-{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}} }}
 
<div class="d-flex justify-content-center pb-4" id="{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}}">{{#tag:wsfield|Decline judge role|type=button|onclick=openInput('dec','{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}}')|class=btn btn-half btn-red}}{{#tag:wsfield|Accept judge role|type=button|onclick=this.closest('.info-item').querySelector('.suit-ace').classList.remove('d-none');this.setAttribute('onclick', 'submitInput(\'{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}}\')' );this.innerText ='Approve case';this.closest('.d-flex').querySelector('.btn-red').innerText = 'Disapprove case'|class=btn btn-half btn-green}}</div><!--submitInput('{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}}'-->
 
{{#tag:wsform|
 
{{#tag:wscreate||mwwrite=Participant/|mwtemplate=Participant|mwoption=range:00001-99999|mwfollow=true}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}} }}|template=Workflow|formfield=Stage|value=Judge accepted}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}} }}|template=Workflow|formfield=Judge|value={{FULLPAGENAME}} }}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}} }}|template=Workflow|formfield=Random judge|value=done }}
 
{{#tag:wsfield||type=hidden|name=User|value={{FULLPAGENAME}} }}
 
{{#tag:wsfield||type=hidden|name=Role|value=Judge }}
 
{{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|3}} }}
 
{{#tag:wsfield||type=hidden|name=Workflow|value={{#explode:@@@|<PROP>|0}} }}
 
{{#tag:wsfield||type=submit|value=Save|class=btn btn-green mt-4|id=submit-{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}}}}
 
|action=addToWiki|class=d-none pb-4|id=acp-{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}} }}</div>
 
{{#tag:html|</details>}}
 
|}}
 
{{#arraymap:{{#ask:[[Class::Workflow]][[Random juror::{{FULLPAGENAME}}]]|?Declined juror|?Filed by|?Case ID|?Lie|?Topic|?Description|?Markup|?Facts|?Locations|?Juror amount|?Jurors|?Judge|?Random juror|?Suit date|link=none|format=array|sep=$$$|limit=9999}}|$$$|@@@|
 
<div class="info-item">
 
{{#tag:html|<details>
 
<summary>You have been selected as a Juror</summary>}}
 
<h2>Case information</h2>
 
<div class="info-row"><b>Suit date</b>{{#time:d M Y|{{#explode:@@@|<PROP>|14}} }}</div>
 
<!--<div class="info-row"><b>Lie</b>{{#explode:@@@|<PROP>|4}}</div>
 
<div class="info-row"><b>Topic</b>{{#explode:@@@|<PROP>|5}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked-up Truth and Lies</b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>-->
 
{{#arraydefine:@jurrors|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}} }}<!--
 
-->{{#vardefine:@nrofjurorswanted|{{#if:{{#explode:@@@|<PROP>|10}}|{{#explode:@@@|<PROP>|10}}|0}}
 
<div class="d-flex justify-content-center pb-4">
 
{{#tag:wsform| {{#arraydefine:@random juror|{{#explode:@@@|<PROP>|13}}|<MANY>}}{{#arraydefine:@user|{{FULLPAGENAME}} }}{{#arraydiff:new_key|@random juror|@user}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[User group::icol-user]][[Class::Member]][[!{{FULLPAGENAME}}]][[Role::Juror]][[!{{#explode:@@@|<PROP>|12}}]]{{#arraymap:{{#explode:@@@|<PROP>|13}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}|searchlabel=|Limit={{#expr:{{#explode:@@@|<PROP>|10}} {{#if:{{#arrayprint:new_key}}|- {{#arraysize:new_key}}| - 0 }} }}|format=array|order=random}} }}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Declined juror|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }}
 
{{#arraysize:@jurrors}} < @@@ - {{#ifexpr:{{#arraysize:@jurrors}} < {{#explode:@@@|<PROP>|10}}|
 
{{#tag:wsfield||type=submit|value=Decline juror role|class=btn btn-red btn-half}}
 
}}
 
|action=addToWiki}}
 
{{#tag:wsform|
 
{{#tag:wscreate||mwwrite=Participant/|mwtemplate=Participant|mwoption=range:00001-99999|mwfollow=true}}
 
{{#tag:wsfield||type=hidden|name=User|value={{FULLPAGENAME}} }}
 
{{#tag:wsfield||type=hidden|name=Role|value=Juror }}
 
{{#arraydefine:@countjurors|{{#explode:@@@|<PROP>|11}}|<MANY>}}
 
{{#tag:wsfield||type=hidden|name=Name|value=Juror {{#expr:{{#if:{{#arraysize:@countjurors}}|{{#arraysize:@countjurors}}|0}} + 1}} }}
 
{{#tag:wsfield||type=hidden|name=Workflow|value={{#explode:@@@|<PROP>|0}} }}
 
{{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|3}} }}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Jurors|value={{#if:{{#explode:@@@|<PROP>|11}}|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }}
 
{{#ifeq:{{#arraysize:@jurrors}}|{{#expr:{{#explode:@@@|<PROP>|10}} - 1 }}|
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value=done}}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Stage|value=In progress}}|<!--
 
-->{{#arraydefine:@random juror|{{#explode:@@@|<PROP>|13}}|<MANY>}}{{#arraydefine:@user|{{FULLPAGENAME}} }}{{#arraydiff:new_key|@random juror|@user}}{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#vardefine:@limit|{{#expr:{{#explode:@@@|<PROP>|10}} {{#if:{{#arrayprint:new_key}}|- {{#arraysize:new_key}}| - 0 }}{{#if:{{#arraysize:@countjurors}}|- {{#arraysize:@countjurors}}|- 0}} }} }}{{#ifexpr:{{#var:@limit}} > 0|{{#ask:[[User group::icol-user]][[Class::Member]][[!{{FULLPAGENAME}}]][[!{{{Filed by|}}}]][[Role::Juror]][[!{{#explode:@@@|<PROP>|12}}]][[!{{#explode:@@@|<PROP>|13}}]]{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}|Limit={{#var:@limit}}|searchlabel=|format=array|order=random}} }}
 
}} }}
 
{{#ifexpr:{{#arraysize:@jurrors}} < {{#explode:@@@|<PROP>|10}}|
 
{{#tag:wsfield||type=submit|value=Accept juror role|class=btn btn-green btn-half }}
 
}}
 
|action=addToWiki}}
 
</div>
 
{{#tag:html|</details>}}
 
</div>
 
|}}
 
 
 
</div>
 
</div>
 +
<div class="messages-wrapper" data-poll="Messages" data-parameters="Workflow={{{Workflow|}}}^Filed by={{{Filed by|}}}"><!--
 +
messages -->
 +
{{Messages
 +
|Fullpagename={{FULLPAGENAME}}
 +
|Workflow={{{Workflow|}}}
 +
|Filed by={{{Filed by|}}}
 +
}}
 
</div>
 
</div>
 
</div>
 
</div>
Line 353: Line 116:
 
}
 
}
  
 +
buymore = document.getElementById('buy-more')
 +
if(buymore){
 
var formnumber = document.getElementById('buy-more').querySelector('.form-number');
 
var formnumber = document.getElementById('buy-more').querySelector('.form-number');
 
formnumber.addEventListener('change', changeNumber, false );
 
formnumber.addEventListener('change', changeNumber, false );
Line 358: Line 123:
 
var tokennr = parseInt(document.getElementById('balance').querySelector('.nr').innerText);
 
var tokennr = parseInt(document.getElementById('balance').querySelector('.nr').innerText);
 
var tokentotal = parseInt(document.getElementById('total-price').innerText);
 
var tokentotal = parseInt(document.getElementById('total-price').innerText);
 
+
}
 
function changeNumber(){
 
function changeNumber(){
  

Latest revision as of 12:36, 24 February 2022


This is the User template. It should be called in the following format:

{{User
|User=
|Roles=
|Name=
|Filed by=
|be candidate=
}}