diff --git a/plugins/tps/movies/controllers/MovieSessions.php b/plugins/tps/movies/controllers/MovieSessions.php new file mode 100644 index 0000000..1acf6ae --- /dev/null +++ b/plugins/tps/movies/controllers/MovieSessions.php @@ -0,0 +1,18 @@ + + = e(trans('backend::lang.form.create')) ?> + + diff --git a/plugins/tps/movies/controllers/moviesessions/config_form.yaml b/plugins/tps/movies/controllers/moviesessions/config_form.yaml new file mode 100644 index 0000000..bb8f78d --- /dev/null +++ b/plugins/tps/movies/controllers/moviesessions/config_form.yaml @@ -0,0 +1,10 @@ +name: MovieSessions +form: $/tps/movies/models/moviesession/fields.yaml +modelClass: Tps\Movies\Models\MovieSession +defaultRedirect: tps/movies/moviesessions +create: + redirect: 'tps/movies/moviesessions/update/:id' + redirectClose: tps/movies/moviesessions +update: + redirect: tps/movies/moviesessions + redirectClose: tps/movies/moviesessions diff --git a/plugins/tps/movies/controllers/moviesessions/config_list.yaml b/plugins/tps/movies/controllers/moviesessions/config_list.yaml new file mode 100644 index 0000000..fcc5dc0 --- /dev/null +++ b/plugins/tps/movies/controllers/moviesessions/config_list.yaml @@ -0,0 +1,12 @@ +list: $/tps/movies/models/moviesession/columns.yaml +modelClass: Tps\Movies\Models\MovieSession +title: MovieSessions +noRecordsMessage: 'backend::lang.list.no_records' +showSetup: true +showCheckboxes: true +recordsPerPage: 20 +toolbar: + buttons: list_toolbar + search: + prompt: 'backend::lang.list.search_prompt' +recordUrl: 'tps/movies/moviesessions/update/:id' diff --git a/plugins/tps/movies/controllers/moviesessions/create.htm b/plugins/tps/movies/controllers/moviesessions/create.htm new file mode 100644 index 0000000..0c6c32b --- /dev/null +++ b/plugins/tps/movies/controllers/moviesessions/create.htm @@ -0,0 +1,46 @@ + +
= e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/movies/controllers/moviesessions/index.htm b/plugins/tps/movies/controllers/moviesessions/index.htm new file mode 100644 index 0000000..ea43a36 --- /dev/null +++ b/plugins/tps/movies/controllers/moviesessions/index.htm @@ -0,0 +1 @@ += $this->listRender() ?> diff --git a/plugins/tps/movies/controllers/moviesessions/preview.htm b/plugins/tps/movies/controllers/moviesessions/preview.htm new file mode 100644 index 0000000..f4bb5ba --- /dev/null +++ b/plugins/tps/movies/controllers/moviesessions/preview.htm @@ -0,0 +1,22 @@ + ++ + = e(trans('backend::lang.form.return_to_list')) ?> + +
\ No newline at end of file diff --git a/plugins/tps/movies/controllers/moviesessions/update.htm b/plugins/tps/movies/controllers/moviesessions/update.htm new file mode 100644 index 0000000..ea3227d --- /dev/null +++ b/plugins/tps/movies/controllers/moviesessions/update.htm @@ -0,0 +1,54 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/movies/models/MovieSession.php b/plugins/tps/movies/models/MovieSession.php new file mode 100644 index 0000000..ba89bc7 --- /dev/null +++ b/plugins/tps/movies/models/MovieSession.php @@ -0,0 +1,33 @@ + 'Tps\Shops\Classes\Attachment', + ]; +} diff --git a/plugins/tps/movies/models/moviesession/columns.yaml b/plugins/tps/movies/models/moviesession/columns.yaml new file mode 100644 index 0000000..009ee4c --- /dev/null +++ b/plugins/tps/movies/models/moviesession/columns.yaml @@ -0,0 +1,7 @@ +columns: + id: + label: id + type: number + title: + label: title + type: text diff --git a/plugins/tps/movies/models/moviesession/fields.yaml b/plugins/tps/movies/models/moviesession/fields.yaml new file mode 100644 index 0000000..0a92e49 --- /dev/null +++ b/plugins/tps/movies/models/moviesession/fields.yaml @@ -0,0 +1,14 @@ +fields: + title: + label: Title + span: auto + type: text + image: + label: Image + mode: image + useCaption: true + thumbOptions: + mode: crop + extension: auto + span: auto + type: fileupload diff --git a/plugins/tps/movies/plugin.yaml b/plugins/tps/movies/plugin.yaml index 7662fec..199ebe4 100755 --- a/plugins/tps/movies/plugin.yaml +++ b/plugins/tps/movies/plugin.yaml @@ -9,3 +9,12 @@ navigation: label: Movies url: tps/movies/movies icon: icon-film + sideMenu: + side-menu-item2: + label: Movies + url: tps/movies/movies + icon: icon-film + side-menu-item: + label: 'Movie Sessions' + url: tps/movies/moviesessions + icon: icon-file-movie-o diff --git a/plugins/tps/movies/updates/builder_table_create_tps_movies_sessions.php b/plugins/tps/movies/updates/builder_table_create_tps_movies_sessions.php new file mode 100644 index 0000000..5d662c2 --- /dev/null +++ b/plugins/tps/movies/updates/builder_table_create_tps_movies_sessions.php @@ -0,0 +1,22 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('title')->nullable(); + }); + } + + public function down() + { + Schema::dropIfExists('tps_movies_sessions'); + } +} diff --git a/plugins/tps/movies/updates/version.yaml b/plugins/tps/movies/updates/version.yaml index 3d0ee63..33bd9cd 100755 --- a/plugins/tps/movies/updates/version.yaml +++ b/plugins/tps/movies/updates/version.yaml @@ -9,3 +9,6 @@ 1.0.4: - 'Updated table tps_movies_' - builder_table_update_tps_movies__2.php +1.0.5: + - 'Created table tps_movies_sessions' + - builder_table_create_tps_movies_sessions.php diff --git a/themes/berkarar/assets/css/components/3-page/home.scss b/themes/berkarar/assets/css/components/3-page/home.scss index e143343..8c84f5a 100755 --- a/themes/berkarar/assets/css/components/3-page/home.scss +++ b/themes/berkarar/assets/css/components/3-page/home.scss @@ -559,7 +559,7 @@ align-items: center; justify-content: center; - a { + h6 { display: flex; align-items: center; @@ -590,6 +590,25 @@ } } + &_poster { + .inner { + width: calc(100% - 30px); + max-width: 510px; + height: unset; + max-height: calc(100% - 20px); + background: unset; + } + + &-photo { + width: 100%; + + img { + @include ImgCon; + display: block; + } + } + } + } @keyframes movie-bg { diff --git a/themes/berkarar/assets/css/main.css b/themes/berkarar/assets/css/main.css index 1f5b944..101dfc5 100755 --- a/themes/berkarar/assets/css/main.css +++ b/themes/berkarar/assets/css/main.css @@ -1869,7 +1869,7 @@ input[type=date]::-webkit-calendar-picker-indicator { -ms-flex-pack: center; justify-content: center; } -.movie_all a { +.movie_all h6 { display: -webkit-box; display: -ms-flexbox; display: flex; @@ -1886,23 +1886,40 @@ input[type=date]::-webkit-calendar-picker-indicator { border-radius: 10px; margin-top: 140px; } -.movie_all a span { +.movie_all h6 span { width: 15px; height: 15px; display: block; margin-left: 10px; } -.movie_all a span svg { +.movie_all h6 span svg { width: 100%; height: 100%; object-fit: contain; -o-object-fit: contain; } -.movie_all a span svg path { +.movie_all h6 span svg path { -webkit-transition: all 0.2s ease-in-out 0s; transition: all 0.2s ease-in-out 0s; -moz-transition: all 0.2s ease-in-out 0s; } +.movie_poster .inner { + width: calc(100% - 30px); + max-width: 510px; + height: unset; + max-height: calc(100% - 20px); + background: unset; +} +.movie_poster-photo { + width: 100%; +} +.movie_poster-photo img { + width: 100%; + height: 100%; + object-fit: contain; + -o-object-fit: contain; + display: block; +} @keyframes movie-bg { 0% { diff --git a/themes/berkarar/assets/js/main.js b/themes/berkarar/assets/js/main.js index 95f5e25..f040403 100755 --- a/themes/berkarar/assets/js/main.js +++ b/themes/berkarar/assets/js/main.js @@ -19,8 +19,10 @@ let mobile_link = document.querySelectorAll('.mobile_buttons-link'); let logout = document.querySelector('.logout'); let logout_link = document.querySelectorAll('.logout a'); +let movie_link = document.querySelectorAll('.movie_item-link'); +let movie_poster = document.querySelector('.movie_all h6'); -// let movie_link = document.querySelectorAll('.movie_item-link'); +let modal_close = document.querySelectorAll('.modal_close'); @@ -145,16 +147,33 @@ if (user_title != undefined) { }); } -// if (movie_link != undefined) { -// movie_link.forEach(x => { -// x.addEventListener('click', function () { -// sleep(2).then(() => { -// console.log("klkl") -// body.classList.add('active'); -// }); -// }); -// }) -// } +if (movie_link != undefined) { + movie_link.forEach(x => { + x.addEventListener('click', function () { + sleep(2).then(() => { + body.classList.add('active'); + }); + }); + }) +} + +if (movie_poster != undefined) { + movie_poster.addEventListener('click', function () { + sleep(2).then(() => { + body.classList.add('active'); + }) + }); +} + +if (modal_close != undefined) { + modal_close.forEach(x => { + x.addEventListener('click', function () { + sleep(2).then(() => { + body.classList.remove('active'); + }); + }); + }) +} diff --git a/themes/berkarar/partials/home/movies.htm b/themes/berkarar/partials/home/movies.htm index 60eedb7..44e5f90 100755 --- a/themes/berkarar/partials/home/movies.htm +++ b/themes/berkarar/partials/home/movies.htm @@ -1,4 +1,10 @@ == +limit(1)->get()->first(); +} +?> +==