1
0
Эх сурвалжийг харах

Cut out Studio Permissions - Prices

AntonLV 13 жил өмнө
parent
commit
0a4e73f4ba

+ 0 - 50
inc/classes/BxDolAclQuery.php

@@ -156,56 +156,6 @@ class BxDolAclQuery extends BxDolDb {
         return (int)$this->getOne("SELECT FOUND_ROWS()");
     }
 
-    function getPrices($aParams, &$aItems, $bReturnCount = true) {
-        $aMethod = array('name' => 'getAll', 'params' => array(0 => 'query'));
-        $sSelectClause = $sJoinClause = $sWhereClause = $sOrderClause = $sLimitClause = "";
-
-        if(!isset($aParams['order']) || empty($aParams['order']))
-           $sOrderClause = "ORDER BY `tap`.`Order` ASC";
-
-        switch($aParams['type']) {
-            case 'by_id':
-                $aMethod['name'] = 'getRow';
-                $sWhereClause .= $this->prepare("AND `tap`.`id`=?", $aParams['value']);
-                break;
-            case 'by_level_id':
-                $sWhereClause .= $this->prepare("AND `tap`.`IDLevel`=?", $aParams['value']);
-                break;
-            case 'by_level_id_pair':
-                $aMethod['name'] = "getPairs";
-                $aMethod['params'][1] = 'days';
-                $aMethod['params'][2] = 'price';
-                $sWhereClause .= $this->prepare("AND `tap`.`IDLevel`=?", $aParams['value']);
-                break;
-            case 'by_level_id_duration':
-                $aMethod['name'] = 'getRow';
-                $sWhereClause .= $this->prepare("AND `tap`.`IDLevel`=? AND `tap`.`Days`=?", $aParams['level_id'], $aParams['days']);
-                break;
-            case 'counter_by_levels':
-                $aMethod['name'] = 'getPairs';
-                $aMethod['params'][1] = 'level_id';
-                $aMethod['params'][2] = 'counter';
-                $sSelectClause = ", COUNT(*) AS `counter`";
-                $sGroupClause = "GROUP BY `tap`.`IDLevel`";
-                break;
-        }
-
-        $aMethod['params'][0] = "SELECT " . ($bReturnCount ? "SQL_CALC_FOUND_ROWS" : "") . "
-                `tap`.`id` AS `id`,
-                `tap`.`IDLevel` AS `level_id`,
-                `tap`.`Days` AS `days`,
-                `tap`.`Price` AS `price`,
-                `tap`.`Order` AS `order`" . $sSelectClause . "
-            FROM `sys_acl_level_prices` AS `tap` " . $sJoinClause . "
-            WHERE 1 " . $sWhereClause . " " . $sOrderClause . " " . $sLimitClause;
-        $aItems = call_user_func_array(array($this, $aMethod['name']), $aMethod['params']);
-
-        if(!$bReturnCount)
-            return !empty($aItems);
-
-        return (int)$this->getOne("SELECT FOUND_ROWS()");
-    }
-
     /**
 	 * Fetch the last purchased/assigned membership that is still active for the given profile.
 	 * 

+ 5 - 14
install/sql/v70.sql

@@ -2897,7 +2897,6 @@ INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `fie
 ('sys_studio_lang_etemplates', 'Sql', 'SELECT * FROM `sys_email_templates` WHERE 1 ', 'sys_email_templates', 'ID', '', '', '', 20, NULL, 'start', '', 'Module', 'NameSystem,Subject,Body', 'auto', 'Module', 'NameSystem', 'BxTemplStudioPolyglotEtemplates', ''),
 ('sys_studio_acl', 'Sql', 'SELECT * FROM `sys_acl_levels` WHERE 1 ', 'sys_acl_levels', 'ID', 'Order', 'Active', '', 100, NULL, 'start', '', 'Description', 'Name', 'auto', '', '', 'BxTemplStudioPermissionsLevels', ''),
 ('sys_studio_acl_actions', 'Sql', 'SELECT *, ''0'' AS `Active` FROM `sys_acl_actions` WHERE 1 ', 'sys_acl_actions', 'ID', '', 'Active', '', 20, NULL, 'start', '', 'Module,Name', 'Title,Desc', 'auto', 'Module,Name', 'Title,Desc', 'BxTemplStudioPermissionsActions', ''),
-('sys_studio_acl_prices', 'Sql', 'SELECT * FROM `sys_acl_level_prices` WHERE 1 ', 'sys_acl_level_prices', 'id', 'Order', '', '', 100, NULL, 'start', '', 'Days,Price', '', 'like', '', '', 'BxTemplStudioPermissionsPrices', ''),
 ('sys_studio_nav_menus', 'Sql', 'SELECT `tm`.*, `tms`.`title` AS `set_title`, `tmt`.`title` AS `template_title` FROM `sys_objects_menu` AS `tm` LEFT JOIN `sys_menu_sets` AS `tms` ON `tm`.`set_name`=`tms`.`set_name` LEFT JOIN `sys_menu_templates` AS `tmt` ON `tm`.`template_id`=`tmt`.`id` WHERE 1 ', 'sys_objects_menu', 'id', '', 'active', '', 100, NULL, 'start', '', '', 'tm`.`title,tms`.`title,tmt`.`title', 'auto', '', '', 'BxTemplStudioNavigationMenus', ''),
 ('sys_studio_nav_sets', 'Sql', 'SELECT * FROM `sys_menu_sets` WHERE 1 ', 'sys_menu_sets', 'set_name', '', '', '', 100, NULL, 'start', '', '', 'title', 'auto', '', '', 'BxTemplStudioNavigationSets', ''),
 ('sys_studio_nav_items', 'Sql', 'SELECT * FROM `sys_menu_items` WHERE 1 ', 'sys_menu_items', 'id', 'order', 'active', '', 100, NULL, 'start_it', '', 'link', 'title_system', 'like', '', '', 'BxTemplStudioNavigationItems', ''),
@@ -2933,22 +2932,17 @@ INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable
 ('sys_studio_acl', 'Order', '', '1%', 0, '', '', 1),
 ('sys_studio_acl', 'switcher', '_adm_prm_txt_enable', '5%', 0, '', '', 2),
 ('sys_studio_acl', 'Icon', '_adm_prm_txt_icon', '5%', 0, '', '', 3),
-('sys_studio_acl', 'Name', '_adm_prm_txt_title', '19%', 1, '15', '', 4),
+('sys_studio_acl', 'Name', '_adm_prm_txt_title', '29%', 1, '15', '', 4),
 ('sys_studio_acl', 'ActionsList', '_adm_prm_txt_actions', '10%', 0, '', '', 5),
-('sys_studio_acl', 'PricingList', '_adm_prm_txt_pricing', '10%', 0, '', '', 6),
-('sys_studio_acl', 'QuotaSize', '_adm_prm_txt_storage', '10%', 0, '', '', 7),
-('sys_studio_acl', 'QuotaMaxFileSize', '_adm_prm_txt_max_file_size', '10%', 0, '', '', 8),
-('sys_studio_acl', 'QuotaNumber', '_adm_prm_txt_max_files', '10%', 0, '', '', 9),
-('sys_studio_acl', 'actions', '', '20%', 0, '', '', 10),
+('sys_studio_acl', 'QuotaSize', '_adm_prm_txt_storage', '10%', 0, '', '', 6),
+('sys_studio_acl', 'QuotaMaxFileSize', '_adm_prm_txt_max_file_size', '10%', 0, '', '', 7),
+('sys_studio_acl', 'QuotaNumber', '_adm_prm_txt_max_files', '10%', 0, '', '', 8),
+('sys_studio_acl', 'actions', '', '20%', 0, '', '', 9),
 ('sys_studio_acl_actions', 'switcher', '_adm_prm_txt_enable', '10%', 0, '', '', 1),
 ('sys_studio_acl_actions', 'Title', '_adm_prm_txt_title', '25%', 1, '25', '', 2),
 ('sys_studio_acl_actions', 'Module', '_adm_prm_txt_module', '20%', 0, '18', '', 3),
 ('sys_studio_acl_actions', 'Desc', '_adm_prm_txt_description', '25%', 0, '25', '', 4),
 ('sys_studio_acl_actions', 'actions', '', '20%', 0, '', '', 5),
-('sys_studio_acl_prices', 'Order', '', '1%', 0, '', '', 1),
-('sys_studio_acl_prices', 'Days', '_adm_prm_txt_term', '40%', 0, '', '', 2),
-('sys_studio_acl_prices', 'Price', '_adm_prm_txt_price', '40%', 0, '', '', 3),
-('sys_studio_acl_prices', 'actions', '', '19%', 0, '', '', 4),
 ('sys_studio_nav_menus', 'switcher', '', '10%', 0, '', '', 1),
 ('sys_studio_nav_menus', 'title', '_adm_nav_txt_menus_gl_title', '17%', 0, '15', '', 2),
 ('sys_studio_nav_menus', 'set_title', '_adm_nav_txt_menus_gl_set_title', '17%', 1, '15', '', 3),
@@ -3022,9 +3016,6 @@ INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `conf
 ('sys_studio_acl', 'single', 'edit', '', 'pencil', 0, 1),
 ('sys_studio_acl', 'single', 'delete', '', 'remove', 1, 2),
 ('sys_studio_acl_actions', 'single', 'options', '', 'cog', 0, 1),
-('sys_studio_acl_prices', 'independent', 'add', '_adm_prm_btn_add_price', '', 0, 1),
-('sys_studio_acl_prices', 'single', 'edit', '', 'pencil', 0, 1),
-('sys_studio_acl_prices', 'single', 'delete', '', 'remove', 1, 2),
 ('sys_studio_nav_menus', 'independent', 'add', '_adm_nav_btn_menus_create', '', 0, 1),
 ('sys_studio_nav_menus', 'single', 'edit', '', 'pencil', 0, 1),
 ('sys_studio_nav_menus', 'single', 'delete', '', 'remove', 1, 2),

+ 0 - 4
modules/boonex/english/data/langs/system.xml

@@ -1765,18 +1765,14 @@ Please click "Continue" below to navigate to the home page of the site.]]></stri
 	<string name="_adm_wgt_cpt_builder_permissions"><![CDATA[Permissions]]></string>
 	<string name="_adm_lmi_cpt_levels"><![CDATA[Levels]]></string>
 	<string name="_adm_lmi_cpt_actions"><![CDATA[Actions]]></string>
-	<string name="_adm_lmi_cpt_prices"><![CDATA[Pricing Options]]></string>
 	<string name="_adm_prm_txt_icon"><![CDATA[Icon]]></string>
 	<string name="_adm_prm_txt_title"><![CDATA[Title]]></string>
 	<string name="_adm_prm_txt_actions"><![CDATA[Actions]]></string>
-	<string name="_adm_prm_txt_pricing"><![CDATA[Pricing]]></string>
 	<string name="_adm_prm_txt_storage"><![CDATA[Storage]]></string>
 	<string name="_adm_prm_txt_max_files"><![CDATA[Max Files]]></string>
 	<string name="_adm_prm_txt_max_file_size"><![CDATA[Max File Size]]></string>
 	<string name="_adm_prm_txt_n_actions"><![CDATA[{0} actions]]></string>
-	<string name="_adm_prm_txt_n_prices"><![CDATA[{0} options]]></string>
 	<string name="_adm_prm_txt_manage_actions"><![CDATA[Manage actions]]></string>
-	<string name="_adm_prm_txt_manage_prices"><![CDATA[Manage pricing options]]></string>
 	<string name="_adm_prm_txt_enable"><![CDATA[Enable]]></string>
 	<string name="_adm_prm_txt_module"><![CDATA[Module]]></string>
 	<string name="_adm_prm_txt_name"><![CDATA[Name]]></string>

+ 0 - 0
studio/classes/BxDolStudioPermissionsPrices.php → modules/boonex/membership_pricing/classes/BxDolStudioPermissionsPrices.php


+ 85 - 0
modules/boonex/membership_pricing/classes/BxDolStudioPermissionsQuery.php

@@ -0,0 +1,85 @@
+<?php
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinStudio Dolphin Studio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+bx_import('BxDolAclQuery');
+
+class BxDolStudioPermissionsQuery extends BxDolAclQuery {
+    function __construct() {
+        parent::__construct();
+    }
+
+	function getPrices($aParams, &$aItems, $bReturnCount = true) {
+        $aMethod = array('name' => 'getAll', 'params' => array(0 => 'query'));
+        $sSelectClause = $sJoinClause = $sWhereClause = $sOrderClause = $sLimitClause = "";
+
+        if(!isset($aParams['order']) || empty($aParams['order']))
+           $sOrderClause = "ORDER BY `tap`.`Order` ASC";
+
+        switch($aParams['type']) {
+            case 'by_id':
+                $aMethod['name'] = 'getRow';
+                $sWhereClause .= $this->prepare("AND `tap`.`id`=?", $aParams['value']);
+                break;
+            case 'by_level_id':
+                $sWhereClause .= $this->prepare("AND `tap`.`IDLevel`=?", $aParams['value']);
+                break;
+            case 'by_level_id_pair':
+                $aMethod['name'] = "getPairs";
+                $aMethod['params'][1] = 'days';
+                $aMethod['params'][2] = 'price';
+                $sWhereClause .= $this->prepare("AND `tap`.`IDLevel`=?", $aParams['value']);
+                break;
+            case 'by_level_id_duration':
+                $aMethod['name'] = 'getRow';
+                $sWhereClause .= $this->prepare("AND `tap`.`IDLevel`=? AND `tap`.`Days`=?", $aParams['level_id'], $aParams['days']);
+                break;
+            case 'counter_by_levels':
+                $aMethod['name'] = 'getPairs';
+                $aMethod['params'][1] = 'level_id';
+                $aMethod['params'][2] = 'counter';
+                $sSelectClause = ", COUNT(*) AS `counter`";
+                $sGroupClause = "GROUP BY `tap`.`IDLevel`";
+                break;
+        }
+
+        $aMethod['params'][0] = "SELECT " . ($bReturnCount ? "SQL_CALC_FOUND_ROWS" : "") . "
+                `tap`.`id` AS `id`,
+                `tap`.`IDLevel` AS `level_id`,
+                `tap`.`Days` AS `days`,
+                `tap`.`Price` AS `price`,
+                `tap`.`Order` AS `order`" . $sSelectClause . "
+            FROM `sys_acl_level_prices` AS `tap` " . $sJoinClause . "
+            WHERE 1 " . $sWhereClause . " " . $sOrderClause . " " . $sLimitClause;
+        $aItems = call_user_func_array(array($this, $aMethod['name']), $aMethod['params']);
+
+        if(!$bReturnCount)
+            return !empty($aItems);
+
+        return (int)$this->getOne("SELECT FOUND_ROWS()");
+    }
+
+    function getPriceOrderMax($iLevelId) {
+        $sSql = $this->prepare("SELECT MAX(`Order`) FROM `sys_acl_level_prices` WHERE `IDLevel`=?", $iLevelId);
+        return (int)$this->getOne($sSql);
+    }
+
+    function deletePrices($aParams) {
+        $sWhereClause = "";
+
+        switch($aParams['type']) {
+            case 'by_level_id':
+                $sWhereClause .= $this->prepare("AND `IDLevel`=?", $aParams['value']);
+                break;
+        }
+
+        return (int)$this->query("DELETE FROM `sys_acl_level_prices` WHERE 1 " . $sWhereClause) > 0;
+    }
+}
+/** @} */

+ 13 - 0
modules/boonex/membership_pricing/install/sql/install.sql

@@ -0,0 +1,13 @@
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `override_class_name`, `override_class_file`) VALUES
+('sys_studio_acl_prices', 'Sql', 'SELECT * FROM `sys_acl_level_prices` WHERE 1 ', 'sys_acl_level_prices', 'id', 'Order', '', '', 100, NULL, 'start', '', 'Days,Price', '', 'like', '', '', 'BxTemplStudioPermissionsPrices', '');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('sys_studio_acl_prices', 'Order', '', '1%', 0, '', '', 1),
+('sys_studio_acl_prices', 'Days', '_adm_prm_txt_term', '40%', 0, '', '', 2),
+('sys_studio_acl_prices', 'Price', '_adm_prm_txt_price', '40%', 0, '', '', 3),
+('sys_studio_acl_prices', 'actions', '', '19%', 0, '', '', 4);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
+('sys_studio_acl_prices', 'independent', 'add', '_adm_prm_btn_add_price', '', 0, 1),
+('sys_studio_acl_prices', 'single', 'edit', '', 'pencil', 0, 1),
+('sys_studio_acl_prices', 'single', 'delete', '', 'remove', 1, 2);

+ 3 - 0
modules/boonex/membership_pricing/install/sql/uninstall.sql

@@ -0,0 +1,3 @@
+DELETE FROM `sys_objects_grid` WHERE `object`='sys_studio_acl_prices';
+DELETE FROM `sys_grid_fields` WHERE `object`='sys_studio_acl_prices';
+DELETE FROM `sys_grid_actions` WHERE `object`='sys_studio_acl_prices';

+ 361 - 361
studio/template/scripts/BxBaseStudioPermissionsPrices.php → modules/boonex/membership_pricing/template/scripts/BxBaseStudioPermissionsPrices.php

@@ -1,362 +1,362 @@
-<?php
-/**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup    DolphinView Dolphin Studio Representation classes
- * @ingroup     DolphinStudio
- * @{
- */
-defined('BX_DOL') or die('hack attempt');
-
-bx_import('BxDolStudioPermissionsPrices');
-bx_import('BxTemplStudioFormView');
-
-class BxBaseStudioPermissionsPrices extends BxDolStudioPermissionsPrices {
-    function __construct($aOptions, $oTemplate = false) {
-        parent::__construct($aOptions, $oTemplate);
-
-        $this->_aOptions['actions_single']['edit']['attr']['title'] = _t('_adm_prm_btn_price_edit');
-        $this->_aOptions['actions_single']['delete']['attr']['title'] = _t('_adm_prm_btn_price_delete');
-    }
-
-    public function performActionAdd() {
-        $sAction = 'add';
-
-        $sFilter = bx_get('filter');
-        if(strpos($sFilter, $this->sParamsDivider) !== false)
-            list($this->iLevel, $sFilter) = explode($this->sParamsDivider, $sFilter);
-
-        if((int)$this->iLevel == 0)
-            $this->iLevel = (int)bx_get('IDLevel');
-
-        $aForm = array(
-            'form_attrs' => array(
-                'id' => 'adm-prm-price-add',
-                'action' => BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction,
-                'method' => BX_DOL_STUDIO_METHOD_DEFAULT
-            ),
-            'params' => array (
-                'db' => array(
-                    'table' => 'sys_acl_level_prices',
-                    'key' => 'id',
-                    'uri' => '',
-                    'uri_title' => '',
-                    'submit_name' => 'do_submit'
-                ),
-            ),
-            'inputs' => array (
-                'IDLevel' => array(
-                    'type' => 'hidden',
-                    'name' => 'IDLevel',
-                    'value' => $this->iLevel,
-            		'db' => array (
-                        'pass' => 'Int',
-                    ),
-                ),
-                'Days' => array(
-                    'type' => 'text',
-                    'name' => 'Days',
-                    'caption' => _t('_adm_prm_txt_price_add_days'),
-                    'info' => _t('_adm_prm_dsc_price_add_days'),
-                    'value' => '',
-                    'db' => array (
-                        'pass' => 'Int',
-                    ),
-                ),
-                'Price' => array(
-                    'type' => 'text',
-                    'name' => 'Price',
-                    'caption' => _t('_adm_prm_txt_price_add_price'),
-                    'info' => '',
-                    'value' => '',
-                	'db' => array (
-                        'pass' => 'Float',
-                    ),
-                ),
-                'controls' => array(
-                    'name' => 'controls', 
-                    'type' => 'input_set',
-                    array(
-                        'type' => 'submit',
-                        'name' => 'do_submit',
-                        'value' => _t('_adm_prm_btn_price_add'),
-                    ),
-                    array (
-                        'type' => 'reset',
-                        'name' => 'close',
-                        'value' => _t('_adm_prm_btn_price_cancel'),
-                        'attrs' => array(
-                            'onclick' => "$('.bx-popup-applied:visible').dolPopupHide()",
-                            'class' => 'bx-def-margin-sec-left',
-                        ),
-                    )
-                )
-            )
-        );
-
-        $oForm = new BxTemplStudioFormView($aForm);
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-            $aPrice = array();
-            $iPrice = $this->oDb->getPrices(array('type' => 'by_level_id_duration', 'level_id' => $oForm->getCleanValue('IDLevel'), 'days' => $oForm->getCleanValue('Days')), $aPrice);
-            if($iPrice != 0) {
-                $this->_echoResultJson(array('msg' => _t('_adm_prm_err_price_duplicate')), true);
-                return;
-            }
-
-            $iId = (int)$oForm->insert(array('Order' => $this->oDb->getPriceOrderMax($this->iLevel) + 1));
-            if($iId != 0) {
-                $this->oDb->updateLevels($this->iLevel, array('Purchasable' => 'yes'));
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-            }
-            else
-                $aRes = array('msg' => _t('_adm_prm_err_price_create'));
-
-            $this->_echoResultJson($aRes, true);
-        }
-        else {
-            bx_import('BxTemplStudioFunctions');
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('adm-prm-price-add-popup', _t('_adm_prm_txt_price_add_popup'), $this->_oTemplate->parseHtmlByName('prm_add_price.html', array(
-                'form_id' => $aForm['form_attrs']['id'],
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            $this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
-        }
-    }
-
-    public function performActionEdit() {
-        $sAction = 'edit';
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId) {
-                $this->_echoResultJson(array());
-                exit;
-            }
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-
-        $aPrice = array();
-        $iPrice = $this->oDb->getPrices(array('type' => 'by_id', 'value' => $iId), $aPrice);
-        if($iPrice != 1 || empty($aPrice)) {
-            $this->_echoResultJson(array());
-            exit;
-        }
-
-        if((int)$this->iLevel == 0)
-            $this->iLevel = (int)$aPrice['level_id'];
-
-        $aForm = array(
-            'form_attrs' => array(
-                'id' => 'adm-prm-price-edit',
-                'action' => BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction,
-                'method' => BX_DOL_STUDIO_METHOD_DEFAULT
-            ),
-            'params' => array (
-                'db' => array(
-                    'table' => 'sys_acl_level_prices',
-                    'key' => 'id',
-                    'uri' => '',
-                    'uri_title' => '',
-                    'submit_name' => 'do_submit'
-                ),
-            ),
-            'inputs' => array (
-            	'id' => array(
-                    'type' => 'hidden',
-                    'name' => 'id',
-                    'value' => $iId,
-            		'db' => array (
-                        'pass' => 'Int',
-                    ),
-                ),
-                'IDLevel' => array(
-                    'type' => 'hidden',
-                    'name' => 'IDLevel',
-                    'value' => $aPrice['level_id'],
-            		'db' => array (
-                        'pass' => 'Int',
-                    ),
-                ),
-                'Days' => array(
-                    'type' => 'text',
-                    'name' => 'Days',
-                    'caption' => _t('_adm_prm_txt_price_add_days'),
-                    'info' => _t('_adm_prm_dsc_price_add_days'),
-                    'value' => $aPrice['days'],
-                    'db' => array (
-                        'pass' => 'Int',
-                    ),
-                ),
-                'Price' => array(
-                    'type' => 'text',
-                    'name' => 'Price',
-                    'caption' => _t('_adm_prm_txt_price_add_price'),
-                    'info' => '',
-                    'value' => round($aPrice['price'], 2),
-                	'db' => array (
-                        'pass' => 'Float',
-                    ),
-                ),
-                'controls' => array(
-                    'name' => 'controls', 
-                    'type' => 'input_set',
-                    array(
-                        'type' => 'submit',
-                        'name' => 'do_submit',
-                        'value' => _t('_adm_prm_btn_price_save'),
-                    ),
-                    array (
-                        'type' => 'reset',
-                        'name' => 'close',
-                        'value' => _t('_adm_prm_btn_price_cancel'),
-                        'attrs' => array(
-                            'onclick' => "$('.bx-popup-applied:visible').dolPopupHide()",
-                            'class' => 'bx-def-margin-sec-left',
-                        ),
-                    )
-                )
-            )
-        );
-
-        $oForm = new BxTemplStudioFormView($aForm);
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-            $iId = $oForm->getCleanValue('id');
-
-            $aPrice = array();
-            $iPrice = $this->oDb->getPrices(array('type' => 'by_level_id_duration', 'level_id' => $oForm->getCleanValue('IDLevel'), 'days' => $oForm->getCleanValue('Days')), $aPrice);
-            if($iPrice != 0 && !empty($aPrice) && $aPrice['id'] != $iId) {
-                $this->_echoResultJson(array('msg' => _t('_adm_prm_err_price_duplicate')), true);
-                return;
-            }
-
-            if((int)$oForm->update($iId) > 0)
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-            else
-                $aRes = array('msg' => _t('_adm_prm_err_price_update'));
-
-            $this->_echoResultJson($aRes, true);
-        }
-        else {
-            bx_import('BxTemplStudioFunctions');
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('adm-prm-price-edit-popup', _t('_adm_prm_txt_price_edit_popup', $aPrice['days']), $this->_oTemplate->parseHtmlByName('prm_add_price.html', array(
-                'form_id' => $aForm['form_attrs']['id'],
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            $this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
-        }
-    }
-
-    function performActionDelete() {
-        $aIds = bx_get('ids');
-        if (!$aIds || !is_array($aIds)) {
-            $this->_echoResultJson(array());
-            exit;
-        }
-
-        $aPrice = array();
-        $this->oDb->getPrices(array('type' => 'by_id', 'value' => $aIds[0]), $aPrice, false);
-
-        parent::performActionDelete();
-
-        $aPrices = array();
-        $iPrices = $this->oDb->getPrices(array('type' => 'by_level_id', 'value' => $aPrice['level_id']), $aPrices);
-        if($iPrices == 0)
-            $this->oDb->updateLevels($this->iLevel, array('Purchasable' => 'no'));
-    }
-
-    function getJsObject() {
-        return 'oBxDolStudioPermissionsPrices';
-    }
-
-    function getCode($isDisplayHeader = true) {
-        return $this->_oTemplate->parseHtmlByName('prm_prices.html', array(
-            'content' => parent::getCode($isDisplayHeader),
-            'js_object' => $this->getJsObject(),
-            'grid_object' => $this->_sObject,
-            'params_divider' => $this->sParamsDivider
-        ));
-    }
-
-    protected function _addJsCss() {
-        parent::_addJsCss();
-        $this->_oTemplate->addJs(array('jquery.form.js', 'permissions_prices.js'));
-
-        bx_import('BxTemplStudioFormView');
-        $oForm = new BxTemplStudioFormView(array());
-        $oForm->addCssJs();
-    }
-    protected function _getCellPrice ($mixedValue, $sKey, $aField, $aRow) {
-        return parent::_getCellDefault (_t_format_currency($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellDays ($mixedValue, $sKey, $aField, $aRow) {
-        return parent::_getCellDefault (_t('_sys_x_days', $mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionAdd($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
-        if($this->iLevel == 0)
-            $isDisabled = true;
-
-        return parent::_getActionDefault($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
-    }
-
-    protected function _getFilterControls () {
-        parent::_getFilterControls();
-
-        $sContent = "";
-
-        bx_import('BxTemplStudioFormView');
-        $oForm = new BxTemplStudioFormView(array());
-
-        $aInputLevels = array(
-            'type' => 'select',
-            'name' => 'level',
-            'attrs' => array(
-                'id' => 'bx-grid-level-' . $this->_sObject,
-            	'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeLevel()'
-            ),
-            'value' => 'id-' . $this->iLevel,
-            'values' => array()
-        );
-
-        $aLevels = $aCounter = array();
-        $this->oDb->getLevels(array('type' => 'all'), $aLevels, false);
-        $this->oDb->getPrices(array('type' => 'counter_by_levels'), $aCounter, false);
-        foreach($aLevels as $aLevel)
-            $aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']) . " (" . (isset($aCounter[$aLevel['id']]) ? $aCounter[$aLevel['id']] : "0") . ")";
-
-        asort($aInputLevels['values']);
-        $aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']);
-
-        $sContent .= $oForm->genRow($aInputLevels);
-        if($this->iLevel == 0)
-            return $sContent;
-
-        $aInputSearch = array(
-            'type' => 'text',
-            'name' => 'keyword',
-            'attrs' => array(
-                'id' => 'bx-grid-search-' . $this->_sObject
-            )
-        );
-        $sContent .= $oForm->genRow($aInputSearch);
-
-        return $sContent;
-    }
-}
+<?php
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    DolphinView Dolphin Studio Representation classes
+ * @ingroup     DolphinStudio
+ * @{
+ */
+defined('BX_DOL') or die('hack attempt');
+
+bx_import('BxDolStudioPermissionsPrices');
+bx_import('BxTemplStudioFormView');
+
+class BxBaseStudioPermissionsPrices extends BxDolStudioPermissionsPrices {
+    function __construct($aOptions, $oTemplate = false) {
+        parent::__construct($aOptions, $oTemplate);
+
+        $this->_aOptions['actions_single']['edit']['attr']['title'] = _t('_adm_prm_btn_price_edit');
+        $this->_aOptions['actions_single']['delete']['attr']['title'] = _t('_adm_prm_btn_price_delete');
+    }
+
+    public function performActionAdd() {
+        $sAction = 'add';
+
+        $sFilter = bx_get('filter');
+        if(strpos($sFilter, $this->sParamsDivider) !== false)
+            list($this->iLevel, $sFilter) = explode($this->sParamsDivider, $sFilter);
+
+        if((int)$this->iLevel == 0)
+            $this->iLevel = (int)bx_get('IDLevel');
+
+        $aForm = array(
+            'form_attrs' => array(
+                'id' => 'adm-prm-price-add',
+                'action' => BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction,
+                'method' => BX_DOL_STUDIO_METHOD_DEFAULT
+            ),
+            'params' => array (
+                'db' => array(
+                    'table' => 'sys_acl_level_prices',
+                    'key' => 'id',
+                    'uri' => '',
+                    'uri_title' => '',
+                    'submit_name' => 'do_submit'
+                ),
+            ),
+            'inputs' => array (
+                'IDLevel' => array(
+                    'type' => 'hidden',
+                    'name' => 'IDLevel',
+                    'value' => $this->iLevel,
+            		'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'Days' => array(
+                    'type' => 'text',
+                    'name' => 'Days',
+                    'caption' => _t('_adm_prm_txt_price_add_days'),
+                    'info' => _t('_adm_prm_dsc_price_add_days'),
+                    'value' => '',
+                    'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'Price' => array(
+                    'type' => 'text',
+                    'name' => 'Price',
+                    'caption' => _t('_adm_prm_txt_price_add_price'),
+                    'info' => '',
+                    'value' => '',
+                	'db' => array (
+                        'pass' => 'Float',
+                    ),
+                ),
+                'controls' => array(
+                    'name' => 'controls', 
+                    'type' => 'input_set',
+                    array(
+                        'type' => 'submit',
+                        'name' => 'do_submit',
+                        'value' => _t('_adm_prm_btn_price_add'),
+                    ),
+                    array (
+                        'type' => 'reset',
+                        'name' => 'close',
+                        'value' => _t('_adm_prm_btn_price_cancel'),
+                        'attrs' => array(
+                            'onclick' => "$('.bx-popup-applied:visible').dolPopupHide()",
+                            'class' => 'bx-def-margin-sec-left',
+                        ),
+                    )
+                )
+            )
+        );
+
+        $oForm = new BxTemplStudioFormView($aForm);
+        $oForm->initChecker();
+
+        if($oForm->isSubmittedAndValid()) {
+            $aPrice = array();
+            $iPrice = $this->oDb->getPrices(array('type' => 'by_level_id_duration', 'level_id' => $oForm->getCleanValue('IDLevel'), 'days' => $oForm->getCleanValue('Days')), $aPrice);
+            if($iPrice != 0) {
+                $this->_echoResultJson(array('msg' => _t('_adm_prm_err_price_duplicate')), true);
+                return;
+            }
+
+            $iId = (int)$oForm->insert(array('Order' => $this->oDb->getPriceOrderMax($this->iLevel) + 1));
+            if($iId != 0) {
+                $this->oDb->updateLevels($this->iLevel, array('Purchasable' => 'yes'));
+                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
+            }
+            else
+                $aRes = array('msg' => _t('_adm_prm_err_price_create'));
+
+            $this->_echoResultJson($aRes, true);
+        }
+        else {
+            bx_import('BxTemplStudioFunctions');
+            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('adm-prm-price-add-popup', _t('_adm_prm_txt_price_add_popup'), $this->_oTemplate->parseHtmlByName('prm_add_price.html', array(
+                'form_id' => $aForm['form_attrs']['id'],
+                'form' => $oForm->getCode(true),
+                'object' => $this->_sObject,
+                'action' => $sAction
+            )));
+
+            $this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+        }
+    }
+
+    public function performActionEdit() {
+        $sAction = 'edit';
+
+        $aIds = bx_get('ids');
+        if(!$aIds || !is_array($aIds)) {
+            $iId = (int)bx_get('id');
+            if(!$iId) {
+                $this->_echoResultJson(array());
+                exit;
+            }
+
+            $aIds = array($iId);
+        }
+
+        $iId = $aIds[0];
+
+        $aPrice = array();
+        $iPrice = $this->oDb->getPrices(array('type' => 'by_id', 'value' => $iId), $aPrice);
+        if($iPrice != 1 || empty($aPrice)) {
+            $this->_echoResultJson(array());
+            exit;
+        }
+
+        if((int)$this->iLevel == 0)
+            $this->iLevel = (int)$aPrice['level_id'];
+
+        $aForm = array(
+            'form_attrs' => array(
+                'id' => 'adm-prm-price-edit',
+                'action' => BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction,
+                'method' => BX_DOL_STUDIO_METHOD_DEFAULT
+            ),
+            'params' => array (
+                'db' => array(
+                    'table' => 'sys_acl_level_prices',
+                    'key' => 'id',
+                    'uri' => '',
+                    'uri_title' => '',
+                    'submit_name' => 'do_submit'
+                ),
+            ),
+            'inputs' => array (
+            	'id' => array(
+                    'type' => 'hidden',
+                    'name' => 'id',
+                    'value' => $iId,
+            		'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'IDLevel' => array(
+                    'type' => 'hidden',
+                    'name' => 'IDLevel',
+                    'value' => $aPrice['level_id'],
+            		'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'Days' => array(
+                    'type' => 'text',
+                    'name' => 'Days',
+                    'caption' => _t('_adm_prm_txt_price_add_days'),
+                    'info' => _t('_adm_prm_dsc_price_add_days'),
+                    'value' => $aPrice['days'],
+                    'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
+                'Price' => array(
+                    'type' => 'text',
+                    'name' => 'Price',
+                    'caption' => _t('_adm_prm_txt_price_add_price'),
+                    'info' => '',
+                    'value' => round($aPrice['price'], 2),
+                	'db' => array (
+                        'pass' => 'Float',
+                    ),
+                ),
+                'controls' => array(
+                    'name' => 'controls', 
+                    'type' => 'input_set',
+                    array(
+                        'type' => 'submit',
+                        'name' => 'do_submit',
+                        'value' => _t('_adm_prm_btn_price_save'),
+                    ),
+                    array (
+                        'type' => 'reset',
+                        'name' => 'close',
+                        'value' => _t('_adm_prm_btn_price_cancel'),
+                        'attrs' => array(
+                            'onclick' => "$('.bx-popup-applied:visible').dolPopupHide()",
+                            'class' => 'bx-def-margin-sec-left',
+                        ),
+                    )
+                )
+            )
+        );
+
+        $oForm = new BxTemplStudioFormView($aForm);
+        $oForm->initChecker();
+
+        if($oForm->isSubmittedAndValid()) {
+            $iId = $oForm->getCleanValue('id');
+
+            $aPrice = array();
+            $iPrice = $this->oDb->getPrices(array('type' => 'by_level_id_duration', 'level_id' => $oForm->getCleanValue('IDLevel'), 'days' => $oForm->getCleanValue('Days')), $aPrice);
+            if($iPrice != 0 && !empty($aPrice) && $aPrice['id'] != $iId) {
+                $this->_echoResultJson(array('msg' => _t('_adm_prm_err_price_duplicate')), true);
+                return;
+            }
+
+            if((int)$oForm->update($iId) > 0)
+                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
+            else
+                $aRes = array('msg' => _t('_adm_prm_err_price_update'));
+
+            $this->_echoResultJson($aRes, true);
+        }
+        else {
+            bx_import('BxTemplStudioFunctions');
+            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('adm-prm-price-edit-popup', _t('_adm_prm_txt_price_edit_popup', $aPrice['days']), $this->_oTemplate->parseHtmlByName('prm_add_price.html', array(
+                'form_id' => $aForm['form_attrs']['id'],
+                'form' => $oForm->getCode(true),
+                'object' => $this->_sObject,
+                'action' => $sAction
+            )));
+
+            $this->_echoResultJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))), true);
+        }
+    }
+
+    function performActionDelete() {
+        $aIds = bx_get('ids');
+        if (!$aIds || !is_array($aIds)) {
+            $this->_echoResultJson(array());
+            exit;
+        }
+
+        $aPrice = array();
+        $this->oDb->getPrices(array('type' => 'by_id', 'value' => $aIds[0]), $aPrice, false);
+
+        parent::performActionDelete();
+
+        $aPrices = array();
+        $iPrices = $this->oDb->getPrices(array('type' => 'by_level_id', 'value' => $aPrice['level_id']), $aPrices);
+        if($iPrices == 0)
+            $this->oDb->updateLevels($this->iLevel, array('Purchasable' => 'no'));
+    }
+
+    function getJsObject() {
+        return 'oBxDolStudioPermissionsPrices';
+    }
+
+    function getCode($isDisplayHeader = true) {
+        return $this->_oTemplate->parseHtmlByName('prm_prices.html', array(
+            'content' => parent::getCode($isDisplayHeader),
+            'js_object' => $this->getJsObject(),
+            'grid_object' => $this->_sObject,
+            'params_divider' => $this->sParamsDivider
+        ));
+    }
+
+    protected function _addJsCss() {
+        parent::_addJsCss();
+        $this->_oTemplate->addJs(array('jquery.form.js', 'permissions_prices.js'));
+
+        bx_import('BxTemplStudioFormView');
+        $oForm = new BxTemplStudioFormView(array());
+        $oForm->addCssJs();
+    }
+    protected function _getCellPrice ($mixedValue, $sKey, $aField, $aRow) {
+        return parent::_getCellDefault (_t_format_currency($mixedValue), $sKey, $aField, $aRow);
+    }
+
+    protected function _getCellDays ($mixedValue, $sKey, $aField, $aRow) {
+        return parent::_getCellDefault (_t('_sys_x_days', $mixedValue), $sKey, $aField, $aRow);
+    }
+
+    protected function _getActionAdd($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) {
+        if($this->iLevel == 0)
+            $isDisabled = true;
+
+        return parent::_getActionDefault($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
+    }
+
+    protected function _getFilterControls () {
+        parent::_getFilterControls();
+
+        $sContent = "";
+
+        bx_import('BxTemplStudioFormView');
+        $oForm = new BxTemplStudioFormView(array());
+
+        $aInputLevels = array(
+            'type' => 'select',
+            'name' => 'level',
+            'attrs' => array(
+                'id' => 'bx-grid-level-' . $this->_sObject,
+            	'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeLevel()'
+            ),
+            'value' => 'id-' . $this->iLevel,
+            'values' => array()
+        );
+
+        $aLevels = $aCounter = array();
+        $this->oDb->getLevels(array('type' => 'all'), $aLevels, false);
+        $this->oDb->getPrices(array('type' => 'counter_by_levels'), $aCounter, false);
+        foreach($aLevels as $aLevel)
+            $aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']) . " (" . (isset($aCounter[$aLevel['id']]) ? $aCounter[$aLevel['id']] : "0") . ")";
+
+        asort($aInputLevels['values']);
+        $aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']);
+
+        $sContent .= $oForm->genRow($aInputLevels);
+        if($this->iLevel == 0)
+            return $sContent;
+
+        $aInputSearch = array(
+            'type' => 'text',
+            'name' => 'keyword',
+            'attrs' => array(
+                'id' => 'bx-grid-search-' . $this->_sObject
+            )
+        );
+        $sContent .= $oForm->genRow($aInputSearch);
+
+        return $sContent;
+    }
+}
 /** @} */

+ 0 - 4
modules/boonex/russian/data/langs/system.xml

@@ -1773,18 +1773,14 @@ Without doing that you won't be submitted to our database.</p>
 	<string name="_adm_wgt_cpt_builder_permissions"><![CDATA[Permissions]]></string>
 	<string name="_adm_lmi_cpt_levels"><![CDATA[Levels]]></string>
 	<string name="_adm_lmi_cpt_actions"><![CDATA[Actions]]></string>
-	<string name="_adm_lmi_cpt_prices"><![CDATA[Pricing Options]]></string>
 	<string name="_adm_prm_txt_icon"><![CDATA[Icon]]></string>
 	<string name="_adm_prm_txt_title"><![CDATA[Title]]></string>
 	<string name="_adm_prm_txt_actions"><![CDATA[Actions]]></string>
-	<string name="_adm_prm_txt_pricing"><![CDATA[Pricing]]></string>
 	<string name="_adm_prm_txt_storage"><![CDATA[Storage]]></string>
 	<string name="_adm_prm_txt_max_files"><![CDATA[Max Files]]></string>
 	<string name="_adm_prm_txt_max_file_size"><![CDATA[Max File Size]]></string>
 	<string name="_adm_prm_txt_n_actions"><![CDATA[{0} actions]]></string>
-	<string name="_adm_prm_txt_n_prices"><![CDATA[{0} options]]></string>
 	<string name="_adm_prm_txt_manage_actions"><![CDATA[Manage actions]]></string>
-	<string name="_adm_prm_txt_manage_prices"><![CDATA[Manage pricing options]]></string>
 	<string name="_adm_prm_txt_enable"><![CDATA[Enable]]></string>
 	<string name="_adm_prm_txt_module"><![CDATA[Module]]></string>
 	<string name="_adm_prm_txt_name"><![CDATA[Name]]></string>

+ 0 - 1
studio/classes/BxDolStudioPermissions.php

@@ -13,7 +13,6 @@ bx_import('BxDolStudioPermissionsQuery');
 
 define('BX_DOL_STUDIO_PRM_TYPE_LEVELS', 'levels');
 define('BX_DOL_STUDIO_PRM_TYPE_ACTIONS', 'actions');
-define('BX_DOL_STUDIO_PRM_TYPE_PRICES', 'prices');
 
 define('BX_DOL_STUDIO_PRM_TYPE_DEFAULT', BX_DOL_STUDIO_PRM_TYPE_LEVELS);
 

+ 1 - 19
studio/classes/BxDolStudioPermissionsQuery.php

@@ -39,9 +39,8 @@ class BxDolStudioPermissionsQuery extends BxDolAclQuery {
                 break;
         }
 
-        $sSql = "DELETE FROM `tal`, `tap`, `tam` 
+        $sSql = "DELETE FROM `tal`, `tam` 
         	USING `sys_acl_levels` AS `tal` 
-        	LEFT JOIN `sys_acl_level_prices` AS `tap` ON `tal`.`ID`=`tap`.`IDLevel`
         	LEFT JOIN `sys_acl_matrix` AS `tam` ON `tal`.`ID`=`tam`.`IDLevel`
         	WHERE 1 " . $sWhereClause . " " . $sLimitClause;
         return (int)$this->query($sSql) > 0;
@@ -95,23 +94,6 @@ class BxDolStudioPermissionsQuery extends BxDolAclQuery {
         return (int)$this->query($sSql) > 0; 
     }
 
-    function getPriceOrderMax($iLevelId) {
-        $sSql = $this->prepare("SELECT MAX(`Order`) FROM `sys_acl_level_prices` WHERE `IDLevel`=?", $iLevelId);
-        return (int)$this->getOne($sSql);
-    }
-
-    function deletePrices($aParams) {
-        $sWhereClause = "";
-
-        switch($aParams['type']) {
-            case 'by_level_id':
-                $sWhereClause .= $this->prepare("AND `IDLevel`=?", $aParams['value']);
-                break;
-        }
-
-        return (int)$this->query("DELETE FROM `sys_acl_level_prices` WHERE 1 " . $sWhereClause) > 0;
-    }
-
     function deleteActions($aParams) {
         $sWhereClause = "";
 

+ 1 - 2
studio/template/scripts/BxBaseStudioPermissions.php

@@ -34,8 +34,7 @@ class BxBaseStudioPermissions extends BxDolStudioPermissions {
         $aMenu = array();
         $aMenuItems = array(
             BX_DOL_STUDIO_PRM_TYPE_LEVELS, 
-            BX_DOL_STUDIO_PRM_TYPE_ACTIONS, 
-            BX_DOL_STUDIO_PRM_TYPE_PRICES
+            BX_DOL_STUDIO_PRM_TYPE_ACTIONS
         );
 
         foreach($aMenuItems as $sMenuItem)

+ 0 - 14
studio/template/scripts/BxBaseStudioPermissionsLevels.php

@@ -463,20 +463,6 @@ class BxBaseStudioPermissionsLevels extends BxDolStudioPermissionsLevels {
         return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
     }
 
-    protected function _getCellPricingList ($mixedValue, $sKey, $aField, $aRow) {
-        $aPrices = array();
-        $iPrices = $this->oDb->getPrices(array('type' => 'by_level_id', 'value' => $aRow['ID']), $aPrices);
-
-        $mixedValue = $this->_oTemplate->parseHtmlByName('bx_a.html', array(
-            'href' => BX_DOL_URL_STUDIO . 'builder_permissions.php?page=prices&level=' . $aRow['ID'],
-            'title' => _t('_adm_prm_txt_manage_prices'),
-        	'bx_repeat:attrs' => array(),
-            'content' => _t('_adm_prm_txt_n_prices', $iPrices)
-        ));
-
-        return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
-    }
-
     protected function _getCellQuotaSize ($mixedValue, $sKey, $aField, $aRow) {        
         return parent::_getCellDefault ($mixedValue > 0 ? _t_format_size($mixedValue) : '&infin;', $sKey, $aField, $aRow);
     }