Difference between revisions of "Template:Participant"

From cm2.liecourt.com
(Fill database)
Line 27: Line 27:
  
  
-->{{#ifeq:{{{Role|}}}|Plaintiff|<div class="mt-4 mb-4 tab-content"><!--
+
--> }}<br><br><br><!--
  --><div class="active tab-pane" id="info-tab"><!--
 
    --><div class="flex-reverse mb-4">{{#widget:link|datatoggle=pill|href=#info-tab-form|text=Join a class|type=a|class=btn btn-green }}</div><!--
 
    --></div><!--
 
    --><div class="tab-pane" id="info-tab-form"><wsform action="addToWiki"><h2>Join a class</h2><!--
 
-->{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Class request}}<!--
 
    -->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=Search class
 
|2=<wstoken id="tokener" name="Class request" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[Class::Workflow]][[Type::Class]]&limit=99999&returntext=Lie" placeholder="Type 3 characters" class="form-control">
 
</wstoken>
 
}}{{#widget:link|datatoggle=pill|href=#info-tab-form-2|text=+ Create a new class|type=a|class=btn btn-green float-right}}
 
{{#widget:link|datatoggle=pill|href=#info-tab|text=Cancel|type=a|class=btn btn-red}}<wsfield type="submit" class="ml-4 btn btn-green" value="Request to join" />
 
</wsform>
 
</div>
 
<div class="tab-pane" id="info-tab-form-2">
 
<wsform action="addToWiki"><!--
 
-->{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Class request|value=new}}<!--
 
                        -->{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Class title}}<!--
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Class title:</b>
 
|2=<wsfield type="text" name="Class title"  value="{{#show:{{{Workflow|}}}|?Lie}}" class="form-control"/>
 
}}
 
<!--
 
 
 
    -->{{#widget:link|datatoggle=pill|href=#info-tab|text=Cancel|type=a|class=btn btn-red}}<wsfield type="submit" class="ml-4 btn btn-green" value="Create a new class" /><!--
 
    --></wsform><br><br><br><!--
 
  --></div><!--
 
--></div>}} }}<br><br><br><!--
 
  
 
-->{{#vardefine:@classQ|{{#show:{{{Workflow|}}}|?Class request|link=none}} }}{{#if:{{#var:@classQ}}|
 
-->{{#vardefine:@classQ|{{#show:{{{Workflow|}}}|?Class request|link=none}} }}{{#if:{{#var:@classQ}}|
Line 80: Line 53:
  
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Lie description :</b>
+
|1=<b>The Lie and Context :</b>
 
|2={{#show:{{{Workflow}}}|?Description }}
 
|2={{#show:{{{Workflow}}}|?Description }}
 
}}<!--
 
}}<!--
  
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Marked lies and truths :</b>
+
|1=<b>The Plaintiff Accusation with Evidence :</b>
 +
|2={{#show:{{{Workflow}}}|?Accusation|link=none }}
 +
}}<!--
 +
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Marked <span class="red">lies</span> and <span class="dark-blue">truths</span> :</b>
 
|2=<div class="lie-input">{{#show:{{{Workflow}}}|?Markup|Link=none }}</div>
 
|2=<div class="lie-input">{{#show:{{{Workflow}}}|?Markup|Link=none }}</div>
 
}}<!--
 
}}<!--
Line 138: Line 115:
 
}}<!--  
 
}}<!--  
 
  -->{{#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" mwfollow/>
+
<wscreate mwwrite="Order/" mwtemplate="Order" mwoption="range:00001-99999" mwfields="User, Version"/>
 +
<wsfield type="hidden" name="User" value="{{#show:{{{Workflow}}}|?Filed by|link=none}}" />
 +
<wsfield type="hidden" name="Version" value="Free" />
 +
<wscreate mwwrite="Suit/" mwtemplate="Suit" mwoption="range:00001-99999" mwfollow mwfields="Title, Case ID, Workflow"/>
 
<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 149: Line 129:
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Suit date }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Suit date }}
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Settlement 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:[[Class::Member]][[Role::Juror]][[!{{{User|}}}]][[!{{#show:{{{Workflow}}}|?Filed by|link=none}}]]|Limit=4|format=array|order=random}} }}</div><!--
+
<div id="jurors">{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#ask:[[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}}
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Number of Jurors needed for the case</b>
 
|1=<b>Number of Jurors needed for the case</b>
|2={{#tag:wsfield||type=number|name=Juror amount|min=1|max=4|class=form-number form-control|value=1}}
+
|2={{#tag:wsfield||type=number|name=Juror amount|min=1|max=5|class=form-number form-control|value=5}}
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
Line 191: Line 171:
 
{{#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>
<div id="jurors">{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#ask:[[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=4|format=array|order=random}} }}</div>
+
<div id="jurors">{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Random juror|value={{#ask:[[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>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=4 }}
+
|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 }}
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
Line 259: Line 239:
 
--><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}} }}{{#arraysort:@chat|reverse}}<!--  
+
  -->{{#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|$}}<!--  
  -->{{#ifexpr:{{#arraysize:@chat}} > 9 |<span class="btn btn-green pt-1 pb-1 pr-4 pl-4">{{fa|history}} Load older</span><hr>}}<!--  
+
  -->{{#ifexpr:{{#arraysize:@chat|$}} > 9 |<span class="btn btn-green pt-1 pb-1 pr-4 pl-4">{{fa|history}} Load older</span><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>
 
|}}
 
|}}

Revision as of 12:39, 25 May 2020


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

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