Review printing

This commit is contained in:
Claude Brisson
2024-06-17 12:09:56 +02:00
parent 8adbaf014f
commit d4a937a2f6
8 changed files with 117 additions and 31 deletions

View File

@@ -2,6 +2,8 @@
VERSION=$(grep '<version>' pom.xml | head -1 | egrep -o '[0-9.]+') VERSION=$(grep '<version>' pom.xml | head -1 | egrep -o '[0-9.]+')
echo Installing Pairgoth version $VERSION
mvn -DskipTests=true install mvn -DskipTests=true install
if [ !-f "$HOME/.m2/repository/org/jeudego/pairgoth/pairgoth-common/$VERSION/pairgoth-common-$VERSION.jar" ] if [ !-f "$HOME/.m2/repository/org/jeudego/pairgoth/pairgoth-common/$VERSION/pairgoth-common-$VERSION.jar" ]

View File

@@ -520,6 +520,10 @@
@media print { @media print {
@page {
size: A4;
}
body { body {
width: unset; width: unset;
height: unset; height: unset;
@@ -527,6 +531,14 @@
overflow: visible; overflow: visible;
} }
#center #inner > .section {
margin: 0 0.5em;
}
#players-list {
max-width: 98vw;
}
.roundbox { .roundbox {
border: none; border: none;
} }
@@ -537,7 +549,7 @@
margin-top: 0.1em !important; margin-top: 0.1em !important;
} }
#logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle, #overview { #header, #logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle, #overview {
display: none !important; display: none !important;
} }
@@ -545,6 +557,10 @@
overflow-y: hidden; overflow-y: hidden;
} }
#paired {
display: none !important;
}
body { body {
&.nogame { &.nogame {
#pairables { #pairables {
@@ -558,22 +574,17 @@
top: 0; top: 0;
} }
} }
#print-pairings {
#paired {
display: none !important; display: none !important;
} }
} }
&:not(.nogame) { &:not(.nogame) {
#paired { #print-pairings {
max-height: unset !important; display: table;
max-width: unset !important; .left {
font-size: 1rem !important; text-align: left;
line-height: 1.1rem !important;
min-width: 60vw;
&::before {
top: 0;
} }
} }
@@ -596,7 +607,7 @@
font-size: 1.4rem; font-size: 1.4rem;
line-height: 1.5rem; line-height: 1.5rem;
height: 24vh; height: 24vh;
border-bottom: 1px dotted gray; border-bottom: 2px dotted gray;
display: flex; display: flex;
flex-flow: column nowrap; flex-flow: column nowrap;
justify-content: space-evenly; justify-content: space-evenly;
@@ -664,11 +675,21 @@
color: black !important; color: black !important;
} }
.participation .ui.label { #participation-stats {
display: none;
}
#players-list tr > :first-child {
display: none;
}
#players-list #players .participation .ui.label {
background: none; background: none;
border: none; border: none;
font-weight: bold; font-size: 1rem !important;
min-width: unset; min-width: unset !important;
min-height: unset !important;
padding: 0 !important;
&.red { &.red {
color: rgba(0,0,0,0); color: rgba(0,0,0,0);
text-decoration: solid line-through black; text-decoration: solid line-through black;
@@ -678,12 +699,37 @@
} }
} }
table { border-top: none; } table {
table tr td, table tr th { page-break-inside:avoid; } border-top: none;
table thead th { font-size: 1rem;
border-top: 1px solid rgba(34, 36, 38, .1); font-weight: bold;
tr td, tr th {
page-break-inside:avoid;
height: 2em;
}
thead {
display:table-header-group;
th {
border-top: 1px solid rgba(34, 36, 38, .1);
&:after {
display: none;
}
}
} }
thead { display:table-header-group; }
tfoot { display:table-footer-group; } tfoot { display:table-footer-group; }
} }
#results-table td.looser {
font-weight: normal;
}
#print-pairings table {
font-size: 1.2rem;
}
#pairing-round, #results-round, #standings-round {
font-size: 1.1rem;
}
#standings-table {
font-size: 0.70rem;
}
}
} }

View File

@@ -99,13 +99,13 @@
background-color: #D0FFD0; background-color: #D0FFD0;
} }
.participation { .participation {
white-space: nowrap; /* white-space: nowrap; */
.ui.label { .ui.label {
cursor: pointer; cursor: pointer;
font-size: 0.8rem; font-size: 0.8rem;
min-width: 2em; min-width: 2em;
min-height: 2em; min-height: 2em;
padding: .5em !important; padding: .5em;
line-height: 1em; line-height: 1em;
text-align: center; text-align: center;
border-radius: 500rem; border-radius: 500rem;
@@ -360,7 +360,14 @@
width: 6em; width: 6em;
} }
} }
}
#print-pairables {
width: 100%;
display: none;
}
#print-pairings {
width: 100%;
display: none;
} }
.pairing-buttons { .pairing-buttons {
display: flex; display: flex;

View File

@@ -91,7 +91,7 @@ Preliminary only Inscriptions préliminaires
Publish Publier Publish Publier
Publish standings Publier le classement Publish standings Publier le classement
Rank Niveau Rank Niveau
Rating Classement Rating Class.
Reg Inscr. Reg Inscr.
Register Inscrire Register Inscrire
Registration Inscriptions Registration Inscriptions

View File

@@ -27,7 +27,11 @@
#stop #stop
#end #end
#set($games = $utils.removeBye($roundPairing.games)) #set($games = $utils.removeBye($roundPairing.games))
#foreach($game in $games) #set($pages = ($games.size() + 3) / 4)
#foreach($i in [1..$games.size()])
#set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages)
#if($j < $games.size())
#set($game = $games[$j])
#set($white = $pmap[$game.w]) #set($white = $pmap[$game.w])
#set($black = $pmap[$game.b]) #set($black = $pmap[$game.b])
#if($foreach.index % 4 == 0) #if($foreach.index % 4 == 0)
@@ -36,7 +40,7 @@
<div class="page-item"> <div class="page-item">
<div class="title">$tour.name</div> <div class="title">$tour.name</div>
<div class="subtitle">Result sheet</div> <div class="subtitle"></div>
<div class="details"> <div class="details">
<div>Table $game.t</div> <div>Table $game.t</div>
#set($komi = $tour.komi) #set($komi = $tour.komi)
@@ -71,6 +75,7 @@
</div> </div>
#end #end
#end #end
#end
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
onLoad(() => { onLoad(() => {

View File

@@ -58,7 +58,7 @@
#set($white = $pmap[$game.w]) #set($white = $pmap[$game.w])
#set($black = $pmap[$game.b]) #set($black = $pmap[$game.b])
<div class="listitem game" data-id="$game.id"> <div class="listitem game" data-id="$game.id">
<div class="table" data-value="$game.t">#$game.t</div> <div class="table" data-value="$game.t">${game.t}.</div>
<div class="white" data-id="$game.w">#if($white)$white.name#if($white.firstname) $white.firstname#end#{else}BIP#end</div> <div class="white" data-id="$game.w">#if($white)$white.name#if($white.firstname) $white.firstname#end#{else}BIP#end</div>
<div class="levels">#if($white)#rank($white.rank)#end&nbsp;/&nbsp;#if($black)#rank($black.rank)#end</div> <div class="levels">#if($white)#rank($white.rank)#end&nbsp;/&nbsp;#if($black)#rank($black.rank)#end</div>
<div class="black" data-id="$game.b">#if($black)$black.name#if($black.firstname) $black.firstname#end#{else}BIP#end</div> <div class="black" data-id="$game.b">#if($black)$black.name#if($black.firstname) $black.firstname#end#{else}BIP#end</div>
@@ -71,6 +71,32 @@
</div> </div>
</div> </div>
</div> </div>
#if($games.size())
<div id="print-pairings">
<table class="ui striped table">
<thead>
<tr>
<th>Tbl</th>
<th>White</th>
<th>Black</th>
<th>Hd</th>
</tr>
</thead>
<tbody>
#foreach($game in $games)
#set($white = $pmap[$game.w])
#set($black = $pmap[$game.b])
<tr>
<td>${game.t}</td>
<td class="left">#if($white)${white.name} ${white.firstname} (#rank($white.rank), $white.country $white.club)#{else}BIP#end</td>
<td class="left">#if($black)${black.name} ${black.firstname} (#rank($black.rank), $black.country $black.club)#{else}BIP#end</td>
<td>${game.h}</td>
</tr>
#end
</tbody>
</table>
</div>
#end
</div> </div>
<div id="edit-pairing" class="popup"> <div id="edit-pairing" class="popup">

View File

@@ -20,7 +20,7 @@
<option value="final">Final only</option> <option value="final">Final only</option>
</select> </select>
</div> </div>
<div> <div id="participation-stats">
$parts.size() participants, $utils.countFinals($parts) confirmed. $parts.size() participants, $utils.countFinals($parts) confirmed.
</div> </div>
</div> </div>

View File

@@ -29,7 +29,7 @@
#set($black = $pmap[$game.b]) #set($black = $pmap[$game.b])
#if($black && $white) #if($black && $white)
<tr id="result-$game.id" data-id="$game.id"> <tr id="result-$game.id" data-id="$game.id">
<td data-sort="$game.t">#$game.t</td> <td data-sort="$game.t">${game.t}.</td>
<td class="white player #if($game.r == 'w' || $game.r == '#') winner #elseif($game.r == 'b' || $game.r == '0') looser #end" data-id="$white.id" data-sort="$white.name#if($white.firstname) $white.firstname#end"><span>#if($white)$white.name#if($white.firstname) $white.firstname#end #rank($white.rank)#{else}BIP#end</span></td> <td class="white player #if($game.r == 'w' || $game.r == '#') winner #elseif($game.r == 'b' || $game.r == '0') looser #end" data-id="$white.id" data-sort="$white.name#if($white.firstname) $white.firstname#end"><span>#if($white)$white.name#if($white.firstname) $white.firstname#end #rank($white.rank)#{else}BIP#end</span></td>
<td class="black player #if($game.r == 'b' || $game.r == '#') winner #elseif($game.r == 'w' || $game.r == '0') looser #end" data-id="$black.id" data-sort="$black.name#if($black.firstname) $black.firstname#end"><span>#if($black)$black.name#if($black.firstname) $black.firstname#end #rank($black.rank)#{else}BIP#end</span></td> <td class="black player #if($game.r == 'b' || $game.r == '#') winner #elseif($game.r == 'w' || $game.r == '0') looser #end" data-id="$black.id" data-sort="$black.name#if($black.firstname) $black.firstname#end"><span>#if($black)$black.name#if($black.firstname) $black.firstname#end #rank($black.rank)#{else}BIP#end</span></td>
<td class="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td> <td class="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td>