Merge pull request #1541 from norahmollo/DocSystem

Hide columns ROLE_CODE and PERMISSION_CODE according to PARTNER_FLAG
This commit is contained in:
julceslauhub
2013-04-11 11:22:00 -07:00
4 changed files with 5 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ $G_ID_SUB_MENU_SELECTED = 'ROLES';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->assign("PARTNER_FLAG", (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false);
$oHeadPublisher->addExtJsScript( 'roles/rolesUsersPermission', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'roles/rolesUsersPermission' ); //adding a html file .html.

View File

@@ -56,6 +56,7 @@ $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'roles/rolesList', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'roles/rolesList' ); //adding a html file .html.
$oHeadPublisher->assign( 'PARTNER_FLAG', (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false);
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
$oHeadPublisher->assign( 'CONFIG', $Config );
G::RenderPage( 'publish', 'extJs' );

View File

@@ -172,7 +172,7 @@ Ext.onReady(function(){
frame: true,
items:[
{xtype: 'textfield', name: 'rol_uid', hidden: true },
{xtype: 'textfield', fieldLabel: _('ID_CODE'), name: 'code', width: 250, allowBlank: false, readOnly: true },
{xtype: 'textfield', fieldLabel: _('ID_CODE'), name: 'code', width: 250, allowBlank: false, readOnly: true, hidden: !PARTNER_FLAG ? false : true},
{xtype: 'textfield', fieldLabel: _('ID_NAME'), name: 'name', width: 200, allowBlank: false},
{
xtype: 'combo',
@@ -239,7 +239,7 @@ Ext.onReady(function(){
},
columns: [
{id:'ROL_UID', dataIndex: 'ROL_UID', hidden:true, hideable:false},
{header: _('ID_CODE'), dataIndex: 'ROL_CODE', width: 220, align:'left'},
{header: _('ID_CODE'), dataIndex: 'ROL_CODE', width: 220, align:'left', hidden: !PARTNER_FLAG ? false : true},
{header: _('ID_NAME'), dataIndex: 'ROL_NAME', width: 180, hidden:false, align:'left'},
{header: _('ID_STATUS'), dataIndex: 'ROL_STATUS', width: 80, hidden: false, align: 'center', renderer: status_role},
{header: _('ID_ACTIVE_USERS'), dataIndex: 'TOTAL_USERS', width: 80, hidden: false, align: 'center'},

View File

@@ -139,7 +139,7 @@ Ext.onReady(function(){
},
columns: [
{id:'PER_UID', dataIndex: 'PER_UID', hidden:true, hideable:false},
{header: _('ID_PERMISSION_CODE'), dataIndex: 'PER_CODE', width: 60, align:'left'},
{header: _('ID_PERMISSION_CODE'), dataIndex: 'PER_CODE', width: 60, align:'left', hidden: !PARTNER_FLAG ? false : true},
{header: _('ID_PERMISSION_NAME'), dataIndex: 'PER_NAME', width: 60, align:'left'}
]
});