Difference between revisions of "Template:Participant"

From cm2.liecourt.com
(Fill database)
(Fill database)
Line 108: Line 108:
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
{{#tag:wsfield||type=submit|value=x|class=remove-juror}}
 
|action=addToWiki}}</div>|<div class="btn btn-green btn-square">{{#explode:@@@|<PROP>|1}}<br><small>Accepted</small></div>}}{{#vardefine:@countjur|{{#expr:{{#var:@countjur}} + 1}} }}|}}<!--  
 
|action=addToWiki}}</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>{{#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}}
+
  -->{{#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>|###|###|,}}, {{#explode:@@@|<PROP>|3}}| {{#explode:@@@|<PROP>|3}} }} }}
Line 139: Line 139:
 
|2={{#tag:wsfield||type=date|name=Suit date|class=form-control|value={{#time:Y-m-d|now}} }}
 
|2={{#tag:wsfield||type=date|name=Suit date|class=form-control|value={{#time:Y-m-d|now}} }}
 
}}<!--  
 
}}<!--  
 
+
-->{{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}} }}
 +
}}<!--
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Date for settlement</b>
 
|1=<b>Date for settlement</b>
Line 169: Line 172:
 
{{#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=Settlement date }}
 +
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Meeting date }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Suit 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>
Line 180: Line 184:
 
|1=<b>Date for the suit</b>
 
|1=<b>Date for the suit</b>
 
|2={{#tag:wsfield||type=date|name=Suit date|class=form-control|value={{#show:{{{Workflow}}}|?Suit date }}}}
 
|2={{#tag:wsfield||type=date|name=Suit date|class=form-control|value={{#show:{{{Workflow}}}|?Suit date }}}}
 +
}}<!--
 +
-->{{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}} }}
 
}}<!--
 
}}<!--
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
Line 219: Line 227:
 
<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}}
 
<wsfield type="submit" value="Mark case settled" class="btn btn-red mb-4 float-right"/>
 
<wsfield type="submit" value="Mark case settled" class="btn btn-red mb-4 float-right"/>
 
</wsform>
 
</wsform>
Line 226: Line 235:
  
 
--><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 }}|<!--
 
--><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 }}|<!--
--><wsform action="addToWiki">  
+
--><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/>
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
Line 236: Line 245:
 
<wsfield type="submit" value="Create verdict" class="btn btn-green"/>
 
<wsfield type="submit" value="Create verdict" class="btn btn-green"/>
 
</wsform>}}</div><div class="col-12 col-lg-4"><!--
 
</wsform>}}</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>}}
 +
<!--
 
--><div class="info-box">
 
--><div class="info-box">
 
<h2>Chat</h2>Talk with other participants on this case<hr><!--  
 
<h2>Chat</h2>Talk with other participants on this case<hr><!--  
  -->{{#arraydefine:@chat|{{#ask:[[Class::Chat]][[Workflow::{{{Workflow|}}}]]|?Message|?Role|?User|?Modification date|?Name|format=array|limit=10|sort=Modification date|order=desc|sep=$}} }}{{#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}}<!--  
  -->{{#ifexpr:{{#arraysize:@chat|$}} > 9 |<span class="btn btn-green pt-1 pb-1 pr-4 pl-4">{{fa|history}} Load older</span><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:{{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>
 
|}}
 
|}}
 
+
{{#vardefine:@mails|{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]]|?User.Email|format=array }}|,|@@@|{{#explode:@@@|<PROP>|1}} |,}} }}
 
+
<wsform action="mail" id="case-form">
<wsform action="addToWiki" 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>
 +
<wsfield type="hidden" name="link" value="{{fullurl:{{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]|link=none }} }}" />
 
<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 10:23, 26 May 2020


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

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