Difference between revisions of "Template:Workflow"

From cm2.liecourt.com
(Fill database)
(Fill database)
(18 intermediate revisions by 2 users not shown)
Line 35: Line 35:
 
-->{{#if:{{{Filed by|}}}|{{#set:Class=Workflow
 
-->{{#if:{{{Filed by|}}}|{{#set:Class=Workflow
 
|Case ID={{{Case ID|}}}
 
|Case ID={{{Case ID|}}}
 +
|uuid={{{uuid|}}}
 
|Type={{{Type|}}}
 
|Type={{{Type|}}}
 
|Stage={{{Stage|}}}
 
|Stage={{{Stage|}}}
Line 40: Line 41:
 
|Lie={{{Lie|}}}
 
|Lie={{{Lie|}}}
 
|Topic={{{Topic|}}}
 
|Topic={{{Topic|}}}
 +
|Accusation={{{Accusation|}}}
 
|Description={{{Description|}}}
 
|Description={{{Description|}}}
 
|Markup={{{Markup|}}}
 
|Markup={{{Markup|}}}
Line 47: Line 49:
 
|Jurors={{{Jurors|}}}|+sep=,
 
|Jurors={{{Jurors|}}}|+sep=,
 
|Suit date={{{Suit date|}}}
 
|Suit date={{{Suit date|}}}
 +
|Meeting date={{{Meeting date|}}}
 
|Settlement date={{{Settlement date|}}}
 
|Settlement date={{{Settlement date|}}}
 
|Plaintiff verdict={{{Plaintiff verdict|No}}}
 
|Plaintiff verdict={{{Plaintiff verdict|No}}}
Line 64: 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 97: Line 100:
 
|2={{{Stage|}}}
 
|2={{{Stage|}}}
 
}}
 
}}
{{#if:{{{Juror amount|}}}|
+
 
 +
{{#if:{{{Judge|}}}|
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Number of Jurors needed</b>
+
|1=<b>Judge</b>
|2={{{Juror amount|}}}
+
|2={{{Judge|}}}
 
}}
 
}}
 +
|
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<b>Invited judge</b>
 +
|2=<wsform action="addToWiki">
 +
  {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
 +
  {{#arraydefine:@members |{{{Random judge|}}} }}
 +
  <wstoken id="tokener52" 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" >
 +
  {{#arraymap:{{#arrayprint:@members}}|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}}
 +
</wstoken><wsfield type="submit" class="btn btn-green" value="Save" /></wsform>}}
 
}}
 
}}
{{#if:{{{Juror amount|}}}|
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Number of Jurors accepted invite</b>
+
|1=<b>Number of Jurors needed</b>
|2={{#arraysize:@jurrors}}
+
|2=<wsform action="addToWiki">{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Juror amount}}<wsfield type="number" name="Juror amount" value="{{{Juror amount|}}}" /><wsfield type="submit" value="Save" /></wsform>
}}
 
 
}}
 
}}
  
{{#if:{{{Judge|}}}|
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Judge</b>
+
|1=<b>Number of Jurors accepted invite</b>
|2=<div class="mt-4 mb-4 tab-content"><!--
+
|2={{#arraydefine:@jurrors|{{{Jurors|}}} }}{{#arraysize:@jurrors}}
  --><div class="active tab-pane" id="info-tab">{{{Judge|}}} {{#widget:link|datatoggle=pill|href=#form-tab|text=Change|type=a|class=btn btn-green ml-4 }}</div><!--
 
--><div class="tab-pane" id="form-tab"> <wsform action="addToWiki">
 
{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random judge}}
 
<!--{{#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 }}-->
 
<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><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform></div></div>
 
}}|{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Judge</b>
 
|2=<wsform action="addToWiki">
 
{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random judge}}
 
<!-- {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Stage|value={{#ifeq:{{{Stage|}}}|In progress|In progress|Judge accepted}} }} -->
 
<!-- {{#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><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform>}}
 
 
}}
 
}}
  
{{#if:{{{Jurors|}}}|
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Accepted Jurors</b>
 
|1=<b>Accepted Jurors</b>
Line 139: Line 133:
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Invited Jurors</b>
 
|1=<b>Invited Jurors</b>
|2=<div class="mt-4 mb-4 tab-content"><!--
+
|2=<wsform action="addToWiki">
  --><div class="active tab-pane" id="juror-info-tab">{{#arraymap:{{{Random juror|}}}|,|@@@|{{#ifeq:@@@|done||@@@}}|,}} {{#widget:link|datatoggle=pill|href=#juror-form-tab|text=Change|type=a|class=btn btn-green ml-4 }}</div><!--
+
  {{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
--><div class="tab-pane" id="juror-form-tab"> <wsform action="addToWiki">
+
  {{#arraydefine:@members |{{{Random juror|}}} }}
{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror}}
+
  <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">
<!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Stage|value=In progress }}-->
+
  {{#arraymap:{{#arrayprint:@members}}|,|@@@|{{#ifeq:@@@|done||{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}} }}|}}  
<!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Jurors }}-->
+
</wstoken><wsfield type="submit" class="btn btn-green" value="Save" /></wsform>}}
{{#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">
 
{{#if:{{#var:@members}} |{{#arraymap:{{#arrayprint:@members|,|@@@|{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}}|}} }}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform></div></div>
 
  
}}|{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Invited Jurors</b>
 
|2=<div class="mt-4 mb-4 tab-content"><!--
 
  --><div class="active tab-pane" id="juror-info-tab">{{#arraymap:{{{Random juror|}}}|,|@@@|{{#ifeq:@@@|done||@@@}}|,}} {{#widget:link|datatoggle=pill|href=#juror-form-tab|text=Change|type=a|class=btn btn-green ml-4 }}</div><!--
 
--><div class="tab-pane" id="juror-form-tab"><wsform action="addToWiki">
 
{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Random juror }}
 
<!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Stage|value=In progress }}-->
 
<!--{{#tag:wsedit||target={{PAGEID}}|template=Workflow|formfield=Jurors }}-->
 
{{#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">
 
{{#if:{{#var:@members}} |{{#arraymap:{{#arrayprint:@members|,|@@@|{{#tag:wsfield |{{#show:@@@ |?Pagename |default=@@@ }} |type=option |value=@@@ |selected=selected}}|}} }}
 
</wstoken><wsfield type="submit" class="btn btn-green" value="Invite" /></wsform></div></div>}}
 
}}
 
  
  

Revision as of 13:29, 7 December 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= 
}}