Difference between revisions of "Template:Participant"

From cm2.liecourt.com
(Fill database)
(Fill database)
Line 110: Line 110:
 
  -->{{#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|@@@ }}{{#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]][[!{{#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=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>|###|###|,}}, {{#explode:@@@|<PROP>|3}}| {{#explode:@@@|<PROP>|3}} }} }}
+
{{#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:wsfield||type=submit|value=x|class=remove-juror}}
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
|action=addToWiki}}</div>}} |}}
 
|action=addToWiki}}</div>}} |}}
Line 255: Line 255:
 
|}}
 
|}}
 
{{#vardefine:@mails|{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]]|?User.Email|format=array }}|,|@@@|{{#explode:@@@|<PROP>|1}} |,}} }}
 
{{#vardefine:@mails|{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]]|?User.Email|format=array }}|,|@@@|{{#explode:@@@|<PROP>|1}} |,}} }}
 +
{{#vardefine:@link|{{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]|link=none }} }}
 
<wsform action="mail" id="case-form">
 
<wsform action="mail" id="case-form">
 
<wscreate mwwrite="Chat/" mwtemplate="Chat" mwoption="range:00001-99999" />
 
<wscreate mwwrite="Chat/" mwtemplate="Chat" mwoption="range:00001-99999" />
 
<wsemail to="noreply@{{SERVERNAME}}" from="noreply@{{SERVERNAME}}" bcc="{{#var:@mails}}" subject="New chat message" template="Template:Chat mail" >
 
<wsemail to="noreply@{{SERVERNAME}}" from="noreply@{{SERVERNAME}}" bcc="{{#var:@mails}}" subject="New chat message" template="Template:Chat mail" >
 
</wsemail>
 
</wsemail>
<wsfield type="hidden" name="link" value="{{fullurl:{{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]|link=none }} }}" />
+
<wsfield type="hidden" name="link" value="{{#if:{{#var:@link}}|{{fullurl: {{#var:@link}} }} }}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Workflow" value="{{{Workflow|}}}" />
 
<wsfield type="hidden" name="Workflow" value="{{{Workflow|}}}" />

Revision as of 12:05, 26 May 2020


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

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