|
|
|
@ -59,27 +59,23 @@ $columns = array(get_lang('Name'), get_lang('NumberOfCourses'), get_lang( |
|
|
|
//$activeurl = '?sidx=session_active'; |
|
|
|
//$activeurl = '?sidx=session_active'; |
|
|
|
//Column config |
|
|
|
//Column config |
|
|
|
$column_model = array( |
|
|
|
$column_model = array( |
|
|
|
array('name'=>'name', 'index'=>'name', 'width'=>'120', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'name', 'index'=>'name', 'width'=>'160', 'align'=>'left', 'search' => 'true', 'wrap_cell' => "true"), |
|
|
|
array('name'=>'nbr_courses', 'index'=>'nbr_courses', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'nbr_courses', 'index'=>'nbr_courses', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'nbr_users', 'index'=>'nbr_users', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'nbr_users', 'index'=>'nbr_users', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'category_name', 'index'=>'category_name', 'width'=>'70', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'category_name', 'index'=>'category_name', 'width'=>'70', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'date_start', 'index'=>'date_start', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'date_start', 'index'=>'date_start', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'date_end', 'index'=>'date_end', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'date_end', 'index'=>'date_end', 'width'=>'40', 'align'=>'left', 'search' => 'true'), |
|
|
|
array('name'=>'coach_name', 'index'=>'coach_name', 'width'=>'80', 'align'=>'left', 'search' => 'false'), |
|
|
|
array('name'=>'coach_name', 'index'=>'coach_name', 'width'=>'80', 'align'=>'left', 'search' => 'false'), |
|
|
|
array('name'=>'status', 'index'=>'session_active','width'=>'40', 'align'=>'left', 'search' => 'true', 'stype'=>'select', |
|
|
|
array('name'=>'status', 'index'=>'session_active','width'=>'40', 'align'=>'left', 'search' => 'true', 'stype'=>'select', |
|
|
|
|
|
|
|
//for the bottom bar |
|
|
|
//for the bottom bar |
|
|
|
'searchoptions' => array( |
|
|
|
'searchoptions' => array( |
|
|
|
'defaultValue' => '1', |
|
|
|
'defaultValue' => '1', |
|
|
|
'value' => '1:'.get_lang('Active').';0:'.get_lang('Inactive')), |
|
|
|
'value' => '1:'.get_lang('Active').';0:'.get_lang('Inactive')), |
|
|
|
//for the top bar |
|
|
|
|
|
|
|
'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))), |
|
|
|
//for the top bar |
|
|
|
array('name'=>'visibility', 'index'=>'visibility', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
|
|
|
'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))), |
|
|
|
array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false', 'search' => 'false') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
array('name'=>'visibility', 'index'=>'visibility', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
|
|
|
|
|
|
|
array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false', 'search' => 'false') |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
//Autowidth |
|
|
|
//Autowidth |
|
|
|
$extra_params['autowidth'] = 'true'; |
|
|
|
$extra_params['autowidth'] = 'true'; |
|
|
|
|
|
|
|
|
|
|
|
@ -90,18 +86,17 @@ $extra_params['height'] = 'auto'; |
|
|
|
|
|
|
|
|
|
|
|
//With this function we can add actions to the jgrid (edit, delete, etc) |
|
|
|
//With this function we can add actions to the jgrid (edit, delete, etc) |
|
|
|
$action_links = 'function action_formatter(cellvalue, options, rowObject) { |
|
|
|
$action_links = 'function action_formatter(cellvalue, options, rowObject) { |
|
|
|
return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png',get_lang('SubscribeUsersToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png',get_lang('SubscribeUsersToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png',get_lang('SubscribeCoursesToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png',get_lang('SubscribeCoursesToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
'\'; |
|
|
|
'\'; |
|
|
|
}'; |
|
|
|
}'; |
|
|
|
?> |
|
|
|
?> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setSearchSelect(columnName) { |
|
|
|
function setSearchSelect(columnName) { |
|
|
|
|
|
|
|
$("#sessions").jqGrid('setColProp', columnName, |
|
|
|
$("#sessions").jqGrid('setColProp', columnName, |
|
|
|
{ |
|
|
|
{ |
|
|
|
searchoptions:{ |
|
|
|
searchoptions:{ |
|
|
|
|