Difference between revisions of "Template:Participant"
From cm2.liecourt.com
(Fill database) |
|||
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 | |
− | + | </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> | |
− | + | }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div class="row "> | <div class="row "> | ||
<div class="col-12 col-lg-8 "> | <div class="col-12 col-lg-8 "> | ||
Line 131: | Line 68: | ||
}}<!-- | }}<!-- | ||
− | --> | + | -->{{Item responsive |Cols={{#var:@cols|4-8}} |
− | |1=<b> | + | |1=<b>Stage:</b> |
− | |2={{#show:{{{Workflow}}}|? | + | |2={{#show:{{{Workflow}}}|?Stage }} |
− | + | }}<!-- | |
-->{{Item responsive |Cols={{#var:@cols|4-8}} | -->{{Item responsive |Cols={{#var:@cols|4-8}} | ||
Line 232: | Line 169: | ||
<wsfield type="hidden" name="vbvbv" value="{{#var:@tokenstats}}" /> | <wsfield type="hidden" name="vbvbv" value="{{#var:@tokenstats}}" /> | ||
<h2>Suit settings</h2> | <h2>Suit settings</h2> | ||
− | <p> | + | <p>Choose a date for the suit, choose the number of jurors needed for the suit, and file the suit. Random jurors will be ask to participate, and the plaintiff will be notified about the suit date</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|value=5 }}<!-- | + | {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Juror amount }} |
+ | {{#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}} | ||
+ | |1=<b>Number of Jurors needed for the case</b> | ||
+ | |2={{#tag:wsfield||type=number|name=Juror amount|min=1|max=5|class=form-number form-control|value=5}} | ||
+ | }}<small class="text-muted">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>| | -->{{#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="submit" value="Create docket" id="submit-docket" class="btn btn-green mb-4 | + | <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>|<!-- | ||
--><h2>Change suit settings</h2><!-- | --><h2>Change suit settings</h2><!-- | ||
--><p>Participants in this case will be informed about your changes to the suit</p><!-- | --><p>Participants in this case will be informed about your changes to the suit</p><!-- | ||
− | --><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 }} |
{{#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 253: | Line 217: | ||
{{Item responsive |Cols={{#var:@cols|4-8}} | {{Item responsive |Cols={{#var:@cols|4-8}} | ||
− | |1=<b | + | |1=<b>Number of Jurors needed for the case</b> |
− | |2={{#tag:wsfield||type=number|name=Juror amount|class=form-number form-control | + | |2={{#tag:wsfield||type=number|name=Juror amount|class=form-number form-control|value={{#show:{{{Workflow}}}|?Juror amount }}|min={{#show:{{{Workflow}}}|?Juror amount }}|max=5 }} |
− | }}<small class="text-muted | + | }}<small class="text-muted">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 | + | --><wsfield type="button" onclick="changeJurors()" class="btn btn-green mb-4 mt-4 float-left" >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 289: | Line 253: | ||
</script>}} | </script>}} | ||
</wsform> | </wsform> | ||
− | <wsform action="addToWiki | + | <wsform action="addToWiki"> |
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Stage|value=Settled}} | {{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Stage|value=Settled}} | ||
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value=done}} | {{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value=done}} | ||
Line 298: | Line 262: | ||
− | --><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>{{#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 }}|<!-- |
− | |||
--><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:07, 23 February 2022
This is the Participant template. It should be called in the following format:
{{Participant |User= |Workflow= |Case ID= |Role= }}