Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updatován bootstrap.native na verzi 4 #2402

Merged
merged 41 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1724b79
Updated bootstrap to v5
marekdedic Oct 14, 2023
15378aa
Removed obsolete bootstrap-theme
marekdedic Oct 14, 2023
12f1d9a
Removed unused bootstrap-select
marekdedic Oct 14, 2023
cb2013a
Removed unused bootstrap-datetimepicker
marekdedic Oct 14, 2023
40b0e67
custom-select -> form-select
marekdedic Oct 14, 2023
c326ded
Removed unneeded input-group-append
marekdedic Oct 14, 2023
c132199
Removed unneeded input-group-prepend
marekdedic Oct 14, 2023
f558cca
Fixed badge background styles
marekdedic Oct 14, 2023
9975d5b
Fixed close button styles
marekdedic Oct 14, 2023
e85a7f7
float-right -> float-end
marekdedic Oct 14, 2023
d1445bd
ml- -> ms-
marekdedic Oct 14, 2023
d1934f3
mr- -> me-
marekdedic Oct 14, 2023
c8022de
pl- -> ps-
marekdedic Oct 14, 2023
abdf852
pr- -> pe-
marekdedic Oct 14, 2023
bfd484c
text-right -> text-end
marekdedic Oct 14, 2023
0b0e9cb
font-weight- -> fw-
marekdedic Oct 14, 2023
e12dd1a
Fixed tooltip placement
marekdedic Oct 15, 2023
4d8ceec
Removed data-placement
marekdedic Oct 15, 2023
5fa06b3
Removed data-autocomplete
marekdedic Oct 15, 2023
3f2000f
Using data-ts-toggle
marekdedic Oct 15, 2023
f088d7b
Updated carousel
marekdedic Oct 15, 2023
df96a64
Replaced form-inline
marekdedic Oct 15, 2023
99bed78
Replaced form-row
marekdedic Oct 15, 2023
d65d5bd
Eliminated rest of form classes
marekdedic Oct 15, 2023
42eb7ce
Bootstrap5FormRenderer rename
marekdedic Oct 15, 2023
f8a5cdc
Fixed event info spacing
marekdedic Oct 15, 2023
4c26ddf
Restored link underlining behaviour of Bootstrap 4
marekdedic Oct 15, 2023
5f07341
Fixed camp budget layout
marekdedic Oct 15, 2023
bf87949
Fixed too wide chit button
marekdedic Oct 15, 2023
b35126a
Limited link underlining to tables
marekdedic Oct 15, 2023
a1797a7
Partially fixed carousel
marekdedic Oct 15, 2023
77561d6
Fixed spacing under carousel
marekdedic Oct 15, 2023
23dd112
Updated education top bar beta badge to use bootstrap v5
marekdedic Nov 15, 2023
8942f8b
Added acceptance test waits
marekdedic Nov 23, 2023
6c065d5
Updated bootstrap.native to v3
marekdedic Oct 17, 2023
c2cd419
Updated bootstrap.native to v4
marekdedic Oct 17, 2023
8b9a6ab
Updated data attributes for bootstrap.native v4
marekdedic Oct 18, 2023
437677b
Removed obsolete data-persist
marekdedic Oct 18, 2023
b8aa8b6
Fixed carousel
marekdedic Oct 18, 2023
10be76f
Added missing comment icon
marekdedic Nov 24, 2023
607b3f5
Fixed datagrid settings dropdown direction
marekdedic Nov 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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} Kč{/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} Kč{/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
Loading