Difference between revisions of "Template:User"

From cm2.liecourt.com
(Fill database)
Line 261: Line 261:
 
{{#tag:html|<details>
 
{{#tag:html|<details>
 
<summary>You have been selected as a {{#ifeq:{{#explode:@@@|<PROP>|10}}|Class|Class&nbsp;}}Judge</summary>}}
 
<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>
 
{{#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="d-none"><div class="info-row"><b>Topic</b>{{#explode:@@@|<PROP>|5}}</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>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>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
Line 332: Line 332:
 
{{#tag:wsfield||type=submit|value=Save|class=btn btn-green}}
 
{{#tag:wsfield||type=submit|value=Save|class=btn btn-green}}
 
|action=addToWiki|class=d-none pb-4|id=dec-{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}} }}
 
|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=submitInput('{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}}')|class=btn btn-half btn-green}}</div>
+
<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:wsform|
 
{{#tag:wscreate||mwwrite=Participant/|mwtemplate=Participant|mwoption=range:00001-99999|mwfollow=true}}
 
{{#tag:wscreate||mwwrite=Participant/|mwtemplate=Participant|mwoption=range:00001-99999|mwfollow=true}}
Line 343: Line 343:
 
{{#tag:wsfield||type=hidden|name=Workflow|value={{#explode:@@@|<PROP>|0}} }}
 
{{#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}}}}
 
{{#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}} }}
+
|action=addToWiki|class=d-none pb-4|id=acp-{{#explode:{{#explode:@@@|<PROP>|0}}|/|1}} }}</div>
 
{{#tag:html|</details>}}
 
{{#tag:html|</details>}}
</div>
 
 
|}}
 
|}}
 
{{#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=$$$}}|$$$|@@@|
 
{{#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=$$$}}|$$$|@@@|
Line 353: Line 352:
 
<h2>Case information</h2>
 
<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>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>Lie</b>{{#explode:@@@|<PROP>|4}}</div>
 
<div class="info-row"><b>Topic</b>{{#explode:@@@|<PROP>|5}}</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>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>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>
+
<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>|@@@|@@@|,}} }}
 
{{#arraydefine:@jurrors|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}} }}
 
<div class="d-flex justify-content-center pb-4">
 
<div class="d-flex justify-content-center pb-4">

Revision as of 12:35, 20 May 2020


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

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