Difference between revisions of "Template:User"

From cm2.liecourt.com
Line 112: Line 112:
 
|action=addToWiki}} {{#tag:html|</details>}}
 
|action=addToWiki}} {{#tag:html|</details>}}
 
</div>}} |}}<!--
 
</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}}|,|@@@|
 
 
-->{{#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">
 
<div class="info-item">
 
{{#tag:html|<details>
 
{{#tag:html|<details>
<summary>A case you are judging requested to join a class</summary>}}
+
  <summary>A case awaits</summary>}}<br>
<h2>Case information</h2>
+
<h3>Are you sure you want to accept?</h3><br>
<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|
 
{{#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}}}}
 
|{{#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>Lie</b>{{#explode:{{#var:@classinfo}}|<PROP>|4}}</div>
Line 155: Line 139:
 
{{#tag:wsfield||type=hidden|name=Type|value=Class }}
 
{{#tag:wsfield||type=hidden|name=Type|value=Class }}
 
{{#tag:wsfield||type=hidden|name=Filed by|value={{#explode:@@@|<PROP>|2}} }}
 
{{#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=Random judge|value={{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{FULLPAGENAME}}]]|Limit=1|format=array|order=random}} }}
 
{{#tag:wsfield||type=hidden|name=Case ID|value=1234-{{#time: U | now}}-{{#time: U | now}} }}
 
{{#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:wsfield||type=hidden|name=Class case IDs|value={{{Workflow|}}} }}
Line 171: Line 155:
 
}}<!-- if new -->
 
}}<!-- if new -->
 
</div>
 
</div>
{{#tag:html|</details>}}
+
{{#tag:html|<br></details>}}
 
</div>
 
</div>
  
Line 275: Line 259:
 
{{#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=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}}'-->
+
<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><!--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}}

Revision as of 13:23, 2 August 2021


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

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