Exemple #1
0
     switch ($getView) {
         case 'compact':
             $columnHeading = array(' ', $gL10n->get('SYS_PERIOD'), $gL10n->get('DAT_DATE'), $gL10n->get('SYS_PARTICIPANTS'), $gL10n->get('DAT_LOCATION'));
             $columnAlign = array('center', 'left', 'left', 'left', 'left');
             $compactTable->disableDatatablesColumnsSort(6);
             break;
         case 'room':
             $columnHeading = array(' ', $gL10n->get('SYS_PERIOD'), $gL10n->get('DAT_DATE'), $gL10n->get('SYS_ROOM'), $gL10n->get('SYS_LEADERS'), $gL10n->get('SYS_PARTICIPANTS'));
             $columnAlign = array('center', 'left', 'left', 'left', 'left', 'left');
             $compactTable->disableDatatablesColumnsSort(7);
             break;
         case 'participants':
             $columnHeading = array(' ', $gL10n->get('SYS_PERIOD'), $gL10n->get('DAT_DATE'), $gL10n->get('SYS_PARTICIPANTS'));
             $columnAlign = array('center', 'left', 'left', 'left');
             $compactTable->disableDatatablesColumnsSort(5);
             $compactTable->setColumnWidth(4, '35%');
             break;
         case 'description':
             $columnHeading = array(' ', $gL10n->get('SYS_PERIOD'), $gL10n->get('DAT_DATE'), $gL10n->get('SYS_DESCRIPTION'));
             $columnAlign = array('center', 'left', 'left', 'left');
             $compactTable->disableDatatablesColumnsSort(5);
             $compactTable->setColumnWidth(4, '35%');
             break;
     }
     if ($getViewMode === 'html') {
         $columnHeading[] = ' ';
         $columnAlign[] = 'right';
     }
     $compactTable->setColumnAlignByArray($columnAlign);
     $compactTable->addRowHeadingByArray($columnHeading);
 }
Exemple #2
0
// get module menu
$rolesMenu = $page->getMenu();
// define link to create new profile field
$rolesMenu->addItem('menu_item_new_role', $g_root_path . '/adm_program/modules/roles/roles_new.php', $gL10n->get('SYS_CREATE_ROLE'), 'add.png');
// define link to maintain categories
$rolesMenu->addItem('menu_item_maintain_category', $g_root_path . '/adm_program/modules/categories/categories.php?type=ROL', $gL10n->get('SYS_MAINTAIN_CATEGORIES'), 'edit.png');
// define link to show inactive roles
$rolesMenu->addItem('menu_item_inactive_role', $g_root_path . '/adm_program/modules/roles/roles.php?inactive=' . $activeRolesFlag, $activeRolesLinkDescription, $activeRolesImage);
// define link to show hidden roles
$rolesMenu->addItem('menu_item_hidden_role', $g_root_path . '/adm_program/modules/roles/roles.php?invisible=' . $visibleRolesFlag, $visibleRolesLinkDescription, $visibleRolesImage);
// Create table
$table = new HtmlTable('roles_table', $page, true, true);
// create array with all column heading values
$columnHeading = array($gL10n->get('SYS_CATEGORY'), 'ORDER', $listDescription, $gL10n->get('SYS_AUTHORIZATION'), $gL10n->get('ROL_PREF'), $gL10n->get('SYS_FEATURES'));
$table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'left', 'right'));
$table->setColumnWidth(3, '40%');
$table->disableDatatablesColumnsSort(array(4, 5, 6));
$table->setDatatablesAlternativOrderColumns(1, 2);
$table->setDatatablesColumnsHide(2);
$table->setDatatablesGroupColumn(1);
$table->addRowHeadingByArray($columnHeading);
$cat_id = '';
// list all roles group by category
$sql = 'SELECT * FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . '
            WHERE rol_cat_id  = cat_id
                AND cat_type    = \'ROL\'
                    ' . $sqlRolesStatus . '
                AND (  cat_org_id = ' . $gCurrentOrganization->getValue('org_id') . '
                     OR cat_org_id IS NULL )
            ORDER BY cat_sequence ASC, rol_name ASC ';
$rol_result = $gDb->query($sql);