Difference between revisions of "Template:User"
From cm2.liecourt.com
Line 284: | Line 284: | ||
{{#tag:html|</details>}} | {{#tag:html|</details>}} | ||
|}} | |}} | ||
− | {{#arraymap:{{#ask:[[Class::Workflow]][[Random juror::{{FULLPAGENAME}}]]|?Declined juror|?Filed by|?Case ID|?Lie|?Topic|?Description|?Markup|?Facts|?Locations|?Juror amount|? | + | {{#arraymap: {{#ask:[[Class::Workflow]][[Random juror::{{FULLPAGENAME}}]]|?Declined juror|?Filed by|?Case ID|?Lie|?Topic|?Description|?Markup|?Facts|?Locations|?Juror amount|?Juror |
+ | s|?Judge|?Random juror|?Suit date|link=none|format=array|sep=$$$|limit=9999}}|$$$|@@@| | ||
<div class="info-item"> | <div class="info-item"> | ||
{{#tag:html|<details> | {{#tag:html|<details> | ||
Line 295: | Line 296: | ||
<div class="info-row"><b>Marked-up Truth and Lies</b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div> | <div class="info-row"><b>Marked-up Truth and Lies</b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div> | ||
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>--> | <div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>--> | ||
− | {{#arraydefine:@jurrors|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}} }} | + | {{#arraydefine:@jurrors|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}} }}<!-- |
+ | -->{{#vardefine:@nrofjurorswanted|{{#if:{{#explode:@@@|<PROP>|10}}|{{#explode:@@@|<PROP>|10}}|0}} }} | ||
<div class="d-flex justify-content-center pb-4"> | <div class="d-flex justify-content-center pb-4"> | ||
{{#tag:wsform| {{#arraydefine:@random juror|{{#explode:@@@|<PROP>|13}}|<MANY>}}{{#arraydefine:@user|{{FULLPAGENAME}} }}{{#arraydiff:new_key|@random juror|@user}} | {{#tag:wsform| {{#arraydefine:@random juror|{{#explode:@@@|<PROP>|13}}|<MANY>}}{{#arraydefine:@user|{{FULLPAGENAME}} }}{{#arraydiff:new_key|@random juror|@user}} | ||
− | {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[User group::icol-user]][[Class::Member]][[!{{FULLPAGENAME}}]][[Role::Juror]][[!{{#explode:@@@|<PROP>|12}}]]{{#arraymap:{{#explode:@@@|<PROP>|13}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}|searchlabel=|Limit={{#expr:{{# | + | {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#ask:[[User group::icol-user]][[Class::Member]][[!{{FULLPAGENAME}}]][[Role::Juror]][[!{{#explode:@@@|<PROP>|12}}]]{{#arraymap:{{#explode:@@@|<PROP>|13}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}|searchlabel=|Limit={{#expr:{{#var:@nrofjurorswanted}} {{#if:{{#arrayprint:new_key}}|- {{#arraysize:new_key}}| - 0 }} }}|format=array|order=random}} }} |
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Declined juror|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }} | {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Declined juror|value={{#if:{{#explode:@@@|<PROP>|1}}|{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }} | ||
− | + | {{#ifexpr:{{#arraysize:@jurrors}} < {{#if:{{#var:@nrofjurorswanted}}| | |
{{#tag:wsfield||type=submit|value=Decline juror role|class=btn btn-red btn-half}} | {{#tag:wsfield||type=submit|value=Decline juror role|class=btn btn-red btn-half}} | ||
}} | }} | ||
Line 313: | Line 315: | ||
{{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|3}} }} | {{#tag:wsfield||type=hidden|name=Case ID|value={{#explode:@@@|<PROP>|3}} }} | ||
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Jurors|value={{#if:{{#explode:@@@|<PROP>|11}}|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }} | {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Jurors|value={{#if:{{#explode:@@@|<PROP>|11}}|{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|@@@|,}}, {{FULLPAGENAME}}| {{FULLPAGENAME}} }} }} | ||
− | {{#ifeq:{{#arraysize:@jurrors}}|{{#expr:{{# | + | {{#ifeq:{{#arraysize:@jurrors}}|{{#expr:{{#var:@nrofjurorswanted}} - 1 }}| |
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value=done}} | {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value=done}} | ||
{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Stage|value=In progress}}|<!-- | {{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Stage|value=In progress}}|<!-- | ||
− | -->{{#arraydefine:@random juror|{{#explode:@@@|<PROP>|13}}|<MANY>}}{{#arraydefine:@user|{{FULLPAGENAME}} }}{{#arraydiff:new_key|@random juror|@user}}{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#vardefine:@limit|{{#expr:{{# | + | -->{{#arraydefine:@random juror|{{#explode:@@@|<PROP>|13}}|<MANY>}}{{#arraydefine:@user|{{FULLPAGENAME}} }}{{#arraydiff:new_key|@random juror|@user}}{{#tag:wsedit||target={{PAGEID:{{#explode:@@@|<PROP>|0}}}}|template=Workflow|formfield=Random juror|value={{#if:{{#arrayprint:new_key}}| {{#arrayprint:new_key}}, }}{{#vardefine:@limit|{{#expr:{{#var:@nrofjurorswanted}} {{#if:{{#arrayprint:new_key}}|- {{#arraysize:new_key}}| - 0 }}{{#if:{{#arraysize:@countjurors}}|- {{#arraysize:@countjurors}}|- 0}} }} }}{{#ifexpr:{{#var:@limit}} > 0|{{#ask:[[User group::icol-user]][[Class::Member]][[!{{FULLPAGENAME}}]][[!{{{Filed by|}}}]][[Role::Juror]][[!{{#explode:@@@|<PROP>|12}}]][[!{{#explode:@@@|<PROP>|13}}]]{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}|Limit={{#var:@limit}}|searchlabel=|format=array|order=random}} }} |
}} }} | }} }} | ||
− | {{#ifexpr:{{#arraysize:@jurrors}} < {{# | + | {{#ifexpr:{{#arraysize:@jurrors}} < {{#var:@nrofjurorswanted}}| |
{{#tag:wsfield||type=submit|value=Accept juror role|class=btn btn-green btn-half }} | {{#tag:wsfield||type=submit|value=Accept juror role|class=btn btn-green btn-half }} | ||
}} | }} |
Revision as of 15:22, 5 July 2021
This is the User template. It should be called in the following format:
{{User |User= |Roles= |Name= |Filed by= |be candidate= }}