Difference between revisions of "Prosecute a case"

From cm2.liecourt.com
(Fill database)
(Fill database)
 
(51 intermediate revisions by 3 users not shown)
Line 132: Line 132:
 
</style>}}
 
</style>}}
  
</div>
+
</div>{{#if:{{#vardefineecho:@workflow|{{#urldecode:{{#urlget:case}} }} }}<!--
 +
 
 +
// FILL OUT VERDICT
 +
-->|
 +
<h1>Please wait ...</h1><div class="d-none">{{#arraymap:{{#ask:[[{{#var:@workflow}}]][[Filed by::User:{{CURRENTLOGGEDUSER}}]][[Plaintiff verdict::No]]|?Case ID|?Lie|?Modification date|link=none|format=array|sort=Modification date|limit=1|order=desc}}|,|@@@|
 +
<div class="info-item">
 +
Please fill in your plaintiff verdict
 +
<div class="info-row"><b>Lie</b>{{#explode:@@@|<PROP>|2}}
 +
{{#vardefine:@partpage|{{#ask:[[Class::Participant]][[User::User:{{CURRENTLOGGEDUSER}}]][[Workflow::{{#explode:@@@|<PROP>|0}}]]|link=none}} }}
 +
{{#if:{{#var:@partpage}}|
 +
{{#widget:link|type=a|text=link|href={{fullurl:{{#explode:{{#ask:[[Class::Verdict]][[User::User:{{CURRENTLOGGEDUSER}}]]|?Case ID|?Lie|?Modification date|sort=Modification date|limit=1|order=desc|link=none|format=array}}|<PROP>|0}}|Participant={{#var:@partpage}} }} }}
 +
{{#tag:html|<script >setTimeout(function(){document.querySelector('.info-row a').click()},1000)</script>}}
 +
|{{#tag:wsform|
 +
{{#tag:wscreate||mwwrite=Participant/|mwtemplate=Participant|mwoption=range:00001-99999|mwfields=User, Role, Case ID, Workflow}}
 +
{{#tag:wscreate||mwwrite=Verdict:{{#explode:@@@|<PROP>|1}}/|mwtemplate=Verdict|mwoption=range:00001-99999|mwfields=User, Role, Case ID, Workflow}}
 +
{{#tag:wsfield||type=hidden|name=User|value=User:{{CURRENTLOGGEDUSER}} }}
 +
{{#tag:wsfield||type=hidden|name=Role|value=Plaintiff }}
 +
{{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|1}} }}
 +
{{#tag:wsfield||type=hidden|name=Workflow|value={{#explode:@@@|<PROP>|0}} }}<!--
 +
-->
 +
{{#tag:wsfield||type=submit|value=Create verdict|class=btn btn-green ml-4 mt-4 mb-4}}
 +
|action=addToWiki|id=form|mwreturn={{fullurl:Verdict:{{#show:{{#var:@workflow}}|?Case ID}}/2}} }}{{#tag:html|<script >setTimeout(function(){document.querySelector('input[type="submit"]').click()},3000)</script>}}|}}| }}
 +
</div></div></div><!--
 +
 
 +
 
 +
// PROSECUTE CASE
 +
-->|<!--
  
  
<h1>Prosecute a case</h1><!--  
+
--><h1>Prosecute a case</h1><!--  
 
  --><div class="row"><div class="col-12 col-lg-8">The Internet Court of Lies is meant to create a global community of people who work to provide evidence-based understanding of Fiat Lies and a means by which Social Media and other media can develop their own content curation based on results of the court.<br><br>Submit your prepared suit, to be accepted by the Court. A Judge is assigned, and if he accepts your suit, Jurors may be assigned. You, the Judge, and Jurors can now try your case by editing your suit page further. Finally, the Judge will declare your suit settled, and the suit is done<!--
 
  --><div class="row"><div class="col-12 col-lg-8">The Internet Court of Lies is meant to create a global community of people who work to provide evidence-based understanding of Fiat Lies and a means by which Social Media and other media can develop their own content curation based on results of the court.<br><br>Submit your prepared suit, to be accepted by the Court. A Judge is assigned, and if he accepts your suit, Jurors may be assigned. You, the Judge, and Jurors can now try your case by editing your suit page further. Finally, the Judge will declare your suit settled, and the suit is done<!--
-->{{#if:{{CURRENTLOGGEDUSER}}|{{#vardefine:@spent|{{#ask:[[Class::Workflow]][[Filed by::User:{{CURRENTLOGGEDUSER}}]]|link=none|format=count}} }}<!--
+
-->{{#if:{{CURRENTLOGGEDUSER}}|{{#vardefine:@balance|<!--{{#ttcount:}}-->1 }}</div><div class="col-12 col-lg-4"><div class="info-box mt-0 pb-4">
-->{{#vardefine:@bought|{{#arraymap:{{#ask:[[Class::Order]][[User::User:{{CURRENTLOGGEDUSER}}]][[Transaction::+]]|?Tokens|format=array|link=none}}|,|@@@|{{#explode:@@@|<PROP>|1}}|+}} }}<!--
 
-->{{#vardefine:@sent|{{#arraymap:{{#ask:[[Class::Transaction]][[User::User:{{CURRENTLOGGEDUSER}}]][[To::!None]]|?Tokens|link=none|format=array}}|,|@@@|{{#explode:@@@|<PROP>|1}}|+}} }}<!--
 
-->{{#vardefine:@recieved|{{#arraymap:{{#ask:[[Class::Transaction]][[To::User:{{CURRENTLOGGEDUSER}}]]|?Tokens|link=none|format=array}}|,|@@@|{{#explode:@@@|<PROP>|1}}|+}} }}<!--
 
-->{{#vardefine:@balance|{{#expr:{{#if:{{#var:@bought}}|{{#var:@bought}}|0}} + {{#if:{{#var:@recieved}}|{{#var:@recieved}}|0}} - {{#expr:{{#if:{{#var:@spent}}|{{#var:@spent}}|0}} + {{#if:{{#var:@sent}}|{{#var:@sent}}|0}} }} }} }}</div><div class="col-12 col-lg-4"><div class="info-box mt-0 pb-4">
 
 
<h2>Your TruthToken balance</h2><span class="truth-token">{{fa|gavel}}</span>× <span class="nr pb-4">{{#var:@balance}}</span><br><br>Prosecuting a case  = 1 TruthToken </div></div>|{{#vardefine:@balance|0}} }}</div>
 
<h2>Your TruthToken balance</h2><span class="truth-token">{{fa|gavel}}</span>× <span class="nr pb-4">{{#var:@balance}}</span><br><br>Prosecuting a case  = 1 TruthToken </div></div>|{{#vardefine:@balance|0}} }}</div>
 
{{#ifexpr:{{#var:@balance}} > 0|
 
{{#ifexpr:{{#var:@balance}} > 0|
  
<wsform action="addToWiki" id="case-form" enctype="multipart/form-data" mwreturn="{{fullurl:User:{{CURRENTLOGGEDUSER}}|msg=casestarted}}">
+
<wsform action="addToWiki" id="case-form" class="box" enctype="multipart/form-data" ><!-- mwreturn="{{fullurl:User:{{CURRENTLOGGEDUSER}}|msg=casestarted}}" -->
<wscreate mwwrite="Workflow/" mwtemplate="Workflow" mwoption="range:00001-99999" />
+
<wscreate mwwrite="Workflow/" mwtemplate="Workflow" mwoption="range:00001-99999" mwfollow="case"  />
 
<wsfield type="hidden" name="Plaintiff verdict"  value="No" />
 
<wsfield type="hidden" name="Plaintiff verdict"  value="No" />
 
<wsfield type="hidden" name="Stage"  value="Waiting for Plaintiff verdict" />
 
<wsfield type="hidden" name="Stage"  value="Waiting for Plaintiff verdict" />
 
<wsfield type="hidden" name="Filed by"  value="User:{{CURRENTLOGGEDUSER}}" /><!--  
 
<wsfield type="hidden" name="Filed by"  value="User:{{CURRENTLOGGEDUSER}}" /><!--  
  -->{{#vardefine:@id|1234-{{#time: U | now}}-{{#time: U | now}} }}
+
  -->{{#vardefine:@id|{{Fake token|token={{#time:U|now}}{{#time:U|now}} }} }}
 
<wsfield type="hidden" name="Case ID" value="{{#var:@id}}" />
 
<wsfield type="hidden" name="Case ID" value="{{#var:@id}}" />
  
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>What is the Lie?</h3>
+
|1=<h3>Name for case</h3>
|2=<wsfield type="text" class="form-control mt-2" name="Lie" placeholder="Lie title" value="{{{Lie|}}}"  />
+
|2=<wsfield type="text" class="form-control mt-2" name="Lie" placeholder="Short phrase" value="{{{Lie|}}}"  />
 
}}
 
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Lie topic</h3>
+
|1=<h3>Lie Category (optional)</h3>{{#arraydefine:@topics|{{#ask:[[Class::Workflow]]|?Topic|limit=999999|link=none|pagetitle=hide|format=plainlist|headers=hide|mainlabel=-|searchlabel=}} }}{{#arrayunique:@topics}}
|2=<wsselect name="Topic" placeholder="Placeholder" class="form-control">
+
|2=<!--<wsselect name="Topic" placeholder="Placeholder" class="form-control">
 
<wsfield type="option" value="Environment">Environment</wsfield>
 
<wsfield type="option" value="Environment">Environment</wsfield>
 
<wsfield type="option" value="Topic2">Topic 2</wsfield>
 
<wsfield type="option" value="Topic2">Topic 2</wsfield>
</wsselect>
+
</wsselect>--><wsfield type="text" name="Topic" list="topics" class="form-control mt-2" />{{#tag:html|<datalist id="topics">{{#arraymap:{{#arrayprint:@topics}}|,|@@@|<option value="@@@">@@@</option>|}}</datalist> }}
 
}}
 
}}
 
+
  <h1>The Lie and Context</h1>
{{Item responsive |Cols={{#var:@cols|4-8}}
+
<!--
|1=<h3>Description of the lie </h3>
+
-->{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>Accusation with Evidence</h3>
 
|2=
 
|2=
<wsfield type="textarea" class="form-control mt-2" name="Description" placeholder="Description" value="{{{Description|}}}" />
+
<wsfield type="textarea" class="form-control mt-2" name="Accusation" placeholder="Text with links to evidence" value="{{{Accusation|}}}" />
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Markup Lie and Thruth parts</h3>
+
|1=<h3>Markup <span class="red">Lie</span> and any <span class="dark-blue">Truths</span></h3>
 
|2=<wsfield type="button" class="btn btn-red btn-mark" onclick="document.execCommand('bold', false, null)">{{fa|highlighter}} Mark Lie</wsfield>  
 
|2=<wsfield type="button" class="btn btn-red btn-mark" onclick="document.execCommand('bold', false, null)">{{fa|highlighter}} Mark Lie</wsfield>  
<wsfield type="button" class="btn btn-green btn-mark " onclick="document.execCommand('italic', false, null)">{{fa|highlighter}} Mark Truth</wsfield><wsfield type="button" class="btn btn-gray btn-mark " onclick="unformat()">{{fa|highlighter}} Clear mark</wsfield>   
+
<wsfield type="button" class="btn btn-mark dark-blue" onclick="document.execCommand('italic', false, null)">{{fa|highlighter}} Mark Truth</wsfield><wsfield type="button" class="btn btn-gray btn-mark " onclick="unformat()">{{fa|highlighter}} Clear mark</wsfield>   
 
{{#Widget:Markup}}
 
{{#Widget:Markup}}
 
}}
 
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Lie locations</h3>
+
|1=<h3>Lie location</h3>
 
|2=<div class="original"><div class="d-flex">
 
|2=<div class="original"><div class="d-flex">
<wsfield type="text" class="form-control mt-2" name="Locations[]" placeholder="Location" value="{{{Locations|}}}" /><span class="add-more locations">{{fa|plus}}</span></div></div>
+
<wsfield type="text" class="form-control mt-2" name="Locations[]" placeholder="URL" value="{{{Locations|}}}" /><span class="add-more locations">{{fa|plus}}</span></div></div>
 
}}
 
}}
  
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>Meeting link</h3>
 +
|2=<div class=""><wsfield type="text" class="form-control mt-2" name="Meeting" placeholder="Skype/Zoom/..." value="{{{Meeting|}}}" /></div>
 +
}}
 +
 
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>Time slot</h3>
 +
|2=<div class=""><wsfield type="button" class="btn btn-green" value="Select a Time Slot" onclick="createPage()" id="time-slot-button" >Select a Time Slot</wsfield><wsfield id="time-slot-field" type="hidden" class="form-control mt-2" name="Slot"  /></div>
 +
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Evidence of lie appearance</h3>  
+
|1=<h3>Evidence screenshot</h3>  
|2=<div class="d-flex">{{#vardefine:@filename|Import-cse-{{#time: U | now}}.png}}
+
|2=<div class="">{{#widget:Multi upload|id={{#var:@id}} }}</div>
{{#vardefine:@pagecontent|<nowiki>{{File for case|Case file=</nowiki>{{#var:@id}}<nowiki>|Uploaded by=</nowiki>{{CURRENTLOGGEDUSER}}<nowiki>}}</nowiki>}}
+
    <small class="muted">* file selction will be uploaded on submitting</small>
<wslabel for="file-upload" class="attachment">{{fa|paperclip}}
+
 
<wsfield class="d-none" type="file" name="File" id="file-upload" verbose_id="hiddendiv" target="{{#var:@filename}}" pagecontent="{{#var:@pagecontent}}" /></wslabel>
 
<div class="upload-preview hidden" id="hiddendiv"></div></div>
 
 
  }}
 
  }}
{{Item responsive |Cols={{#var:@cols|4-8}}
+
<!--{{Item responsive |Cols={{#var:@cols|4-8}}
 
|1=<h3>Class suit?</h3>
 
|1=<h3>Class suit?</h3>
 
|2=<div class="d-flex">  
 
|2=<div class="d-flex">  
Line 200: Line 230:
 
{{#widget:Check input |type=radio |name=Type |text=no |id=truthno |value=Individual  |checked=checked }}
 
{{#widget:Check input |type=radio |name=Type |text=no |id=truthno |value=Individual  |checked=checked }}
 
</div>
 
</div>
}}<!--  
+
}}--><!--  
 
  -->
 
  -->
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
Line 206: Line 236:
 
|2=
 
|2=
 
<wsfield type="textarea" name="Markup" id="real-field" class="d-none" />
 
<wsfield type="textarea" name="Markup" id="real-field" class="d-none" />
<wsfield type="button" class="btn btn-green float-right" onclick="submitRealField()">Prosecute*</wsfield>
+
<wsfield type="button" class="btn btn-green float-right" id="upload-button" onclick="uploadFiles(this)">Propose verdict*</wsfield>
 
<wsfield type="submit" id="real-submit" class="d-none" value="niks" />
 
<wsfield type="submit" id="real-submit" class="d-none" value="niks" />
 
}}<!--  
 
}}<!--  
  --><small>*By clicking "Prosecute" you agree to tell the Truth, the Whole Truth, and Nothing but the Truth, in their participation in a case. If you lie as a case participant with a Fiat Lie, you risk being banned from further participation in the ICoL.</small>
+
  --><small>*By clicking "Propose verdict" you agree to tell the Truth, the Whole Truth, and Nothing but the Truth, in their participation in a case. If you lie as a case participant with a Fiat Lie, you risk being banned from further participation in the ICoL.</small>
 
</wsform>
 
</wsform>
 
{{#tag:html|<script>
 
{{#tag:html|<script>
Line 254: Line 284:
  
 
function submitRealField(){
 
function submitRealField(){
 +
  console.log('dededd')
 
   document.getElementById('real-field').value = document.getElementById('fake-field').innerHTML;
 
   document.getElementById('real-field').value = document.getElementById('fake-field').innerHTML;
 
   setTimeout(function(){
 
   setTimeout(function(){
Line 266: Line 297:
 
<wsform id="case-form">
 
<wsform id="case-form">
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>What is the Lie?</h3>
+
|1=<h3>Name for case</h3>
|2=<wsfield type="text" class="form-control mt-2" name="Lie" placeholder="Lie title" value="{{{Lie|}}}" readonly="readonly" />
+
|2=<wsfield type="text" class="form-control mt-2" name="Lie" placeholder="Short phrase" value="{{{Lie|}}}" readonly="readonly" />
 
}}
 
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Lie topic</h3>
+
|1=<h3>Lie Category (optional)</h3>
 
|2=<wsselect name="Topic" placeholder="Placeholder" class="form-control" readonly="readonly">
 
|2=<wsselect name="Topic" placeholder="Placeholder" class="form-control" readonly="readonly">
 
<wsfield type="option" value="Environment">Environment</wsfield>
 
<wsfield type="option" value="Environment">Environment</wsfield>
Line 284: Line 315:
 
}}
 
}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Markup Lie and Thruth parts</h3>
+
|1=<h3>Markup Lie and any Thruths</h3>
 
|2=<wsfield type="button" class="btn btn-red btn-mark" readonly="readonly" onclick="document.execCommand('bold', false, null)">{{fa|highlighter}} Mark Lie</wsfield>  
 
|2=<wsfield type="button" class="btn btn-red btn-mark" readonly="readonly" onclick="document.execCommand('bold', false, null)">{{fa|highlighter}} Mark Lie</wsfield>  
<wsfield type="button" class="btn btn-green btn-mark " readonly="readonly" onclick="document.execCommand('italic', false, null)">{{fa|highlighter}} Mark Truth</wsfield><wsfield type="button" class="btn btn-gray btn-mark " ">{{fa|highlighter}} Clear mark</wsfield>   
+
<wsfield type="button" class="btn btn-green btn-mark " readonly="readonly" onclick="document.execCommand('italic', false, null)">{{fa|highlighter}} Mark Truth</wsfield><wsfield type="button" class="btn btn-gray btn-mark" >{{fa|highlighter}} Clear mark</wsfield>   
 
{{#Widget:Markup}}
 
{{#Widget:Markup}}
 
}}
 
}}
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Lie locations</h3>
+
|1=<h3>Lie location</h3>
 
|2=<div class="original"><div class="d-flex">
 
|2=<div class="original"><div class="d-flex">
<wsfield type="text" class="form-control mt-2" name="Locations[]" placeholder="Location" value="{{{Locations|}}}" readonly="readonly" /><span class="add-more locations">{{fa|plus}}</span></div></div>
+
<wsfield type="text" class="form-control mt-2" name="Locations[]" placeholder="URL" value="{{{Locations|}}}" readonly="readonly" /><span class="add-more locations">{{fa|plus}}</span></div></div>
 
}}
 
}}
  
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>Meeting link</h3>
 +
|2=<div class=""><wsfield type="text" class="form-control mt-2" name="Meeting" placeholder="Skype/Zoom/..." value="{{{Meeting|}}}" /></div>
 +
}}
 +
 
 +
{{Item responsive |Cols={{#var:@cols|4-8}}
 +
|1=<h3>Time slot</h3>
 +
|2=<div class=""><wsfield type="button" class="btn btn-green" value="Select Time Slot" onclick="createPage()"  /><wsfield id="time-slot-field" type="hidden" class="form-control mt-2" name="Slot"  /></div>
 +
}} 
  
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
|1=<h3>Evidence of lie appearance</h3>  
+
|1=<h3>Evidence screenshot</h3>  
 
|2=<div class="d-flex">{{#vardefine:@filename|Import-cse-{{#time: U | now}}.png}}
 
|2=<div class="d-flex">{{#vardefine:@filename|Import-cse-{{#time: U | now}}.png}}
 
{{#vardefine:@pagecontent|<nowiki>{{File for case|Case file=</nowiki>1234-132525-767967-3865381265853<nowiki>|Uploaded by=</nowiki>{{CURRENTLOGGEDUSER}}<nowiki>}}</nowiki>}}
 
{{#vardefine:@pagecontent|<nowiki>{{File for case|Case file=</nowiki>1234-132525-767967-3865381265853<nowiki>|Uploaded by=</nowiki>{{CURRENTLOGGEDUSER}}<nowiki>}}</nowiki>}}
Line 304: Line 344:
 
<wsfield class="d-none" type="file" name="File" id="file-upload" verbose_id="hiddendiv" target="{{#var:@filename}}" pagecontent="{{#var:@pagecontent}}" readonly="readonly" /></wslabel>
 
<wsfield class="d-none" type="file" name="File" id="file-upload" verbose_id="hiddendiv" target="{{#var:@filename}}" pagecontent="{{#var:@pagecontent}}" readonly="readonly" /></wslabel>
 
<div class="upload-preview hidden" id="hiddendiv"></div></div>
 
<div class="upload-preview hidden" id="hiddendiv"></div></div>
 +
  <small class="muted">* file selction will be uploaded on submitting</small>
 
  }}
 
  }}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
 
{{Item responsive |Cols={{#var:@cols|4-8}}
Line 318: Line 359:
  
  
}}</wsform> }}{{Managed
+
}}</wsform> }} }}<!-- ./ if urlget case enter verdict else prosecute case
 +
-->{{Managed
 
|Version=1.0
 
|Version=1.0
 
|Version notes=1.0 - First managed version
 
|Version notes=1.0 - First managed version

Latest revision as of 10:08, 25 August 2022

Prosecute a case

The Internet Court of Lies is meant to create a global community of people who work to provide evidence-based understanding of Fiat Lies and a means by which Social Media and other media can develop their own content curation based on results of the court.

Submit your prepared suit, to be accepted by the Court. A Judge is assigned, and if he accepts your suit, Jurors may be assigned. You, the Judge, and Jurors can now try your case by editing your suit page further. Finally, the Judge will declare your suit settled, and the suit is done
0 TruthTokens, please buy TruthTokens on your profile page