Difference between revisions of "Template:Suit"
From cm2.liecourt.com
m (Text replacement - "{{subst:#if:1||}}" to "") |
|||
(29 intermediate revisions by 2 users not shown) | |||
Line 207: | Line 207: | ||
} | } | ||
</style>}}</div><!-- | </style>}}</div><!-- | ||
− | -->{{#vardefine:@class|{{#ask:[[Class::Workflow]][[Class case IDs::{{{Workflow|}}}]]|format=array|link=none}} }} {{#if:{{#var:@class}}|This suit is part of a class: {{#ask:[[Class::Suit]][[Workflow::{{#var:@class}}]]}}| | + | -->{{#if:{{CURRENTLOGGEDUSER}}|{{#vardefine:@class|{{#ask:[[Class::Workflow]][[Class case IDs::{{{Workflow|}}}]]|format=array|link=none}} }} {{#if:{{#var:@class}}|This suit is part of a class: {{#ask:[[Class::Suit]][[Workflow::{{#var:@class}}]]}}| |
{{#vardefine:@type|{{#show:{{{Workflow|}}}|?Type|link=none}} }} | {{#vardefine:@type|{{#show:{{{Workflow|}}}|?Type|link=none}} }} | ||
− | <div class="row"><div class="col-12 col-lg-8">{{#tag:html|<h1><span>{{{Title|}}}</span><!--<span>{{#widget:link|text=Suit history|href=#|type=a|class=btn-green}}</span>--></h1>}} | + | <div class="row"><div class="col-12 col-lg-8 box">{{#tag:html|<h1><span>{{{Title|}}}</span><!--<span>{{#widget:link|text=Suit history|href=#|type=a|class=btn-green}}</span>--></h1>}} |
<div class="suit-info">{{Item responsive |Cols={{#var:@cols|4-8}} | <div class="suit-info">{{Item responsive |Cols={{#var:@cols|4-8}} | ||
|1=<b>Case ID</b> | |1=<b>Case ID</b> | ||
Line 223: | Line 223: | ||
{{Item responsive |Cols={{#var:@cols|4-8}} | {{Item responsive |Cols={{#var:@cols|4-8}} | ||
|1=<b>Status</b> | |1=<b>Status</b> | ||
− | |2={{#vardefine:@workflow|{{#ask:[[{{{Workflow|}}}]]|?Stage|?Locations|?Topic|?Filed by|?Jurors|?Juror amount|?Description|?Markup|format=array|link=none}} }}{{#explode:{{#var:@workflow}}|<PROP>|1}} | + | |2={{#vardefine:@workflow|{{#ask:[[{{{Workflow|}}}]]|?Stage|?Locations|?Topic|?Filed by|?Jurors|?Juror amount|?Description|?Markup|?Slot|?Settlement date|?Accusation|format=array|link=none}} }}{{#explode:{{#var:@workflow}}|<PROP>|1}} |
}} | }} | ||
{{Item responsive |Cols={{#var:@cols|4-8}} | {{Item responsive |Cols={{#var:@cols|4-8}} | ||
|1=<b>Number of Jurors</b> | |1=<b>Number of Jurors</b> | ||
− | |2={{#arraydefine:@jurors|{{#explode:{{#var:@workflow}}|<PROP>|5}} }}{{#arraysize:@jurors}} | + | |2={{#arraydefine:@jurors|{{#explode:{{#var:@workflow}}|<PROP>|5}}|<MANY>}}{{#arraysize:@jurors}} / {{#explode:{{#var:@workflow}}|<PROP>|6}} accepted |
}} | }} | ||
− | <br></div></div><div class="col-12 col-lg-4">{{#if:{{CURRENTLOGGEDUSER}}|{{#if:{{#vardefineecho:@participantpage|{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]][[User::User:{{CURRENTLOGGEDUSER}}]]|link=none}} }}|<!-- | + | <br></div></div><div class="col-12 col-lg-4 ">{{#if:{{CURRENTLOGGEDUSER}}|{{#if:{{#vardefineecho:@participantpage|{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]][[User::User:{{CURRENTLOGGEDUSER}}]]|link=none}} }}|<!-- |
-->{{#vardefine:@participantrole|{{#show:{{#var:@participantpage}}|?Role|link=none}} }}<div class="info-box "> | -->{{#vardefine:@participantrole|{{#show:{{#var:@participantpage}}|?Role|link=none}} }}<div class="info-box "> | ||
<h2>{{#switch:{{#var:@participantrole}}|Juror={{Fa|balance-scale}}|Judge={{Fa|gavel}}|Plaintiff={{fa|book}} }}</h2> | <h2>{{#switch:{{#var:@participantrole}}|Juror={{Fa|balance-scale}}|Judge={{Fa|gavel}}|Plaintiff={{fa|book}} }}</h2> | ||
Line 238: | Line 238: | ||
--><div class="info-box "> | --><div class="info-box "> | ||
<h2>Docket</h2> | <h2>Docket</h2> | ||
− | <div ><b>Settlement date</b><br>{{#if:{{{ | + | <div ><b>Suit date</b><br>{{#if:{{#explode:{{#var:@workflow}}|<PROP>|9}}|{{#explode:{{#var:@workflow}}|<PROP>|9}}|undecided }}</div> |
+ | <div ><b>Settlement date</b><br>{{#if:{{#explode:{{#var:@workflow}}|<PROP>|10}}|{{#time:d M Y|{{#explode:{{#var:@workflow}}|<PROP>|10}} }}|undecided }}</div> | ||
<div ><b>Jurors needed</b><br>{{#explode:{{#var:@workflow}}|<PROP>|6}}</div> | <div ><b>Jurors needed</b><br>{{#explode:{{#var:@workflow}}|<PROP>|6}}</div> | ||
− | </div></div></div> | + | </div><!-- |
+ | -->{{#ifsysop:<div class="info-box "> | ||
+ | <h2>Sysop tools</h2><!-- | ||
+ | --><div ><b>Workflow</b><br>[[{{{Workflow|}}}]]</div><!-- | ||
+ | --><div ><b>Participants</b><br>{{#arraymap:{{#ask:[[Class::Participant]][[Workflow::{{{Workflow|}}}]]|?Role|?Name|format=array|link=none}}|,|@@@|[[{{#explode:@@@|<PROP>|0}}|{{#if:{{#explode:@@@|<PROP>|2}}|{{#explode:@@@|<PROP>|2}}|{{#explode:@@@|<PROP>|1}}}}]]|<br>}}</div><!-- | ||
+ | --></div>}}<!-- | ||
+ | --></div></div> | ||
+ | |||
{{#ifeq:{{#var:@type}}|Class| | {{#ifeq:{{#var:@type}}|Class| | ||
{{#arraydefine:@cases|{{#show:{{{Workflow|}}}|?Class case IDs|link=none}} }}<!-- | {{#arraydefine:@cases|{{#show:{{{Workflow|}}}|?Class case IDs|link=none}} }}<!-- | ||
− | --><h1>Class information</h1>{{# | + | --><h1>Class information</h1>{{#if:{{#ask:[[Class::Verdict]][[Workflow::{{{Workflow|}}}]][[Role::Judge]]}}|<br><!-- |
− | |||
− | }}<br><!-- | ||
--><ul class="nav nav-tabs"><!-- | --><ul class="nav nav-tabs"><!-- | ||
--><li class="active nav-item">{{#widget:link|datatoggle=pill|href=#mainid|text=Verdicts|type=a|class=nav-link active}}</li> | --><li class="active nav-item">{{#widget:link|datatoggle=pill|href=#mainid|text=Verdicts|type=a|class=nav-link active}}</li> | ||
Line 258: | Line 264: | ||
-->{{verdict results|id={{{Case ID|}}}|Context={{#explode:@@@|<PROP>|1}}}}<!-- | -->{{verdict results|id={{{Case ID|}}}|Context={{#explode:@@@|<PROP>|1}}}}<!-- | ||
--></div>|}}<!-- | --></div>|}}<!-- | ||
− | --></div | + | --></div> }} |
<h1>Cases</h1> | <h1>Cases</h1> | ||
<h2>This Class suit contains {{#arraysize:@cases}} cases</h2> | <h2>This Class suit contains {{#arraysize:@cases}} cases</h2> | ||
Line 271: | Line 277: | ||
{{#arraymap:{{#arrayprint:@cases}}|,|@@@|<!-- | {{#arraymap:{{#arrayprint:@cases}}|,|@@@|<!-- | ||
--><div id="cases-{{#var:@casecounter2}}" class="tab-pane {{#ifeq:{{#var:@casecounter2}}|0|active}}"><!-- | --><div id="cases-{{#var:@casecounter2}}" class="tab-pane {{#ifeq:{{#var:@casecounter2}}|0|active}}"><!-- | ||
− | -->{{#vardefine:@workflow|{{#ask:[[@@@]]|?Lie|?Case ID|?Topic|?Filed by|?Jurors|?Juror amount|?Description|?Markup|?Locations|format=array|link=none}} }}<!-- | + | -->{{#vardefine:@workflow|{{#ask:[[@@@]]|?Lie|?Case ID|?Topic|?Filed by|?Jurors|?Juror amount|?Description|?Markup|?Locations|?Accusation|?uuid|format=array|link=none}} }}<!-- |
-->{{Item responsive |Cols={{#var:@cols|4-8}} | -->{{Item responsive |Cols={{#var:@cols|4-8}} | ||
|1=<b>Lie</b> | |1=<b>Lie</b> | ||
Line 277: | Line 283: | ||
}}<!-- | }}<!-- | ||
--><div class="row"> | --><div class="row"> | ||
− | <div class="col-lg- | + | <div class="col-lg-12 col-12 box mt-0"> |
− | <h2>The | + | <h2>The Case</h2> |
{{Item responsive |Cols=4-8 | {{Item responsive |Cols=4-8 | ||
− | |1=<b>Lie | + | |1=<b>Lie category</b> |
|2={{#explode:{{#var:@workflow}}|<PROP>|3}} | |2={{#explode:{{#var:@workflow}}|<PROP>|3}} | ||
}} | }} | ||
{{Item responsive |Cols=4-8 | {{Item responsive |Cols=4-8 | ||
− | |1=<b> | + | |1=<b>The Plaintiff Accusation with Evidence</b> |
− | |2={{#explode:{{#var:@workflow}}|<PROP>| | + | |2={{#explode:{{#var:@workflow}}|<PROP>|10}} |
}}<!-- | }}<!-- | ||
-->{{Item responsive |Cols=4-8 | -->{{Item responsive |Cols=4-8 | ||
− | |1=<b> | + | |1=<b>Markup <span class="red">Lie</span> and any <span class="dark-blue">Truths</span> </b> |
|2=<div class="lie-input">{{#explode:{{#var:@workflow}}|<PROP>|8}}</div> | |2=<div class="lie-input">{{#explode:{{#var:@workflow}}|<PROP>|8}}</div> | ||
}} | }} | ||
{{Item responsive |Cols=4-8 | {{Item responsive |Cols=4-8 | ||
− | |1=<b>Evidence | + | |1=<b>Evidence screenshot</b>{{#vardefine:@uuid|{{#show:{{{Workflow|}}}|?uuid|link=none}} }} |
− | |2={{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Case file]][[Case file: | + | |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=Image | + | |ModalHeading={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|Pdf|Image}} |
− | |BodyText=[[{{#explode:@@@|<PROP>|0}}]]Uploaded on: {{#explode:@@@|<PROP>|1}} | + | |BodyText={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|{{#widget:pdf|pdf={{filepath:{{#explode:{{#explode:@@@|<PROP>|0}}|:|1}} }} }}|[[{{#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}} }} |}} | + | -->{{#vardefine:@counter|{{#expr:{{#var:@counter}} + 1}} }} }}|}} |
}} | }} | ||
</div> | </div> | ||
− | <div class="col- | + | <div class="col-12 col-lg-12 mt-0 box" > |
− | + | <div > | |
− | <div | + | <h2>Lie location</h2> |
− | <h2>Lie | ||
{{#arraymap:{{#explode:{{#var:@workflow}}|<PROP>|9}}|,|@@@| | {{#arraymap:{{#explode:{{#var:@workflow}}|<PROP>|9}}|,|@@@| | ||
{{Item responsive |Cols=2-10 | {{Item responsive |Cols=2-10 | ||
|1=<b>{{fa|external-link-alt}}</b> | |1=<b>{{fa|external-link-alt}}</b> | ||
− | |2={{#widget:link|href= | + | |2={{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}} |
}} | }} | ||
|}} | |}} | ||
+ | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
<!-- | <!-- | ||
− | --><br>{{# | + | --><br>{{#if:{{#ask:[[Class::Verdict]][[Workflow::{{#explode:{{#var:@workflow}}|<PROP>|0}}]][[Role::Judge]]}}|<br><!-- |
− | |||
− | }}<br><!-- | ||
--><ul class="nav nav-tabs"><!-- | --><ul class="nav nav-tabs"><!-- | ||
--><li class="active nav-item">{{#widget:link|datatoggle=pill|href=#mainid|text=Verdicts|type=a|class=nav-link active}}</li> | --><li class="active nav-item">{{#widget:link|datatoggle=pill|href=#mainid|text=Verdicts|type=a|class=nav-link active}}</li> | ||
Line 335: | Line 339: | ||
-->{{verdict results|id={{#explode:{{#var:@workflow}}|<PROP>|2}}|Context={{#explode:@@@|<PROP>|1}}}}<!-- | -->{{verdict results|id={{#explode:{{#var:@workflow}}|<PROP>|2}}|Context={{#explode:@@@|<PROP>|1}}}}<!-- | ||
--></div>|}}<!-- | --></div>|}}<!-- | ||
− | --></div | + | --></div> }}<!-- |
--></div><!-- | --></div><!-- | ||
Line 342: | Line 346: | ||
| | | | ||
<div class="row"> | <div class="row"> | ||
− | <div class="col-12 col-lg- | + | <div class="col-12 col-lg-12 box mt-0"> |
− | <h2>The | + | <h2>The Case</h2> |
{{Item responsive |Cols=4-8 | {{Item responsive |Cols=4-8 | ||
− | |1=<b>Lie | + | |1=<b>Lie Category</b> |
|2={{#explode:{{#var:@workflow}}|<PROP>|3}} | |2={{#explode:{{#var:@workflow}}|<PROP>|3}} | ||
}} | }} | ||
{{Item responsive |Cols=4-8 | {{Item responsive |Cols=4-8 | ||
− | |1=<b> | + | |1=<b>The Plaintiff Accusation with Evidence</b> |
− | |2={{#explode:{{#var:@workflow}}|<PROP>| | + | |2={{#explode:{{#var:@workflow}}|<PROP>|11}} |
}}<!-- | }}<!-- | ||
-->{{Item responsive |Cols=4-8 | -->{{Item responsive |Cols=4-8 | ||
− | |1=<b> | + | |1=<b>Markup <span class="red">Lie</span> and any <span class="dark-blue">Truths</span></b> |
|2=<div class="lie-input">{{#explode:{{#var:@workflow}}|<PROP>|8}}</div> | |2=<div class="lie-input">{{#explode:{{#var:@workflow}}|<PROP>|8}}</div> | ||
}} | }} | ||
{{Item responsive |Cols=4-8 | {{Item responsive |Cols=4-8 | ||
− | |1=<b>Evidence | + | |1=<b>Evidence screenshot</b>{{#vardefine:@uuid|{{#show:{{{Workflow|}}}|?uuid|link=none}} }} |
− | |2={{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Case file]][[Case file::{{ | + | |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=Image | + | |ModalHeading={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|Pdf|Image}} |
− | |BodyText=[[{{#explode:@@@|<PROP>|0}}]]Uploaded on: {{#explode:@@@|<PROP>|1}} | + | |BodyText={{#ifeq:{{#explode:@@@|<PROP>|2}}|pdf|{{#widget:pdf|pdf={{filepath:{{#explode:{{#explode:@@@|<PROP>|0}}|:|1}} }} }}|[[{{#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}} }} |}} | + | -->{{#vardefine:@counter|{{#expr:{{#var:@counter}} + 1}} }} |}} }} |
}} | }} | ||
</div> | </div> | ||
− | <div class="col- | + | <div class="col-12 col-lg-12 box mt-0"> |
− | + | <div class=""> | |
− | <div class=" | + | <h2>Lie location</h2> |
− | <h2>Lie | ||
{{#arraymap:{{#explode:{{#var:@workflow}}|<PROP>|2}}|,|@@@| | {{#arraymap:{{#explode:{{#var:@workflow}}|<PROP>|2}}|,|@@@| | ||
{{Item responsive |Cols=2-10 | {{Item responsive |Cols=2-10 | ||
|1=<b>{{fa|external-link-alt}}</b> | |1=<b>{{fa|external-link-alt}}</b> | ||
− | |2={{#widget:link|href= | + | |2={{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}} |
}} | }} | ||
|}} | |}} | ||
Line 385: | Line 388: | ||
</div> | </div> | ||
</div> | </div> | ||
− | < | + | </div><!-- |
− | < | + | -->{{#if:{{#ask:[[Class::Verdict]][[Workflow::{{{Workflow|}}}]][[Role::Judge]]}}|<div class="row"><div class="col-12 box"><h2>Settlement records</h2><br><!-- |
− | |||
--><ul class="nav nav-tabs"><!-- | --><ul class="nav nav-tabs"><!-- | ||
--><li class="active nav-item">{{#widget:link|datatoggle=pill|href=#mainid|text=Verdicts|type=a|class=nav-link active}}</li> | --><li class="active nav-item">{{#widget:link|datatoggle=pill|href=#mainid|text=Verdicts|type=a|class=nav-link active}}</li> | ||
Line 400: | Line 402: | ||
-->{{verdict results|id={{{Case ID|}}}|Context={{#explode:@@@|<PROP>|1}}}}<!-- | -->{{verdict results|id={{{Case ID|}}}|Context={{#explode:@@@|<PROP>|1}}}}<!-- | ||
--></div>|}}<!-- | --></div>|}}<!-- | ||
− | --></div> | + | --></div></div></div> }}<!-- |
-->}}<!-- end if class | -->}}<!-- end if class | ||
− | -->}}<!-- | + | -->}}|<div class="m-5 alert alert-danger">Not permitted</div>}}<!-- |
-->{{DISPLAYTITLE:{{{Title|}}} {{#ifeq:{{#var:@type}}|Class|(Class)}} }} | -->{{DISPLAYTITLE:{{{Title|}}} {{#ifeq:{{#var:@type}}|Class|(Class)}} }} | ||
</includeonly> | </includeonly> |
Latest revision as of 10:12, 10 December 2021
This is the Suit template. It should be called in the following format:
{{Suit |Case ID= |Title= |Workflow= }}