From 0328d33914340803c0b19c8a8462524779d7b5b8 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sun, 16 Nov 2025 20:58:08 +0000
Subject: [PATCH 1/3] feat: Implement new Bootstrap 4 admin design for
runtemplate
This commit introduces a complete visual redesign of the `runtemplate.php` page, based on a modern Bootstrap 4 admin template.
- Created a new, isolated UI namespace `MultiFlexi\UiII` to allow for a gradual transition without breaking the existing application.
- Implemented a new page layout with a fixed, collapsible sidebar and a top header bar.
- Developed new, modular UI components (`WebPage`, `AppShell`, `Sidebar`, `RunTemplatePage`) to construct the new design.
- Added a test file `runtemplate_new.php` for safe, isolated viewing and testing of the new design.
- Included Font Awesome 6 for icons and implemented interactive elements like a collapsible sidebar and a placeholder for charts.
---
src/MultiFlexi/UiII/AppShell.php | 48 ++++++
src/MultiFlexi/UiII/RunTemplatePage.php | 205 ++++++++++++++++++++++++
src/MultiFlexi/UiII/Sidebar.php | 23 +++
src/MultiFlexi/UiII/WebPage.php | 77 +++++++++
src/runtemplate_new.php | 50 ++++++
5 files changed, 403 insertions(+)
create mode 100644 src/MultiFlexi/UiII/AppShell.php
create mode 100644 src/MultiFlexi/UiII/RunTemplatePage.php
create mode 100644 src/MultiFlexi/UiII/Sidebar.php
create mode 100644 src/MultiFlexi/UiII/WebPage.php
create mode 100644 src/runtemplate_new.php
diff --git a/src/MultiFlexi/UiII/AppShell.php b/src/MultiFlexi/UiII/AppShell.php
new file mode 100644
index 00000000..50b61c2e
--- /dev/null
+++ b/src/MultiFlexi/UiII/AppShell.php
@@ -0,0 +1,48 @@
+ 'app-shell'] + $properties);
+
+ // Vytvoření postranního panelu
+ $this->sidebar = new Sidebar();
+ $this->addItem($this->sidebar);
+
+ // Vytvoření hlavní obsahové oblasti
+ $this->contentArea = $this->addItem(new \Ease\Html\MainTag(null, ['class' => 'content-area']));
+ $this->pageMax = $this->contentArea->addItem(new \Ease\Html\DivTag(null, ['class' => 'page-max']));
+ }
+
+ /**
+ * Přidá obsah do hlavní části stránky.
+ *
+ * @param mixed $content Obsah k přidání.
+ *
+ * @return mixed
+ */
+ public function addContent($content)
+ {
+ return $this->pageMax->addItem($content);
+ }
+}
diff --git a/src/MultiFlexi/UiII/RunTemplatePage.php b/src/MultiFlexi/UiII/RunTemplatePage.php
new file mode 100644
index 00000000..d8f615f4
--- /dev/null
+++ b/src/MultiFlexi/UiII/RunTemplatePage.php
@@ -0,0 +1,205 @@
+addItem($this->createHeader());
+
+ // Filters card
+ $this->addItem($this->createFiltersCard());
+
+ // Table + chart row
+ $row = $this->addItem(new \Ease\TWB4\Row());
+ $col1 = $row->addColumn('12');
+ $col1->addItem($this->createTableCard());
+ $col2 = $row->addColumn('12');
+ $col2->addItem($this->createChartCard());
+
+ // Footer actions
+ $this->addItem($this->createFooterActions());
+
+ // Modal
+ \Ease\TWB4\WebPage::singleton()->body->addItem($this->createDetailModal());
+ }
+
+ private function createHeader()
+ {
+ $header = new \Ease\Html\DivTag(null, ['class' => 'd-flex align-items-center mb-3']);
+ $toggleBtn = '';
+ $header->addItem($toggleBtn . '
Výpisy do Pohody 925 – 5230011904
');
+ $actions = $header->addItem(new \Ease\Html\DivTag(null, ['class' => 'card-header-actions']));
+ $actions->addItem(new \Ease\TWB4\SubmitButton('Spustit', 'primary', ['id' => 'btnRun']));
+ $actions->addItem(new \Ease\TWB4\LinkButton('?refresh=1', 'Obnovit', 'outline-secondary', ['id' => 'btnRefresh']));
+
+ return $header;
+ }
+
+ private function createFiltersCard()
+ {
+ $card = new \Ease\TWB4\Card(null, ['class' => 'mb-3']);
+ $form = '
+ ';
+ $card->addItem(new \Ease\TWB4\CardBody(null, $form));
+
+ return $card;
+ }
+
+ private function createTableCard()
+ {
+ $table = '
+
+
+
+
+ | Datum |
+ Protiúčet / Popis |
+ Variabilní symbol |
+ Částka |
+ Stav |
+ Akce |
+
+
+
+
+ | 13.4.2023 |
+ T-shirt s potiskem |
+ 123456 |
+ -12,00 |
+ Exportováno |
+ |
+
+
+ | 21.3.2023 |
+ Trhovin lenyd |
+ 654321 |
+ -20,00 |
+ Čeká |
+ |
+
+
+ | 31.3.2023 |
+ Počtávea |
+ 987654 |
+ 51,00 |
+ Exportováno |
+ |
+
+
+
+
';
+
+ $card = new \Ease\TWB4\Card(null, ['class' => 'mb-3']);
+ $card->addItem(new \Ease\TWB4\CardBody(null, $table));
+
+ return $card;
+ }
+
+ private function createChartCard()
+ {
+ $chartHeader = '
+
+
Statistiky za období
+
+
+
+
+
+
';
+
+ $chartBody = '';
+ $card = new \Ease\TWB4\Card(null, ['class' => 'chart-card mb-4']);
+ $card->addItem(new \Ease\TWB4\CardBody(null, $chartHeader.$chartBody));
+
+ return $card;
+ }
+
+ private function createFooterActions()
+ {
+ $footer = new \Ease\Html\DivTag(null, ['class' => 'd-flex justify-content-between align-items-center mt-3']);
+ $footer->addItem('Zobrazeno 1–20 z 456 položek
');
+ $footer->addItem('
+ ');
+
+ return $footer;
+ }
+
+ private function createDetailModal()
+ {
+ $modalContent = '
+
+ - ID
+ - 925-5230011904-20230413-1
+ - Datum
+ - 13.4.2023 10:07
+ - Trvání
+ - 0.2s
+ - Výstup
+ - Soubor: výpis-20230413.xml
+
+
+ Log
+
+[INFO] 2023-04-13 10:07: Started...
+[INFO] 2023-04-13 10:07: Exported 12 items
+[ERROR] 2023-04-13 10:07: Missing mapping for account ...
+
';
+
+ $modal = new \Ease\TWB4\Modal(
+ 'Detail běhu',
+ $modalContent,
+ ['id' => 'detailModal', 'size' => 'lg']
+ );
+ $modal->modalFooter->addItem(new \Ease\TWB4\LinkButton('#', 'Stáhnout výstup', 'primary'));
+
+ return $modal;
+ }
+}
diff --git a/src/MultiFlexi/UiII/Sidebar.php b/src/MultiFlexi/UiII/Sidebar.php
new file mode 100644
index 00000000..eade2624
--- /dev/null
+++ b/src/MultiFlexi/UiII/Sidebar.php
@@ -0,0 +1,23 @@
+ 'sidebar d-flex flex-column'] + $properties);
+ $this->addItem(new \Ease\Html\H3Tag('DARAM', ['class' => 'text-danger mb-4']));
+
+ $nav = $this->addItem(new \Ease\Html\NavTag(null, ['class' => 'nav flex-column']));
+ $nav->addItem(new \Ease\Html\ATag('#', ' Dashboard', ['class' => 'nav-link active']));
+ $nav->addItem(new \Ease\Html\ATag('#', ' Runs', ['class' => 'nav-link']));
+ $nav->addItem(new \Ease\Html\ATag('#', ' Logs', ['class' => 'nav-link']));
+ $nav->addItem(new \Ease\Html\ATag('#', ' Statistiky', ['class' => 'nav-link']));
+ $nav->addItem(new \Ease\Html\ATag('#', ' Nastavení', ['class' => 'nav-link']));
+
+ $this->addItem('verze MultiFlexi • lokální
');
+ }
+}
diff --git a/src/MultiFlexi/UiII/WebPage.php b/src/MultiFlexi/UiII/WebPage.php
new file mode 100644
index 00000000..d08f4790
--- /dev/null
+++ b/src/MultiFlexi/UiII/WebPage.php
@@ -0,0 +1,77 @@
+addCss('https://stackpath.bootstrapcdn.com/bootstrap/4.6.2/css/bootstrap.min.css');
+ $this->addCss('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css'); // Font Awesome 6
+ $this->addCss(
+ '
+ html, body { height: 100%; }
+ .app-shell { min-height: 100vh; display: flex; background: #f7f8fa; }
+ .sidebar {
+ width: 220px;
+ background: #fff;
+ border-right: 1px solid #e6e9ef;
+ padding: 1.25rem 0.75rem;
+ position: sticky;
+ top: 0;
+ height: 100vh;
+ transition: margin-left 0.3s, width 0.3s;
+ }
+ .sidebar.collapsed { margin-left: -220px; }
+ .content-area {
+ flex: 1;
+ padding: 1.25rem;
+ display: flex;
+ justify-content: center;
+ transition: margin-left 0.3s;
+ }
+ .content-area.expanded {
+ margin-left: 0;
+ }
+ .page-max { width: 100%; max-width: 1200px; }
+ .card-header-actions { display:flex; gap: 0.5rem; align-items:center; }
+ @media (max-width: 768px) {
+ .sidebar { display:none; }
+ }
+ '
+ );
+
+ // Vytvoření hlavní obálky
+ $this->appShell = new AppShell();
+ $this->body->addItem($this->appShell);
+ }
+
+ /**
+ * Přidá do stránky základní JavaScript.
+ */
+ public function finalize()
+ {
+ // Přidání základních JS souborů na konec
+ $this->addJavaScript('https://code.jquery.com/jquery-3.5.1.slim.min.js', null, true);
+ $this->addJavaScript('https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js', null, true);
+ $this->addJavaScript('https://stackpath.bootstrapcdn.com/bootstrap/4.6.2/js/bootstrap.min.js', null, true);
+ $this->addJavaScript('https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js', null, true);
+
+ parent::finalize();
+ }
+}
diff --git a/src/runtemplate_new.php b/src/runtemplate_new.php
new file mode 100644
index 00000000..03ab562f
--- /dev/null
+++ b/src/runtemplate_new.php
@@ -0,0 +1,50 @@
+appShell->addContent(new RunTemplatePage());
+
+// Přidání JavaScriptu pro graf a sbalování sidebaru
+$page->addJavaScript("
+ // Sample Chart.js config
+ var ctx = document.getElementById('runsChart').getContext('2d');
+ var runsChart = new Chart(ctx, {
+ type: 'line',
+ data: {
+ labels: ['Fri','Mon','Tue','Wed','Thu','Fri','Sat','Tue'],
+ datasets: [{
+ label: 'Běhy',
+ data: [2, 12, 8, 10, 22, 18, 24, 12],
+ fill: false,
+ borderWidth: 2,
+ pointRadius: 3,
+ lineTension: 0.2
+ }]
+ },
+ options: {
+ legend: { display: false },
+ scales: {
+ yAxes: [{ ticks: { beginAtZero: true } }]
+ },
+ responsive: true,
+ maintainAspectRatio: false
+ }
+ });
+
+ // Sidebar toggle logic
+ $(document).on('click', '.sidebar-toggle-btn', function() {
+ $('.sidebar').toggleClass('collapsed');
+ $('.content-area').toggleClass('expanded');
+ });
+");
+
+// Vykreslení stránky do souboru
+file_put_contents('/home/jules/verification/runtemplate.html', $page->draw(false));
From b1f10d63b3a1fca4be17d02bc40715288cee20ca Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sun, 16 Nov 2025 21:00:23 +0000
Subject: [PATCH 2/3] feat: Implement new Bootstrap 4 admin design for
runtemplate
This commit introduces a complete visual redesign of the `runtemplate.php` page, based on a modern Bootstrap 4 admin template.
- Created a new, isolated UI namespace `MultiFlexi\UiII` to allow for a gradual transition without breaking the existing application.
- Implemented a new page layout with a fixed, collapsible sidebar and a top header bar.
- Developed new, modular UI components (`WebPage`, `AppShell`, `Sidebar`, `RunTemplatePage`) to construct the new design.
- Added a test file `runtemplate_new.php` for safe, isolated viewing and testing of the new design.
- Included Font Awesome 6 for icons and implemented interactive elements like a collapsible sidebar and a placeholder for charts.
From 32f263c16ea279b62085d8f64c225dd187bbe815 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=C4=9Bzslav=20Dvo=C5=99=C3=A1k?=
Date: Sun, 16 Nov 2025 23:07:46 +0100
Subject: [PATCH 3/3] fix: Update CardBody instantiation to remove null
parameters in RunTemplatePage
---
src/MultiFlexi/UiII/RunTemplatePage.php | 6 +++---
src/MultiFlexi/UiII/WebPage.php | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/MultiFlexi/UiII/RunTemplatePage.php b/src/MultiFlexi/UiII/RunTemplatePage.php
index d8f615f4..1467198b 100644
--- a/src/MultiFlexi/UiII/RunTemplatePage.php
+++ b/src/MultiFlexi/UiII/RunTemplatePage.php
@@ -80,7 +80,7 @@ private function createFiltersCard()
';
- $card->addItem(new \Ease\TWB4\CardBody(null, $form));
+ $card->addItem(new \Ease\TWB4\CardBody($form));
return $card;
}
@@ -130,7 +130,7 @@ private function createTableCard()
';
$card = new \Ease\TWB4\Card(null, ['class' => 'mb-3']);
- $card->addItem(new \Ease\TWB4\CardBody(null, $table));
+ $card->addItem(new \Ease\TWB4\CardBody($table));
return $card;
}
@@ -149,7 +149,7 @@ private function createChartCard()
$chartBody = '';
$card = new \Ease\TWB4\Card(null, ['class' => 'chart-card mb-4']);
- $card->addItem(new \Ease\TWB4\CardBody(null, $chartHeader.$chartBody));
+ $card->addItem(new \Ease\TWB4\CardBody($chartHeader.$chartBody));
return $card;
}
diff --git a/src/MultiFlexi/UiII/WebPage.php b/src/MultiFlexi/UiII/WebPage.php
index d08f4790..13b165db 100644
--- a/src/MultiFlexi/UiII/WebPage.php
+++ b/src/MultiFlexi/UiII/WebPage.php
@@ -64,7 +64,7 @@ public function __construct($pageTitle = null)
/**
* Přidá do stránky základní JavaScript.
*/
- public function finalize()
+ public function finalize(): void
{
// Přidání základních JS souborů na konec
$this->addJavaScript('https://code.jquery.com/jquery-3.5.1.slim.min.js', null, true);