|
|
Line 23: |
Line 23: |
| {{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}} | | {{#vardefine:@allowed|{{#ifeq:User:{{CURRENTLOGGEDUSER}}|{{FULLPAGENAME}}|Yes|{{#ifsysop:Yes|No}}}}}} |
| {{#ifeq:{{#var:@allowed}}|Yes|<div class="row mt-4"> | | {{#ifeq:{{#var:@allowed}}|Yes|<div class="row mt-4"> |
− | <div class="col-12 col-lg-8 mt-4"> | + | <div class="col-12 col-lg-8"> |
| {{#ifeq:{{#urlget:msg}}|casestarted|<div class="alert alert-success">Case started! Please check your messages for the required actions.</div>}} | | {{#ifeq:{{#urlget:msg}}|casestarted|<div class="alert alert-success">Case started! Please check your messages for the required actions.</div>}} |
− | <div class="row"> | + | <div class="tab-content box"><h2>Member information</h2> |
− | <div class="profile-img col-2 d-lg-block d-none"> | |
− | {{fa|user}}
| |
− | </div> | |
− | <div class="col-12 col-lg-10">
| |
− | <div class="ml-lg-4 tab-content">
| |
| <div id="info-tab" class="tab-pane fade show active" role="tabpanel" aria-labelledby="info-tab"> | | <div id="info-tab" class="tab-pane fade show active" role="tabpanel" aria-labelledby="info-tab"> |
| {{Item responsive |Cols={{#var:@cols|4-8}} | | {{Item responsive |Cols={{#var:@cols|4-8}} |
Line 62: |
Line 57: |
| }} | | }} |
| </div> | | </div> |
− | </div> | + | </div><div class="box"> |
− | </div>
| + | <h2>Active in {{#vardefine:@nrcases|{{#ask:[[Class::Participant]][[User::{{FULLPAGENAME}}]]|format=count}} }}{{#var:@nrcases}} {{#ifeq:{{#var:@nrcases}}|1|case|cases}}</h2> |
− | </div> | |
− | <h2>Active in cases:</h2> | |
| | | |
| {{Item responsive |Cols={{#var:@cols|8-4}} | | {{Item responsive |Cols={{#var:@cols|8-4}} |
Line 77: |
Line 70: |
| }} | | }} |
| | | |
− | |}} | + | |}}</div> |
| </div> | | </div> |
| <div class="col-12 col-lg-4"> | | <div class="col-12 col-lg-4"> |
Line 83: |
Line 76: |
| <h2>TruthTokens</h2><div id="balance"> | | <h2>TruthTokens</h2><div id="balance"> |
| <!-- | | <!-- |
− | -->{{#vardefine:@spent|{{#ask:[[Class::Workflow]][[Filed by::{{FULLPAGENAME}}]]|link=none|format=count}} }}<!--
| + | -->{{#vardefine:@balance|{{#ttcount:}} }} |
− | -->{{#vardefine:@bought|{{#arraymap:{{#ask:[[Class::Order]][[User::{{FULLPAGENAME}}]][[Transaction::+]]|?Tokens|format=array|link=none}}|,|@@@|{{#explode:@@@|<PROP>|1}}|+}} }}<!--
| + | <span class="truth-token">{{fa|gavel}}</span>× <span class="nr">{{#var:@balance}}</span> |
− | -->{{#vardefine:@sent|{{#arraymap:{{#ask:[[Class::Transaction]][[User::{{FULLPAGENAME}}]][[To::!None]]|?Tokens|link=none|format=array}}|,|@@@|{{#explode:@@@|<PROP>|1}}|+}} }}<!--
| |
− | -->{{#vardefine:@recieved|{{#arraymap:{{#ask:[[Class::Transaction]][[To::{{FULLPAGENAME}}]]|?Tokens|link=none|format=array}}|,|@@@|{{#explode:@@@|<PROP>|1}}|+}} }}<!--
| |
− | -->{{#vardefine:@balance|{{#expr:{{#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}} }} }} + 1 }} }} | |
− | <span class="truth-token">{{fa|gavel}}</span>× <span class="nr">{{#var:@balance}}</span> {{#tag:wsfield|Buy more|type=button|onclick=buyMore()|class=btn ml-4 btn-green|id=buy-more-button}}</div> | |
− | {{#tag:wsfield|Send to a friend|type=button|onclick=sendTokens()|class=btn d-none|id=send-tokens}}
| |
− | <div id="buy-more" class="d-none">
| |
− | <wsform action="addToWiki" >
| |
− | {{#tag:wscreate||mwwrite=Order/|mwtemplate=Order|mwoption=range:00001-99999|mwfollow=true}}
| |
− | <div><span class="truth-token">{{fa|gavel}}</span>× <wsfield type="number" min="1" class="form-control form-number" name="Tokens" value="1" /></div>
| |
− | <wsfield type="hidden" name="Email" value="{{{Email|}}}" />
| |
− | <wsfield type="hidden" name="Name" value="{{{Name|}}}" />
| |
− | <wsfield type="hidden" name="User" value="{{FULLPAGENAME}}" />
| |
− | {{#vardefine:@payid|{{#ask:[[Class::Order]][[User::{{FULLPAGENAME}}]][[Transaction::+]][[Paytrace validated customer id::+]]|?Paytrace validated customer id|limit=1|link=none|pagetitle=hide|format=plainlist|headers=hide|mainlabel=-|searchlabel=}} }}
| |
− | {{#if:{{#var:@payid}}|<wsfield type="hidden" name="Paytrace validated customer id" value="{{#var:@payid}}" />}}
| |
− | <div class="total-token-price">Total $ <span id="total-price" >200</span>,-</div>
| |
− | <!--{{#widget:Pay}}-->
| |
− | <wsfield type="submit" value="buy" class="btn btn-green " />
| |
− | </wsform>
| |
| </div> | | </div> |
− | <div id="send-tokens-form" class="d-none"> | + | </div> |
− | <wsform action="addToWiki" >
| |
− | {{#tag:wscreate||mwwrite=Transaction/|mwtemplate=Transaction|mwoption=range:00001-99999|mwfollow=true}}
| |
− | <div><span class="truth-token">{{fa|gavel}}</span>× <wsfield type="number" min="1" max="{{#var:@balance}}" class="form-control form-number" name="Tokens" value="1" /></div>
| |
− | <wsfield type="hidden" name="User" value="{{FULLPAGENAME}}" />
| |
− | <wsfield type="text" name="To" placeholder="User:name" class="form-control mt-4 mb-4" />
| |
− | <!--{{#widget:Pay}}-->
| |
− | <wsfield type="submit" value="send" class="btn btn-green " />
| |
− | </wsform>
| |
− | </div>
| |
− | <div id="result"></div><!--{{Payment form|
| |
− | |Billing name={{{Name|}}}
| |
− | |Billing email={{{Email|}}}
| |
− | |Price=200
| |
− | }}--></div>
| |
| <div class="info-box"> | | <div class="info-box"> |
| <h2>Messages</h2> | | <h2>Messages</h2> |
Line 365: |
Line 326: |
| </div> | | </div> |
| </div> | | </div> |
− |
| |
− | <div class="row" >
| |
− | <div class="col-6">{{#ask:[[Class::Participant]][[User::{{FULLPAGENAME}}]][[Role::+]]
| |
− | |?Role
| |
− | |mainlabel=-
| |
− | |format=jqplotchart
| |
− | |charttype=pie
| |
− | |chartlegend=e
| |
− | |distribution=yes
| |
− | |distributionsort=desc
| |
− | |background=none
| |
− | |colorscheme=blues}}</div>
| |
− | <div class="col-6">{{#arraydefine:@cases|{{#ask:[[Class::Participant]][[User::{{FULLPAGENAME}}]][[Workflow.Lie::+]]}} }} Participant in {{#arraysize:@cases}} case{{#ifexpr:{{#arraysize:@cases}} > 1|s}}{{#ask:[[Class::Participant]][[User::{{FULLPAGENAME}}]][[Workflow.Lie::+]]
| |
− | |?Workflow.Lie
| |
− | |mainlabel=-
| |
− | |format=jqplotchart
| |
− | |charttype=pie
| |
− | |chartlegend=e
| |
− | |distribution=yes
| |
− | |distributionsort=desc
| |
− | |background=none
| |
− | |colorscheme=purples}}</div>
| |
− | </div>
| |
− |
| |
− |
| |
| {{#tag:html|<script> | | {{#tag:html|<script> |
| function openInput(name, elem){ | | function openInput(name, elem){ |