Difference between revisions of "Template:Participant"

From cm2.liecourt.com
(Fill database)
 
(26 intermediate revisions by 3 users not shown)
Line 16: Line 16:
 
</pre>
 
</pre>
  
</noinclude><includeonly>
+
</noinclude><includeonly>{{#vardefine:@currentuser|{{#if:{{{Currentuser|}}}|{{{Currentuser|}}}|{{CURRENTLOGGEDUSER}} }} }}<!--
 
+
-->{{#vardefine:@servername|{{#if:{{{Servername|}}}|{{{Servername|}}}|{{SERVERNAME}} }} }}<!--
<div class="d-none">__NOTOC__ __NOTITLE__{{#if:{{{User|}}}|{{#set:Class=Participant|Role={{{Role|}}}|Workflow={{{Workflow|}}}|User={{{User|}}}|Case ID={{{Case ID|}}}|Name={{{Name|}}} }} }}</div><!--
+
-->{{#vardefine:@fullpagename|{{#if:{{{Fullpagename|}}}|{{{Fullpagename|}}}|{{FULLPAGENAME}} }} }}<!--
-->{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{{User|}}}|Yes|{{#ifsysop:Yes|No}}}}}}
+
--><div data-poll="Participant" data-workflow="{{{Workflow|}}}" data-parameters="Currentuser={{#var:@currentuser}}^Servername={{#var:@servername}}
 +
^Role={{{Role|}}}^Workflow={{{Workflow|}}}^User={{{User|}}}^Case ID={{{Case ID|}}}"></div><!--
 +
--><div class="d-none">__NOTOC__ __NOTITLE__{{#if:{{{User|}}}|{{#set:Class=Participant|Role={{{Role|}}}|Workflow={{{Workflow|}}}|User={{{User|}}}|Case ID={{{Case ID|}}}|Name={{{Name|}}} }} }}</div><!--
 +
-->{{#vardefine:@allowed|{{#ifeq:User:{{#var:@currentuser}}|{{{User|}}}|Yes|{{#ifsysop:Yes|No}}}}}}
 
{{#vardefine:@judge|{{#show:{{{Workflow|}}}|?Judge}} }}
 
{{#vardefine:@judge|{{#show:{{{Workflow|}}}|?Judge}} }}
 
{{#ifeq:{{#var:@allowed}}|Yes|<h1>{{#switch:{{{Role|}}}|Judge={{fa|gavel}}|Plaintiff={{fa|book}}|Juror={{fa|balance-scale}} }}&nbsp;{{#if:{{{Name|}}}|{{{Name|}}}|{{{Role|}}} }} - {{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]}}</h1><!--
 
{{#ifeq:{{#var:@allowed}}|Yes|<h1>{{#switch:{{{Role|}}}|Judge={{fa|gavel}}|Plaintiff={{fa|book}}|Juror={{fa|balance-scale}} }}&nbsp;{{#if:{{{Name|}}}|{{{Name|}}}|{{{Role|}}} }} - {{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]}}</h1><!--
Line 30: 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
+
-->{{#vardefine:@dontshowthis|<!--
</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>
+
 
}}
+
system messages:
 +
 
 +
stage-waiting-for-plaintiff
 +
stage-needs-judge-for-plaintiff
 +
stage-needs-judge-for-judge
 +
stage-judge-accepted-for-judge
 +
stage-judge-accepted-for-juror
 +
stage-needs-jurors-for-plaintiff
 +
stage-needs-jurors-for-judge
 +
stage-needs-jurors-for-juror
 +
stage-in-progress-for-juror
 +
stage-in-progress-for-judge
 +
stage-in-progress-for-plaintiff
 +
stage-settled-for-plaintiff
 +
 
 +
-->{{#if:{{#show:User:{{CURRENTLOGGEDUSER}}|?Nomessages}}| |<!--
 +
    --><div class="jumbotron mt-4"><!--
 +
    --><!--
 +
    -->{{#switch:{{#show:{{{Workflow|}}}|?Stage}}
 +
        |Waiting for Plaintiff verdict=<!--
 +
        -->{{#switch:{{{Role|}}}<!--
 +
        -->|Plaintiff={{int:stage-waiting-for-plaintiff}}
 +
            |Judge={{int:stage-waiting-for-judge}}
 +
            |juror={{int:stage-waiting-for-juror}}
 +
            }}
 +
        |Needs judge=<!--
 +
        -->{{#switch:{{{Role|}}}<!--
 +
        -->|Plaintiff={{int:stage-needs-judge-for-plaintiff}}
 +
            |Judge={{int:stage-needs-judge-for-judge}}
 +
            |Juror={{int:stage-needs-judge-for-juror}}
 +
            }}
 +
        |Judge accepted=<!--  
 +
        -->{{#switch:{{{Role|}}}<!--
 +
        -->|Judge={{int:stage-judge-accepted-for-judge}}
 +
            |Juror={{int:stage-judge-accepted-for-juror}}
 +
            |Plaintiff={{int:stage-judge-accepted-for-plaintiff}}
 +
            }}
 +
        |Needs jurors=<!--
 +
        -->{{#switch:{{{Role|}}}<!--
 +
        -->|Judge={{int:stage-needs-jurors-for-judge}}
 +
            |Juror={{int:stage-needs-jurors-for-juror}}
 +
            |Plaintiff={{int:stage-needs-jurors-for-plaintiff}}
 +
            }}
 +
        |In progress=<!--
 +
        -->{{#switch:{{{Role|}}}<!--
 +
        -->|Juror={{int:stage-in-progress-for-juror}}
 +
          |Plaintiff={{int:stage-in-progress-for-judge}}
 +
          |Judge={{int:stage-in-progress-for-plaintiff}}
 +
          }}
 +
        |Settled=<!--
 +
        -->{{#switch:{{{Role|}}}<!--
 +
        -->|Juror={{int:stage-settled-for-juror}}
 +
          |Plaintiff={{int:stage-settled-for-judge}}
 +
          |Judge={{int:stage-settled-for-plaintiff}}
 +
          }}<!--
 +
    -->}}<!--
 +
--><wsform action="addToWiki"><!--
 +
-->{{#tag:wsedit||target={{PAGEID:User:{{CURRENTLOGGEDUSER}} }}|template=User|formfield=Nomessages|value=True}}<!--
 +
--><wsfield type="submit" class="btn text-muted float-right" value="☐ Don't show messages again"/><!--
 +
--></wsform><!--
 +
    --></div><!--
 +
-->}}<!--
 +
 
 +
-->
 
<div class="row ">
 
<div class="row ">
 
<div class="col-12 col-lg-8 ">
 
<div class="col-12 col-lg-8 ">
<div class="box"><h2>Case information</h2><!--
+
<div class="box"><div class="d-flex justify-content-between"><h2>Case information</h2> {{#ifeq:{{{Role|}}}|Plaintiff|{{#widget:link|type=a|text=Edit|class=btn-green|onclick=this.classList.add('pending') |href={{fullurl:edit case|id={{#replace:{{{Workflow|}}}|Workflow/| }} }} }} }}</div><!--
 
-->{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#if:{{#var:@judge}}|<!--
 
-->{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#if:{{#var:@judge}}|<!--
  
Line 65: Line 131:
 
}}<!--
 
}}<!--
  
-->{{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}}
 
|1=<b>The Lie and Context :</b>
 
|2={{#show:{{{Workflow}}}|?Description }}
 
}}<!--
 
  
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
Line 89: Line 150:
 
{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}} |<br>}}
 
{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}} |<br>}}
 
}}<!--
 
}}<!--
 +
 +
-->{{#vardefine:@meeting|{{#show:{{{Workflow}}}|?Meeting|link=none }} }}<!--
 +
 +
-->{{#if:{{#var:@meeting}}|{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Meeting link</b>
 +
|2=[{{#var:@meeting}} Meeting]
 +
}} }}<!--
 +
 +
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Suit date</b>
 +
|2={{#show:{{{Workflow}}}|?Slot|link=none }}
 +
}} <!--
  
 
-->{{Item responsive |Cols=6-6
 
-->{{Item responsive |Cols=6-6
Line 115: Line 188:
 
|}}</div>
 
|}}</div>
 
<!--
 
<!--
 +
 +
--> {{#ifeq:{{{Role|}}}|Plaintiff|{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Needs judge|
 +
{{#vardefine:@randomjudge|{{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{{User|{{CURRENTLOGGEDUSER}} }}}]] [[Online since::>{{#time: r | now - 1 hour}}]]
 +
|Limit=1
 +
|format=array
 +
|order=random
 +
|default={{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{{User|{{CURRENTLOGGEDUSER}} }}}]]|Limit=1|format=array|order=random}} }} }}
 +
{{#tag:wsform|<h2>Invite a Judge</h2>
 +
  {{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Stage|value=Needs judge}}
 +
{{#tag:wsedit||target={{PAGEID:{{{Workflow|}}} }}|template=Workflow|formfield=Random judge|value={{#var:@randomjudge}} }}
 +
  {{#tag:wsfield||type=submit|class=btn btn-green|value=Invite Judge |onclick=this.classList.add('pending') }}
 +
  |action=addToWiki|mwreturn={{fullurl:{{FULLPAGENAME}} }} }}
 +
}} }}<!--
  
 
-->{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#ifeq:{{{Role|}}}|Judge|<div class="box"><h2>Case settings</h2>
 
-->{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#ifeq:{{{Role|}}}|Judge|<div class="box"><h2>Case settings</h2>
 
{{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">{{#explode:@@@|<PROP>|2}}<br><small>Accepted</small>{{#tag:wsform|{{#arraydefine:@random juror|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>}}{{#arraydefine:@user|{{#explode:@@@|<PROP>|3}} }}{{#arraydiff:new_key|@random juror|@user}}{{#arraydefine:@Jurorsarr|{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Jurors|format=array|link=none}}|<PROP>|1}}|<MANY>}}
+
-->{{#vardefine:zz|{{#ask:[[{{{Workflow|}}}]]|?Random juror|?Declined juror|?Judge|?Filed by|?Jurors|format=array|link=none}} }}<!--
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[User group::icol-user]][[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}} }}
+
-->{{#vardefine:@countjur|0}}<!--
{{#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}} }} }}
+
-->{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]][[Role::Juror]]|?Role|?Name|?User|format=array|link=none}}|,|@@@|<!--
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Jurors|value={{#arraydiff:jrs|@Jurorsarr|@user}}{{#arrayprint:jrs}} }}
+
    -->{{#vardefine:@hasVerdict|{{#ask:[[Class::Verdict]][[Workflow::{{{Workflow|}}}]][[User::{{#explode:@@@|<PROP>|3}}]]|?Truth|format=plainlist|mainlabel=-|headers=hide|link=none}} }}<!--
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
+
    -->{{#if:{{#explode:@@@|<PROP>|2}}|<!--
|action=addToWiki}}</div>|<div class="btn btn-green btn-square">{{#explode:@@@|<PROP>|1}}<br><small>Accepted</small></div>}}{{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}|}}<!--  
+
        --><div class="btn {{#if:{{#var:@hasVerdict}}|btn-yellow|btn-green}} btn-square"><!--
-->{{#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><!--
+
            -->{{#explode:@@@|<PROP>|2}}<!--
 
+
            --><br><small>{{#if:{{#var:@hasVerdict}}|Saved verdict|Accepted}}</small><!--
-->{{#vardefine:@user|{{PAGENAME:@@@}} }}<!--
+
              --></div><!--
-->{{#if:{{#show:User:{{#var:@user}}|?User right}}|
+
          -->|<div class="btn {{#if:{{#var:@hasVerdict}}|btn-yellow|btn-green}} btn-square"><!--
{{#tag:wsform|
+
                -->{{#explode:@@@|<PROP>|1}}<br><small>Accepted</small></div>}}{{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}|}}<!--  
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
+
                -->{{#arraymap:{{#explode:{{#ask:[[{{{Workflow|}}}]]|?Random juror|format=array|link=none}}|<PROP>|1}}|<MANY>|@@@|<!--
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
+
                      -->{{#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><!--
{{#tag:wsfield||type=submit|style=padding-right:24px;|value=Notify }}
+
--></div>}} |}}
|action=mail}}|{{#tag:wsfield||type=submit|style=padding-right:24px;|value=No e-mail|disabled=disabled}} }}<!--
 
 
 
-->{{#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:[[User group::icol-user]][[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>|###|###|,}}, @@@| @@@ }} }}
 
<!--{{#tag:wsfield||type=submit|value=x|class=remove-juror}}-->
 
|action=addToWiki}}</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>}}
 
{{#ifeq:{{#show:{{{Workflow}}}|?Stage|link=none}}|Judge accepted|
 
{{#ifeq:{{#show:{{{Workflow}}}|?Stage|link=none}}|Judge accepted|
 
<wsform action="addToWiki" >
 
<wsform action="addToWiki" >
<wscreate mwwrite="Suit/" mwtemplate="Suit" mwoption="range:00001-99999" />
+
<wscreate mwwrite="Case/{{{Case ID|}}}" mwtemplate="Suit" />
 
<wsfield type="hidden" name="Title" value="{{#show:{{{Workflow|}}}|?Lie|link=none}}" />
 
<wsfield type="hidden" name="Title" value="{{#show:{{{Workflow|}}}|?Lie|link=none}}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
Line 151: Line 230:
 
<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>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>
+
<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:[[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>Number of Jurors needed for the case</b>
+
<wsfield type="submit" value="Create docket" onclick="this.classList.add('pending');" id="submit-docket" class="btn btn-green mb-"/>}}<!--
|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>
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Date for settlement</b>
 
|2={{#tag:wsfield||type=date|name=Settlement date|class=form-control|value={{#time:Y-m-d|now + 2 weeks}}}}
 
}}<small class="text-muted">The settlement date should be a minimum of two days and a maximum of 14 days. This will be the date when you set your verdict based on the plaintiff and juror proposed verdicts</small>
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Date for online meeting</b>
 
|2={{#tag:wsfield||type=date|name=Meeting date|class=form-control|value={{#time:Y-m-d|now + 1 weeks}} }}
 
}}<small class="text-muted">Set the docket date where all Jurors and the Plaintiff can meet with you for chat based on your proposed verdict</small>
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Date for the suit</b>
 
|2={{#tag:wsfield||type=date|name=Suit date|class=form-control|value={{#time:Y-m-d|now}} }}
 
}}<small class="text-muted">Set the docket date where all Jurors should have their verdicts done. You will complete your verdict the next day for all jurors you have</small><!--
 
--><div class="clear-both"></div><!--  
 
 
--><!--
 
--><!--
 
-->{{#ifeq:{{PAGENAME:{{#show:{{{Workflow}}}|?Filed by|link=none}} }}|{{CURRENTLOGGEDUSER}}|<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>|<!--
 
--><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|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:[[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>
+
<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
 +
|default={{#ask:[[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>
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Number of Jurors needed for the case</b>
+
|1=<b class="d-none">Number of Jurors needed for the case</b>
|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 }}
+
|2={{#tag:wsfield||type=number|name=Juror amount|class=form-number form-control d-none|value={{#show:{{{Workflow}}}|?Juror amount }}|min={{#show:{{{Workflow}}}|?Juror amount }}|max=5 }}
}}<small class="text-muted">Set the number of Jurors you are requesting</small>
+
}}<small class="text-muted d-none">Set the number of Jurors you are requesting</small>
{{Item responsive |Cols={{#var:@cols|4-8}}
+
<div class="clear-both"></div><!--  
|1=<b>Date for settlement</b>
+
--><wsfield type="button" onclick="changeJurors()" class="btn btn-green mb-4 mt-4 float-left d-none " >Change suit</wsfield>
|2={{#tag:wsfield||type=date|name=Settlement date|class=form-control|value={{#show:{{{Workflow}}}|?Settlement date }}}}
+
<wsfield type="submit" value="Change suit" id="change-suit" class="btn btn-green mb-4 d-none"/>
}}<small class="text-muted">The settlement date should be a minimum of two days and a maximum of 14 days. This will be the date when you set your verdict based on the plaintiff and juror proposed verdicts</small>
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Date for online meeting</b>
 
|2={{#tag:wsfield||type=date|name=Meeting date|class=form-control|value={{#show:{{{Workflow}}}|?Meeting date}} }}
 
}}<small class="text-muted">Set the docket date where all Jurors and the Plaintiff can meet with you for chat based on your proposed verdict</small><!--
 
-->
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Date for the suit</b>
 
|2={{#tag:wsfield||type=date|name=Suit date|class=form-control|value={{#show:{{{Workflow}}}|?Suit date }}}}
 
}}<small class="text-muted">Set the docket date where all Jurors should have their verdicts done. You will complete your verdict the next day for all jurors you have</small><!--
 
--><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="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 258: Line 287:
 
</script>}}
 
</script>}}
 
</wsform>
 
</wsform>
<wsform action="addToWiki">   
+
<wsform action="addToWiki" mwreturn="{{fullurl:{{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]|link=none}} }}">   
 
{{#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}}
<wsfield type="submit" value="Mark case settled" class="btn btn-red mb-4 float-right mt-4"/><div class="clear-both"></div>
+
<wsfield type="submit" id="realSettleButton" value="Mark case settled" onclick="this.classList.add('pending');"  class="btn btn-red mb-4 float-right mt-4 d-none"/><div class="clear-both"></div>
 
</wsform>
 
</wsform>
 
}}</div>}} }}<!--
 
}}</div>}} }}<!--
Line 267: Line 296:
  
  
--><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={{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 |onclick=this.classList.add('pending') |class=btn btn-green }} {{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#ifeq:{{{Role|}}}|Judge|<wsfield type="button" onclick="$('#realSettleButton').click(); this.classList.add('pending')" class="btn btn-red">Mark case settled</wsfield> }}  }}<!--
 +
      -->}}<!--
 +
  -->|<!--
 
--><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/>
Line 275: Line 312:
 
<wsfield type="hidden" name="Role" value="{{{Role|}}}" />
 
<wsfield type="hidden" name="Role" value="{{{Role|}}}" />
 
<wsfield type="hidden" name="Name" value="{{{Name|}}}" />
 
<wsfield type="hidden" name="Name" value="{{{Name|}}}" />
<wsfield type="hidden" name="Participant" value="{{FULLPAGENAME}}" />
+
<wsfield type="hidden" name="Participant" value="{{#var:@fullpagename}}" />
<wsfield type="submit" value="Create verdict" class="btn btn-green"/>
+
<wsfield type="submit" value="Create verdict" onclick="this.classList.add('pending');" class="btn btn-green"/>
 
</wsform>}}</div></div><div class="col-12 col-lg-4"><!--
 
</wsform>}}</div></div><div class="col-12 col-lg-4"><!--
 
-->{{#vardefine:@meetingdate|{{#show:{{{Workflow}}}|?Meeting date}} }}{{#if:{{#var:@meetingdate}}|<div class="info-box"><h2>Online meeting</h2>A online meeting with all the participants on this case is planned on <h2>{{#time:d-M-Y|{{#var:@meetingdate}} }}</h2> [[file:zoom.png|150px|link=]]</div>}}
 
-->{{#vardefine:@meetingdate|{{#show:{{{Workflow}}}|?Meeting date}} }}{{#if:{{#var:@meetingdate}}|<div class="info-box"><h2>Online meeting</h2>A online meeting with all the participants on this case is planned on <h2>{{#time:d-M-Y|{{#var:@meetingdate}} }}</h2> [[file:zoom.png|150px|link=]]</div>}}
 
<!--
 
<!--
 
--><div class="info-box">
 
--><div class="info-box">
<h2>Chat</h2>Talk with other participants on this case<hr><!--  
+
{{#tag:html|<details>
 +
<summary><h2>Chat</h2>Talk with other participants on this case<hr></summary>}}<!--  
 
  -->{{#arraydefine:@chat|{{#ask:[[Class::Chat]][[Workflow::{{{Workflow|}}}]]|?Message|?Role|?User|?Modification date|?Name|format=array|limit={{#if:{{#urlget:chat}}|999|10}}|sort=Modification date|order=desc}} }}{{#arraysort:@chat|reverse}}<!--  
 
  -->{{#arraydefine:@chat|{{#ask:[[Class::Chat]][[Workflow::{{{Workflow|}}}]]|?Message|?Role|?User|?Modification date|?Name|format=array|limit={{#if:{{#urlget:chat}}|999|10}}|sort=Modification date|order=desc}} }}{{#arraysort:@chat|reverse}}<!--  
  -->{{#if:{{#urlget:chat}}||{{#ifexpr:{{#arraysize:@chat}} > 9 |{{#Widget:link|type=a|class=btn btn-green pt-1 pb-1 pr-4 pl-4|text={{fa|history}} Load older|href={{fullurl:{{FULLPAGENAME}}|chat=all}} }}<hr>}} }}<!--  
+
  -->{{#if:{{#urlget:chat}}||{{#ifexpr:{{#arraysize:@chat}} > 9 |{{#Widget:link|type=a|class=btn btn-green pt-1 pb-1 pr-4 pl-4|text={{fa|history}} Load older|href={{fullurl:{{#var:@fullpagename}}|chat=all}} }}<hr>}} }}<!--  
 
  -->{{#arraymap:{{#arrayprint:@chat}}|,|@@@|  
 
  -->{{#arraymap:{{#arrayprint:@chat}}|,|@@@|  
 
<div class="chat {{#ifeq:{{#explode:@@@|<PROP>|3}}|{{{User|}}}|me}} "><div class="d-flex"><h3 {{#ifeq:{{#explode:@@@|<PROP>|3}}|{{{User|}}}||class="chat-{{#if:{{#explode:@@@|<PROP>|5}}|{{#explode:{{#explode:@@@|<PROP>|5}}| |1}}|{{#explode:@@@|<PROP>|2}} }}"}}>{{#if:{{#explode:@@@|<PROP>|5}}|{{#explode:@@@|<PROP>|5}}|{{#explode:@@@|<PROP>|2}} }}</h3><h4 class="pl-2">{{#explode:@@@|<PROP>|4}}</h4></div>{{#explode:@@@|<PROP>|1}}</div>
 
<div class="chat {{#ifeq:{{#explode:@@@|<PROP>|3}}|{{{User|}}}|me}} "><div class="d-flex"><h3 {{#ifeq:{{#explode:@@@|<PROP>|3}}|{{{User|}}}||class="chat-{{#if:{{#explode:@@@|<PROP>|5}}|{{#explode:{{#explode:@@@|<PROP>|5}}| |1}}|{{#explode:@@@|<PROP>|2}} }}"}}>{{#if:{{#explode:@@@|<PROP>|5}}|{{#explode:@@@|<PROP>|5}}|{{#explode:@@@|<PROP>|2}} }}</h3><h4 class="pl-2">{{#explode:@@@|<PROP>|4}}</h4></div>{{#explode:@@@|<PROP>|1}}</div>
Line 291: Line 329:
 
<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@{{#var:@servername}}" from="noreply@{{#var:@servername}}" bcc="{{#var:@mails}}" subject="New chat message" template="Template:Chat mail" >
 
</wsemail>
 
</wsemail>
 
<wsfield type="hidden" name="link" value="{{#if:{{#var:@link}}|{{fullurl: {{#var:@link}} }} }}" />
 
<wsfield type="hidden" name="link" value="{{#if:{{#var:@link}}|{{fullurl: {{#var:@link}} }} }}" />
Line 303: Line 341:
 
</wsform>
 
</wsform>
  
</div><!--
+
</div>{{#tag:html|</details>}}<!--
  
 
--></div>|<div class="m-5 alert alert-danger">Not permitted</div>}}<!-- end allowed  
 
--></div>|<div class="m-5 alert alert-danger">Not permitted</div>}}<!-- end allowed  
 
--></includeonly>
 
--></includeonly>

Latest revision as of 07:49, 8 April 2022


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

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