Просмотр исходного кода

#103 addition menu below cover image in Persons and Orgs modules

Alex Trofimov 11 лет назад
Родитель
Сommit
c0ea7502a7

+ 1 - 0
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -94,6 +94,7 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             'id' => $aData[$CNF['FIELD_ID']],
             'content_url' => $sUrl,
             'title' => $aData[$CNF['FIELD_NAME']],
+            'menu' => BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_SUBMENU_VIEW_ENTRY_COVER'])->getCode(),
 
             'picture_avatar_url' => $sUrlAvatar,
             'picture_popup' => $sPicturePopup,

+ 10 - 5
modules/base/profile/template/cover.html

@@ -1,9 +1,14 @@
 
-<div class="bx-base-pofile-cover">
-    <a class="bx-base-pofile-cover-image bx-def-round-corners bx-def-border" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)" style="background-image:url(__cover_url__)">&nbsp;</a>
-    <div class="bx-base-pofile-cover-info bx-def-unit bx-def-padding">
-        <a href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent())"><img class="bx-def-margin-right bx-def-ava bx-def-ava-size" src="__picture_avatar_url__" /></a>
-        <h1 class="bx-def-unit-info bx-def-margin-sec-bottom bx-def-margin-sec-top bx-def-font-contrasted">__title__</h1>
+<div class="bx-base-pofile-cover-wrapper bx-def-round-corners">
+    <div class="bx-base-pofile-cover">
+        <a class="bx-base-pofile-cover-image bx-def-box-sizing" href="__cover_href__" onclick="$('#__cover_popup_id__').dolPopupImage('__cover_url__', this)" style="background-image:url(__cover_url__)">&nbsp;</a>
+        <div class="bx-base-pofile-cover-info bx-def-unit bx-def-padding">
+            <a href="__picture_href__" onclick="$('#__picture_popup_id__').dolPopupImage('__picture_url__', $(this).parent())"><img class="bx-def-margin-right bx-def-ava bx-def-ava-size" src="__picture_avatar_url__" /></a>
+            <h1 class="bx-def-unit-info bx-def-margin-sec-bottom bx-def-margin-sec-top bx-def-font-contrasted">__title__</h1>
+        </div>
+    </div>
+    <div class="bx-base-pofile-menu">
+        __menu__
     </div>
 </div>
 

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

@@ -16,6 +16,14 @@
 
 /* profile cover */
 
+.bx-base-pofile-cover-wrapper {
+    overflow:hidden;
+}
+
+.bx-base-pofile-menu {
+    text-align:center;
+}
+
 .bx-base-pofile-cover {
     position:relative;
     height:320px;

+ 1 - 1
modules/boonex/albums/install/sql/enable.sql

@@ -242,7 +242,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('trigger_profile_view_submenu', 'bx_albums', 'albums-author', '_bx_albums_menu_item_title_system_view_entries_author', '_bx_albums_menu_item_title_view_entries_author', 'page.php?i=albums-author&profile_id={profile_id}', '', '', '', '', 2147483647, 1, 0, 0);
+('trigger_profile_view_submenu', 'bx_albums', 'albums-author', '_bx_albums_menu_item_title_system_view_entries_author', '_bx_albums_menu_item_title_view_entries_author', 'page.php?i=albums-author&profile_id={profile_id}', '', '', 'picture-o col-blue1', '', 2147483647, 1, 0, 0);
 
 
 -- PRIVACY 

+ 1 - 0
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -82,6 +82,7 @@ class BxOrgsConfig extends BxBaseModProfileConfig
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_organizations_view_actions_more', // actions menu on view entry page for "more" popup
             'OBJECT_MENU_SUBMENU' => 'bx_organizations_submenu', // main module submenu
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_organizations_view_submenu',  // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_COVER' => 'bx_organizations_view_submenu_cover',  // view entry submenu displayed in cover
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'organizations-home', // first item in view entry submenu from main module submenu
             'OBJECT_MENU_MANAGE_TOOLS' => 'bx_organizations_menu_manage_tools', //manage menu in content administration tools
             'OBJECT_PAGE_VIEW_ENTRY' => 'bx_organizations_view_profile',

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

@@ -97,6 +97,7 @@
     <string name="_bx_orgs_menu_title_view_profile_actions_more"><![CDATA[Organization More Actions]]></string>
     <string name="_bx_orgs_menu_set_title_view_profile_submenu"><![CDATA[View Organization Submenu]]></string>
     <string name="_bx_orgs_menu_title_view_profile_submenu"><![CDATA[View Organization Submenu]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_submenu_cover"><![CDATA[Organization Cover Submenu]]></string>
 	<string name="_bx_orgs_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
     <string name="_bx_orgs_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete"><![CDATA[Delete]]></string>

+ 5 - 4
modules/boonex/organizations/install/sql/enable.sql

@@ -185,15 +185,16 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- MENU: view submenu
 
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_organizations_view_submenu', '_bx_orgs_menu_title_view_profile_submenu', 'bx_organizations_view_submenu', 'bx_organizations', 8, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php');
+('bx_organizations_view_submenu', '_bx_orgs_menu_title_view_profile_submenu', 'bx_organizations_view_submenu', 'bx_organizations', 8, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php'),
+('bx_organizations_view_submenu_cover', '_bx_orgs_menu_title_view_profile_submenu_cover', 'bx_organizations_view_submenu', 'bx_organizations', 14, 0, 1, 'BxOrgsMenuView', 'modules/boonex/organizations/classes/BxOrgsMenuView.php');
 
 INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
 ('bx_organizations_view_submenu', 'bx_organizations', '_bx_orgs_menu_set_title_view_profile_submenu', 0);
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_organizations_view_submenu', 'bx_organizations', 'view-organization-profile', '_bx_orgs_menu_item_title_system_view_profile_view', '_bx_orgs_menu_item_title_view_profile_view', 'page.php?i=view-organization-profile&id={content_id}', '', '', '', '', 2147483647, 1, 0, 1),
-('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-info', '_bx_orgs_menu_item_title_system_view_profile_info', '_bx_orgs_menu_item_title_view_profile_info', 'page.php?i=organization-profile-info&id={content_id}', '', '', '', '', 2147483647, 1, 0, 2),
-('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-friends', '_bx_orgs_menu_item_title_system_view_profile_friends', '_bx_orgs_menu_item_title_view_profile_friends', 'page.php?i=organization-profile-friends&profile_id={profile_id}', '', '', '', '', 2147483647, 1, 0, 3);
+('bx_organizations_view_submenu', 'bx_organizations', 'view-organization-profile', '_bx_orgs_menu_item_title_system_view_profile_view', '_bx_orgs_menu_item_title_view_profile_view', 'page.php?i=view-organization-profile&id={content_id}', '', '', 'briefcase col-red2', '', 2147483647, 1, 0, 1),
+('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-info', '_bx_orgs_menu_item_title_system_view_profile_info', '_bx_orgs_menu_item_title_view_profile_info', 'page.php?i=organization-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', 2147483647, 1, 0, 2),
+('bx_organizations_view_submenu', 'bx_organizations', 'organization-profile-friends', '_bx_orgs_menu_item_title_system_view_profile_friends', '_bx_orgs_menu_item_title_view_profile_friends', 'page.php?i=organization-profile-friends&profile_id={profile_id}', '', '', 'group col-blue3', '', 2147483647, 1, 0, 3);
 
 -- MENU: notifications menu in account popup
 

+ 1 - 0
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -82,6 +82,7 @@ class BxPersonsConfig extends BxBaseModProfileConfig
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_persons_view_actions_more', // actions menu on view entry page for "more" popup
             'OBJECT_MENU_SUBMENU' => 'bx_persons_submenu', // main module submenu
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_persons_view_submenu',  // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_COVER' => 'bx_persons_view_submenu_cover',  // view entry submenu displayed in cover
             'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'persons-home', // first item in view entry submenu from main module submenu
             'OBJECT_MENU_MANAGE_TOOLS' => 'bx_persons_menu_manage_tools', //manage menu in content administration tools
             'OBJECT_PAGE_VIEW_ENTRY' => 'bx_persons_view_profile',

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

@@ -92,6 +92,7 @@
     <string name="_bx_persons_menu_title_view_profile_actions_more"><![CDATA[Person More Actions]]></string>
     <string name="_bx_persons_menu_set_title_view_profile_submenu"><![CDATA[View Person Submenu]]></string>
     <string name="_bx_persons_menu_title_view_profile_submenu"><![CDATA[View Person Submenu]]></string>
+    <string name="_bx_persons_menu_title_view_profile_submenu_cover"><![CDATA[Person Cover Submenu]]></string>
 	<string name="_bx_persons_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
     <string name="_bx_persons_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
     <string name="_bx_persons_menu_item_title_system_delete"><![CDATA[Delete]]></string>

+ 5 - 4
modules/boonex/persons/install/sql/enable.sql

@@ -180,15 +180,16 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- MENU: view submenu
 
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_persons_view_submenu', '_bx_persons_menu_title_view_profile_submenu', 'bx_persons_view_submenu', 'bx_persons', 8, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php');
+('bx_persons_view_submenu', '_bx_persons_menu_title_view_profile_submenu', 'bx_persons_view_submenu', 'bx_persons', 8, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php'),
+('bx_persons_view_submenu_cover', '_bx_persons_menu_title_view_profile_submenu_cover', 'bx_persons_view_submenu', 'bx_persons', 14, 0, 1, 'BxPersonsMenuView', 'modules/boonex/persons/classes/BxPersonsMenuView.php');
 
 INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
 ('bx_persons_view_submenu', 'bx_persons', '_bx_persons_menu_set_title_view_profile_submenu', 0);
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_persons_view_submenu', 'bx_persons', 'view-persons-profile', '_bx_persons_menu_item_title_system_view_profile_view', '_bx_persons_menu_item_title_view_profile_view', 'page.php?i=view-persons-profile&id={content_id}', '', '', '', '', 2147483647, 1, 0, 1),
-('bx_persons_view_submenu', 'bx_persons', 'persons-profile-info', '_bx_persons_menu_item_title_system_view_profile_info', '_bx_persons_menu_item_title_view_profile_info', 'page.php?i=persons-profile-info&id={content_id}', '', '', '', '', 2147483647, 1, 0, 2),
-('bx_persons_view_submenu', 'bx_persons', 'persons-profile-friends', '_bx_persons_menu_item_title_system_view_profile_friends', '_bx_persons_menu_item_title_view_profile_friends', 'page.php?i=persons-profile-friends&profile_id={profile_id}', '', '', '', '', 2147483647, 1, 0, 3);
+('bx_persons_view_submenu', 'bx_persons', 'view-persons-profile', '_bx_persons_menu_item_title_system_view_profile_view', '_bx_persons_menu_item_title_view_profile_view', 'page.php?i=view-persons-profile&id={content_id}', '', '', 'user col-blue3', '', 2147483647, 1, 0, 1),
+('bx_persons_view_submenu', 'bx_persons', 'persons-profile-info', '_bx_persons_menu_item_title_system_view_profile_info', '_bx_persons_menu_item_title_view_profile_info', 'page.php?i=persons-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', 2147483647, 1, 0, 2),
+('bx_persons_view_submenu', 'bx_persons', 'persons-profile-friends', '_bx_persons_menu_item_title_system_view_profile_friends', '_bx_persons_menu_item_title_view_profile_friends', 'page.php?i=persons-profile-friends&profile_id={profile_id}', '', '', 'group col-blue3', '', 2147483647, 1, 0, 3);
 
 -- MENU: notifications menu in account popup
 SET @iNotifMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_account_notifications' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);

+ 1 - 1
modules/boonex/posts/install/sql/enable.sql

@@ -226,7 +226,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('trigger_profile_view_submenu', 'bx_posts', 'posts-author', '_bx_posts_menu_item_title_system_view_entries_author', '_bx_posts_menu_item_title_view_entries_author', 'page.php?i=posts-author&profile_id={profile_id}', '', '', '', '', 2147483647, 1, 0, 0);
+('trigger_profile_view_submenu', 'bx_posts', 'posts-author', '_bx_posts_menu_item_title_system_view_entries_author', '_bx_posts_menu_item_title_view_entries_author', 'page.php?i=posts-author&profile_id={profile_id}', '', '', 'file-text col-red3', '', 2147483647, 1, 0, 0);
 
 
 -- PRIVACY 

+ 3 - 2
modules/boonex/russian/data/langs/bx_organizations/ru.xml

@@ -94,8 +94,9 @@
     <string name="_bx_orgs_menu_title_view_profile_actions"><![CDATA[Организации - Действия]]></string>
     <string name="_bx_orgs_menu_set_title_view_profile_actions_more"><![CDATA[Организации - Дополнительные Действия]]></string>
     <string name="_bx_orgs_menu_title_view_profile_actions_more"><![CDATA[Организации - Дополнительные Действия]]></string>
-    <string name="_bx_orgs_menu_set_title_view_profile_submenu"><![CDATA[Просмотреть подменю организаций]]></string>
-    <string name="_bx_orgs_menu_title_view_profile_submenu"><![CDATA[Просмотреть подменю организаций]]></string>
+    <string name="_bx_orgs_menu_set_title_view_profile_submenu"><![CDATA[Подменю просмотра организации]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_submenu"><![CDATA[Подменю просмотра организации]]></string>
+    <string name="_bx_orgs_menu_title_view_profile_submenu_cover"><![CDATA[Подменю организации на обложке]]></string>
 	<string name="_bx_orgs_menu_set_title_manage_tools"><![CDATA[Управление подменю инструментов]]></string>
     <string name="_bx_orgs_menu_title_manage_tools"><![CDATA[Управление подменю инструментов]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete"><![CDATA[Удалить]]></string>

+ 3 - 2
modules/boonex/russian/data/langs/bx_persons/ru.xml

@@ -90,8 +90,9 @@
     <string name="_bx_persons_menu_title_view_profile_actions"><![CDATA[Персоны - Действия]]></string>
     <string name="_bx_persons_menu_set_title_view_profile_actions_more"><![CDATA[Персоны - Дополнительные действия]]></string>
     <string name="_bx_persons_menu_title_view_profile_actions_more"><![CDATA[Персоны - Дополнительные действия]]></string>
-    <string name="_bx_persons_menu_set_title_view_profile_submenu"><![CDATA[Просмотреть подменю персон]]></string>
-    <string name="_bx_persons_menu_title_view_profile_submenu"><![CDATA[Просмотреть подменю персон]]></string>
+    <string name="_bx_persons_menu_set_title_view_profile_submenu"><![CDATA[Подменю просмотра персоны]]></string>
+    <string name="_bx_persons_menu_title_view_profile_submenu"><![CDATA[Подменю просмотра персоны]]></string>
+    <string name="_bx_persons_menu_title_view_profile_submenu_cover"><![CDATA[Подменю персоны на обложке]]></string>
 	<string name="_bx_persons_menu_set_title_manage_tools"><![CDATA[Управление подменю инструментов]]></string>
     <string name="_bx_persons_menu_title_manage_tools"><![CDATA[Управление подменю инструментов]]></string>
     <string name="_bx_persons_menu_item_title_system_delete"><![CDATA[Удалить]]></string>