forked from coding-blocks/boss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Feature : conflicting claims : Fixes coding-blocks#260
- Loading branch information
1 parent
857e507
commit 6ad5b9f
Showing
3 changed files
with
168 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,116 @@ | ||
<div class="four wide item"> | ||
<div class="image"> | ||
<div class="ui statistic"> | ||
<div class="value"> | ||
{{claim.bounty}} | ||
</div> | ||
<div class="label"> | ||
BOUNTY POINTS | ||
</div> | ||
</div> | ||
</div> | ||
<div class="middle aligned content"> | ||
<a class="header">{{claim.user}}</a> | ||
<div class="meta"> | ||
<span>{{claim.repo}}</span> | ||
</div> | ||
<div class="description"> | ||
<p> | ||
Issue : <a href="{{claim.issueUrl}}">{{claim.issueUrl}}</a> | ||
</p> | ||
<p> | ||
Pull : <a href="{{claim.pullUrl}}">{{claim.pullUrl}}</a> | ||
</p> | ||
</div> | ||
<div class="extra"> | ||
{{#equal claim.status "claimed"}} | ||
<div class="ui label yellow">{{claim.status}}</div> | ||
{{/equal}} | ||
{{#equal claim.status "accepted"}} | ||
<div class="ui label green">{{claim.status}}</div> | ||
{{/equal}} | ||
{{#equal claim.status "rejected"}} | ||
<div class="ui label red">{{claim.status}}</div> | ||
{{/equal}} | ||
</div> | ||
</div> | ||
<form class="ui form" style="padding: 3em" method="post" action="/claims/{{claim.id}}/update"> | ||
<div class="four wide field"> | ||
<label>Final Bounty Points</label> | ||
<input name="bounty" value="{{claim.bounty}}"> | ||
<label>Update Status</label> | ||
<select name="status" class="ui dropdown" id="status"> | ||
<option value="claimed">Claimed</option> | ||
<option value="rejected">Rejected</option> | ||
<option value="accepted">Accepted</option> | ||
<option value="disputed">Disputed</option> | ||
<option value="revoked">Revoked</option> | ||
</select> | ||
</div> | ||
<div class="ui container"> | ||
<div class="ui two column grid"> | ||
<div class="column"> | ||
<div class="four wide item"> | ||
<div class="image"> | ||
<div class="ui statistic"> | ||
<div class="value"> | ||
{{claim.bounty}} | ||
</div> | ||
<div class="label"> | ||
BOUNTY POINTS | ||
</div> | ||
</div> | ||
</div> | ||
<div class="middle aligned content"> | ||
<a class="header">{{claim.user}}</a> | ||
<div class="meta"> | ||
<span>{{claim.repo}}</span> | ||
</div> | ||
<div class="description"> | ||
<p> | ||
Issue : <a href="{{claim.issueUrl}}">{{claim.issueUrl}}</a> | ||
</p> | ||
<p> | ||
Pull : <a href="{{claim.pullUrl}}">{{claim.pullUrl}}</a> | ||
</p> | ||
</div> | ||
<div class="extra"> | ||
{{#equal claim.status "claimed"}} | ||
<div class="ui label yellow">{{claim.status}}</div> | ||
{{/equal}} | ||
{{#equal claim.status "accepted"}} | ||
<div class="ui label green">{{claim.status}}</div> | ||
{{/equal}} | ||
{{#equal claim.status "rejected"}} | ||
<div class="ui label red">{{claim.status}}</div> | ||
{{/equal}} | ||
</div> | ||
</div> | ||
<form class="ui form" style="padding: 3em" method="post" action="/claims/{{claim.id}}/update"> | ||
<div class="four wide field"> | ||
<label>Final Bounty Points</label> | ||
<input name="bounty" value="{{claim.bounty}}"> | ||
<label>Update Status</label> | ||
<select name="status" class="ui dropdown" id="status"> | ||
<option value="claimed">Claimed</option> | ||
<option value="rejected">Rejected</option> | ||
<option value="accepted">Accepted</option> | ||
<option value="disputed">Disputed</option> | ||
<option value="revoked">Revoked</option> | ||
</select> | ||
</div> | ||
|
||
<label>Reason </label> | ||
<textarea name="reason" id="reason"> {{claim.reason}} </textarea> | ||
<br /> | ||
<button class="ui button green" type="submit">Submit</button> | ||
|
||
<label>Reason </label> | ||
<textarea name="reason" id="reason"> {{claim.reason}} </textarea> | ||
<br/> | ||
<button class="ui button green" type="submit">Submit</button> | ||
|
||
</form> | ||
<script> | ||
</form> | ||
<script> | ||
$('select.dropdown').dropdown(); | ||
$('select.dropdown').dropdown(); | ||
{ {#unless claim.reason } } | ||
$('#reason').hide(); | ||
{ | ||
{ | ||
/unless}} | ||
{{#unless claim.reason}} | ||
$('#reason').hide(); | ||
{{/unless}} | ||
$('select').on('change', function (e) { | ||
let status = $('#status option:selected').text(); | ||
if (['Rejected', 'Disputed', 'Revoked'].includes(status)) | ||
$('#reason').show(); | ||
else | ||
$('#reason').html('').hide(); | ||
$('select').on('change', function (e){ | ||
let status = $('#status option:selected').text(); | ||
if( ['Rejected' , 'Disputed' , 'Revoked'].includes(status) ) | ||
$('#reason').show(); | ||
else | ||
$('#reason').html('').hide(); | ||
}); | ||
}); | ||
</script> | ||
</div> | ||
</div> | ||
<div class="column"> | ||
<h2>Conflicts</h2> | ||
{{#if conflicts}} | ||
This following claims collides with the current claim | ||
<div class="ui two column grid"> | ||
{{#conflicts}} | ||
<div class="column"> | ||
<div class="ui fluid card"> | ||
<div class="content"> | ||
<div class="header">Claim ID : {{id}}</div> | ||
<div class="meta">Bounty : {{bounty}}</div> | ||
<div class="meta">By : {{user}}</div> | ||
<div class="description"> | ||
<div class="ui two column grid"> | ||
<div class="column"> | ||
<a href="{{issueUrl}}">View Issue</a> | ||
</div> | ||
<div class="column"> | ||
<a href="{{pullUrl}}">View PR</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</script> | ||
</div> | ||
</div> | ||
</div> | ||
{{/conflicts}} | ||
</div> | ||
{{else}} | ||
There are no conflicting claims | ||
{{/if}} | ||
</div> | ||
</div> | ||
</div> |