Game edition ok, and other minor tweaks

This commit is contained in:
Claude Brisson
2024-01-19 05:43:07 +01:00
parent 897246c7a6
commit cffa4ce699
9 changed files with 131 additions and 14 deletions

View File

@@ -52,11 +52,11 @@
#set($white = $pmap[$game.w])
#set($black = $pmap[$game.b])
<div class="listitem game" data-id="$game.id">
<div class="table">#$game.t</div>
<div class="white">#if($white)$white.name $white.firstname#{else}BIP#end</div>
<div class="table" data-value="$game.t">#$game.t</div>
<div class="white" data-id="$game.w">#if($white)$white.name $white.firstname#{else}BIP#end</div>
<div class="levels">#if($white)#rank($white.rank)#end&nbsp;/&nbsp;#if($black)#rank($black.rank)#end</div>
<div class="black">#if($black)$black.name $black.firstname#{else}BIP#end</div>
<div class="handicap">#if($game.h)h$game.h#{else}&nbsp;#end</div>
<div class="black" data-id="$game.b">#if($black)$black.name $black.firstname#{else}BIP#end</div>
<div class="handicap" data-value="$game.h">#if($game.h)h$game.h#{else}&nbsp;#end</div>
</div>
#end
</div>
@@ -64,3 +64,52 @@
</div>
</div>
</div>
<div id="edit-pairing" class="popup">
<div class="popup-body">
<form id="pairing-form" class="ui form edit">
<input type="hidden" name="id"/>
<div class="popup-content">
<div class="inline fields">
<div class="field">
<label>Tbl</label>
<span class="nobreak">#<input name="t" type="number"/></span>
</div>
<div class="field">
<label>White</label>
<input type="hidden" name="w"/>
<div id="edit-pairing-white"></div>
</div>
<div class="field">
<button id="pairing-exchange" type="button" class="ui icon button">
<i class="fa fa-exchange"></i>
</button>
</div>
<div class="field">
<label>Black</label>
<input type="hidden" name="b"/>
<div id="edit-pairing-black"></div>
</div>
<div class="field">
<label>Hd</label>
<select name="h">
#foreach($h in [0..9])
<option value="$h">$h</option>
#end
</select>
</div>
</div>
</div>
<div class="popup-footer">
<button id="cancel-pairing" type="button" class="ui gray right labeled icon floating close button">
<i class="times icon"></i>
Cancel
</button>
<button id="update-pairing" type="button" class="ui green right labeled icon floating button">
<i class="check icon"></i>
Update
</button>
</div>
</form>
</div>
</div>