Difference between revisions of "Template:Workflow"

From cm2.liecourt.com
(Fill database)
(Fill database)
Line 67: Line 67:
  
 
{{#switch:{{{Stage|}}}
 
{{#switch:{{{Stage|}}}
|Waiting for Plaintiff verdict=<div class="d-flex flow-index"><div>Case is prosecuted</div><div class="active">Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
+
|Waiting for Plaintiff verdict=<div class="d-flex flow-index"><div>Case is proposed</div><div class="active">Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
|Needs judge=<div class="d-flex flow-index"><div>Case is prosecuted</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div class="active">Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
+
|Needs judge=<div class="d-flex flow-index"><div>Case is proposed</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div class="active">Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
|Judge accepted=<div class="d-flex flow-index"><div>Case is prosecuted</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div class="active">Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
+
|Judge accepted=<div class="d-flex flow-index"><div>Case is proposed</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div class="active">Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
|Needs jurors=<div class="d-flex flow-index"><div>Case is prosecuted</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div class="active">Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
+
|Needs jurors=<div class="d-flex flow-index"><div>Case is proposed</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div class="active">Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
|In progress=<div class="d-flex flow-index"><div>Case is prosecuted</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div class="active">Suit in progress</div><div>Settled</div></div>  
+
|In progress=<div class="d-flex flow-index"><div>Case is proposed</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div class="active">Suit in progress</div><div>Settled</div></div>  
|Settled=<div class="d-flex flow-index"><div>Case is prosecuted</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div class="active">Settled</div></div>
+
|Settled=<div class="d-flex flow-index"><div>Case is proposed</div><div>Waiting for Plaintiff verdict</div><div>Case is waiting for approval</div><div>Case needs a judge</div><div>Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div class="active">Settled</div></div>
 
}}
 
}}
 
{{#if:{{{Type|}}}|
 
{{#if:{{{Type|}}}|
Line 117: Line 117:
 
|2={{#ifeq:{{{Random judge|}}}|done||{{{Random judge|}}}<!--
 
|2={{#ifeq:{{{Random judge|}}}|done||{{{Random judge|}}}<!--
 
-->{{#vardefine:@user|{{PAGENAME:{{{Random judge|}}} }} }}<!--
 
-->{{#vardefine:@user|{{PAGENAME:{{{Random judge|}}} }} }}<!--
-->{{#if:{{#show:User:{{#var:@user}}|?Email}}|{{#tag:wsform|
+
-->{{#if:{{#show:User:{{#var:@user}}|?User right}}|{{#tag:wsform|
 
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
 
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
 
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
 
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
Line 133: Line 133:
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Stage|value={{#ifeq:{{{Stage|}}}|In progress|In progress|Needs jurors}} }}-->
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Stage|value={{#ifeq:{{{Stage|}}}|In progress|In progress|Needs jurors}} }}-->
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Judge }}-->
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Judge }}-->
<wstoken id="tokener3" name="Random judge" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[Class::Member]][[Role::Judge]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" >
+
<wstoken id="tokener3" name="Random judge" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[User group::icol-user]][[Class::Member]][[Role::Judge]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" >
 
</wstoken>
 
</wstoken>
 
<wsemail parselast="true" template="Template:Role invite" ></wsemail>
 
<wsemail parselast="true" template="Template:Role invite" ></wsemail>
Line 144: Line 144:
 
<!-- {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Judge }} -->
 
<!-- {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Judge }} -->
  
<wstoken id="tokener3" name="Random judge" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[Class::Member]][[Role::Judge]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" >
+
<wstoken id="tokener3" name="Random judge" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[User group::icol-user]][[Class::Member]][[Role::Judge]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" >
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform>}}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform>}}
 
}}
 
}}
Line 158: Line 158:
 
|2=<div class="mt-4 mb-4 tab-content"><!--
 
|2=<div class="mt-4 mb-4 tab-content"><!--
 
   --><div class="active tab-pane" id="juror-info-tab">{{#arraymap:{{{Random juror|}}}|,|@@@|{{#ifeq:@@@|done||@@@}}{{#vardefine:@user|{{PAGENAME:@@@ }} }}<!--
 
   --><div class="active tab-pane" id="juror-info-tab">{{#arraymap:{{{Random juror|}}}|,|@@@|{{#ifeq:@@@|done||@@@}}{{#vardefine:@user|{{PAGENAME:@@@ }} }}<!--
-->{{#if:{{#show:User:{{#var:@user}}|?Email}}|{{#tag:wsform|
+
-->{{#if:{{#show:User:{{#var:@user}}|?User right}}|{{#tag:wsform|
 
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
 
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
 
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
 
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
Line 169: Line 169:
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Jurors }}-->
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Jurors }}-->
 
{{#arraydefine:@members |{{{Random juror|}}} }}
 
{{#arraydefine:@members |{{{Random juror|}}} }}
<wstoken id="tokener" name="Random juror[]" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[Class::Member]][[Role::Juror]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" multiple="multiple">
+
<wstoken id="tokener" name="Random juror[]" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[User group::icol-user]][[Class::Member]][[Role::Juror]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" multiple="multiple">
 
{{#if:{{#var:@members}} |{{#arraymap:{{#arrayprint:@members|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}} }}
 
{{#if:{{#var:@members}} |{{#arraymap:{{#arrayprint:@members|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}} }}
 
</wstoken>
 
</wstoken>
Line 180: Line 180:
 
   --><div class="active tab-pane" id="juror-info-tab">{{#arraymap:{{{Random juror|}}}|,|@@@|{{#ifeq:@@@|done||@@@}}<!--
 
   --><div class="active tab-pane" id="juror-info-tab">{{#arraymap:{{{Random juror|}}}|,|@@@|{{#ifeq:@@@|done||@@@}}<!--
 
-->{{#vardefine:@user|{{PAGENAME:@@@ }} }}<!--
 
-->{{#vardefine:@user|{{PAGENAME:@@@ }} }}<!--
-->{{#if:{{#show:User:{{#var:@user}}|?Email}}|{{#tag:wsform|
+
-->{{#if:{{#show:User:{{#var:@user}}|?User right}}|{{#tag:wsform|
 
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
 
{{#tag:wsemail||parselast=true|template=Template:Role invite}}
 
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
 
{{#tag:wsfield||type=hidden|name=User|value={{#var:@user}} }}
Line 193: Line 193:
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Jurors }}-->
 
  <!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Jurors }}-->
 
{{#arraydefine:@members |{{{Random juror|}}} }}
 
{{#arraydefine:@members |{{{Random juror|}}} }}
<wstoken id="tokener2" name="Random juror[]" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[Class::Member]][[Role::Juror]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" multiple="multiple">
+
<wstoken id="tokener2" name="Random juror[]" json="/extensions/WSForm/WSForm.api.php?action=handleExternalRequest&script=semantic_ask&query=[[User group::icol-user]][[Class::Member]][[Role::Juror]]&limit=99999&returntext=Pagename" placeholder="Type a minimal of 3 characters" class="form-control" multiple="multiple">
 
{{#if:{{#var:@members}} |{{#arraymap:{{#arrayprint:@members|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}} }}
 
{{#if:{{#var:@members}} |{{#arraymap:{{#arrayprint:@members|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}} }}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform></div></div>}}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform></div></div>}}

Revision as of 09:42, 14 August 2020


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

{{Workflow
|Case ID=
|Type=
|Stage=
|Filed by=
|Lie=
|Topic=
|Description=
|Lies=
|Facts=
|Locations=
|Judge=
|Juror amount=
|Jurors=
|Suit date=
|Plaintiff verdict=
|Reason for judge decline=
|Random judge=
|Random juror=
|Declined judge=
|Declined juror= 
}}