diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/AdvertisementsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/AdvertisementsController.php new file mode 100644 index 000000000..17d9397ad --- /dev/null +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/AdvertisementsController.php @@ -0,0 +1,36 @@ +Reklama = $Advertisement; + $this->helpers = $helpers; + } + + public function index(){ + $path = Config::get('app.cdn').Config::get('cms.storage.media.path'); + //categories list + $data = $this->Reklama->select('id','title', 'url', DB::raw("IF(media_mobile<>'',concat('$path',media_mobile),media_mobile) as media_mobile")) + ->where('active',1) + ->paginate(5) + ->toArray(); + + return $this->helpers->apiArrayResponseBuilder(200, 'success', $data); + } + + +} diff --git a/plugins/ahmadfatoni/apigenerator/routes.php b/plugins/ahmadfatoni/apigenerator/routes.php index 35feb607a..395aad3b9 100644 --- a/plugins/ahmadfatoni/apigenerator/routes.php +++ b/plugins/ahmadfatoni/apigenerator/routes.php @@ -5,6 +5,7 @@ Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses' Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi')); //postlar bilen categorialar Route::resource('api/categories', 'AhmadFatoni\ApiGenerator\Controllers\API\CategoriesController', ['except' => ['destroy', 'create', 'edit']]); +Route::resource('api/advetisements', 'AhmadFatoni\ApiGenerator\Controllers\API\AdvertisementsController', ['except' => ['destroy', 'create', 'edit']]); Route::resource('{locale}/api/posts', 'AhmadFatoni\ApiGenerator\Controllers\API\postsController', ['except' => ['destroy', 'create', 'edit']]); Route::get('api/version',function (){ return '2.0.8'; diff --git a/plugins/tps/reklama/models/reklama/columns.yaml b/plugins/tps/reklama/models/reklama/columns.yaml index 040bf9c73..0b419c198 100644 --- a/plugins/tps/reklama/models/reklama/columns.yaml +++ b/plugins/tps/reklama/models/reklama/columns.yaml @@ -33,3 +33,9 @@ columns: media: label: media type: text + searchable: true + media_mobile: + label: 'Application ADV' + type: text + searchable: true + sortable: true diff --git a/plugins/tps/reklama/models/reklama/fields.yaml b/plugins/tps/reklama/models/reklama/fields.yaml index 3b7af943c..d17d9232a 100644 --- a/plugins/tps/reklama/models/reklama/fields.yaml +++ b/plugins/tps/reklama/models/reklama/fields.yaml @@ -60,7 +60,12 @@ fields: span: auto type: mediafinder media_mobile: - label: 'Media for mobile' + label: 'Application Reklama (600x140)' mode: image span: auto type: mediafinder + web_media_mobile: + label: 'Web Media Mobile Version' + mode: image + span: left + type: mediafinder diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_5.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_5.php new file mode 100644 index 000000000..21e6d4cbe --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_5.php @@ -0,0 +1,23 @@ +boolean('is_banner')->default(true); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->dropColumn('is_banner'); + }); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_6.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_6.php new file mode 100644 index 000000000..4fe794308 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_6.php @@ -0,0 +1,23 @@ +string('is_banner')->nullable(false)->unsigned(false)->default('true')->change(); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->boolean('is_banner')->nullable(false)->unsigned(false)->default(1)->change(); + }); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_7.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_7.php new file mode 100644 index 000000000..83774f4eb --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_7.php @@ -0,0 +1,23 @@ +boolean('is_banner')->nullable(false)->unsigned(false)->default(true)->change(); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->string('is_banner', 191)->nullable(false)->unsigned(false)->default('true')->change(); + }); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_8.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_8.php new file mode 100644 index 000000000..0d64016d6 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_8.php @@ -0,0 +1,23 @@ +dropColumn('is_banner'); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->boolean('is_banner')->default(1); + }); + } +} diff --git a/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_9.php b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_9.php new file mode 100644 index 000000000..c91a9da88 --- /dev/null +++ b/plugins/tps/reklama/updates/builder_table_update_tps_reklama_item_9.php @@ -0,0 +1,23 @@ +string('web_media_mobile')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_reklama_item', function($table) + { + $table->dropColumn('web_media_mobile'); + }); + } +} diff --git a/plugins/tps/reklama/updates/version.yaml b/plugins/tps/reklama/updates/version.yaml index 3480194fb..b0e73c1b5 100644 --- a/plugins/tps/reklama/updates/version.yaml +++ b/plugins/tps/reklama/updates/version.yaml @@ -27,3 +27,18 @@ 1.0.10: - 'Updated table tps_reklama_item' - builder_table_update_tps_reklama_item_4.php +1.0.11: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item_5.php +1.0.12: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item_6.php +1.0.13: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item_7.php +1.0.14: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item_8.php +1.0.15: + - 'Updated table tps_reklama_item' + - builder_table_update_tps_reklama_item_9.php diff --git a/storage/framework/classes.php b/storage/framework/classes.php index 5e19589f8..e7e8f6c72 100644 --- a/storage/framework/classes.php +++ b/storage/framework/classes.php @@ -462,4 +462,5 @@ 'ToughDeveloper\\ImageResizer\\Classes\\Image' => 'plugins/toughdeveloper/imageresizer/classes/Image.php', 'ToughDeveloper\\ImageResizer\\Models\\Settings' => 'plugins/toughdeveloper/imageresizer/models/Settings.php', 'Rainlab\\Blog\\Models\\Category' => 'plugins/rainlab/blog/models/Category.php', + 'AhmadFatoni\\ApiGenerator\\Controllers\\API\\AdvertisementsController' => 'plugins/ahmadfatoni/apigenerator/controllers/api/AdvertisementsController.php', ); \ No newline at end of file diff --git a/themes/modern2/assets/js/menu.js b/themes/modern2/assets/js/menu.js index 8ecb3d66d..810faa2ba 100644 --- a/themes/modern2/assets/js/menu.js +++ b/themes/modern2/assets/js/menu.js @@ -19,25 +19,16 @@ searchClose.onclick = function () { searchModal.classList.remove("active"); }; // ============================================= -function addLink() { - //Get the selected text and append the extra info - var selection = window.getSelection(); - pagelink = ". Orient: " + document.location.href; - copytext = selection + pagelink; - //Create a new div to hold the prepared text - newdiv = document.createElement('div'); +const copyListener = (e) => { + const range = window.getSelection().getRangeAt(0), + rangeContents = range.cloneContents(), + pageLink = `Orient Link: ${document.location.href}`, + helper = document.createElement("div"); - //hide the newly created container - newdiv.style.position = 'absolute'; - newdiv.style.left = '-99999px'; + helper.appendChild(rangeContents); - //insert the container, fill it with the extended text, and define the new selection - document.body.appendChild(newdiv); - newdiv.innerHTML = copytext; - selection.selectAllChildren(newdiv); - - window.setTimeout(function () { - document.body.removeChild(newdiv); - }, 100); -} -document.addEventListener('copy', addLink); + event.clipboardData.setData("text/plain", `${helper.innerText}\n${pageLink}`); + event.clipboardData.setData("text/html", `${helper.innerHTML}
${pageLink}`); + event.preventDefault(); +}; +document.addEventListener("copy", copyListener); diff --git a/themes/modern2/content/static-pages-en/contact.htm b/themes/modern2/content/static-pages-en/contact.htm index 1d9f133e4..13be870bc 100644 --- a/themes/modern2/content/static-pages-en/contact.htm +++ b/themes/modern2/content/static-pages-en/contact.htm @@ -9,5 +9,5 @@ title = "Contact us"
Contacts
Address: Turkmenistan, Ashgabat city, Makhtumkuli avenue, 72
-
Phone: (+99312) 211059
+
Phone: (+99312) 940786
Email: info@orient.tm
\ No newline at end of file diff --git a/themes/modern2/content/static-pages/contact.htm b/themes/modern2/content/static-pages/contact.htm index 10095addb..9504add0b 100644 --- a/themes/modern2/content/static-pages/contact.htm +++ b/themes/modern2/content/static-pages/contact.htm @@ -1,12 +1,11 @@ [viewBag] -title = "Связаться с нами" +title = "Контакты" url = "/habarlash" layout = "contacts" is_hidden = 0 navigation_hidden = 0 robot_index = "index" robot_follow = "follow" -localeUrl[en] = "/habarlash" == {% put form %}
Обратная связь
@@ -17,5 +16,5 @@ localeUrl[en] = "/habarlash"
Наши контакты:
Наш адрес: Туркменистан, г.Ашхабад, проспект Махтумкули, 72
-
Тел: (+99312) 211059
+
Тел: (+99312) 940786
Email: info@orient.tm
\ No newline at end of file diff --git a/themes/modern2/layouts/blog.htm b/themes/modern2/layouts/blog.htm index 623979b97..763ec6d43 100644 --- a/themes/modern2/layouts/blog.htm +++ b/themes/modern2/layouts/blog.htm @@ -9,6 +9,8 @@ random = 0 + {% component 'SeoBlogPost' %} {% partial 'head' %} @@ -47,4 +49,4 @@ random = 0 - \ No newline at end of file + diff --git a/themes/modern2/layouts/cms.htm b/themes/modern2/layouts/cms.htm index b1461499f..77a7816e6 100644 --- a/themes/modern2/layouts/cms.htm +++ b/themes/modern2/layouts/cms.htm @@ -11,6 +11,8 @@ random = 0 + {% component 'SeoCmsPage' %} {% partial 'head' %} @@ -51,4 +53,4 @@ random = 0 - \ No newline at end of file + diff --git a/themes/modern2/layouts/static.htm b/themes/modern2/layouts/static.htm index 1b9da8f38..a78d69991 100644 --- a/themes/modern2/layouts/static.htm +++ b/themes/modern2/layouts/static.htm @@ -15,6 +15,8 @@ random = 0 + {% component 'SeoStaticPage' %} {% partial 'head' %} @@ -51,4 +53,4 @@ $(document).ready(function(){ gtag('config', 'G-HHRB3PCSBQ'); - \ No newline at end of file + diff --git a/themes/modern2/meta/menus/top-menu.yaml b/themes/modern2/meta/menus/top-menu.yaml index b226b3d03..ea4199298 100644 --- a/themes/modern2/meta/menus/top-menu.yaml +++ b/themes/modern2/meta/menus/top-menu.yaml @@ -1,21 +1,4 @@ items: - - - title: Главная - nesting: null - type: url - url: / - code: '' - reference: null - cmsPage: null - replace: null - viewBag: - locale: - en: - title: Home - url: '' - isHidden: '0' - cssClass: '' - isExternal: '0' - title: Разделы nesting: null @@ -153,6 +136,22 @@ items: isHidden: '0' cssClass: '' isExternal: '0' + - + title: Выборы-2022 + nesting: 0 + type: blog-category + code: '' + reference: '797' + cmsPage: category + replace: 0 + viewBag: + locale: + en: + title: Elections-2022 + url: '' + isHidden: '0' + cssClass: '' + isExternal: '0' - title: Фото nesting: 0 @@ -208,6 +207,7 @@ items: title: Объявления nesting: 0 type: blog-category + url: null code: '' reference: '796' cmsPage: category diff --git a/themes/modern2/pages/post.htm b/themes/modern2/pages/post.htm index 6bb03c273..1f718a58e 100644 --- a/themes/modern2/pages/post.htm +++ b/themes/modern2/pages/post.htm @@ -12,7 +12,7 @@ localeTitle[en] = "Post" [blogPost] slug = "{{ :slug }}" id = "{{ :id }}" -categoryPage = "blog/category" +categoryPage = 404 [views] slug = "{{ :slug }}" @@ -134,4 +134,4 @@ post = "post" } }); -{% endput %} +{% endput %} \ No newline at end of file diff --git a/themes/modern2/partials/head.htm b/themes/modern2/partials/head.htm index 7dd19b914..1e9ad9df7 100644 --- a/themes/modern2/partials/head.htm +++ b/themes/modern2/partials/head.htm @@ -1,6 +1,8 @@ [viewBag] == + - \ No newline at end of file +