From 33a939e02c72608f355ade970e3100ae0a3d38b6 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Sat, 1 Aug 2020 12:21:33 +0530 Subject: [PATCH 1/2] Remove previous changes --- .../Webkul/Ui/src/Resources/views/datagrid/table.blade.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/Ui/src/Resources/views/datagrid/table.blade.php b/packages/Webkul/Ui/src/Resources/views/datagrid/table.blade.php index e87fbba52..845658344 100644 --- a/packages/Webkul/Ui/src/Resources/views/datagrid/table.blade.php +++ b/packages/Webkul/Ui/src/Resources/views/datagrid/table.blade.php @@ -658,6 +658,7 @@ } else { newParams = newParams + '&' + this.filters[i].column + condition + '=' + this.filters[i].val; } + console.log('newParams', newParams); } var uri = window.location.href.toString(); @@ -729,6 +730,7 @@ obj.label = this.columns[colIndex].label; if (this.columns[colIndex].type === 'boolean') { + console.log('obj.val', obj.val); if (obj.val === '1') { obj.val = '{{ __('ui::app.datagrid.true') }}'; } else { @@ -742,6 +744,7 @@ if (obj.column !== undefined && obj.val !== undefined) { this.filters.push(obj); + console.log('pushed'); } obj = {}; @@ -750,7 +753,7 @@ removeFilter: function (filter) { for (let i in this.filters) { - if (this.filters[i].column === filter.column + if (this.filters[i].col === filter.col && this.filters[i].cond === filter.cond && this.filters[i].val === filter.val) { this.filters.splice(i, 1); @@ -833,6 +836,8 @@ captureColumn: function (id) { element = document.getElementById(id); + + console.log(element.innerHTML); }, removeMassActions: function () { From ab16b927588a022328b2921de9426a0bf32949fd Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Sat, 1 Aug 2020 13:53:53 +0530 Subject: [PATCH 2/2] updates --- ...content_count_velocity_meta_data_table.php | 32 ++++++++++++++ .../Seeders/VelocityMetaDataSeeder.php | 1 + .../src/Repositories/ContentRepository.php | 7 ++- .../Velocity/src/Resources/lang/ar/app.php | 1 + .../Velocity/src/Resources/lang/de/app.php | 1 + .../Velocity/src/Resources/lang/en/app.php | 43 ++++++++++--------- .../Velocity/src/Resources/lang/fa/app.php | 1 + .../Velocity/src/Resources/lang/it/app.php | 1 + .../Velocity/src/Resources/lang/nl/app.php | 1 + .../Velocity/src/Resources/lang/pl/app.php | 1 + .../Velocity/src/Resources/lang/pt_BR/app.php | 1 + .../Velocity/src/Resources/lang/tr/app.php | 1 + .../views/admin/meta-info/meta-data.blade.php | 11 +++++ 13 files changed, 80 insertions(+), 22 deletions(-) create mode 100644 packages/Webkul/Velocity/src/Database/Migrations/2020_08_01_132239_add_header_content_count_velocity_meta_data_table.php diff --git a/packages/Webkul/Velocity/src/Database/Migrations/2020_08_01_132239_add_header_content_count_velocity_meta_data_table.php b/packages/Webkul/Velocity/src/Database/Migrations/2020_08_01_132239_add_header_content_count_velocity_meta_data_table.php new file mode 100644 index 000000000..611353a43 --- /dev/null +++ b/packages/Webkul/Velocity/src/Database/Migrations/2020_08_01_132239_add_header_content_count_velocity_meta_data_table.php @@ -0,0 +1,32 @@ +text('header_content_count'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('velocity_meta_data', function (Blueprint $table) { + $table->dropColumn('header_content_count'); + }); + } +} diff --git a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php index 6ac303fa4..82db2ca38 100644 --- a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php +++ b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php @@ -20,6 +20,7 @@ class VelocityMetaDataSeeder extends Seeder 'locale' => 'en', 'home_page_content' => "

@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')

", + 'header_content_count' => "5", 'footer_left_content' => __('velocity::app.admin.meta-data.footer-left-raw-content'), 'footer_middle_content' => '', diff --git a/packages/Webkul/Velocity/src/Repositories/ContentRepository.php b/packages/Webkul/Velocity/src/Repositories/ContentRepository.php index 839686fa7..c979384c1 100644 --- a/packages/Webkul/Velocity/src/Repositories/ContentRepository.php +++ b/packages/Webkul/Velocity/src/Repositories/ContentRepository.php @@ -129,6 +129,11 @@ class ContentRepository extends Repository { $query = $this->model::orderBy('position', 'ASC'); + $velocityMetaData = app('Webkul\Velocity\Helpers\Helper')->getVelocityMetaData(); + $headerContentCount = $velocityMetaData->header_content_count; + + $headerContentCount = $headerContentCount != '' ? $headerContentCount : 5; + $contentCollection = $query ->select( 'velocity_contents.content_type', @@ -140,7 +145,7 @@ class ContentRepository extends Repository ->leftJoin('velocity_contents_translations', 'velocity_contents.id', 'velocity_contents_translations.content_id') ->distinct('velocity_contents_translations.id') ->where('velocity_contents_translations.locale', app()->getLocale()) - ->limit(5) + ->limit($headerContentCount) ->get(); $formattedContent = []; diff --git a/packages/Webkul/Velocity/src/Resources/lang/ar/app.php b/packages/Webkul/Velocity/src/Resources/lang/ar/app.php index b1532603d..3521f5cfc 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/ar/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/ar/app.php @@ -97,6 +97,7 @@ return [ 'footer-left-content' => 'تذييل يسار المحتوى', 'subscription-content' => 'محتوى شريط الاشتراك', 'sidebar-categories' => 'فئات الشريط الجانبي', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

نحن نحب صياغة البرامج وحل مشاكل العالم الحقيقي مع الثنائيات. نحن ملتزمون للغاية بأهدافنا. نحن نستثمر مواردنا لإنشاء برامج وتطبيقات سهلة الاستخدام على مستوى عالمي للأعمال التجارية مع أرفع مستوى ، على أعلى مستوى من الخبرة التقنية.

', 'slider-path' => 'مسار المنزلق', 'category-logo' => 'شعار الفئة', diff --git a/packages/Webkul/Velocity/src/Resources/lang/de/app.php b/packages/Webkul/Velocity/src/Resources/lang/de/app.php index c94af3a2d..f6beaef19 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/de/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/de/app.php @@ -96,6 +96,7 @@ return [ 'home-page-content' => 'Inhalt der Startseite', 'footer-left-content' => 'Fußzeile Linker Inhalt', 'subscription-content' => 'Abonnementleiste Inhalt', + 'header_content_count' => 'Header Content Count', 'sidebar-categories' => 'Seitenleisten-Kategorien', 'footer-left-raw-content' => '

Wir lieben es, Software zu erstellen und die Probleme der realen Welt mit den Binärdateien zu lösen. Wir fühlen uns unseren Zielen sehr verpflichtet. Wir investieren unsere Ressourcen, um benutzerfreundliche Software und Anwendungen von Weltklasse für das Unternehmensgeschäft mit erstklassiger Technologie zu entwickeln.

', 'slider-path' => 'Slider Pfad', diff --git a/packages/Webkul/Velocity/src/Resources/lang/en/app.php b/packages/Webkul/Velocity/src/Resources/lang/en/app.php index 45bab1d0d..df7bf584d 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/en/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/en/app.php @@ -90,27 +90,28 @@ return [ ] ], 'meta-data' => [ - 'footer' => 'Footer', - 'title' => 'Velocity meta data', - 'activate-slider' => 'Activate Slider', - 'home-page-content' => 'Home Page Content', - 'footer-left-content' => 'Footer Left Content', - 'subscription-content' => 'Subscription bar Content', - 'sidebar-categories' => 'Sidebar Categories', - 'footer-left-raw-content' => '

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

', - 'slider-path' => 'Slider Path', - 'category-logo' => 'Category logo', - 'product-policy' => 'Product Policy', - 'update-meta-data' => 'Update Meta Data', - 'product-view-image' => 'Product View Image', - 'advertisement-two' => 'Advertisement Two Images', - 'advertisement-one' => 'Advertisement One Images', - 'footer-middle-content' => 'Footer Middle Content', - 'advertisement-four' => 'Advertisement Four Images', - 'advertisement-three' => 'Advertisement Three Images', - 'images' => 'Images', - 'general' => 'General', - 'add-image-btn-title' => 'Add Image' + 'footer' => 'Footer', + 'title' => 'Velocity meta data', + 'activate-slider' => 'Activate Slider', + 'home-page-content' => 'Home Page Content', + 'footer-left-content' => 'Footer Left Content', + 'subscription-content' => 'Subscription bar Content', + 'sidebar-categories' => 'Sidebar Categories', + 'header_content_count' => 'Header Content Count', + 'footer-left-raw-content' => '

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

', + 'slider-path' => 'Slider Path', + 'category-logo' => 'Category logo', + 'product-policy' => 'Product Policy', + 'update-meta-data' => 'Update Meta Data', + 'product-view-image' => 'Product View Image', + 'advertisement-two' => 'Advertisement Two Images', + 'advertisement-one' => 'Advertisement One Images', + 'footer-middle-content' => 'Footer Middle Content', + 'advertisement-four' => 'Advertisement Four Images', + 'advertisement-three' => 'Advertisement Three Images', + 'images' => 'Images', + 'general' => 'General', + 'add-image-btn-title' => 'Add Image' ], 'category' => [ 'save-btn-title' => 'Save Menu', diff --git a/packages/Webkul/Velocity/src/Resources/lang/fa/app.php b/packages/Webkul/Velocity/src/Resources/lang/fa/app.php index 1582d8964..611f5a9cc 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/fa/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/fa/app.php @@ -97,6 +97,7 @@ return [ 'footer-left-content' => 'بالا و پایین صفحه', 'subscription-content' => 'نوار اشتراک محتوا', 'sidebar-categories' => 'دسته بندی های نوار کناری', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

ما دوست داریم که نرم افزارهایی را تهیه کرده و مشکلات دنیای واقعی را با باینری حل کنیم. ما به اهداف خود بسیار متعهد هستیم. ما منابع خود را برای ایجاد کلاس های نرم افزاری و برنامه های کاربردی برای تجارت سازمانی با درجه برتر ، در لبه تخصص فناوری سرمایه گذاری می کنیم..

', 'slider-path' => 'مسیر کشویی', 'category-logo' => 'آرم دسته', diff --git a/packages/Webkul/Velocity/src/Resources/lang/it/app.php b/packages/Webkul/Velocity/src/Resources/lang/it/app.php index 01bc554e4..45330bfb0 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/it/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/it/app.php @@ -98,6 +98,7 @@ return [ 'footer-left-content' => 'Contenuti Footer Sinistra', 'subscription-content' => 'Conenuti Subscription bar', 'sidebar-categories' => 'Categorie Sidebar', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

Ci piace personalizzare software e risolvere problemi del mondo reale. Siamo fortemente to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

', 'slider-path' => 'Percorso Slider', 'category-logo' => 'Logo Categoria', diff --git a/packages/Webkul/Velocity/src/Resources/lang/nl/app.php b/packages/Webkul/Velocity/src/Resources/lang/nl/app.php index e7c004717..b998de6f8 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/nl/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/nl/app.php @@ -97,6 +97,7 @@ return [ 'footer-left-content' => 'Inhoud voettekst links', 'subscription-content' => 'Abonnementsbalk Inhoud', 'sidebar-categories' => 'Sidebar categorieën', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

We houden ervan om software te maken en de echte wereldproblemen met de binaire bestanden op te lossen. We zijn zeer toegewijd aan onze doelen. We investeren onze middelen om gebruiksvriendelijke software en applicaties van wereldklasse te creëren met de allerbeste, geavanceerde technologie-expertise.

', 'slider-path' => 'Schuifpad', 'category-logo' => 'Category logo', diff --git a/packages/Webkul/Velocity/src/Resources/lang/pl/app.php b/packages/Webkul/Velocity/src/Resources/lang/pl/app.php index 8287820ff..c23c1b07d 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/pl/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/pl/app.php @@ -97,6 +97,7 @@ return [ 'footer-left-content' => 'Zawartość lewejstrony stopki', 'subscription-content' => 'Treść paska subskrypcji', 'sidebar-categories' => 'kategorie paska bocznego', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

Uwielbiamy tworzyć oprogramowanie i rozwiązywać rzeczywiste problemy z plikami binarnymi. Jesteśmy bardzo zaangażowani w realizację naszych celów. Inwestujemy olbrzymie zasoby w tworzenie światowej klasy łatwego w użyciu oprogramowania oraz aplikacji dla firm oraz użytkowników prywatnych , w oparciu o najnowszą wiedzę technologiczną

', 'slider-path' => 'Ścieżka Slidera (suwaka)', 'category-logo' => 'Logo kategorii', diff --git a/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php index 03ec3736b..bfdbc773b 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php @@ -97,6 +97,7 @@ return [ 'footer-left-content' => 'Conteúdo Rodapé Esquerdo', 'subscription-content' => 'Conteúdo da Barra de Inscrição', 'sidebar-categories' => 'Sidebar Categories', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.

', 'slider-path' => 'Caminho do Slider', 'category-logo' => 'Logo da Categoria', diff --git a/packages/Webkul/Velocity/src/Resources/lang/tr/app.php b/packages/Webkul/Velocity/src/Resources/lang/tr/app.php index 7ae68a238..4f9b93d8a 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/tr/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/tr/app.php @@ -97,6 +97,7 @@ return [ 'footer-left-content' => 'Alt Sol İçeriği', 'subscription-content' => 'Abonelik Çubuğu İçeriği', 'sidebar-categories' => 'Yan Kategoriler', + 'header_content_count' => 'Header Content Count', 'footer-left-raw-content' => '

Yazılımlar üretmeyi ve dünyada karşılaştığımız sorunları bu şekilde çözmeyi çok seviyoruz. Hedeflerimize büyük önem veriyor, en iyi olduğumuz teknoloji uzmanlığı ile kurumsal işleriniz için birin sınıf kullanıcı dostu yazılım ve uygulamalar oluşturmak için kaynaklarımıza yatırım yapıyoruz.

', 'slider-path' => 'Slider Yolu', 'category-logo' => 'Kategori Logosu', diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php index 0612a733e..75522d3b7 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/meta-info/meta-data.blade.php @@ -78,6 +78,17 @@ value="{{ $metaData ? $metaData->sidebar_category_count : '10' }}" /> +
+ + + +
+