Skip to content

Commit 1bc6107

Browse files
committed
fix category sort within roles administration
1 parent f53cf8e commit 1bc6107

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

adm_program/modules/roles/roles.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,16 @@
101101
// create array with all column heading values
102102
$columnHeading = array(
103103
$gL10n->get('SYS_CATEGORY'),
104+
'ORDER',
104105
$listDescription,
105106
$gL10n->get('SYS_AUTHORIZATION'),
106107
$gL10n->get('ROL_PREF'),
107108
$gL10n->get('SYS_FEATURES'));
108-
$table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
109+
$table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'left', 'right'));
109110
$table->setColumnWidth(3, '40%');
110-
$table->disableDatatablesColumnsSort(array(3, 4, 5));
111+
$table->disableDatatablesColumnsSort(array(4, 5, 6));
112+
$table->setDatatablesAlternativOrderColumns(1, 2);
113+
$table->setDatatablesColumnsHide(2);
111114
$table->setDatatablesGroupColumn(1);
112115
$table->addRowHeadingByArray($columnHeading);
113116

@@ -301,6 +304,7 @@
301304
// create array with all column values
302305
$columnValues = array(
303306
$categoryName,
307+
$role->getValue('cat_sequence'),
304308
'<a href="'.$g_root_path.'/adm_program/modules/roles/roles_new.php?rol_id='.$role->getValue('rol_id').'" title="'.$role->getValue('rol_description').'">'.$role->getValue('rol_name').'</a>',
305309
$assignRoles,
306310
$listView,

adm_program/system/classes/tablecategory.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,18 @@ public function getValue($columnName, $format = '')
177177
return $value;
178178
}
179179

180-
// die Kategorie wird um eine Position in der Reihenfolge verschoben
180+
/** Change the internal sequence of this category. It can be moved one place up or down
181+
* @param $mode This could be @b UP or @b DOWN.
182+
*/
181183
public function moveSequence($mode)
182184
{
183185
global $gCurrentOrganization;
184186

185-
// Anzahl orgaunabhaengige ermitteln, da diese nicht mit den abhaengigen vermischt werden duerfen
187+
// count all categories that are organization independent because these categories should not
188+
// be mixed with the organization categories. Hidden categories are sidelined.
186189
$sql = 'SELECT COUNT(1) as count FROM '. TBL_CATEGORIES. '
187190
WHERE cat_type = \''. $this->getValue('cat_type'). '\'
191+
AND cat_name_intern NOT LIKE \'CONFIRMATION_OF_PARTICIPATION\'
188192
AND cat_org_id IS NULL ';
189193
$this->db->query($sql);
190194
$row = $this->db->fetch_array();

0 commit comments

Comments
 (0)