diff --git a/_class/class_camp.php b/_class/class_camp.php index 24a41eb..d0437a2 100644 --- a/_class/class_camp.php +++ b/_class/class_camp.php @@ -169,9 +169,9 @@ class camp * * @return mixed */ - public function get_camp_from() + public function get_camp_from($_formatted = false) { - return $this->camp_from; + return !$_formatted ? $this->camp_from : date('Y. m. d.', strtotime($this->camp_from)); } public function get_camp_from_day() @@ -213,9 +213,9 @@ class camp * * @return mixed */ - public function get_camp_to() + public function get_camp_to($_formatted = false) { - return $this->camp_to; + return !$_formatted ? $this->camp_to : date('Y. m. d.', strtotime($this->camp_to)); } /** @@ -378,19 +378,19 @@ class camp { global $sql; - if ("" === $_name) { + if ('' === $_name) { $_name = 'null'; } - if ("" === $_count) { + if ('' === $_count) { $_count = 'null'; } - if ("" === $_price) { + if ('' === $_price) { $_price = 'null'; } - if ("" === $_info) { + if ('' === $_info) { $_info = 'null'; } @@ -413,19 +413,19 @@ class camp { global $sql; - if ("" === $_name) { + if ('' === $_name) { $_name = 'null'; } - if ("" === $_count) { + if ('' === $_count) { $_count = 'null'; } - if ("" === $_price) { + if ('' === $_price) { $_price = 'null'; } - if ("" === $_info) { + if ('' === $_info) { $_info = 'null'; } @@ -447,4 +447,16 @@ class camp ] ); } + + public function get_camp_accepted_applies_count() + { + global $sql; + + return $sql->single_variable(" + SELECT count(distinct capp_id) as capp_count + FROM camp_apply + WHERE capp_camp_id = {$this->get_camp_id()} + AND capp_status = 3 + "); + } } diff --git a/_css/camp.css b/_css/camp.css index 7723ade..b8d9b5a 100644 --- a/_css/camp.css +++ b/_css/camp.css @@ -112,3 +112,72 @@ input.apply { font-size: 20px; font-weight: bold; } + +.container { + max-width: unset; +} + +#camp-list { + width: 100%; +} + +.camp-toggle { + width: 80%; + text-align: center; + padding: 5px 2px; + margin: 0px auto; + cursor: pointer; +} + +.camp-toggle.no { + font-weight: normal; + border: 2px solid red; + background: white; + color: gray; + padding: 5px 2px; +} + +.camp-toggle.yes { + border: 2px solid green; + background: lightgreen; + color: black; + font-weight: bold; +} + +input.camp-toggle-input { + visibility: hidden; +} + +.side_block { + float: right; + display: inline-block; + clear: right; + margin: 10px 0px 10px 11% !important; + padding: 5px; + font-size: 18px; + line-height: 1.4; + background-color: #e6e6e6; +} + +@media (max-width: 1249px) { + .side_block { + text-align: center; + display: block; + width: 100%; + margin-top: -10px !important; + border-top: 1px solid lightgray; + } + + .side_block:hover { + background-color: #e6e6e6; + } + + .list .list_item { + border-left: 0; + } + + .list .list_item:hover { + border-left: 0; + background-color: #e6e6e6; + } +} diff --git a/_css/diary.css b/_css/diary.css index 36fe5c3..81a305b 100644 --- a/_css/diary.css +++ b/_css/diary.css @@ -1,49 +1,47 @@ @media (min-width: 1250px) { + .list { + width: 80%; + } -.list { - width: 80%; -} + .row, .list-row { + display: flex; + } -.row { - display: flex; -} + .list .list_item { + width: 54%; + display: inline-block; + float: none; + } -.list .list_item { - width: 54%; - display: inline-block; - float: none; -} + .side_block { + float: right; + display: inline-block; + width: 35%; + clear: right; + margin: 10px 0px 10px 11% !important; + padding: 5px; + font-size: 18px; + line-height: 1.4; + background-color: #e6e6e6; + } -.side_block { - float: right; - display: inline-block; - width: 35%; - clear: right; - margin: 10px 0px 10px 11% !important; - padding: 5px; - font-size: 18px; - line-height: 1.4; - background-color: #e6e6e6; -} - -.extra_row { - display: none; -} - -.diary_header .active_header { - display: inline; -} + .extra_row { + display: none; + } + .diary_header .active_header { + display: inline; + } } @media (max-width: 1249px) { - .side_block { - display: none; - } + .side_block { + display: none; + } - .extra_row { - display: block; - margin-top: 5px; - line-height: 1.2; - } -} \ No newline at end of file + .extra_row { + display: block; + margin-top: 5px; + line-height: 1.2; + } +} diff --git a/index.php b/index.php index 30765a8..7f8bbc9 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,13 @@ ob_start(); echo ''; ?> + is_subpage() && 'jelentkezes' == $page->get_subpage()) || !($page->is_id() && 4 == $page->get_id())) { + ?> + @@ -46,7 +52,7 @@ ob_start(); } - if (in_array($page->get_page(), array('view','preview')) && $page->is_subpage() && $page->get_subpage() == "diary"|| $page->get_page() == "view" && !$page->is_subpage()) + if (in_array($page->get_page(), array('view','preview')) && $page->is_subpage() && $page->get_subpage() == "diary"|| $page->get_page() == "view" && !$page->is_subpage() || $page->get_subpage() == 'jelentkezes') echo ''; if ($page->is_page() && ($page->get_page() == 'coach' || $page->get_page() == 'coach_preview')) { diff --git a/template/templates/camp_apply.tpl b/template/templates/camp_apply.tpl index 38ede8d..de9b25d 100644 --- a/template/templates/camp_apply.tpl +++ b/template/templates/camp_apply.tpl @@ -181,6 +181,7 @@
+ {* {foreach $camp_array as $camp} @@ -193,8 +194,72 @@ {/foreach}
{$camp->get_camp_city()}
-
-
+ *} +
+
+
+
+ {foreach $camp_array as $camp} + {if + $camp@first || + ( + $camp_array[$camp@index]->get_camp_from()|substr:5:2 != $camp_array[$camp@index-1]->get_camp_from()|substr:5:2 + ) + + } + {if !$camp@first && + $camp_array[$camp@index]->get_camp_from()|substr:5:2 != $camp_array[$camp@index-1]->get_camp_from()|substr:5:2 + } +
+ {/if} + {$camp_array[$camp@index]->get_camp_from()|substr:0:4}. + {$months[$camp_array[$camp@index]->get_camp_from()|substr:5:2]} + + +
+ {/if} +
+
+ + {$camp->get_camp_name()} ({$camp->get_camp_from(true)} - {$camp->get_camp_to(true)})
+ Tábor típusa: {$camp->get_camp_type()->get_ct_name()}
+ Edző: {$camp->get_camp_leader()}
+
+ {if $camp->get_camp_info()} +
+ Tábor információk: {nl2br($camp->get_camp_info())} + {/if} + +
+ +
+
+ +
+ Létszám: {if $camp->get_camp_count()}{$camp->get_camp_count()} / {/if}{$camp->get_camp_accepted_applies_count()} +
+
+ + Ár: {$camp->get_camp_price()} Ft + +
+ +
+ teszt +
+
+
+ + {if $camp@last} +
+ {/if} + {/foreach} + +
+
+
+ + @@ -368,3 +433,61 @@ $("#accept_terms").change(function() { + +
Kijelentem, hogy minden, az edzőtábor szempontjából fontos információt megadtam, a gyerek egyesületének edzőjét az edzőtáborról tájékoztattam.