AntonLV 2 лет назад
Родитель
Сommit
a5fea32ffb

+ 1 - 1
modules/boonex/jobs/classes/BxJobsConfig.php

@@ -27,7 +27,7 @@ class BxJobsConfig extends BxBaseModGroupsConfig
         $this->CNF = array (
 
             // module icon
-            'ICON' => 'handshake col-green2',
+            'ICON' => 'briefcase col-green2',
 
             // database tables
             'TABLE_ENTRIES' => $aModule['db_prefix'] . 'data',

+ 33 - 0
modules/boonex/jobs/classes/BxJobsModule.php

@@ -34,6 +34,39 @@ class BxJobsModule extends BxBaseModGroupsModule
             'BrowseRecommendationsFans' => '',
         ]);
     }
+
+    public function serviceApplicants ($iContentId = 0, $bAsArray = false)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(!$iContentId)
+            $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        if(!$iContentId)
+            return false;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if(!$aContentInfo)
+            return false;
+
+        if(!($oGroupProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $this->getName())))
+            return false;
+
+        $iGroupProfileId = $oGroupProfile->id();
+        if(!$this->serviceIsAdmin($iGroupProfileId))
+            return false;
+
+        if(!$bAsArray) {
+            bx_import('BxDolConnection');
+            $mixedResult = $this->serviceBrowseConnectionsQuick ($iGroupProfileId, $CNF['OBJECT_CONNECTIONS'], BX_CONNECTIONS_CONTENT_TYPE_INITIATORS, 0);
+            if(!$mixedResult)
+                return MsgBox(_t('_sys_txt_empty'));
+        }
+        else
+            $mixedResult = BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS'])->getConnectedInitiators($iGroupProfileId, 0);
+
+        return $mixedResult;
+    }
 }
 
 /** @} */

+ 22 - 21
modules/boonex/jobs/install/langs/en.xml

@@ -8,7 +8,7 @@
     <string name="_bx_jobs_option_per_page_browse"><![CDATA[Number of items per page]]></string>
     <string name="_bx_jobs_option_num_rss"><![CDATA[Number of items in RSS feed]]></string>
     <string name="_bx_jobs_option_searchable_fields"><![CDATA[Searchable fields]]></string>
-    <string name="_bx_jobs_option_members_mode"><![CDATA[Special mode for job performers]]></string>
+    <string name="_bx_jobs_option_members_mode"><![CDATA[Special mode for job assignees]]></string>
     <string name="_bx_jobs_option_members_mode_multi_roles"><![CDATA[Multi Roles]]></string>
     <string name="_bx_jobs_option_per_page_for_favorites_lists"><![CDATA[Number of favorite lists per page]]></string>
     <string name="_bx_jobs_option_enable_subscribe_wo_join"><![CDATA[Allow to follow without join]]></string>
@@ -29,11 +29,11 @@
     <string name="_bx_jobs_form_profile_input_sys_allow_view_to"><![CDATA[Visible to]]></string>
     <string name="_bx_jobs_form_profile_input_allow_view_to"><![CDATA[Visible to]]></string>
     <string name="_bx_jobs_form_profile_input_allow_view_favorite_list"><![CDATA[Visibility]]></string>
-    <string name="_bx_jobs_form_profile_input_allow_view_to_desc"><![CDATA[Closed - anyone can find the job and see who's in it, only performers can see posts. Secret - only performers can find the job and see posts.]]></string>
+    <string name="_bx_jobs_form_profile_input_allow_view_to_desc"><![CDATA[Closed - anyone can find the job and see who's in it, only assignees can see posts. Secret - only assignees can find the job and see posts.]]></string>
     <string name="_bx_jobs_form_profile_input_sys_allow_post_to"><![CDATA[Who can post]]></string>
     <string name="_bx_jobs_form_profile_input_allow_post_to"><![CDATA[Who can post]]></string>
-    <string name="_bx_jobs_form_profile_input_sys_initial_members"><![CDATA[Invite Performers]]></string>
-    <string name="_bx_jobs_form_profile_input_initial_members"><![CDATA[Invite Performers]]></string>
+    <string name="_bx_jobs_form_profile_input_sys_initial_members"><![CDATA[Invite Assignees]]></string>
+    <string name="_bx_jobs_form_profile_input_initial_members"><![CDATA[Invite Assignees]]></string>
     <string name="_bx_jobs_form_profile_input_sys_name"><![CDATA[Job Name]]></string>
     <string name="_bx_jobs_form_profile_input_name"><![CDATA[Job Name]]></string>
     <string name="_bx_jobs_form_profile_input_name_err"><![CDATA[Field must contain 1 - 80 characters.]]></string>
@@ -145,8 +145,8 @@
     <string name="_bx_jobs_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
     <string name="_bx_jobs_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
     <string name="_bx_jobs_page_title_profile_friends"><![CDATA[Friends]]></string>
-    <string name="_bx_jobs_page_title_sys_job_fans"><![CDATA[Performers]]></string>
-    <string name="_bx_jobs_page_title_job_fans"><![CDATA[Performers]]></string>
+    <string name="_bx_jobs_page_title_sys_job_fans"><![CDATA[Assignees]]></string>
+    <string name="_bx_jobs_page_title_job_fans"><![CDATA[Assignees]]></string>
     <string name="_bx_jobs_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
     <string name="_bx_jobs_page_block_title_entry_reports"><![CDATA[Reports]]></string>
     <string name="_bx_jobs_page_title_profile_comments"><![CDATA[Comments]]></string>
@@ -165,8 +165,8 @@
     <string name="_bx_jobs_page_title_sys_followed"><![CDATA[Jobs I follow]]></string>
     <string name="_bx_jobs_page_title_joined"><![CDATA[Assigned Jobs]]></string>
     <string name="_bx_jobs_page_title_followed"><![CDATA[Jobs I follow]]></string>
-    <string name="_bx_jobs_page_title_sys_invite_to_job"><![CDATA[Invite Performers to the Job]]></string>
-    <string name="_bx_jobs_page_title_invite_to_job"><![CDATA[Invite Performers to the Job]]></string>
+    <string name="_bx_jobs_page_title_sys_invite_to_job"><![CDATA[Invite Assignees to the Job]]></string>
+    <string name="_bx_jobs_page_title_invite_to_job"><![CDATA[Invite Assignees to the Job]]></string>
     <string name="_bx_jobs_page_title_sys_entries_search"><![CDATA[Search]]></string>
     <string name="_bx_jobs_page_title_entries_search"><![CDATA[Search]]></string>
     <string name="_bx_jobs_page_title_sys_entries_favorites"><![CDATA[Favorites Jobs]]></string>
@@ -207,10 +207,11 @@
     <string name="_bx_jobs_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
     <string name="_bx_jobs_page_block_title_entry_context"><![CDATA[Posted in]]></string>
     <string name="_bx_jobs_page_block_title_admins"><![CDATA[Administrators]]></string>
-    <string name="_bx_jobs_page_block_title_fans_link"><![CDATA[Performers of <a href="{profile_link}">{display_name}</a>]]></string>
-    <string name="_bx_jobs_page_block_title_fans"><![CDATA[Performers]]></string>
-    <string name="_bx_jobs_page_block_title_system_fans"><![CDATA[Performers]]></string>
-    <string name="_bx_jobs_page_block_title_system_fans_manage"><![CDATA[Manage performers]]></string>
+    <string name="_bx_jobs_page_block_title_applicants"><![CDATA[Applicants]]></string>
+    <string name="_bx_jobs_page_block_title_fans_link"><![CDATA[Assignees of <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_jobs_page_block_title_fans"><![CDATA[Assignees]]></string>
+    <string name="_bx_jobs_page_block_title_system_fans"><![CDATA[Assignees]]></string>
+    <string name="_bx_jobs_page_block_title_system_fans_manage"><![CDATA[Manage assignees]]></string>
     <string name="_bx_jobs_page_block_title_invites"><![CDATA[Invites]]></string>
     <string name="_bx_jobs_page_block_title_system_invites_manage"><![CDATA[Invites]]></string>
     <string name="_bx_jobs_page_block_title_bans"><![CDATA[Bans]]></string>
@@ -229,7 +230,7 @@
     <string name="_bx_jobs_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
     <string name="_bx_jobs_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
     <string name="_bx_jobs_page_block_title_categories"><![CDATA[Jobs Categories]]></string>
-    <string name="_bx_jobs_page_block_title_invite_to_job"><![CDATA[Invite Performers to the Job]]></string>
+    <string name="_bx_jobs_page_block_title_invite_to_job"><![CDATA[Invite Assignees to the Job]]></string>
     <string name="_bx_jobs_page_block_title_search_form"><![CDATA[Search Form]]></string>
     <string name="_bx_jobs_page_block_title_search_results"><![CDATA[Search Results]]></string>
     <string name="_bx_jobs_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
@@ -258,8 +259,8 @@
     <string name="_bx_jobs_menu_title_view_profile_actions_more"><![CDATA[Job More Actions]]></string>
     <string name="_bx_jobs_menu_title_view_profile_meta"><![CDATA[Job Meta]]></string>
     <string name="_bx_jobs_menu_set_title_view_profile_meta"><![CDATA[Job Meta]]></string>
-    <string name="_bx_jobs_menu_item_title_system_sm_members"><![CDATA[Performers]]></string>
-    <string name="_bx_jobs_menu_item_title_sm_members"><![CDATA[{0} performers]]></string>
+    <string name="_bx_jobs_menu_item_title_system_sm_members"><![CDATA[Assignees]]></string>
+    <string name="_bx_jobs_menu_item_title_sm_members"><![CDATA[{0} assignees]]></string>
     <string name="_bx_jobs_menu_set_title_view_profile_submenu"><![CDATA[View Job Submenu]]></string>
     <string name="_bx_jobs_menu_title_view_profile_submenu"><![CDATA[View Job Submenu]]></string>
     <string name="_bx_jobs_menu_title_entries_my"><![CDATA[Profile Jobs Action Menu]]></string>
@@ -294,8 +295,8 @@
     <string name="_bx_jobs_menu_item_title_view_entries_in_context"><![CDATA[Jobs]]></string>
     <string name="_bx_jobs_menu_item_title_system_view_joined_jobs"><![CDATA[Jobs]]></string>
     <string name="_bx_jobs_menu_item_title_view_joined_jobs"><![CDATA[Jobs]]></string>
-    <string name="_bx_jobs_menu_item_title_system_view_fans"><![CDATA[Performers]]></string>
-    <string name="_bx_jobs_menu_item_title_view_fans"><![CDATA[Performers]]></string>
+    <string name="_bx_jobs_menu_item_title_system_view_fans"><![CDATA[Assignees]]></string>
+    <string name="_bx_jobs_menu_item_title_view_fans"><![CDATA[Assignees]]></string>
     <string name="_bx_jobs_menu_item_title_system_view_manage"><![CDATA[Manage]]></string>
     <string name="_bx_jobs_menu_item_title_view_manage"><![CDATA[Manage]]></string>
     <string name="_bx_jobs_menu_item_title_system_view_profile_comments"><![CDATA[Comments]]></string>
@@ -424,7 +425,7 @@
     <string name="_bx_jobs_txt_account_pending"><![CDATA[This job is pending approval, please wait until it is activated.]]></string>
     <string name="_bx_jobs_txt_account_suspended"><![CDATA[This job is suspended.]]></string>
     <string name="_bx_jobs_txt_status_hidden"><![CDATA[This job was hidden.]]></string>
-    <string name="_bx_jobs_txt_N_fans"><![CDATA[{0} performers]]></string>
+    <string name="_bx_jobs_txt_N_fans"><![CDATA[{0} assignees]]></string>
     <string name="_bx_jobs_txt_ban_added"><![CDATA[Banned]]></string>
     <string name="_bx_jobs_txt_role"><![CDATA[Role]]></string>
     <string name="_bx_jobs_txt_role_added"><![CDATA[Added]]></string>
@@ -455,8 +456,8 @@
     <string name="_bx_jobs_err_price_duplicate"><![CDATA[Similar pricing plan is already exists.]]></string>
     <string name="_bx_jobs_err_cannot_perform"><![CDATA[An error appeared. Please report.]]></string>
 
-    <string name="_bx_jobs_alert_action_fan_added"><![CDATA[performer joined]]></string>
-    <string name="_bx_jobs_txt_ntfs_fan_added"><![CDATA[Job <b class="bx-ntfs-content-profile">{owner_name}</b> has got a performer <b class="bx-ntfs-content-entry">{subentry_sample}</b>]]></string>
+    <string name="_bx_jobs_alert_action_fan_added"><![CDATA[assignee joined]]></string>
+    <string name="_bx_jobs_txt_ntfs_fan_added"><![CDATA[Job <b class="bx-ntfs-content-profile">{owner_name}</b> has got an assignee <b class="bx-ntfs-content-entry">{subentry_sample}</b>]]></string>
     <string name="_bx_jobs_alert_action_join_invitation_notif"><![CDATA[join invitation]]></string>
     <string name="_bx_jobs_alert_action_join_request"><![CDATA[join request]]></string>
     <string name="_bx_jobs_txt_ntfs_join_invitation"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b> job's representative invites <b class="bx-ntfs-content-entry">{subentry_sample}</b> to join job]]></string>
@@ -515,7 +516,7 @@
 <p>Your admin status was revoked from <a href="{EntryUrl}">{EntryTitle}</a> job.</p>
 {email_footer}]]></string>
 
-    <string name="_bx_jobs_email_set_role"><![CDATA[Job performer status was changed]]></string>
+    <string name="_bx_jobs_email_set_role"><![CDATA[Job assignee status was changed]]></string>
     <string name="_bx_jobs_email_set_role_subject"><![CDATA[Your job status was changed]]></string>
     <string name="_bx_jobs_email_set_role_body"><![CDATA[{email_header}
 <p>Your status in <a href="{EntryUrl}">{EntryTitle}</a> job was changed to <b>{Role}</b>.</p>

+ 15 - 14
modules/boonex/jobs/install/sql/enable.sql

@@ -44,9 +44,10 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_jobs_view_profile', 2, 'bx_jobs', '', '_bx_jobs_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 0),
 ('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_profile_location', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:15:"entity_location";}', 0, 0, 0, 0),
 ('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:14:"entity_context";}', 0, 0, 1, 1),
-('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:4:"fans";}', 0, 0, 1, 2),
-('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_admins', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:6:"admins";}', 0, 0, 1, 3),
-('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_profile_location', 3, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"locations_map";s:6:"params";a:2:{i:0;s:7:"bx_jobs";i:1;s:12:"{content_id}";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 0, 1, 4),
+('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_applicants', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:10:"applicants";}', 0, 0, 1, 2),
+('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:4:"fans";}', 0, 0, 1, 3),
+('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_admins', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:6:"admins";}', 0, 0, 1, 4),
+('bx_jobs_view_profile', 3, 'bx_jobs', '', '_bx_jobs_page_block_title_profile_location', 3, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"locations_map";s:6:"params";a:2:{i:0;s:7:"bx_jobs";i:1;s:12:"{content_id}";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 0, 1, 5),
 ('bx_jobs_view_profile', 4, 'bx_jobs', '', '_bx_jobs_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 0),
 ('bx_jobs_view_profile', 4, 'bx_jobs', '', '_bx_jobs_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:15:"entity_comments";}', 0, 0, 0, 0),
 ('bx_jobs_view_profile', 2, 'bx_jobs', '', '_bx_jobs_page_block_title_entry_reports', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:14:"entity_reports";}', 0, 0, 1, 6);
@@ -252,19 +253,19 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designb
 
 SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 AND `order` < 9999 ORDER BY `order` DESC LIMIT 1);
 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 
-('sys_site', 'bx_jobs', 'jobs-home', '_bx_jobs_menu_item_title_system_entries_home', '_bx_jobs_menu_item_title_entries_home', 'page.php?i=jobs-home', '', '', 'handshake col-green2', 'bx_jobs_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+('sys_site', 'bx_jobs', 'jobs-home', '_bx_jobs_menu_item_title_system_entries_home', '_bx_jobs_menu_item_title_entries_home', 'page.php?i=jobs-home', '', '', 'briefcase col-green2', 'bx_jobs_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
 
 -- MENU: add to homepage menu
 
 SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
 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 
-('sys_homepage', 'bx_jobs', 'jobs-home', '_bx_jobs_menu_item_title_system_entries_home', '_bx_jobs_menu_item_title_entries_home', 'page.php?i=jobs-home', '', '', 'handshake col-green2', 'bx_jobs_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+('sys_homepage', 'bx_jobs', 'jobs-home', '_bx_jobs_menu_item_title_system_entries_home', '_bx_jobs_menu_item_title_entries_home', 'page.php?i=jobs-home', '', '', 'briefcase col-green2', 'bx_jobs_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
 
 -- MENU: add to "add content" menu
 
 SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
 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 
-('sys_add_content_links', 'bx_jobs', 'create-job-profile', '_bx_jobs_menu_item_title_system_create_profile', '_bx_jobs_menu_item_title_create_profile', 'page.php?i=create-job-profile', '', '', 'handshake col-green2', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+('sys_add_content_links', 'bx_jobs', 'create-job-profile', '_bx_jobs_menu_item_title_system_create_profile', '_bx_jobs_menu_item_title_create_profile', 'page.php?i=create-job-profile', '', '', 'briefcase col-green2', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
 
 -- MENU: view actions
 
@@ -379,10 +380,10 @@ INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
 ('bx_jobs_view_submenu', 'bx_jobs', '_bx_jobs_menu_set_title_view_profile_submenu', 0);
 
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_jobs_view_submenu', 'bx_jobs', 'view-job-profile', '_bx_jobs_menu_item_title_system_view_profile_view', '_bx_jobs_menu_item_title_view_profile_view', 'page.php?i=view-job-profile&id={content_id}', '', '', 'handshake col-green2', '', '', 0, 2147483647, 1, 0, 1),
+('bx_jobs_view_submenu', 'bx_jobs', 'view-job-profile', '_bx_jobs_menu_item_title_system_view_profile_view', '_bx_jobs_menu_item_title_view_profile_view', 'page.php?i=view-job-profile&id={content_id}', '', '', 'briefcase col-green2', '', '', 0, 2147483647, 1, 0, 1),
 ('bx_jobs_view_submenu', 'bx_jobs', 'job-profile-info', '_bx_jobs_menu_item_title_system_view_profile_info', '_bx_jobs_menu_item_title_view_profile_info', 'page.php?i=job-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', '', 0, 2147483647, 1, 0, 2),
 ('bx_jobs_view_submenu', 'bx_jobs', 'job-profile-comments', '_bx_jobs_menu_item_title_system_view_profile_comments', '_bx_jobs_menu_item_title_view_profile_comments', 'page.php?i=job-profile-comments&id={content_id}', '', '', '', '', '', 0, 2147483647, 0, 0, 3),
-('bx_jobs_view_submenu', 'bx_jobs', 'job-fans', '_bx_jobs_menu_item_title_system_view_fans', '_bx_jobs_menu_item_title_view_fans', 'page.php?i=job-fans&profile_id={profile_id}', '', '', 'handshake col-green2', '', '', 0, 2147483647, 1, 0, 4),
+('bx_jobs_view_submenu', 'bx_jobs', 'job-fans', '_bx_jobs_menu_item_title_system_view_fans', '_bx_jobs_menu_item_title_view_fans', 'page.php?i=job-fans&profile_id={profile_id}', '', '', 'briefcase col-green2', '', '', 0, 2147483647, 1, 0, 4),
 ('bx_jobs_view_submenu', 'bx_jobs', 'more-auto', '_bx_jobs_menu_item_title_system_view_profile_more_auto', '_bx_jobs_menu_item_title_view_profile_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 9999);
 
 -- MENU: custom menu for snippet meta info
@@ -415,12 +416,12 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- MENU: profile stats
 SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
 INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
-('sys_profile_stats', 'bx_jobs', 'profile-stats-my-jobs', '_bx_jobs_menu_item_title_system_manage_my_jobs', '_bx_jobs_menu_item_title_manage_my_jobs', 'page.php?i=joined-jobs&profile_id={member_id}', '', '_self', 'handshake col-green2', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 2);
+('sys_profile_stats', 'bx_jobs', 'profile-stats-my-jobs', '_bx_jobs_menu_item_title_system_manage_my_jobs', '_bx_jobs_menu_item_title_manage_my_jobs', 'page.php?i=joined-jobs&profile_id={member_id}', '', '_self', 'briefcase col-green2', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 2);
 
 -- MENU: profile followings
 SET @iFollowingsMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_profile_followings' LIMIT 1);
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `collapsed`, `active`, `copyable`, `order`) VALUES 
-('sys_profile_followings', 'bx_jobs', 'jobs', '_bx_jobs_menu_item_title_system_followings', '_bx_jobs_menu_item_title_followings', 'javascript:void(0)', '', '_self', 'handshake col-green2', '', '', 2147483647, 0, 1, 0, @iFollowingsMenuOrder + 1);
+('sys_profile_followings', 'bx_jobs', 'jobs', '_bx_jobs_menu_item_title_system_followings', '_bx_jobs_menu_item_title_followings', 'javascript:void(0)', '', '_self', 'briefcase col-green2', '', '', 2147483647, 0, 1, 0, @iFollowingsMenuOrder + 1);
 
 -- MENU: manage tools submenu
 INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
@@ -437,12 +438,12 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 -- MENU: dashboard manage tools
 SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
 INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', 'bx_jobs', 'jobs-administration', '_bx_jobs_menu_item_title_system_admt_jobs', '_bx_jobs_menu_item_title_admt_jobs', 'page.php?i=jobs-administration', '', '_self', 'handshake', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+('sys_account_dashboard_manage_tools', 'bx_jobs', 'jobs-administration', '_bx_jobs_menu_item_title_system_admt_jobs', '_bx_jobs_menu_item_title_admt_jobs', 'page.php?i=jobs-administration', '', '_self', 'briefcase', 'a:2:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
 
 -- 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`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
-('trigger_profile_view_submenu', 'bx_jobs', 'joined-jobs', '_bx_jobs_menu_item_title_system_view_joined_jobs', '_bx_jobs_menu_item_title_view_joined_jobs', 'page.php?i=joined-jobs&profile_id={profile_id}', '', '', 'handshake col-green2', '', 2147483647, '', 1, 0, 0),
-('trigger_group_view_submenu', 'bx_jobs', 'jobs-context', '_bx_jobs_menu_item_title_system_view_entries_in_context', '_bx_jobs_menu_item_title_view_entries_in_context', 'page.php?i=jobs-context&profile_id={profile_id}', '', '', 'handshake col-green2', '', 2147483647, 'a:3:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:21:"is_enable_for_context";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 0);
+('trigger_profile_view_submenu', 'bx_jobs', 'joined-jobs', '_bx_jobs_menu_item_title_system_view_joined_jobs', '_bx_jobs_menu_item_title_view_joined_jobs', 'page.php?i=joined-jobs&profile_id={profile_id}', '', '', 'briefcase col-green2', '', 2147483647, '', 1, 0, 0),
+('trigger_group_view_submenu', 'bx_jobs', 'jobs-context', '_bx_jobs_menu_item_title_system_view_entries_in_context', '_bx_jobs_menu_item_title_view_entries_in_context', 'page.php?i=jobs-context&profile_id={profile_id}', '', '', 'briefcase col-green2', '', 2147483647, 'a:3:{s:6:"module";s:7:"bx_jobs";s:6:"method";s:21:"is_enable_for_context";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 1, 0, 0);
 
 -- ACL
 INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
@@ -562,7 +563,7 @@ INSERT INTO `sys_recommendation_criteria` (`object_id`, `name`, `source_type`, `
 -- STATS
 SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
 INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
-('bx_jobs', 'bx_jobs', '_bx_jobs', 'page.php?i=jobs-home', 'handshake col-green2', 'SELECT COUNT(*) FROM `bx_jobs_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_jobs'' WHERE 1 AND `tp`.`status`=''active''', @iMaxOrderStats + 1);
+('bx_jobs', 'bx_jobs', '_bx_jobs', 'page.php?i=jobs-home', 'briefcase col-green2', 'SELECT COUNT(*) FROM `bx_jobs_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_jobs'' WHERE 1 AND `tp`.`status`=''active''', @iMaxOrderStats + 1);
 
 -- CHARTS
 SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);

+ 4 - 27
modules/boonex/jobs/js/main.js

@@ -9,35 +9,12 @@
  */
 
 function BxJobsMain(oOptions) {
-    this._sActionsUrl = oOptions.sActionUrl;
-    this._sObjName = oOptions.sObjName == undefined ? 'oBxJobsMain' : oOptions.sObjName;
-    this._sObjNameGrid = oOptions.sObjNameGrid == undefined ? '' : oOptions.sObjNameGrid;
-    
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    BxBaseModGroupsMain.call(this, oOptions);
 
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxJobsMain' : oOptions.sObjName;
 }
 
-BxJobsMain.prototype.onClickSetRole = function(iFanProfileId, iRole) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    if(glGrids[this._sObjNameGrid] != undefined)
-        glGrids[this._sObjNameGrid].actionWithId(iFanProfileId, 'set_role_submit', {role: iRole}, '', false, false);
-};
-
-BxJobsMain.prototype.onClickSetRoleMulti = function(oElement, iFanProfileId, iRole) {
-    if(!glGrids[this._sObjNameGrid])
-        return;
-
-    var oSiblings = $(oElement).parents('.bx-base-group-sr-role:first').siblings();
-    if(iRole == 0)
-        oSiblings.find('input:checked').removeAttr('checked');
-    else
-        oSiblings.find("input[value = '0']:checked").removeAttr('checked');
-
-    var sRoles = $(oElement).parents('.bx-base-group-sr-roles:first').find('input:checked').serialize();
-    glGrids[this._sObjNameGrid].actionWithId(iFanProfileId, 'set_role_submit', {}, sRoles, false, false);
-};
+BxJobsMain.prototype = Object.create(BxBaseModGroupsMain.prototype);
+BxJobsMain.prototype.constructor = BxJobsMain;
 
 /** @} */

+ 24 - 9
modules/boonex/jobs/template/images/icons/std-icon.svg

@@ -1,13 +1,28 @@
-<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect width="48" height="48" fill="url(#paint0_linear_221_2571)"/>
-<path d="M37.161 33C38.285 33 39.1789 32.2928 39.9817 31.3037C41.6248 29.2791 38.9269 27.6612 37.8981 26.8689C36.852 26.0634 35.6841 25.6071 34.5 25.5M33 22.5C35.071 22.5 36.75 20.8211 36.75 18.75C36.75 16.6789 35.071 15 33 15" stroke="white" stroke-width="2.25" stroke-linecap="round"/>
-<path d="M10.8389 33C9.71499 33 8.821 32.2928 8.01832 31.3037C6.37513 29.2791 9.073 27.6612 10.102 26.8689C11.148 26.0634 12.3159 25.6071 13.5 25.5M14.25 22.5C12.1789 22.5 10.5 20.8211 10.5 18.75C10.5 16.6789 12.1789 15 14.25 15" stroke="white" stroke-width="2.25" stroke-linecap="round"/>
-<path d="M18.1257 28.6668C16.593 29.6145 12.5745 31.5496 15.022 33.9711C16.2177 35.154 17.5493 36 19.2234 36H28.7766C30.4507 36 31.7823 35.154 32.9779 33.9711C35.4255 31.5496 31.407 29.6145 29.8743 28.6668C26.2801 26.4444 21.7198 26.4444 18.1257 28.6668Z" stroke="white" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M29.25 17.25C29.25 20.1495 26.8995 22.5 24 22.5C21.1005 22.5 18.75 20.1495 18.75 17.25C18.75 14.3505 21.1005 12 24 12C26.8995 12 29.25 14.3505 29.25 17.25Z" stroke="white" stroke-width="2.25"/>
+<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="80" height="80" fill="url(#paint0_linear_961_1833)"/>
+<path d="M18 48.8V46.0978C18 45.8026 18.3529 45.6414 18.5865 45.8219C20.97 47.6637 23.8266 48.363 26.9326 48.6857C27.9319 48.7895 29.019 48.859 30.1958 48.9056C30.7033 48.9257 31.11 49.3199 31.1976 49.8201C31.3123 50.4749 31.4936 51.0045 31.7801 51.4721C32.2166 52.1844 32.8155 52.7833 33.5279 53.2199C34.8009 54 36.5341 54 40 54C43.4659 54 45.1991 54 46.4721 53.2199C47.1845 52.7833 47.7834 52.1844 48.2199 51.4721C48.5064 51.0045 48.6877 50.4749 48.8024 49.8201C48.89 49.3199 49.2967 48.9257 49.8042 48.9056C50.981 48.859 52.0682 48.7895 53.0675 48.6857C56.1735 48.363 59.03 47.6637 61.4134 45.822C61.647 45.6415 62 45.8027 62 46.098V48.8C62 55.9653 62 59.5481 58.9677 61.774C55.9353 64 51.055 64 41.2941 64H38.7059C28.945 64 24.0646 64 21.0323 61.774C18 59.5481 18 55.9653 18 48.8Z" fill="black" fill-opacity="0.2"/>
+<path d="M48.9989 43.8989C49.0007 44.4635 49.4683 44.9182 50.0323 44.8928C54.3093 44.7003 57.0198 44.162 58.9677 42.6568C61.0112 41.0778 61.6776 38.8502 61.8949 35.2568C61.6777 31.8427 61.0113 29.7262 58.9677 28.226C55.9353 26 51.055 26 41.2941 26H38.7059C28.945 26 24.0646 26 21.0323 28.226C18.9888 29.7261 18.3224 31.8424 18.1051 35.256C18.3224 38.8498 18.9887 41.0777 21.0324 42.6568C22.9802 44.162 25.6908 44.7003 29.9677 44.8928C30.5317 44.9182 30.9993 44.4635 31.0011 43.8989C31.0098 41.1516 31.0874 39.6584 31.7801 38.5279C32.2166 37.8156 32.8155 37.2167 33.5279 36.7801C34.8009 36 36.5341 36 40 36C43.4659 36 45.1991 36 46.4721 36.7801C47.1845 37.2167 47.7834 37.8156 48.2199 38.5279C48.9126 39.6584 48.9902 41.1516 48.9989 43.8989Z" fill="black" fill-opacity="0.2"/>
+<path d="M34 45C34 42.6893 34 41.534 34.5201 40.6853C34.8111 40.2104 35.2104 39.8111 35.6852 39.5201C36.5339 39 37.6894 39 40 39C42.3106 39 43.466 39 44.3147 39.5201C44.7896 39.8111 45.1889 40.2104 45.4799 40.6853C46 41.534 46 42.6893 46 45C46 47.3107 46 48.466 45.4799 49.3147C45.1889 49.7896 44.7896 50.1889 44.3147 50.4799C43.466 51 42.3106 51 40 51C37.6894 51 36.5339 51 35.6852 50.4799C35.2104 50.1889 34.8111 49.7896 34.5201 49.3147C34 48.466 34 47.3107 34 45Z" fill="black" fill-opacity="0.2"/>
+<path d="M31.7801 16.6853C31 17.534 31 18.6893 31 21C31 21.0159 31 21.0318 31 21.0476C31 21.6078 31.4635 22.0533 32.0235 22.0413C33.9561 22 36.1657 22 38.7059 22H41.2941C43.8343 22 46.0439 22 47.9765 22.0413C48.5365 22.0533 49 21.6078 49 21.0476C49 21.0318 49 21.0159 49 21C49 18.6893 49 17.534 48.2199 16.6853C47.7834 16.2104 47.1845 15.8111 46.4721 15.5201C45.1991 15 43.4659 15 40 15C36.5341 15 34.8009 15 33.5279 15.5201C32.8155 15.8111 32.2166 16.2104 31.7801 16.6853Z" fill="black" fill-opacity="0.2"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M18 47.8V45.0978C18 44.8026 18.3529 44.6414 18.5865 44.8219C20.97 46.6637 23.8266 47.363 26.9326 47.6857C27.9319 47.7895 29.019 47.859 30.1958 47.9056C30.7033 47.9257 31.11 48.3199 31.1976 48.8201C31.3123 49.4749 31.4936 50.0045 31.7801 50.4721C32.2166 51.1844 32.8155 51.7833 33.5279 52.2199C34.8009 53 36.5341 53 40 53C43.4659 53 45.1991 53 46.4721 52.2199C47.1845 51.7833 47.7834 51.1844 48.2199 50.4721C48.5064 50.0045 48.6877 49.4749 48.8024 48.8201C48.89 48.3199 49.2967 47.9257 49.8042 47.9056C50.981 47.859 52.0682 47.7895 53.0675 47.6857C56.1735 47.363 59.03 46.6637 61.4134 44.822C61.647 44.6415 62 44.8027 62 45.098V47.8C62 54.9653 62 58.5481 58.9677 60.774C55.9353 63 51.055 63 41.2941 63H38.7059C28.945 63 24.0646 63 21.0323 60.774C18 58.5481 18 54.9653 18 47.8ZM48.9989 42.8989C49.0007 43.4635 49.4683 43.9182 50.0323 43.8928C54.3093 43.7003 57.0198 43.162 58.9677 41.6568C61.0112 40.0778 61.6776 37.8502 61.8949 34.2568C61.6777 30.8427 61.0113 28.7262 58.9677 27.226C55.9353 25 51.055 25 41.2941 25H38.7059C28.945 25 24.0646 25 21.0323 27.226C18.9888 28.7261 18.3224 30.8424 18.1051 34.256C18.3224 37.8498 18.9887 40.0777 21.0324 41.6568C22.9802 43.162 25.6908 43.7003 29.9677 43.8928C30.5317 43.9182 30.9993 43.4635 31.0011 42.8989C31.0098 40.1516 31.0874 38.6584 31.7801 37.5279C32.2166 36.8156 32.8155 36.2167 33.5279 35.7801C34.8009 35 36.5341 35 40 35C43.4659 35 45.1991 35 46.4721 35.7801C47.1845 36.2167 47.7834 36.8156 48.2199 37.5279C48.9126 38.6584 48.9902 40.1516 48.9989 42.8989Z" fill="url(#paint1_linear_961_1833)"/>
+<path d="M34 44C34 41.6893 34 40.534 34.52 39.6853C34.811 39.2104 35.2103 38.8111 35.6852 38.5201C36.5339 38 37.6894 38 40 38C42.3106 38 43.466 38 44.3147 38.5201C44.7896 38.8111 45.1889 39.2104 45.4799 39.6853C46 40.534 46 41.6893 46 44C46 46.3107 46 47.466 45.4799 48.3147C45.1889 48.7896 44.7896 49.1889 44.3147 49.4799C43.466 50 42.3106 50 40 50C37.6894 50 36.5339 50 35.6852 49.4799C35.2103 49.1889 34.811 48.7896 34.52 48.3147C34 47.466 34 46.3107 34 44Z" fill="url(#paint2_linear_961_1833)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M31.7801 15.6853C31 16.534 31 17.6893 31 20C31 20.5863 31.485 21.0526 32.0711 21.0403C33.9924 21 36.1866 21 38.7059 21H41.2941C43.8134 21 46.0076 21 47.9289 21.0403C48.515 21.0526 49 20.5863 49 20C49 17.6893 49 16.534 48.2199 15.6853C47.7834 15.2104 47.1845 14.8111 46.4721 14.5201C45.1991 14 43.4659 14 40 14C36.5341 14 34.8009 14 33.5279 14.5201C32.8155 14.8111 32.2166 15.2104 31.7801 15.6853Z" fill="url(#paint3_linear_961_1833)"/>
 <defs>
-<linearGradient id="paint0_linear_221_2571" x1="24" y1="0" x2="24" y2="48" gradientUnits="userSpaceOnUse">
-<stop stop-color="#F43F5E"/>
-<stop offset="1" stop-color="#BE123C"/>
+<linearGradient id="paint0_linear_961_1833" x1="40" y1="0" x2="40" y2="80" gradientUnits="userSpaceOnUse">
+<stop stop-color="#DB2777"/>
+<stop offset="1" stop-color="#881337"/>
+</linearGradient>
+<linearGradient id="paint1_linear_961_1833" x1="40" y1="25" x2="40" y2="63" gradientUnits="userSpaceOnUse">
+<stop stop-color="#F9FAFB"/>
+<stop offset="1" stop-color="#9CA3AF"/>
+</linearGradient>
+<linearGradient id="paint2_linear_961_1833" x1="40" y1="38" x2="40" y2="50" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FDE68A"/>
+<stop offset="1" stop-color="#D97706"/>
+</linearGradient>
+<linearGradient id="paint3_linear_961_1833" x1="40" y1="14" x2="40" y2="21.0405" gradientUnits="userSpaceOnUse">
+<stop stop-color="#F9FAFB"/>
+<stop offset="1" stop-color="#9CA3AF"/>
 </linearGradient>
 </defs>
 </svg>

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

@@ -207,6 +207,7 @@
     <string name="_bx_jobs_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
     <string name="_bx_jobs_page_block_title_entry_context"><![CDATA[Опубликовано в]]></string>
     <string name="_bx_jobs_page_block_title_admins"><![CDATA[Администраторы]]></string>
+    <string name="_bx_jobs_page_block_title_applicants"><![CDATA[Кандидаты]]></string>
     <string name="_bx_jobs_page_block_title_fans_link"><![CDATA[Исполнители задания: <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_jobs_page_block_title_fans"><![CDATA[Исполнители]]></string>
     <string name="_bx_jobs_page_block_title_system_fans"><![CDATA[Исполнители]]></string>