Skip to content

Commit

Permalink
Merge pull request #2402 from skaut/bootstrap.native-update
Browse files Browse the repository at this point in the history
Updatován bootstrap.native na verzi 4
  • Loading branch information
marekdedic authored Nov 25, 2023
2 parents dacb5fb + 607b3f5 commit 002c711
Show file tree
Hide file tree
Showing 80 changed files with 11,543 additions and 7,563 deletions.
84 changes: 42 additions & 42 deletions app/AccountancyModule/AccountancyHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ public static function loader(string $filter): callable
public static function eventStateLabel(string $s): string
{
if ($s === 'draft') {
return '<span class=\'badge badge-warning\'>Rozpracováno</span>';
return '<span class=\'badge bg-warning text-dark\'>Rozpracováno</span>';
}

if ($s === 'closed') {
return '<span class=\'badge badge-success\'>Uzavřeno</span>';
return '<span class=\'badge bg-success\'>Uzavřeno</span>';
}

return '<span class=\'badge badge-danger\'>Zrušeno</span>';
return '<span class=\'badge bg-danger\'>Zrušeno</span>';

//draft, closed, cancelled
}
Expand All @@ -73,31 +73,31 @@ public static function educationStateLabel(string $s): string
{
switch ($s) {
case 'draft':
return '<span class=\'badge badge-warning\'>Rozpracováno</span>';
return '<span class=\'badge bg-warning text-dark\'>Rozpracováno</span>';

case 'published':
return '<span class=\'badge badge-info\'>Zveřejněno</span>';
return '<span class=\'badge bg-info text-dark\'>Zveřejněno</span>';

case 'confirmed':
return '<span class=\'badge badge-info\'>Potvrzeno vedoucím</span>';
return '<span class=\'badge bg-info text-dark\'>Potvrzeno vedoucím</span>';

case 'waiting':
return '<span class=\'badge badge-info\'>Čeká na schválení</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na schválení</span>';

case 'approved':
return '<span class=\'badge badge-info\'>Schváleno</span>';
return '<span class=\'badge bg-info text-dark\'>Schváleno</span>';

case 'closed':
return '<span class=\'badge badge-success\'>Uzavřeno</span>';
return '<span class=\'badge bg-success\'>Uzavřeno</span>';

case 'rejected':
return '<span class=\'badge badge-danger\'>Potvrzení odmítnuto</span>';
return '<span class=\'badge bg-danger\'>Potvrzení odmítnuto</span>';

case 'disapproved':
return '<span class=\'badge badge-danger\'>Schválení odmítnuto</span>';
return '<span class=\'badge bg-danger\'>Schválení odmítnuto</span>';

default:
return '<span class=\'badge badge-danger\'>Zrušeno</span>';
return '<span class=\'badge bg-danger\'>Zrušeno</span>';
}
}

Expand All @@ -110,56 +110,56 @@ public static function grantStateLabel(string $s): string
{
switch ($s) {
case 'new':
return '<span class=\'badge badge-warning\'>Nová</span>';
return '<span class=\'badge bg-warning text-dark\'>Nová</span>';

case 'unfinished':
return '<span class=\'badge badge-warning\'>Rozpracováno</span>';
return '<span class=\'badge bg-warning text-dark\'>Rozpracováno</span>';

case 'complement':
case 'waitsForAmendation':
return '<span class=\'badge badge-info\'>Čeká na doplnění</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na doplnění</span>';

case 'waitsForAdvanceSend':
return '<span class=\'badge badge-info\'>Čeká na odeslání zálohy</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na odeslání zálohy</span>';

case 'waitsForConfirmation':
return '<span class=\'badge badge-info\'>Čeká na potvrzení</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na potvrzení</span>';

case 'waitsForAuthorization':
return '<span class=\'badge badge-info\'>Čeká na potvrzení RK</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na potvrzení RK</span>';

case 'waitsForDecisionApprove':
return '<span class=\'badge badge-info\'>Čeká na potvrzení rozhodnutí</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na potvrzení rozhodnutí</span>';

case 'waitsForApproval':
return '<span class=\'badge badge-info\'>Čeká na schválení</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na schválení</span>';

case 'waitsForAudit':
return '<span class=\'badge badge-info\'>Čeká na vyúčtování OJ</span>';
return '<span class=\'badge bg-info text-dark\'>Čeká na vyúčtování OJ</span>';

case 'centralCheck':
return '<span class=\'badge badge-info\'>Kontrola ústředím</span>';
return '<span class=\'badge bg-info text-dark\'>Kontrola ústředím</span>';

case 'submitted':
return '<span class=\'badge badge-info\'>Odevzdáno</span>';
return '<span class=\'badge bg-info text-dark\'>Odevzdáno</span>';

case 'confirmed':
return '<span class=\'badge badge-info\'>Potvrzeno</span>';
return '<span class=\'badge bg-info text-dark\'>Potvrzeno</span>';

case 'approved':
return '<span class=\'badge badge-info\'>Schváleno</span>';
return '<span class=\'badge bg-info text-dark\'>Schváleno</span>';

case 'closed':
return '<span class=\'badge badge-success\'>Uzavřeno</span>';
return '<span class=\'badge bg-success\'>Uzavřeno</span>';

case 'running':
return '<span class=\'badge badge-success\'>V realizaci OJ</span>';
return '<span class=\'badge bg-success\'>V realizaci OJ</span>';

case 'denied':
return '<span class=\'badge badge-danger\'>Zamítnuto</span>';
return '<span class=\'badge bg-danger\'>Zamítnuto</span>';

default:
return '<span class=\'badge badge-danger\'>Zrušeno</span>';
return '<span class=\'badge bg-danger\'>Zrušeno</span>';
}
}

Expand All @@ -172,30 +172,30 @@ public static function campStateLabel(string $s): string
{
switch ($s) {
case 'draft':
return '<span class=\'badge badge-warning\'>Rozpracováno</span>';
return '<span class=\'badge bg-warning text-dark\'>Rozpracováno</span>';

case 'approvedParent':
return '<span class=\'badge badge-info\'>Schválený střediskem</span>';
return '<span class=\'badge bg-info text-dark\'>Schválený střediskem</span>';

case 'approvedLeader':
return '<span class=\'badge badge-info\'>Schválený vedoucím</span>';
return '<span class=\'badge bg-info text-dark\'>Schválený vedoucím</span>';

case 'real':
return '<span class=\'badge badge-success\'>Skutečnost odevzdána</span>';
return '<span class=\'badge bg-success\'>Skutečnost odevzdána</span>';

default:
return '<span class=\'badge badge-danger\'>Zrušený</span>';
return '<span class=\'badge bg-danger\'>Zrušený</span>';
}
}

/** @filter */
public static function commandState(DateTimeInterface|null $s): string
{
if ($s === null) {
return '<span class="hidden-xs hidden-sm badge badge-warning">Rozpracovaný</span>';
return '<span class="hidden-xs hidden-sm badge bg-warning text-dark">Rozpracovaný</span>';
}

return '<span class="badge badge-success" title="Uzavřeno dne: ' .
return '<span class="badge bg-success" title="Uzavřeno dne: ' .
$s->format('j.n.Y H:i:s') . '">Uzavřený</span>';
}

Expand All @@ -215,14 +215,14 @@ public static function paymentState(string $state, bool $plural): string
public static function paymentStateLabel(State $s): Html
{
$classes = [
State::PREPARING => 'info',
State::COMPLETED => 'success',
State::CANCELED => 'danger',
State::PREPARING => 'bg-info text-dark',
State::COMPLETED => 'bg-success',
State::CANCELED => 'bg-danger',
];

return Html::el('span')
->setText(self::paymentState($s->toString(), false))
->setAttribute('class', 'badge badge-' . ($classes[$s->toString()] ?? 'secondary'));
->setAttribute('class', 'badge ' . ($classes[$s->toString()] ?? 'secondary'));
}

/**
Expand Down Expand Up @@ -373,10 +373,10 @@ public static function groupState(string $s): string
{
switch ($s) {
case 'open':
return '<span class=\'badge badge-success\'>Otevřená</span>';
return '<span class=\'badge bg-success\'>Otevřená</span>';

case 'closed':
return '<span class=\'badge badge-warning\'>Uzavřená</span>';
return '<span class=\'badge bg-warning text-dark\'>Uzavřená</span>';

default:
throw new ShouldNotHappen(sprintf('Unknown group state "%s"', $s));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
{block dialog-body}
Vyberte tábory, které chcete exportovat.

<div class="mt-2 ml-2">
<div class="mt-2 ms-2">
<div class="form-check mb-1">
<input type="checkbox" class="form-check-input" id="export-check-all"
data-dependent-checkboxes=".export-dependent-checkboxes">
<label for="export-check-all" class="font-weight-bold">Vybrat vše</label>
<label for="export-check-all" class="fw-bold">Vybrat vše</label>
</div>
<form n:name="form" class="export-dependent-checkboxes">
<div class="form-check" n:foreach="$form['campIds']->items as $key => $label">
Expand Down
3 changes: 1 addition & 2 deletions app/AccountancyModule/CampModule/templates/@campsGrid.latte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<span n:tag-if="count($rows) === 0"
title="Nebyly nalezeny žádné tábory"
class="d-inline-block"
data-toggle="tooltip"
data-placement="bottom">
data-bs-toggle="tooltip">
<a href="{plink exportDialog:open!}" n:class="count($rows) === 0 ? disabled, btn, btn-light, ajax, mb-2" data-naja-history="off">
<i class="fas fa-arrow-down"></i>
Exportovat&hellip;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</thead>
<tr n:foreach="$entries as $entry" n:if="$entry->isIncome() === $income">
<td>{$entry->name}</td>
<td class="text-right">
<td class="text-end">
{$entry->total|price}
</td>
</tr>
Expand All @@ -29,14 +29,14 @@
<tr n:foreach="$categoriesSummary as $categorySummary" n:if="$categorySummary->isIncome() === $income && ! $categorySummary->isVirtual()">
{do $balance += (float)$categorySummary->total->getAmount()/100}
<td>{$categorySummary->name}</td>
<td n:class="text-right,text-nowrap, array_key_exists($categorySummary->id, $toRepair) ? bg-danger-lighter"
<td n:class="text-end,text-nowrap, array_key_exists($categorySummary->id, $toRepair) ? bg-danger-lighter"
n:attr="[title => array_key_exists($categorySummary->id, $toRepair) ? 'Částka ve SkautISu je ' . $toRepair[$categorySummary->id]]">
{$categorySummary->total|price}
</td>
</tr>
<tr>
<td><b>Celkem</b></td>
<td class="text-right text-nowrap"><b>{$balance|price}</b></td>
<td class="text-end text-nowrap"><b>{$balance|price}</b></td>
</tr>
</table>
{/define}
Expand Down Expand Up @@ -78,8 +78,6 @@
{include #categoriesTable $categoriesSummary, TRUE}
</div>

<div class="clearfix visible-sm-block"></div>

<div class="col-md-3 col-sm-6 ">
<h3>Předpokl. náklady</h3>
{include #budgetTable $budgetEntries, FALSE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{else}
<div class="mb-2 card" n:if="$isEditable">
<div class="card-body">
<a n:if="$isEditable" href="#importHpd" role="button" data-toggle="modal" class="btn btn-primary">
<a n:if="$isEditable" href="#importHpd" role="button" data-bs-toggle="modal" class="btn btn-primary">
<i class="far fa-user"></i>&nbsp;Načíst příjmy od účastníků
</a>
</div>
Expand All @@ -24,14 +24,14 @@
{/snippet}
</div>
<hr />
<div class="text-right lead mb-sm-2" title="náklady + výnosy">Výsledek hospodaření: {if $finalRealBalance === null}Chybí povolené automatické dopočítávání!{else}{$finalRealBalance|price}{/if}</div>
<div class="text-end lead mb-sm-2" title="náklady + výnosy">Výsledek hospodaření: {if $finalRealBalance === null}Chybí povolené automatické dopočítávání!{else}{$finalRealBalance|price}{/if}</div>

<div id="importHpd" class="modal" tabindex="-1" role="dialog" aria-labelledby="importHpdLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Import příjmů od účastníků</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"> &times; </span></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{control formImportHpd}
Expand Down
Loading

0 comments on commit 002c711

Please sign in to comment.