From 5474660f4758334f38f35081e34b2d275fefe76f Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Mon, 2 May 2011 12:27:04 +0000 Subject: [PATCH] //merge 1.4 => 1.5 --- admin-dev/tabs/AdminModules.php | 30 +++++++++++++++++++++++++++++- img/admin/filter.png | Bin 0 -> 720 bytes 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 img/admin/filter.png diff --git a/admin-dev/tabs/AdminModules.php b/admin-dev/tabs/AdminModules.php index 45f6ed10e..f0fd44e1a 100644 --- a/admin-dev/tabs/AdminModules.php +++ b/admin-dev/tabs/AdminModules.php @@ -671,7 +671,7 @@ class AdminModules extends AdminTab '; - + echo $this->displaySelectedFilter(); if ($tab_module = Tools::getValue('tab_module')) if (array_key_exists($tab_module, $this->listTabModules)) $goto = $tab_module; @@ -871,6 +871,34 @@ class AdminModules extends AdminTab return file_put_contents($this->_moduleCacheFile, Tools::file_get_contents('http://www.prestashop.com/xml/modules_list.xml')); } + public function displaySelectedFilter() + { + global $cookie; + $selected_filter = ''; + $id_employee = (int)($cookie->id_employee); + + $showTypeModules = Configuration::get('PS_SHOW_TYPE_MODULES_'.(int)($cookie->id_employee)); + $showInstalledModules = Configuration::get('PS_SHOW_INSTALLED_MODULES_'.(int)($cookie->id_employee)); + $showEnabledModules = Configuration::get('PS_SHOW_ENABLED_MODULES_'.(int)($cookie->id_employee)); + $showCountryModules = Configuration::get('PS_SHOW_COUNTRY_MODULES_'.(int)($cookie->id_employee)); + $selected_filter .= ($showTypeModules == 'allModules' ? $this->l('All Modules').' - ' : ''). + ($showTypeModules == 'nativeModules' ? $this->l('Native Modules').' - ' : ''). + ($showTypeModules == 'partnerModules' ? $this->l('Partners Modules').' - ' : ''). + ($showTypeModules == 'otherModules' ? $this->l('Others Modules').' - ' : ''). + ($showInstalledModules == 'installedUninstalled' ? $this->l('Installed & Uninstalled').' - ' : ''). + ($showInstalledModules == 'installed' ? $this->l('Installed Modules').' - ' : ''). + ($showInstalledModules == 'unistalled' ? $this->l('Uninstalled Modules').' - ' : ''). + ($showEnabledModules == 'enabledDisabled' ? $this->l('Enabled & Disabled').' - ' : ''). + ($showEnabledModules == 'enabled' ? $this->l('Enabled Modules').' - ' : ''). + ($showEnabledModules == 'disabled' ? $this->l('Disabled Modules').' - ' : ''). + ($showCountryModules === 1 ? $this->l('Current country:').' '.$nameCountryDefault.' - ' : ''). + ($showCountryModules === 0 ? $this->l('All countries').' - ' : ''); + + if (strlen($selected_filter) != 0) + $selected_filter = '
'.$this->l('Selected filters').' : '.rtrim($selected_filter, ' - ').'
'; + return $selected_filter; + } + private function setFilterModules($module_type, $country_module_value, $module_install, $module_status) { global $cookie; diff --git a/img/admin/filter.png b/img/admin/filter.png new file mode 100644 index 0000000000000000000000000000000000000000..bcf0fbbbb813172efb556fcc3bb67d05a6987d5f GIT binary patch literal 720 zcmV;>0x$iEP)+~r*^RTR90H;?##|RerIQA4I^$+ ze-tCYegW9Bzp7L!A#JTzV`gUN!LnkpNH&}O4JbfU4sJG0b1=6oE3|%y40r{kfOc#| zp^x{w6dUy+%fVP$mK9Rg>-8H3cgfDr&qE0`aImqlfngX={^H?e8F`5OCWH{8)9HwJ zZ$Avi{{47TmjVuMglJ-70wErE2TP?AOG``0!;0+Y9^Zd{A-lN;K%r1TQ4~_C6vpP!TwJ8xZsU0#p64OUGO^fy(_XKKZQD4G69j(` z{JNFFFq6~MQ_|@)V`F1nU0u;=G_WiS!!WqKyrf#KqN=KI_8QRdJOjV2uWU0rJBy}i zOioS`kH-OUT^HANIXgQ;RaFiS4%pq@y;-hrV=&A_*LB9n$7wVgG@DJ1j*iIXavUBW z0+7jMq8SJw*x6F~_Tw`D_%okSu*tyUwK%aPCLnV+AhTrNjHI6??I zozA_>!RqQN)oPWwxjFLrJPQj80F=vR*4EYr3?5Y~d@$E_Lu(+EU7=#vYPHZb4M~y) zspvQki9{k&=7$vEM;cjfaT@oVbx!t2M9UvK&OG{{d1A-fnPj6 zJ`UzQfgcC~n1JU4C4gsrM$$bA{0Yoo4wC~s!2SnPUwL3ZxUT{L0000