Răsfoiți Sursa

Ticket #2416 - Core changes and usage in Persons module.

AntonLV 7 ani în urmă
părinte
comite
f4a17dac8f

+ 8 - 7
modules/base/general/classes/BxBaseModGeneralSearchResult.php

@@ -117,15 +117,16 @@ class BxBaseModGeneralSearchResult extends BxTemplSearchResult
         return $iPerPageInShowCase;
         return $iPerPageInShowCase;
     }
     }
     
     
-    function displayResultBlock ()
+    function displayResultBlock()
     {
     {
-		if ($this->bShowcaseView){
-            $this->addContainerClass(array('bx-def-margin-sec-lefttopright-neg', 'bx-base-unit-showcase-wrapper'));
-			$this->aCurrent['paginate']['perPage'] = $this->getItemPerPageInShowCase();
-			$this->oModule->_oTemplate->addCss(array(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css'));
+        if ($this->bShowcaseView) {
+            $this->addContainerClass(array('bx-base-unit-showcase-wrapper'));
+            $this->aCurrent['paginate']['perPage'] = $this->getItemPerPageInShowCase();
+            $this->oModule->_oTemplate->addCss(array(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css'));
             $this->oModule->_oTemplate->addJs(array('flickity/flickity.pkgd.min.js','modules/base/general/js/|showcase.js'));
             $this->oModule->_oTemplate->addJs(array('flickity/flickity.pkgd.min.js','modules/base/general/js/|showcase.js'));
-		}
-		return parent::displayResultBlock ();
+        }
+
+        return parent::displayResultBlock();
     }
     }
 }
 }
 
 

+ 14 - 7
modules/base/profile/classes/BxBaseModProfileSearchResult.php

@@ -16,7 +16,7 @@ class BxBaseModProfileSearchResult extends BxBaseModGeneralSearchResult
     public function __construct($sMode = '', $aParams = array())
     public function __construct($sMode = '', $aParams = array())
     {
     {
         parent::__construct($sMode, $aParams);
         parent::__construct($sMode, $aParams);
-        $this->aUnitViews = array('gallery' => 'unit_with_cover.html', 'showcase' => 'unit_with_cover_showcase.html', 'showcase_wo_info' => 'unit_wo_info_showcase.html', 'simple' => 'unit_wo_links.html');
+        $this->aUnitViews = array('gallery' => 'unit_with_cover.html', 'gallery_wo_info' => 'unit_wo_info.html', 'showcase' => 'unit_with_cover_showcase.html', 'showcase_wo_info' => 'unit_wo_info_showcase.html', 'simple' => 'unit_wo_links.html');
         if (!empty($aParams['unit_views']) && is_array($aParams['unit_views']))
         if (!empty($aParams['unit_views']) && is_array($aParams['unit_views']))
             $this->aUnitViews = array_merge ($this->aUnitViews, $aParams['unit_views']);
             $this->aUnitViews = array_merge ($this->aUnitViews, $aParams['unit_views']);
         if (!empty($aParams['unit_view']))
         if (!empty($aParams['unit_view']))
@@ -24,13 +24,20 @@ class BxBaseModProfileSearchResult extends BxBaseModGeneralSearchResult
         
         
         $this->sUnitTemplate = $this->aUnitViews[$this->sUnitViewDefault];
         $this->sUnitTemplate = $this->aUnitViews[$this->sUnitViewDefault];
         $this->sCenterContentUnitSelector = '.bx-base-pofile-unit';
         $this->sCenterContentUnitSelector = '.bx-base-pofile-unit';
-        $this->addContainerClass (array('bx-def-margin-sec-lefttopright-neg', 'bx-base-pofile-units-wrapper', 'bx-def-margin-sec-bottom-neg'));
-		if (in_array($this->sUnitTemplate, array('unit_with_cover_showcase.html', 'unit_wo_info_showcase.html'))){
-			$this->bShowcaseView = true;
+        $this->addContainerClass (array(
+            'bx-base-pofile-units-wrapper', 
+            'bx-base-puw-' . str_replace('_' ,  '-', $this->sUnitViewDefault),
+            'bx-def-margin-sec-neg'
+        ));
+
+        if(in_array($this->sUnitTemplate, array('unit_wo_info.html', 'unit_wo_info_showcase.html'))) {
+            $this->removeContainerClass('bx-def-margin-sec-neg');
+        }
+        if(in_array($this->sUnitTemplate, array('unit_with_cover_showcase.html', 'unit_wo_info_showcase.html'))) {
+            $this->bShowcaseView = true;
 
 
-			$this->removeContainerClass ('bx-def-margin-bottom-neg');
-			if($this->sUnitTemplate == 'unit_wo_info_showcase.html')
-				$this->addContainerAttribute(array('bx-sc-group-cells' => 3));
+            if($this->sUnitTemplate == 'unit_wo_info_showcase.html')
+                $this->addContainerAttribute(array('bx-sc-group-cells' => 3));
         }
         }
         if ($sMode == 'recommended')
         if ($sMode == 'recommended')
             $this->bRecommendedView=true;
             $this->bRecommendedView=true;

+ 9 - 0
modules/base/profile/template/css/main.css

@@ -392,6 +392,15 @@ a.bx-base-pofile-cover-thumb p.bx-base-pofile-unit-thumb.bx-def-ava-big-size {
     justify-content: flex-start;
     justify-content: flex-start;
 }
 }
 
 
+.bx-base-pofile-units-wrapper.bx-base-puw-gallery-wo-info {
+    -webkit-justify-content: space-between;
+    justify-content: space-between;
+}
+.bx-base-pofile-units-wrapper.bx-base-puw-gallery-wo-info:before,
+.bx-base-pofile-units-wrapper.bx-base-puw-gallery-wo-info:after {
+    display: none;
+}
+
 .bx-base-pofile-units-wrapper .bx-base-pofile-unit-with-cover {
 .bx-base-pofile-units-wrapper .bx-base-pofile-unit-with-cover {
     -webkit-box-flex: 0;
     -webkit-box-flex: 0;
 
 

+ 1 - 0
modules/boonex/persons/install/langs/en.xml

@@ -157,6 +157,7 @@
     <string name="_bx_persons_page_block_title_system_manage"><![CDATA[Manage Own People]]></string>
     <string name="_bx_persons_page_block_title_system_manage"><![CDATA[Manage Own People]]></string>
     <string name="_bx_persons_page_block_title_system_manage_administration"><![CDATA[Manage All People]]></string>
     <string name="_bx_persons_page_block_title_system_manage_administration"><![CDATA[Manage All People]]></string>
     <string name="_bx_persons_page_block_title_manage"><![CDATA[Manage People]]></string>
     <string name="_bx_persons_page_block_title_manage"><![CDATA[Manage People]]></string>
+    <string name="_bx_persons_page_block_title_sys_active_profiles"><![CDATA[Active People]]></string>
     <string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Active People]]></string>
     <string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Active People]]></string>
     <string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Online People]]></string>
     <string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Online People]]></string>
     <string name="_bx_persons_page_block_title_search_form"><![CDATA[Search Form]]></string>
     <string name="_bx_persons_page_block_title_search_form"><![CDATA[Search Form]]></string>

+ 2 - 1
modules/boonex/persons/install/sql/enable.sql

@@ -195,7 +195,8 @@ SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' A
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_featured_entries_view_showcase', '_bx_persons_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 1),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_featured_entries_view_showcase', '_bx_persons_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 1),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_recommended_entries_view_showcase', '_bx_persons_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
 ('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_recommended_entries_view_showcase', '_bx_persons_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
-('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_entries_view_showcase', '_bx_persons_page_block_title_active_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:16:\"showcase_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3);
+('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_entries_view_showcase', '_bx_persons_page_block_title_active_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:16:\"showcase_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_persons', '_bx_persons_page_block_title_sys_active_profiles', '_bx_persons_page_block_title_active_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_persons\";s:6:\"method\";s:22:\"browse_active_profiles\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:15:\"gallery_wo_info\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 4);
 
 
 -- MENU
 -- MENU
 
 

+ 1 - 0
modules/boonex/russian/data/langs/bx_persons/ru.xml

@@ -157,6 +157,7 @@
     <string name="_bx_persons_page_block_title_system_manage"><![CDATA[Управление собственными профилями]]></string>
     <string name="_bx_persons_page_block_title_system_manage"><![CDATA[Управление собственными профилями]]></string>
     <string name="_bx_persons_page_block_title_system_manage_administration"><![CDATA[Управление всеми профилями]]></string>
     <string name="_bx_persons_page_block_title_system_manage_administration"><![CDATA[Управление всеми профилями]]></string>
     <string name="_bx_persons_page_block_title_manage"><![CDATA[Управление]]></string>
     <string name="_bx_persons_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_persons_page_block_title_sys_active_profiles"><![CDATA[Активные пользователи]]></string>
     <string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Активные пользователи]]></string>
     <string name="_bx_persons_page_block_title_active_profiles"><![CDATA[Активные пользователи]]></string>
     <string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Онлайн пользователи]]></string>
     <string name="_bx_persons_page_block_title_online_profiles"><![CDATA[Онлайн пользователи]]></string>
     <string name="_bx_persons_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
     <string name="_bx_persons_page_block_title_search_form"><![CDATA[Форма поиска]]></string>