Difference between revisions of "Template:Participant"

From cm2.liecourt.com
Line 125: Line 125:
 
|1=<b>Jurors:</b>
 
|1=<b>Jurors:</b>
 
|2={{#vardefine:zz|{{#ask:[[{{{Workflow|}}}]]|?Random juror|?Declined juror|?Judge|?Filed by|?Jurors|format=array|link=none}} }}
 
|2={{#vardefine:zz|{{#ask:[[{{{Workflow|}}}]]|?Random juror|?Declined juror|?Judge|?Filed by|?Jurors|format=array|link=none}} }}
{{#vardefine:@countjur|0}}{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]][[Role::Juror]]|?Role|?Name|format=array|link=none}}|,|@@@|{{#if:{{#explode:@@@|<PROP>|2}}|<div class="btn btn-green btn-square">{{#explode:@@@|<PROP>|2}}<br><small>Accepted</small>{{#tag:wsform|{{#arraydefine:@random juror|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>}}{{#arraydefine:@user|@@@ }}{{#arraydiff:new_key|@random juror|@user}}{{#arraydefine:@Jurorsarr|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Jurors|format=array|link=none}}|<PROP>|1}}|<MANY>}}
+
{{#vardefine:@countjur|0}}{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]][[Role::Juror]]|?Role|?Name|?User|format=array|link=none}}|,|@@@|{{#if:{{#explode:@@@|<PROP>|2}}|<div class="btn btn-green btn-square">{{#explode:@@@|<PROP>|2}}<br><small>Accepted</small>{{#tag:wsform|{{#arraydefine:@random juror|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>}}{{#arraydefine:@user|{{#explode:@@@|<PROP>|3}} }}{{#arraydiff:new_key|@random juror|@user}}{{#arraydefine:@Jurorsarr|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Jurors|format=array|link=none}}|<PROP>|1}}|<MANY>}}
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[Class::Member]][[!@@@]][[Role::Juror]][[!{{#explode:{{#var:zz}}|<PROP>|4}}]][[!{{#explode:{{#var:zz}}|<PROP>|3}}]]{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|1}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|5}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|[[!###]]|}}|Limit=1|format=array|order=random}} }}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[Class::Member]][[!{{#explode:@@@|<PROP>|3}}]][[Role::Juror]][[!{{#explode:{{#var:zz}}|<PROP>|4}}]][[!{{#explode:{{#var:zz}}|<PROP>|3}}]]{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|1}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|5}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|[[!###]]|}}|Limit=1|format=array|order=random}} }}
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Declined juror|value=@@@}}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Declined juror|value={#if:{{#explode:{{#var:zz}}|<PROP>|2}}|{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|###|,}}, {{#explode:@@@|<PROP>|3}}| {{#explode:@@@|<PROP>|3}} }} }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Jurors|value={{#arraydiff:new_key|@Jurorsarr|@user}} }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Jurors|value={{#arraydiff:new_key|@Jurorsarr|@user}} }}
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
|action=addToWiki}}</div>|<div class="btn btn-green btn-square">{{#explode:@@@|<PROP>|1}}<br><small>Accepted</small></div>}}{{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}|}}<!--  
 
|action=addToWiki}}</div>|<div class="btn btn-green btn-square">{{#explode:@@@|<PROP>|1}}<br><small>Accepted</small></div>}}{{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}|}}<!--  
  -->{{#arraymap:{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>|@@@|{{#ifeq:@@@|done||<div class="btn btn-gray btn-square"> Juror {{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}{{#var:@countjur}}<br><small>Invited 1 day ago</small>{{#tag:wsform|{{#arraydefine:@random juror|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>}}{{#arraydefine:@user|@@@ }}{{#arraydiff:new_key|@random juror|@user}}
+
  -->{{#arraymap:{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>|@@@|{{#ifeq:@@@|done||<div class="btn btn-gray btn-square"> Juror {{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}{{#var:@countjur}}<br><small>Invited 1 day ago</small>{{#tag:wsform|{{#arraydefine:@random juror|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>}}{{#arraydefine:@user|{{#explode:@@@|<PROP>|3}}}}{{#arraydiff:new_key|@random juror|@user}}
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[Class::Member]][[!@@@]][[Role::Juror]][[!{{#explode:{{#var:zz}}|<PROP>|4}}]][[!{{#explode:{{#var:zz}}|<PROP>|3}}]]{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|1}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|5}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|[[!###]]|}}|Limit=1|format=array|order=random}} }}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[Class::Member]][[!{{#explode:@@@|<PROP>|3}}]][[Role::Juror]][[!{{#explode:{{#var:zz}}|<PROP>|4}}]][[!{{#explode:{{#var:zz}}|<PROP>|3}}]]{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|1}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|5}}|<MANY>|###|[[!###]]|}}{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|[[!###]]|}}|Limit=1|format=array|order=random}} }}
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Declined juror|value={{#if:{{#explode:{{#var:zz}}|<PROP>|2}}|{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|###|,}}, @@@| @@@ }} }}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Declined juror|value={{#if:{{#explode:{{#var:zz}}|<PROP>|2}}|{{#arraymap:{{#explode:{{#var:zz}}|<PROP>|2}}|<MANY>|###|###|,}}, {{#explode:@@@|<PROP>|3}}| {{#explode:@@@|<PROP>|3}} }} }}
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
|action=addToWiki}}</div>}} |}}
 
|action=addToWiki}}</div>}} |}}

Revision as of 11:54, 22 May 2020


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

{{Participant
|User=
|Workflow=
|Case ID=
|Role=
}}