Difference between revisions of "Template:User"

From cm2.liecourt.com
Line 299: Line 299:
 
<div class="d-flex justify-content-center pb-4">
 
<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: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=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:{{#var:@nrofjurorswanted}} {{#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}} }} }}
 
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Declined juror|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }}
{{#ifexpr:{{#arraysize:@jurrors}} < {{#explode:@@@|<PROP>|10}}|
+
{{#ifexpr:{{#arraysize:@jurrors}} < {{#var:@nrofjurorswanted}}|
 
{{#tag:wsfield||type=submit|value=Decline juror role|class=btn btn-red btn-half}}
 
{{#tag:wsfield||type=submit|value=Decline juror role|class=btn btn-red btn-half}}
 
}}
 
}}
Line 314: Line 314:
 
{{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|3}} }}
 
{{#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}} }} }}
 
{{#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 }}|
+
{{#ifeq:{{#arraysize:@jurrors}}|{{#expr:{{#var:@nrofjurorswanted}} - 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=Random juror|value=done}}
 
  {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Stage|value=In progress}}|<!--  
 
  {{#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}} }}
+
  -->{{#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:{{#var:@nrofjurorswanted}} {{#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}}|
+
{{#ifexpr:{{#arraysize:@jurrors}} < {{#var:@nrofjurorswanted}}|
 
{{#tag:wsfield||type=submit|value=Accept juror role|class=btn btn-green btn-half }}
 
{{#tag:wsfield||type=submit|value=Accept juror role|class=btn btn-green btn-half }}
 
}}
 
}}

Revision as of 15:27, 5 July 2021


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

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