Difference between revisions of "Template:User"

From cm2.liecourt.com
(Fill database)
(Fill database)
Line 5: Line 5:
 
}}
 
}}
  
This is the '''Member''' template. It should be called in the following format:
+
This is the '''User''' template. It should be called in the following format:
  
 
<pre>
 
<pre>
{{Member
+
{{User
 
|User=
 
|User=
 
|Roles=
 
|Roles=
Line 15: Line 15:
 
}}
 
}}
 
</pre>
 
</pre>
{{Member }}
+
<!--{{User }}-->
  
 
</noinclude><includeonly>
 
</noinclude><includeonly>
<div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}}|+sep=,|User={{{User|}}}|Name={{{Name|}}}|Email={{{Email|}}}|Volunteer={{{Volunteer|}}}|Tokens spent={{{Tokens spent|}}} }}
+
<div class="d-none">__NOTITLE__ __NOTOC__{{#if:{{{Name|}}}|{{#set:Class=Member|Role={{#if:{{{Roles|}}}|{{{Roles|}}}|Juror, Judge}}|+sep=,|User={{{User|}}}|Name={{{Name|}}}|Email={{{Email|}}}|Volunteer={{{Volunteer|}}}|Tokens spent={{{Tokens spent|}}}|Page={{FULLPAGENAME}} }}
 
</div>
 
</div>
 
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}}  
 
{{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}}  
Line 182: Line 182:
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|@@@|<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>
 
<div class="info-row"><b>Link</b>{{#ask:[[Class::Suit]][[Case ID::{{#explode:@@@|<PROP>|3}}]]|format=plainlist}}</div>
 
<div class="info-row"><b>Link</b>{{#ask:[[Class::Suit]][[Case ID::{{#explode:@@@|<PROP>|3}}]]|format=plainlist}}</div>
 
<h2>Class information</h2>
 
<h2>Class information</h2>
Line 197: Line 197:
 
<div class="info-row"><b>Description</b>{{#explode:{{#var:@classinfo}}|<PROP>|6}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:{{#var:@classinfo}}|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:{{#var:@classinfo}}|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:{{#var:@classinfo}}|<PROP>|7}}</div></div>
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:{{#var:@classinfo}}|<PROP>|9}}|,|@@@|@@@|<br>}}</div>
+
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:{{#var:@classinfo}}|<PROP>|9}}|,|@@@|{{#widget:link|href=@@@|text={{#regex:@@@|/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)(.+)/|$1}}|type=a}}|<br>}}</div>
 
<div class="info-row"><b>Link</b>{{#ask:[[Class::Suit]][[Case ID::{{#explode:{{#var:@classinfo}}|<PROP>|3}}]]|format=plainlist}}</div>
 
<div class="info-row"><b>Link</b>{{#ask:[[Class::Suit]][[Case ID::{{#explode:{{#var:@classinfo}}|<PROP>|3}}]]|format=plainlist}}</div>
 
}}<!-- if new -->
 
}}<!-- if new -->
Line 266: Line 266:
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
 
<div class="info-row"><b>Marked truth and lies </b><div class="lie-input">{{#explode:@@@|<PROP>|7}}</div></div>
<div class="info-row"><b>Locations</b>{{#arraymap:{{#explode:@@@|<PROP>|9}}|,|@@@|@@@|<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>
 
<div class="info-row"><b>Screenshot</b>{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Case file]][[Case file::{{#explode:@@@|<PROP>|3}}]]|?=|?Modification date|Format=array|link=none}}|,|@@@|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=attachment  |text={{fa|image}} }}<!--
 
<div class="info-row"><b>Screenshot</b>{{#vardefine:@counter|0}}{{#arraymap:{{#ask:[[Class::Case file]][[Case file::{{#explode:@@@|<PROP>|3}}]]|?=|?Modification date|Format=array|link=none}}|,|@@@|{{#widget:link |type=a|href=#image-modal-{{#var:@counter}} |datatoggle=modal |class=attachment  |text={{fa|image}} }}<!--
  
Line 357: Line 357:
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</div>
 
<div class="info-row"><b>Description</b>{{#explode:@@@|<PROP>|6}}</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>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}}|,|@@@|@@@|<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>|@@@|@@@|,}} }}
 
<div class="d-flex justify-content-center pb-4">
 
<div class="d-flex justify-content-center pb-4">
Line 379: Line 379:
 
{{#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}}, }}{{#ask:[[Class::Member]][[!{{FULLPAGENAME}}]][[!{{{Filed by|}}}]][[Role::Juror]][[!{{#explode:@@@|<PROP>|12}}]][[!{{#explode:@@@|<PROP>|13}}]]{{#arraymap:{{#explode:@@@|<PROP>|11}}|<MANY>|@@@|[[!@@@]]|}}{{#arraymap:{{#explode:@@@|<PROP>|1}}|<MANY>|@@@|[[!@@@]]|}}|Limit={{#expr:{{#explode:@@@|<PROP>|10}} {{#if:{{#arrayprint:new_key}}|- {{#arraysize:new_key}}| - 0 }} }}|format=array|order=random}} }}
+
  -->{{#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:{{#explode:@@@|<PROP>|10}} {{#if:{{#arrayprint:new_key}}|- {{#arraysize:new_key}}| - 0 }}{{#if:{{#arraysize:@countjurors}}|- {{#arraysize:@countjurors}}|- 0}} }} }}{{#ifexpr:{{#var:@limit}} > 0|{{#ask:[[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}}|format=array|order=random}} }}
}}
+
}} }}
 
{{#ifexpr:{{#arraysize:@jurrors}} < {{#explode:@@@|<PROP>|10}}|
 
{{#ifexpr:{{#arraysize:@jurrors}} < {{#explode:@@@|<PROP>|10}}|
 
{{#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 12:38, 19 May 2020


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

{{User
|User=
|Roles=
|Name=
|Filed by=
}}