Difference between revisions of "Template:Participant"
From cm2.liecourt.com
m (Reverted edits by Maintenance script (talk) to last revision by Merel) (Tag: Rollback) |
|||
Line 180: | Line 180: | ||
}}<!-- | }}<!-- | ||
− | -->{{#arraymap:{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::!{{{User|}}}]]|?Role|link=none|format=array}}|,|@@@| | + | -->{{#arraymap:{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::!{{{User|}}}]][[Locked::True]]|?Role|link=none|format=array}}|,|@@@| |
{{#tag:html|<details> | {{#tag:html|<details> | ||
<summary>{{#explode:@@@|<PROP>|1}} verdict</summary> | <summary>{{#explode:@@@|<PROP>|1}} verdict</summary> | ||
Line 205: | Line 205: | ||
{{Item responsive |Cols={{#var:@cols|2-10}} | {{Item responsive |Cols={{#var:@cols|2-10}} | ||
|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:@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"> | + | -->{{#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|?User|format=array|link=none}}|,|@@@|<!-- | |
− | + | -->{{#if:{{#explode:@@@|<PROP>|2}}|<!-- | |
− | + | --><div class="btn btn-green btn-square"><!-- | |
− | + | -->{{#explode:@@@|<PROP>|2}}<!-- | |
− | + | --><br><small>Accepted</small><!-- | |
− | + | --></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><br><!-- | |
− | + | --></div>}} |}} | |
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
-->{{#vardefine:@tokenstats|<nowiki>{{subst:#ttaward:</nowiki>{{PAGENAME:{{#show:{{{Workflow}}}|?Filed by|link=none}} }}<nowiki>}}</nowiki>}} | -->{{#vardefine:@tokenstats|<nowiki>{{subst:#ttaward:</nowiki>{{PAGENAME:{{#show:{{{Workflow}}}|?Filed by|link=none}} }}<nowiki>}}</nowiki>}} | ||
Line 258: | Line 255: | ||
<div class="clear-both"></div><!-- | <div class="clear-both"></div><!-- | ||
--><wsfield type="button" onclick="changeJurors()" class="btn btn-green mb-4 mt-4 float-left d-none " >Change suit</wsfield> | --><wsfield type="button" onclick="changeJurors()" class="btn btn-green mb-4 mt-4 float-left d-none " >Change suit</wsfield> | ||
− | <wsfield type="submit" value="Change suit" id="change-suit" class="btn btn-green mb-4 "/> | + | <wsfield type="submit" value="Change suit" id="change-suit" class="btn btn-green mb-4 d-none"/> |
{{#tag:html|<script> | {{#tag:html|<script> | ||
var oldjurrors = document.getElementById('jurors').querySelector('input').value; | var oldjurrors = document.getElementById('jurors').querySelector('input').value; | ||
Line 298: | Line 295: | ||
− | --><div class="box"><h2>Your verdict :</h2>{{#vardefine:@verdict|{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::{{{User|}}}]]|link=none}} }}{{#if:{{#var:@verdict}}|{{verdict results|Verdict={{#var:@verdict}} }}<br><!-- | + | --><div class="box"><h2>Your verdict :</h2><!-- |
− | -->{{#ifeq:{{#show:{{{Workflow|}}}|?Stage}}|Settled| |{{#widget:link|type=a|href={{fullurl:{{#var:@verdict}}|Participant={{#var:@fullpagename}} }}|text=Edit verdict|class=btn btn-green }} }}|<!-- | + | -->{{#vardefine:@verdict|{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::{{{User|}}}]]|link=none}} }}<!-- |
+ | -->{{#if:{{#var:@verdict}}<!-- | ||
+ | -->|<!-- | ||
+ | -->{{verdict results|Verdict={{#var:@verdict}} }}<br><!-- | ||
+ | -->{{#ifeq:{{#show:{{{Workflow|}}}|?Stage}}|Settled| |<!-- | ||
+ | -->{{#ifeq:{{#show:{{#var:@verdict}}|?Locked|link=none}}|True| |<!-- | ||
+ | -->{{#widget:link|type=a|href={{fullurl:{{#var:@verdict}}|Participant={{#var:@fullpagename}} }}|text=Edit verdict|class=btn btn-green }}<!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->|<!-- | ||
--><wsform action="addToWiki">{{#ifeq:{{{Role|}}}|Juror|{{#vardefine:@verdictdate|{{#show:{{{Workflow}}}|?Suit date|link=none}} }} {{#if:{{#var:@verdictdate}}|Create your Verdict before {{#var:@verdictdate}} }}<br> }} | --><wsform action="addToWiki">{{#ifeq:{{{Role|}}}|Juror|{{#vardefine:@verdictdate|{{#show:{{{Workflow}}}|?Suit date|link=none}} }} {{#if:{{#var:@verdictdate}}|Create your Verdict before {{#var:@verdictdate}} }}<br> }} | ||
<wscreate mwwrite="Verdict:{{{Case ID|}}}/" mwtemplate="Verdict" mwoption="range:00001-99999" mwfollow/> | <wscreate mwwrite="Verdict:{{{Case ID|}}}/" mwtemplate="Verdict" mwoption="range:00001-99999" mwfollow/> |
Revision as of 11:11, 21 March 2022
This is the Participant template. It should be called in the following format:
{{Participant |User= |Workflow= |Case ID= |Role= }}