diff --git a/plugins/tps/birzha/Plugin.php b/plugins/tps/birzha/Plugin.php index 277773299..0e0e4c056 100644 --- a/plugins/tps/birzha/Plugin.php +++ b/plugins/tps/birzha/Plugin.php @@ -342,6 +342,7 @@ class Plugin extends PluginBase 'TPS\Birzha\Components\Balance' => 'balance', 'TPS\Birzha\Components\ContactForm' => 'contactForm', 'TPS\Birzha\Components\EmailVerify' => 'emailverify', + 'TPS\Birzha\Components\Birzhadocs' => 'birzhadocs', ]; } diff --git a/plugins/tps/birzha/components/Birzhadocs.php b/plugins/tps/birzha/components/Birzhadocs.php new file mode 100644 index 000000000..536db6935 --- /dev/null +++ b/plugins/tps/birzha/components/Birzhadocs.php @@ -0,0 +1,27 @@ + 'Docs list', + 'description' => 'List of docs' + ]; + } + + public function onRun() { + $this->sections_with_docs = $this->loadDocs(); + } + + protected function loadDocs() { + $translator = Translator::instance(); + + return BirzhaDoc::where('lang', $translator->getLocale())->get(); + } + + public $sections_with_docs; +} diff --git a/plugins/tps/birzha/components/birzhadocs/default.htm b/plugins/tps/birzha/components/birzhadocs/default.htm new file mode 100644 index 000000000..212bc3fec --- /dev/null +++ b/plugins/tps/birzha/components/birzhadocs/default.htm @@ -0,0 +1,46 @@ +{% set sections = __SELF__.sections_with_docs %} + +{% for section in sections %} +
+
{{ section.section_name }}
+
+ {% for doc in section.section_docs %} + + {% if loop.index < 6 %} + {{ doc.file_name }} + {% endif %} + {% endfor %} + + + {% if section.section_docs[5] %} +
+ +
+ {% for doc in section.section_docs %} + + {% if loop.index > 5 %} + {{ doc.file_name }} + {% endif %} + {% endfor %} +
+
+ {% endif %} +
+
+{% endfor %} \ No newline at end of file diff --git a/plugins/tps/birzha/controllers/Birzhadocs.php b/plugins/tps/birzha/controllers/Birzhadocs.php new file mode 100644 index 000000000..71e4b5bad --- /dev/null +++ b/plugins/tps/birzha/controllers/Birzhadocs.php @@ -0,0 +1,18 @@ + + + + diff --git a/plugins/tps/birzha/controllers/birzhadocs/config_form.yaml b/plugins/tps/birzha/controllers/birzhadocs/config_form.yaml new file mode 100644 index 000000000..745dcf18e --- /dev/null +++ b/plugins/tps/birzha/controllers/birzhadocs/config_form.yaml @@ -0,0 +1,10 @@ +name: Birzhadocs +form: $/tps/birzha/models/birzhadoc/fields.yaml +modelClass: TPS\Birzha\Models\BirzhaDoc +defaultRedirect: tps/birzha/birzhadocs +create: + redirect: 'tps/birzha/birzhadocs/update/:id' + redirectClose: tps/birzha/birzhadocs +update: + redirect: tps/birzha/birzhadocs + redirectClose: tps/birzha/birzhadocs diff --git a/plugins/tps/birzha/controllers/birzhadocs/config_list.yaml b/plugins/tps/birzha/controllers/birzhadocs/config_list.yaml new file mode 100644 index 000000000..d83a9c7af --- /dev/null +++ b/plugins/tps/birzha/controllers/birzhadocs/config_list.yaml @@ -0,0 +1,12 @@ +list: $/tps/birzha/models/birzhadoc/columns.yaml +modelClass: TPS\Birzha\Models\BirzhaDoc +title: Birzhadocs +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/birzha/birzhadocs/update/:id' diff --git a/plugins/tps/birzha/controllers/birzhadocs/create.htm b/plugins/tps/birzha/controllers/birzhadocs/create.htm new file mode 100644 index 000000000..78e86c8db --- /dev/null +++ b/plugins/tps/birzha/controllers/birzhadocs/create.htm @@ -0,0 +1,46 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + +
+
+ + + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/birzha/controllers/birzhadocs/index.htm b/plugins/tps/birzha/controllers/birzhadocs/index.htm new file mode 100644 index 000000000..ea43a3636 --- /dev/null +++ b/plugins/tps/birzha/controllers/birzhadocs/index.htm @@ -0,0 +1 @@ +listRender() ?> diff --git a/plugins/tps/birzha/controllers/birzhadocs/preview.htm b/plugins/tps/birzha/controllers/birzhadocs/preview.htm new file mode 100644 index 000000000..8a5aedac2 --- /dev/null +++ b/plugins/tps/birzha/controllers/birzhadocs/preview.htm @@ -0,0 +1,22 @@ + + + + +fatalError): ?> + +
+ formRenderPreview() ?> +
+ + +

fatalError) ?>

+ + +

+ + + +

\ No newline at end of file diff --git a/plugins/tps/birzha/controllers/birzhadocs/update.htm b/plugins/tps/birzha/controllers/birzhadocs/update.htm new file mode 100644 index 000000000..e9cfb09b0 --- /dev/null +++ b/plugins/tps/birzha/controllers/birzhadocs/update.htm @@ -0,0 +1,54 @@ + + + + +fatalError): ?> + + 'layout']) ?> + +
+ formRender() ?> +
+ +
+
+ + + + + + + +
+
+ + + +

fatalError)) ?>

+

+ \ No newline at end of file diff --git a/plugins/tps/birzha/models/BirzhaDoc.php b/plugins/tps/birzha/models/BirzhaDoc.php new file mode 100644 index 000000000..cdc269fcf --- /dev/null +++ b/plugins/tps/birzha/models/BirzhaDoc.php @@ -0,0 +1,30 @@ +engine = 'InnoDB'; + $table->string('section_name'); + }); + } + + public function down() + { + Schema::dropIfExists('tps_birzha_docs'); + } +} diff --git a/plugins/tps/birzha/updates/builder_table_create_tps_birzha_docs_one.php b/plugins/tps/birzha/updates/builder_table_create_tps_birzha_docs_one.php new file mode 100644 index 000000000..26207cd15 --- /dev/null +++ b/plugins/tps/birzha/updates/builder_table_create_tps_birzha_docs_one.php @@ -0,0 +1,24 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('section_code'); + $table->string('section_name'); + $table->text('section_docs'); + }); + } + + public function down() + { + Schema::dropIfExists('tps_birzha_docs_one'); + } +} diff --git a/plugins/tps/birzha/updates/builder_table_delete_tps_birzha_docs.php b/plugins/tps/birzha/updates/builder_table_delete_tps_birzha_docs.php new file mode 100644 index 000000000..a93669a35 --- /dev/null +++ b/plugins/tps/birzha/updates/builder_table_delete_tps_birzha_docs.php @@ -0,0 +1,23 @@ +engine = 'InnoDB'; + $table->string('section_name', 191); + $table->text('section_docs'); + $table->integer('id'); + }); + } +} diff --git a/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs.php b/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs.php new file mode 100644 index 000000000..1b2909b6e --- /dev/null +++ b/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs.php @@ -0,0 +1,23 @@ +text('section_docs'); + }); + } + + public function down() + { + Schema::table('tps_birzha_docs', function($table) + { + $table->dropColumn('section_docs'); + }); + } +} diff --git a/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs_2.php b/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs_2.php new file mode 100644 index 000000000..d48380da9 --- /dev/null +++ b/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs_2.php @@ -0,0 +1,23 @@ +integer('id'); + }); + } + + public function down() + { + Schema::table('tps_birzha_docs', function($table) + { + $table->dropColumn('id'); + }); + } +} diff --git a/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs_one.php b/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs_one.php new file mode 100644 index 000000000..72aa2417d --- /dev/null +++ b/plugins/tps/birzha/updates/builder_table_update_tps_birzha_docs_one.php @@ -0,0 +1,23 @@ +string('lang'); + }); + } + + public function down() + { + Schema::table('tps_birzha_docs_one', function($table) + { + $table->dropColumn('lang'); + }); + } +} diff --git a/plugins/tps/birzha/updates/version.yaml b/plugins/tps/birzha/updates/version.yaml index db5c0f890..ebcc8e792 100644 --- a/plugins/tps/birzha/updates/version.yaml +++ b/plugins/tps/birzha/updates/version.yaml @@ -278,3 +278,21 @@ 1.0.99: - 'Updated table tps_birzha_products' - builder_table_update_tps_birzha_products_25.php +1.0.100: + - 'Created table tps_birzha_docs' + - builder_table_create_tps_birzha_docs.php +1.0.101: + - 'Updated table tps_birzha_docs' + - builder_table_update_tps_birzha_docs.php +1.0.102: + - 'Updated table tps_birzha_docs' + - builder_table_update_tps_birzha_docs_2.php +1.0.103: + - 'Drop table tps_birzha_docs' + - builder_table_delete_tps_birzha_docs.php +1.0.104: + - 'Created table tps_birzha_docs_one' + - builder_table_create_tps_birzha_docs_one.php +1.0.105: + - 'Updated table tps_birzha_docs_one' + - builder_table_update_tps_birzha_docs_one.php diff --git a/themes/birzha/assets/css/main.css b/themes/birzha/assets/css/main.css index b17fdceea..9ddba98f0 100644 --- a/themes/birzha/assets/css/main.css +++ b/themes/birzha/assets/css/main.css @@ -1814,7 +1814,7 @@ li { left: 0; width: 100%; padding: 30px 40px; - background: rgba(0,0,0,.5); + background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); transition: all .7s linear; @@ -5035,6 +5035,145 @@ li { } } +.term_row { + margin-bottom: 25px; + position: relative; + display: block; +} + +.term_row-title { + cursor: pointer; + display: block; + position: relative; + font-weight: 700; + font-size: 17px; + line-height: 30px; + color: #003197; + padding: 20px 50px 20px 30px; + + background: #F2F6FF; +} + +.term_row-title::after { + content: ''; + position: absolute; + top: 36px; + right: 25px; + width: 18px; + height: 8px; + background: url("../images/svg/arrow-down.svg") no-repeat center; + background-size: contain; + transition: all .3s linear; + -webkit-transition: all .3s linear; +} + +.term_row-title.active:after { + transform: rotate(180deg); +} + +.term_sub-item { + overflow: hidden; + max-height: 0; + transition: all .3s linear; + -webkit-transition: all .3s linear; +} + +.term_sub-item::-webkit-scrollbar { + display: none; +} + +.term_download-link { + display: block; + font-weight: 400; + font-size: 16px; + line-height: 24px; + + width: 100%; + cursor: pointer; + margin-bottom: 15px; + position: relative; + padding-left: 35px; + + transition: all .1s linear; + -webkit-transition: all .1s linear; +} + +.term_download-link:first-child { + margin-top: 25px; +} + +.term_download-link:hover { + text-decoration: underline; + color: #003197; + font-weight: 600; +} + +.term_download-link:hover::before { + width: 22px; + height: 22px; +} + +.term_download-link::before { + content: ''; + position: absolute; + top: 5px; + left: 0; + width: 20px; + height: 20px; + background: url("../images/svg/download.svg") no-repeat center; + background-size: contain; +} + +.term_more { + padding: 10px 20px; + font-weight: 400; + font-size: 14px; + line-height: 21px; + color: #FFFFFF; + background: var(--blue); + cursor: pointer; + position: relative; + + display: flex; + align-items: center; +} + +.term_more span { + transition: all .3s linear; + -webkit-transition: all .3s linear; + margin-right: 10px; + display: block; +} + +.term_more.active span { + transform: rotate(180deg); +} + +.term_additional { + width: 100%; + display: flex; + flex-direction: column-reverse; + align-items: center; +} + +.term_additional .term_download-link:first-child { + margin-top: 0; +} + +.term_all { + width: 100%; + display: block; + overflow: hidden; + max-height: 0; + transition: all .3s linear; + -webkit-transition: all .3s linear; +} + +.term_all::-webkit-scrollbar { + display: none; +} + + /* Terms end ======================================= */ /* Import table page ======================================= */ @@ -7358,10 +7497,28 @@ input::-webkit-calendar-picker-indicator { } .aside_term-tab { - font-size: 14px; + font-size: 15px; padding: 15px 20px; } + .term_row-title { + font-size: 14px; + padding: 12px 50px 12px 25px; + } + + .term_row-title::after { + top: 22px; + } + + .term_download-link { + font-size: 14px; + } + + .term_more { + font-size: 13px; + } + + .aside_term-tab::after { width: 8px; height: 8px; diff --git a/themes/birzha/assets/images/svg/arrow-down-white.svg b/themes/birzha/assets/images/svg/arrow-down-white.svg new file mode 100644 index 000000000..0c35f8801 --- /dev/null +++ b/themes/birzha/assets/images/svg/arrow-down-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/birzha/assets/images/svg/download.svg b/themes/birzha/assets/images/svg/download.svg new file mode 100644 index 000000000..74da66d3b --- /dev/null +++ b/themes/birzha/assets/images/svg/download.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/themes/birzha/assets/js/main.js b/themes/birzha/assets/js/main.js index bca793174..a6bfac4e8 100644 --- a/themes/birzha/assets/js/main.js +++ b/themes/birzha/assets/js/main.js @@ -112,9 +112,9 @@ for (z = 0; z < accordion.length; z++) { panel.style.marginTop = "0px"; } else { - panel.style.maxHeight = panel.scrollHeight + "px"; + // panel.style.maxHeight = panel.scrollHeight + "px"; + panel.style.maxHeight = "unset"; panel.style.overflow = "visible"; - panel.style.marginTop = "10px"; } }); } // Accordion end ========================= diff --git a/themes/birzha/pages/terms.htm b/themes/birzha/pages/terms.htm index 0e76bbebe..631a41cb6 100644 --- a/themes/birzha/pages/terms.htm +++ b/themes/birzha/pages/terms.htm @@ -12,6 +12,9 @@ localeUrl[ru] = "/uslovia-torgov" [session] security = "all" redirect = "vojti" + +[birzhadocs] +language = "tm" == {{ pg.title }} {% endfor %} + + + @@ -50,6 +56,11 @@ function onStart() { {{ pg.markup|raw }} {% endfor %} + +
+ + {% component 'birzhadocs' %} +
diff --git a/themes/birzha/partials/birzha_docs.htm b/themes/birzha/partials/birzha_docs.htm new file mode 100644 index 000000000..1761c98e4 --- /dev/null +++ b/themes/birzha/partials/birzha_docs.htm @@ -0,0 +1,15 @@ +[viewBag] +snippetCode = "birzha_docs" +snippetName = "Birzha docs" +snippetProperties[language][title] = "language" +snippetProperties[language][type] = "dropdown" +snippetProperties[language][default] = "tm" +snippetProperties[language][options][] = "tm" +snippetProperties[language][options][] = "ru" +snippetProperties[language][options][] = "en" + +[birzhadocs] +language = "tm" +== +{% component 'birzhadocs' %} +32416585465 \ No newline at end of file