Difference between revisions of "Template:Participant"

From cm2.liecourt.com
Line 33: Line 33:
 
|Settled=<div class="d-flex flow-index"><div class="done">Case is proposed</div><div class="done">Waiting for Plaintiff verdict</div><div class="done">Case is waiting for approval</div><div class="done">Case needs a judge</div><div class="done">Judge accepted</div><div class="done">Case is filed</div><div class="done">Case needs jurors</div><div class="done">Suit in progress</div><div class="active">Settled</div></div>
 
|Settled=<div class="d-flex flow-index"><div class="done">Case is proposed</div><div class="done">Waiting for Plaintiff verdict</div><div class="done">Case is waiting for approval</div><div class="done">Case needs a judge</div><div class="done">Judge accepted</div><div class="done">Case is filed</div><div class="done">Case needs jurors</div><div class="done">Suit in progress</div><div class="active">Settled</div></div>
 
}}
 
}}
<h2>Your checklist:</h2>{{#vardefine:@check|{{#ask:[[{{{Workflow|}}}]]|?Juror amount|?Suit date|?Settlement date|?Meeting date|format=array|link=none}} }}
+
 
{{#switch:{{{Role|}}}
+
<!--
|Plaintiff=<div class="d-flex flow-index"><div class="done">Propose a case</div><div class="done">Complete verdict
+
--><!--
</div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|2}}|class="done"}}>Reevaluate verdict</div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|4}}|{{#ifexpr:{{#time: U |{{#explode:{{#var:@check}}|<PROP>|4}} }} < {{#time: U | now}} |class="done"}} }}>Attend meeting</div></div>
+
 
|Judge=<div class="d-flex flow-index"><div class="done">Read the Plaintiff pleading and proposed verdict</div><div class="done">Accept or Reject the Plaintiff filing
+
--><!--
</div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|2}}|class="done"}}>Set settlement date </div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|1}}|class="done"}}>Set the number of Jurors</div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|2}}|class="done"}}>Set date for Jurors verdicts</div><div {{#vardefine:@verdict|{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::{{{User|}}}]]|link=none}} }}{{#if:{{#var:@verdict}}|class="done"}}>Complete your verdict</div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|4}}|class="done"}}>Set date for meeting with Jurors and the Plaintiff</div><div {{#ifeq:{{#show:{{{Workflow|}}}|?Stage}}|Settled|class="done"}}>Complete your verdict and settle the case</div></div>
+
--><!--
|Juror=<div class="d-flex flow-index"><div class="done">Read the Plaintiff pleading and proposed verdict</div><div  {{#vardefine:@verdict|{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::{{{User|}}}]]|link=none}} }}{{#if:{{#var:@verdict}}|class="done"}}>Create verdict
+
  -->{{#if:{{#show:User:{{CURRENTLOGGEDUSER}}|?Nomessages}}| |
</div><div {{#if:{{#explode:{{#var:@check}}|<PROP>|4}}|{{#ifexpr:{{#time: U |{{#explode:{{#var:@check}}|<PROP>|4}} }} < {{#time: U | now}} |class="done"}} }}>Attend meeting</div></div>
+
|{{#switch:{{#show:{{{Workflow|}}}|?Stage}}
 +
|Waiting for Plaintiff verdict=<!--  
 +
  -->{{#switch:{{{Role|}}}<!--
 +
-->|Plaintiff=<div class="jumbotron mt-4"><h2 class="display-4">Create your verdict</h2>  
 +
* Fill out <b>Accusation</b>
 +
* Mark <b>Lie in Context</b>
 +
{{#var:@dontshowthis}}</div>
 
}}
 
}}
 +
|Needs judge=<!--
 +
-->{{#switch:{{{Role|}}}<!--
 +
-->|Judge=<div class="jumbotron mt-4"><h2 class="display-4">Start the Trail</h2>
 +
* Accept Trail Obligation
 +
* Accept Plaintiff Pleading
 +
{{#var:@dontshowthis}}</div>
 +
}}
 +
|Judge accepted=<!--
 +
-->{{#switch:{{{Role|}}}<!--
 +
-->|Juror=<div class="jumbotron mt-4"><h2 class="display-4">Accept Trail Obligation</h2>
 +
* Create your verdict
 +
{{#var:@dontshowthis}}</div><!--
 +
-->}}
 +
|Needs jurors=<!--
 +
-->{{#switch:{{{Role|}}}<!--
 +
-->|Juror=<div class="jumbotron mt-4"><h2 class="display-4">Accept Trail Obligation</h2>
 +
* Create your verdict
 +
{{#var:@dontshowthis}}</div><!--
 +
-->}}
 +
|In progress=<!--
 +
--><div class="jumbotron mt-4"><h2 class="display-4">Trail is starting</h2>
 +
Trail Starts on {{#show:{{{Workflow}}}|?Slot|link=none }} with Audio and Chat{{#var:@dontshowthis}}</div>
 +
}}<!--
 +
--><!--
 +
-->}}<!--
 +
-->
 
<div class="row ">
 
<div class="row ">
 
<div class="col-12 col-lg-8 ">
 
<div class="col-12 col-lg-8 ">
Line 68: Line 100:
 
}}<!--
 
}}<!--
  
-->{{Item responsive |Cols={{#var:@cols|4-8}}
+
-->{{#if:{{#show:{{{Workflow}}}|?Topic|link=none }}|{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Stage:</b>
+
|1=<b>Category:</b>
|2={{#show:{{{Workflow}}}|?Stage }}
+
|2={{#show:{{{Workflow}}}|?Topic|link=none }}
}}<!--
+
}} }}<!--
  
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
Line 171: Line 203:
 
<p>Start the suit, and the plaintiff will be notified</p>
 
<p>Start the suit, and the plaintiff will be notified</p>
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Stage|value=Needs jurors}}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Stage|value=Needs jurors}}
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Juror amount }}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Juror amount|value=5 }}<!--
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Suit date }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Settlement date }}
 
<div id="jurors">{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#ask:[[Online since::>{{#time: r | now - 1 hour}}]][[User group::icol-user]][[Class::Member]][[Role::Juror]][[!{{{User|}}}]][[!{{#show:{{{Workflow}}}|?Filed by|link=none}}]]|Limit=5|format=array|order=random
 
|default={{#ask:[[User group::icol-user]][[Class::Member]][[Role::Juror]][[!{{{User|}}}]][[!{{#show:{{{Workflow}}}|?Filed by|link=none}}]]|Limit=5|format=array|order=random}} }} }}</div><!--
 
  
-->{{Item responsive |Cols={{#var:@cols|4-8}}
+
-->{{#ifeq:{{PAGENAME:{{#show:{{{Workflow}}}|?Filed by|link=none}} }}|{{#var:@currentuser}}|<wsfield type="button" disabled="disabled" class="btn btn-green mb-4" >Cannot create docket. You're the plaintiff.</wsfield>|
|1=<b class="d-none">Number of Jurors needed for the case</b>
+
<wsfield type="submit" value="Create docket" id="submit-docket" class="btn btn-green mb-4  "/>}}<!--
|2={{#tag:wsfield||type=number|name=Juror amount|min=1|max=5|class=form-number form-control d-none|value=5}}
 
}}<small class="text-muted d-none">Set the number of Jurors you are requesting</small>
 
<div class="clear-both"></div><!--  
 
 
--><!--
 
--><!--
 
-->{{#ifeq:{{PAGENAME:{{#show:{{{Workflow}}}|?Filed by|link=none}} }}|{{#var:@currentuser}}|<wsfield type="button" disabled="disabled" class="btn btn-green mb-4" >Cannot create docket. You're the plaintiff.</wsfield>|
 
<wsfield type="button" onclick="setJurors()" class="btn btn-green mb-4" >Create docket</wsfield>
 
<wsfield type="submit" value="Create docket" id="submit-docket" class="btn btn-green mb-4 d-none"/>}}<!--
 
-->{{#tag:html|<script>
 
  var oldjurrors = document.getElementById('jurors').querySelector('input').value;
 
 
function setJurors(){
 
  var amount = document.querySelector('[name="Juror amount"]').value;
 
  var jur = oldjurrors.split('-^^--^^-')[1];
 
  var jurarray = jur.split(',');
 
  var newjurrors = jurarray.slice(0 , amount);
 
  document.getElementById('jurors').querySelector('input').value = oldjurrors.split('-^^--^^-')[0]+'-^^--^^-'+newjurrors;
 
  document.getElementById('submit-docket').click();
 
}
 
 
</script>}}<!--
 
  
 
--></wsform>|<!--
 
--></wsform>|<!--
Line 206: Line 214:
 
--><wsform action="addToWiki" >     
 
--><wsform action="addToWiki" >     
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Stage|value=Needs jurors}}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Stage|value=Needs jurors}}
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Juror amount }}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Juror amount|value=5 }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Change|value=yes }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Change|value=yes }}
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Change seen by|value=none }}
+
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Change seen by|value=none }}<!--
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Settlement date }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Meeting date }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Suit date }}<!--  
 
 
  --><div id="jurrors" class="d-none">{{#vardefine:@wf|{{#ask:[[{{{Workflow}}}]]|?Random juror|?Declined juror|?Jurors|?Filed by|link=none|format=array}} }}{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|1}}|<MANY>|@@@|@@@|,}}</div>
 
  --><div id="jurrors" class="d-none">{{#vardefine:@wf|{{#ask:[[{{{Workflow}}}]]|?Random juror|?Declined juror|?Jurors|?Filed by|link=none|format=array}} }}{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|1}}|<MANY>|@@@|@@@|,}}</div>
 
<div id="jurors">{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#ask:[[Online since::>{{#time: r | now - 1 hour}}]][[User group::icol-user]][[Class::Member]][[Role::Juror]][[!{{{User|}}}]][[!{{#explode:{{#var:@wf}}|<PROP>|4}}]]{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|2}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|3}}|<MANY>|@@@|[[!@@@]]|}}|Limit=5|format=array|order=random
 
<div id="jurors">{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#ask:[[Online since::>{{#time: r | now - 1 hour}}]][[User group::icol-user]][[Class::Member]][[Role::Juror]][[!{{{User|}}}]][[!{{#explode:{{#var:@wf}}|<PROP>|4}}]]{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|2}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:{{#var:@wf}}|<PROP>|3}}|<MANY>|@@@|[[!@@@]]|}}|Limit=5|format=array|order=random
Line 221: Line 226:
 
}}<small class="text-muted d-none">Set the number of Jurors you are requesting</small>
 
}}<small class="text-muted d-none">Set the number of Jurors you are requesting</small>
 
<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" >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 d-none "/>
+
<wsfield type="submit" value="Change suit" id="change-suit" class="btn btn-green mb-4 "/>
 
{{#tag:html|<script>
 
{{#tag:html|<script>
 
       var oldjurrors = document.getElementById('jurors').querySelector('input').value;
 
       var oldjurrors = document.getElementById('jurors').querySelector('input').value;
Line 262: Line 267:
  
  
--><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>{{#widget:link|type=a|href={{fullurl:{{#var:@verdict}}|Participant={{#var:@fullpagename}} }}|text=Edit verdict|class=btn btn-green }}|<!--
+
--><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><!--
 +
-->{{#ifeq:{{#show:{{{Workflow|}}}|?Stage}}|Settled| |{{#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 14:45, 12 January 2022


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

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