Difference between revisions of "Template:Participant"

From cm2.liecourt.com
Line 5: Line 5:
 
}}
 
}}
  
This is the '''Participant''' template. It should be called in the following format:
+
This is the '''Verdict results''' template. It should be called in the following format:
  
 
<pre>
 
<pre>
{{Participant
+
{{Verdict results }}
|User=
 
|Workflow=
 
|Case ID=
 
|Role=
 
}}
 
 
</pre>
 
</pre>
  
</noinclude><includeonly>{{#vardefine:@currentuser|{{#if:{{{Currentuser|}}}|{{{Currentuser|}}}|{{CURRENTLOGGEDUSER}} }} }}<!--
+
</noinclude><includeonly>
-->{{#vardefine:@servername|{{#if:{{{Servername|}}}|{{{Servername|}}}|{{SERVERNAME}} }} }}<!--
+
{{#vardefine:verdictsarray|{{#ask:{{#if:{{{Verdict|}}}|[[{{{Verdict|}}}]]|[[Class::Verdict]][[Case ID::{{{id|}}}]]{{#if:{{{Context|}}}|[[Context::{{{Context|}}}]]|[[Context::None]] }} }}
-->{{#vardefine:@fullpagename|{{#if:{{{Fullpagename|}}}|{{{Fullpagename|}}}|{{FULLPAGENAME}} }} }}<!--
+
|?Case ID
--><div data-poll="Participant" data-workflow="{{{Workflow|}}}" data-parameters="Currentuser={{#var:@currentuser}}^Servername={{#var:@servername}}
+
|?Role
^Role={{{Role|}}}^Workflow={{{Workflow|}}}^User={{{User|}}}^Case ID={{{Case ID|}}}"></div><!--
+
|?User
--><div class="d-none">__NOTOC__ __NOTITLE__{{#if:{{{User|}}}|{{#set:Class=Participant|Role={{{Role|}}}|Workflow={{{Workflow|}}}|User={{{User|}}}|Case ID={{{Case ID|}}}|Name={{{Name|}}} }} }}</div><!--
+
|?Truth
-->{{#vardefine:@allowed|{{#ifeq:User:{{#var:@currentuser}}|{{{User|}}}|Yes|{{#ifsysop:Yes|No}}}}}}
+
|?Truth percentage
{{#vardefine:@judge|{{#show:{{{Workflow|}}}|?Judge}} }}
+
|?Truth text
{{#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><!--
+
|?Whole truth
--><h2>Case Progress:</h2>{{#switch:{{#show:{{{Workflow|}}}|?Stage}}
+
|?Whole truth percentage
|Waiting for Plaintiff verdict=<div class="d-flex flow-index"><div class="done">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>
+
|?Whole truth text
|Needs judge=<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="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>
+
|?Nothing But the truth
|Judge accepted=<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="active">Judge accepted</div><div>Case is filed</div><div>Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
+
|?Nothing But the truth percentage
|Needs jurors=<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="active">Case needs jurors</div><div>Suit in progress</div><div>Settled</div></div>
+
|?Nothing But the truth text
|In progress=<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="active">Suit in progress</div><div>Settled</div></div>
+
|?Deceit
|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>
+
|?Deceit percentage
}}
+
|?Deceit text
 
+
|?Deceit intended
<!--
+
|?Deceit intended percentage
-->{{#vardefine:@dontshowthis|<!--
+
|?Deceit intended text
--><!--
+
|?Motivation
-
+
|?Motivation percentage
--><!--
+
|?Motivation text
-->}}<!--
+
|?Social acceptability
 
+
|?Social acceptability percentage
system messages:
+
|?Social acceptability text
 
+
|?Label
stage-waiting-for-plaintiff
+
|?Label percentage
stage-needs-judge-for-plaintiff
+
|?Label text
stage-needs-judge-for-judge
+
|?-Verdict=File
stage-judge-accepted-for-judge
+
|?-Verdict.Modification date
stage-judge-accepted-for-juror
+
|?Name
stage-needs-jurors-for-plaintiff
+
|link=none
stage-needs-jurors-for-judge
+
|Sort=Role
stage-needs-jurors-for-juror
+
|Order=desc
stage-in-progress-for-juror
+
|Format=array
stage-in-progress-for-judge
+
|Sep=$$$
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="col-12 col-lg-8 ">
 
<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|href={{fullurl:edit case|id={{#replace:{{{Workflow|}}}|Workflow/| }} }} }} }}</div><!--
 
-->{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#if:{{#var:@judge}}|<!--
 
 
 
 
 
--> }}<!--
 
 
 
-->{{#vardefine:@classQ|{{#show:{{{Workflow|}}}|?Class request|link=none}} }}{{#if:{{#var:@classQ}}|
 
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b>Class request:</b>
+
|1=<h3>Is it the Truth?</h3>
|2={{#ifeq:{{#var:@classQ}}|Declined|Declined|{{#ifeq:{{#var:@classQ}}|Approved|
+
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|
                                          Approved: Class page:  {{#ask:[[Class::Workflow]][[Class case IDs::{{{Workflow|}}}]]|format=array|link=none}}                                       |Pending}} }}
+
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex"> </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|4}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|4}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|5}}%,#f2f2f2 {{#explode:@@@|<PROP>|5}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|5}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|5}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|6}} </div><!--  
}}
 
}} }}<!--
 
  
-->{{Item responsive |Cols={{#var:@cols|4-8}}
+
-->{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Verdict file]][[Verdict::{{#explode:@@@|<PROP>|0}}]]|?=|?Modification date|Format=array|link=none}}|,|###|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=vi attachment mt-2 |text={{fa|image}} }}<!--
|1=<b>Role:</b>
 
|2={{{Role|}}}
 
}}<!--
 
 
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Suit:</b>
 
|2={{#vardefine:@title|{{#ask:[[Class::Suit]][[Case ID::{{{Case ID|}}}]]}} }}{{#if:{{#var:@title}}|{{#var:@title}}|{{#show:{{{Workflow}}}|?Lie|link=none }} }}
 
}}<!--
 
 
 
-->{{#if:{{#show:{{{Workflow}}}|?Topic|link=none }}|{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Category:</b>
 
|2={{#show:{{{Workflow}}}|?Topic|link=none }}
 
}} }}<!--
 
 
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|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>
 
}}<!--
 
 
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Lie locations:</b>
 
|2={{#arraymap:{{#show:{{{Workflow|}}}|?Locations}}|,|@@@|
 
{{#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
 
|1=<b>Evidence of lie appearance:</b>{{#vardefine:@uuid|{{#show:{{{Workflow|}}}|?uuid|link=none}} }}
 
|2={{#vardefine:@counter|0}}{{#if:{{#var:@uuid}}|{{#arraymap:{{#ask:[[Class::Case file]][[Case file::{{#var:@uuid}}]]|?=|?Modification date|?Type|Format=array|link=none}}|,|@@@|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=attachment |text={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|{{fa|file-pdf}}|{{fa|image}} }} }}<!--
 
  
 
-->{{Modal
 
-->{{Modal
 
|Targetid=image-modal-{{#var:@counter}}
 
|Targetid=image-modal-{{#var:@counter}}
 
|Dialog class=image-modal
 
|Dialog class=image-modal
|ModalHeading={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|Pdf|Image}}
+
|ModalHeading=Image
|BodyText={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|{{#widget:pdf|pdf={{filepath:{{#explode:{{#explode:@@@|<PROP>|0}}|:|1}} }}  }}|[[{{#explode:@@@|<PROP>|0}}]]}}Uploaded on: {{#explode:@@@|<PROP>|1}}
+
|BodyText=[[{{#explode:###|<PROP>|0}}]] Uploaded on: {{#explode:###|<PROP>|1}}
 
|FooterText={{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=btn btn-submit  |text=close}}
 
|FooterText={{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=btn btn-submit  |text=close}}
 
|Hide link=Yes
 
|Hide link=Yes
}}<!--
 
-->{{#vardefine:@counter|{{#expr:{{#var:@counter}} + 1 }} }}|}} }} }}<!--
 
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<b>Verdicts:</b>
 
 
}}<!--
 
}}<!--
  
-->{{#arraymap:{{#ask:[[Class::Verdict]][[Case ID::{{{Case ID|}}}]][[User::!{{{User|}}}]][[Locked::True]]|?Role|link=none|format=array}}|,|@@@|  
+
-->{{#vardefine:@counter|{{#expr:{{#var:@counter}} + 1}} }} |}}</div><!--  
{{#tag:html|<details>
 
<summary>{{#explode:@@@|<PROP>|1}} verdict</summary>
 
}}
 
{{verdict results|Verdict={{#explode:@@@|<PROP>|0}} }}
 
{{#tag:html|</details>}}
 
|}}</div>
 
<!--
 
  
--> {{#ifeq:{{{Role|}}}|Plaintiff|{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Needs judge|
+
--></div></div></div>|}} }}
{{#vardefine:@randomjudge|{{#ask:[[User group::icol-user]][[Class::Member]][[Role::Judge]][[!{{{User|{{CURRENTLOGGEDUSER}} }}}]] [[Online since::>{{#time: r | now - 1 hour}}]]
+
{{Item responsive |Cols={{#var:@cols|4-8}}
|Limit=1
+
|1=<h3>Is it the Whole Truth?</h3>
|format=array
+
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|7}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|7}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|8}}%,#f2f2f2 {{#explode:@@@|<PROP>|8}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|8}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|8}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|9}} </div><!--  
|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}}
 
  |action=addToWiki|mwreturn={{fullurl:{{FULLPAGENAME}} }} }}
 
}} }}<!--
 
  
-->{{#ifeq:{{#show:{{{Workflow}}}|?Stage }}|Settled|| {{#ifeq:{{{Role|}}}|Judge|<div class="box"><h2>Case settings</h2>
+
--></div><!--  
{{Item responsive |Cols={{#var:@cols|2-10}}
 
|1=<b>Jurors:</b>
 
|2=<!--
 
-->{{#vardefine:zz|{{#ask:[[{{{Workflow|}}}]]|?Random juror|?Declined juror|?Judge|?Filed by|?Jurors|format=array|link=none}} }}<!--
 
-->{{#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><!--
 
              --></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><br><!--
 
--></div>}} |}}
 
}}<!--
 
-->{{#vardefine:@tokenstats|<nowiki>{{subst:#ttaward:</nowiki>{{PAGENAME:{{#show:{{{Workflow}}}|?Filed by|link=none}} }}<nowiki>}}</nowiki>}}
 
{{#ifeq:{{#show:{{{Workflow}}}|?Stage|link=none}}|Judge accepted|
 
<wsform action="addToWiki" >
 
<wscreate mwwrite="Case/{{{Case ID|}}}" mwtemplate="Suit"  />
 
<wsfield type="hidden" name="Title" value="{{#show:{{{Workflow|}}}|?Lie|link=none}}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Workflow" value="{{{Workflow|}}}" />
 
<wsfield type="hidden" name="vbvbv" value="{{#var:@tokenstats}}" />
 
<h2>Suit settings</h2>
 
<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=Juror amount|value=5 }}<!--
 
  
-->{{#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>|
+
--></div></div></div>|}} }}
<wsfield type="submit" value="Create docket" id="submit-docket" class="btn btn-green mb-"/>}}<!--
+
{{Item responsive |Cols={{#var:@cols|4-8}}
--><!--
+
|1=<h3>Is it nothing but the Factual and Whole Truth (Adding other Truths and Lies to the Context)?</h3>
 +
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|10}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|10}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|11}}%,#f2f2f2 {{#explode:@@@|<PROP>|11}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|11}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|11}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|12}} </div><!--  
  
--></wsform>|<!--
+
--></div><!--  
--><h2>Change suit settings</h2><!--
 
--><p>Participants in this case will be informed about your changes to the suit</p><!--
 
--><wsform action="addToWiki" >   
 
{{#tag:wsedit||target={{PAGEID:{{{Workflow}}} }}|template=Workflow|formfield=Stage|value=Needs jurors}}
 
{{#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 seen by|value=none }}<!--
 
--><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:[[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>
 
  
 +
--></div></div></div>|}} }}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<b class="d-none">Number of Jurors needed for the case</b>
+
|1=<h3>What is the Deceit?</h3>
|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 }}
+
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|
}}<small class="text-muted d-none">Set the number of Jurors you are requesting</small>
+
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div>{{#vardefine:@decietscount|0}}{{#arraymap:{{#explode:@@@|<PROP>|15}}|,|###|<div class="w-100 verdict-wrapper"><div class="d-flex">   </div><div class="d-flex"><div class="vi bg-white">{{#explode:{{#explode:@@@|<PROP>|13}}|,|{{#var:@decietscount}}}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%,#f2f2f2 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:{{#explode:@@@|<PROP>|14}}|,|{{#var:@decietscount}}}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:{{#explode:@@@|<PROP>|15}}|,|{{#var:@decietscount}}}} </div><!--
<div class="clear-both"></div><!--
 
--><wsfield type="button" onclick="changeJurors()" class="btn btn-green mb-4 mt-4 float-left d-none " >Change suit</wsfield>
 
<wsfield type="submit" value="Change suit" id="change-suit" class="btn btn-green mb-4 d-none"/>
 
{{#tag:html|<script>
 
      var oldjurrors = document.getElementById('jurors').querySelector('input').value;
 
  
 +
--></div><!--
  
function changeJurors(){
+
--></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}|}}</div></div>
var amount = document.querySelector('[name="Juror amount"]').value;
 
  var oldamount = document.querySelector('[name="Juror amount"]').getAttribute('min');
 
  
  
if(amount > oldamount){
+
|}} }}
  var pastjurrors = document.getElementById('jurrors').innerHTML;
+
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>Is the Deceit Intended?</h3>
 +
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|16}}|yes|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|16}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|17}}%,#f2f2f2 {{#explode:@@@|<PROP>|17}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|17}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|17}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|18}} </div><!--
  
  var jur = oldjurrors.split('-^^--^^-')[1];
+
--></div><!--  
  var jurarray = jur.split(',');
 
  var oldjurarray = pastjurrors.split(',');
 
  var newjurrors = jurarray.slice(0 , amount - oldamount);
 
  document.getElementById('jurors').querySelector('input').value = oldjurrors.split('-^^--^^-')[0]+'-^^--^^-'+oldjurarray.join()+','+newjurrors;
 
  document.getElementById('change-suit').click();
 
}else{
 
    var pastjurrors = document.getElementById('jurrors').innerHTML;
 
    var oldjurarray = pastjurrors.split(',');
 
    document.getElementById('jurors').querySelector('input').value = oldjurrors.split('-^^--^^-')[0]+'-^^--^^-'+oldjurarray.join();
 
  
  document.getElementById('change-suit').click();
+
--></div></div></div>|}} }}
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>What is the Motivation behind the Lie?</h3>
 +
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|
 +
<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div>{{#vardefine:@decietscount|0}}{{#arraymap:{{#explode:@@@|<PROP>|19}}|,|###|<div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:{{#explode:@@@|<PROP>|19}}|,|{{#var:@decietscount}}}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%,#f2f2f2 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:{{#explode:@@@|<PROP>|20}}|,|{{#var:@decietscount}}}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:{{#explode:@@@|<PROP>|21}}|,|{{#var:@decietscount}}}} </div><!--
  
}
+
--></div><!--
}
 
  
</script>}}
+
--></div>{{#vardefine:@decietscount|{{#expr:{{#var:@decietscount}} + 1 }} }}|}}</div></div>
</wsform>
 
<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=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>
 
</wsform>
 
}}</div>}} }}<!--
 
  
  
 +
|}}  }}
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>What is the Social Acceptability for the lie?</h3>
 +
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi {{#ifeq:{{#explode:@@@|<PROP>|22}}|Acceptable|truth-yes|truth-no}}">{{#explode:@@@|<PROP>|22}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|23}}%,#f2f2f2 {{#explode:@@@|<PROP>|23}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|23}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|23}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|24}} </div><!--
 +
 +
--></div><!--
 +
 +
--></div></div></div>|}} }}
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>What is the Label for the Lie needed to Improve the Social Acceptability?</h3>
 +
|2={{#arraymap:{{#var:verdictsarray}}|$$$|@@@|<div class="verdict-item"><div class="d-flex"><div class="verdict-type">{{#if:{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|30}}|{{#explode:@@@|<PROP>|2}} }}</div><div class="w-100 verdict-wrapper"><div class="d-flex">  </div><div class="d-flex"><div class="vi bg-white">{{#explode:@@@|<PROP>|25}}</div><div class="vi ml-2" style="background: linear-gradient(to right, #329966 0%,#329966 {{#explode:@@@|<PROP>|26}}%,#f2f2f2 {{#explode:@@@|<PROP>|26}}%,#f2f2f2 100%); background: conic-gradient(from 180deg, #329966 {{#explode:@@@|<PROP>|26}}%, #f2f2f2 0 0);"><div class="inner-percentage">{{#explode:@@@|<PROP>|26}}%</div></div></div><div class="d-flex "> <div class="vi mt-2 w-100 bg-white">{{#explode:@@@|<PROP>|27}} </div><!--
  
--><div class="box"><h2>Your verdict :</h2><!--
+
--></div><!--  
-->{{#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| |<!--
 
        -->{{#ifeq:{{#show:{{#var:@verdict}}|?Locked|link=none}}|True| |<!--
 
        -->{{#widget:link|type=a|href={{fullurl:{{#var:@verdict}}|Participant={{#var:@fullpagename}} }}|text=Edit verdict|class=btn btn-green }}<!--
 
        -->}}<!--
 
      -->}}<!--
 
  -->|<!--
 
--><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/>
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Workflow" value="{{{Workflow|}}}" />
 
<wsfield type="hidden" name="User" value="{{{User|}}}" />
 
<wsfield type="hidden" name="Role" value="{{{Role|}}}" />
 
<wsfield type="hidden" name="Name" value="{{{Name|}}}" />
 
<wsfield type="hidden" name="Participant" value="{{#var:@fullpagename}}" />
 
<wsfield type="submit" value="Create verdict" class="btn btn-green"/>
 
</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>}}
 
<!--
 
--><div class="info-box">
 
{{#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}}<!--
 
-->{{#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}}|,|@@@|
 
<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.User right|format=array }}|,|@@@|{{#explode:@@@|<PROP>|1}} |,}} }}
 
{{#vardefine:@link|{{#ask:[[Class::Suit]][[Workflow::{{{Workflow|}}}]]|link=none }} }}
 
<wsform action="mail" id="case-form">
 
<wscreate mwwrite="Chat/" mwtemplate="Chat" mwoption="range:00001-99999" />
 
<wsemail to="noreply@{{#var:@servername}}" from="noreply@{{#var:@servername}}" bcc="{{#var:@mails}}" subject="New chat message" template="Template:Chat mail" >
 
</wsemail>
 
<wsfield type="hidden" name="link" value="{{#if:{{#var:@link}}|{{fullurl: {{#var:@link}} }} }}" />
 
<wsfield type="hidden" name="Case ID" value="{{{Case ID|}}}" />
 
<wsfield type="hidden" name="Workflow" value="{{{Workflow|}}}" />
 
<wsfield type="hidden" name="User" value="{{{User|}}}" />
 
<wsfield type="hidden" name="Role" value="{{{Role|}}}" />
 
<wsfield type="hidden" name="Name" value="{{{Name|}}}" />
 
<wsfield type="textarea" name="Message" class="form-control mt-2 mb-2" />
 
<div class="d-flex justify-content-end"><wsfield type="submit" value="Send" class="btn btn-green"/></div>
 
</wsform>
 
  
</div>{{#tag:html|</details>}}<!--
+
--></div></div></div>|}} }}
  
--></div>|<div class="m-5 alert alert-danger">Not permitted</div>}}<!-- end allowed
+
</includeonly>
--></includeonly>
 

Revision as of 11:12, 21 March 2022


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

{{Verdict results }}