fix class table

1.10.x
aragonc 10 years ago
parent fe01879d38
commit 4f0789a9c3
  1. 10
      app/Resources/public/css/base.css
  2. 8
      main/admin/usergroups.php
  3. BIN
      main/img/icons/16/edit.png
  4. BIN
      main/img/icons/32/add-class.png
  5. 2820
      main/img/icons/svg/add-class.svg
  6. 16
      main/inc/ajax/model.ajax.php
  7. 4
      main/inc/lib/display.lib.php
  8. 8
      main/user/class.php

@ -2408,6 +2408,10 @@ form .formw .freeze {
.label_tag.course {
background-color: #62cffc;
}
.label{
font-weight: normal;
font-size: 90%;
}
.invisible {
color: #999;
}
@ -5102,13 +5106,13 @@ div#chat-remote-video video {
}
.ui-accordion .ui-accordion-content-active{
}
.ui-jqgrid-view .label-success{
font-size: 14px;
}
.ui-jqgrid-view .ui-widget-content a{
color:#666666;
}
.ui-jqgrid-view .ui-widget-content a.btn{
color: #fff;
}
.ui-jqgrid-view .ui-state-default,
.ui-jqgrid-view .ui-widget-content .ui-state-default,
.ui-jqgrid-view .ui-widget-header .ui-state-default{

@ -60,8 +60,8 @@ $column_model = array(
array('name'=>'users', 'index'=>'users', 'width'=>'15', 'align'=>'left'),
array('name'=>'courses', 'index'=>'courses', 'width'=>'15', 'align'=>'left'),
array('name'=>'sessions', 'index'=>'sessions', 'width'=>'15', 'align'=>'left'),
array('name'=>'group_type', 'index'=>'group_type', 'width'=>'15', 'align'=>'left'),
array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'sortable'=>'false','formatter'=>'action_formatter'),
array('name'=>'group_type', 'index'=>'group_type', 'width'=>'15', 'align'=>'center'),
array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'center', 'sortable'=>'false','formatter'=>'action_formatter'),
);
//Autowidth
@ -76,8 +76,8 @@ $action_links = 'function action_formatter (cellvalue, options, rowObject) {
.' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'"><img src="../img/icons/22/user_to_class.png" title="'.get_lang('SubscribeUsersToClass').'"></a>'
.' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'"><img src="../img/icons/22/course_to_class.png" title="'.get_lang('SubscribeClassToCourses').'"></a>'
.' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'"><img src="../img/icons/22/sessions_to_class.png" title="'.get_lang('SubscribeClassToSessions').'"></a>'
.' <a href="?action=edit&id=\'+options.rowId+\'"><img width="22px" src="../img/edit.png" title="'.get_lang('Edit').'" ></a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.png"></a>\';
.' <a href="?action=edit&id=\'+options.rowId+\'"><img src="../img/icons/16/edit.png" title="'.get_lang('Edit').'" ></a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/icons/16/delete.png"></a>\';
}';
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 80 KiB

@ -1505,19 +1505,19 @@ switch ($action) {
$group['users'] = count($obj->get_users_by_usergroup($group['id']));
if ($obj->usergroup_was_added_in_course($group['id'], $course_id)) {
$url = 'class.php?action=remove_class_from_course&id='.$group['id'].'&'.api_get_cidreq();
//$icon = Display::return_icon('delete.png', get_lang('Remove'));
$class = 'btn btn-danger';
$text = get_lang('Remove');
$icon = Display::return_icon('delete.png', get_lang('Remove'));
//$class = 'btn btn-danger';
//$text = get_lang('Remove');
} else {
$url = 'class.php?action=add_class_to_course&id='.$group['id'].'&'.api_get_cidreq().'&type=not_registered';
$class = 'btn btn-primary';
//$icon = Display::return_icon('add.png', get_lang('Add'));
$text = get_lang('Add');
//$class = 'btn btn-primary';
$icon = Display::return_icon('add.png', get_lang('Add'));
//$text = get_lang('Add');
}
switch ($group['group_type']) {
case 0:
$group['group_type'] = Display::label(get_lang('Class'), 'info');
$group['group_type'] = Display::label(get_lang('Class'), 'primary');
break;
case 1:
$group['group_type'] = Display::label(get_lang('Social'), 'success');
@ -1528,7 +1528,7 @@ switch ($action) {
$group['status'] = $role;
$group['actions'] = Display::url($text, $url, ['class' => $class]);
$group['actions'] = Display::url($icon, $url);
$new_result[] = $group;
}
$result = $new_result;

@ -1831,8 +1831,8 @@ class Display
case 'info':
$class = 'label-info';
break;
case 'inverse':
$class = 'label-inverse';
case 'primary':
$class = 'label-primary';
break;
default:
$class = 'label-default';

@ -43,7 +43,7 @@ if (api_is_allowed_to_edit()) {
$actions .= '<div class="actions">';
if ($type == 'registered') {
$actions .= '<a href="class.php?'.api_get_cidreq().'&type=not_registered">'.
Display::return_icon('add.png', get_lang("AddClassesToACourse"), array(), ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('add-class.png', get_lang("AddClassesToACourse"), array(), ICON_SIZE_MEDIUM).'</a>';
} else {
$actions .= '<a href="class.php?'.api_get_cidreq().'&type=registered">'.
Display::return_icon('back.png', get_lang("Classes"), array(), ICON_SIZE_MEDIUM).'</a>';
@ -124,13 +124,13 @@ $columnModel = array(
'name' => 'group_type',
'index' => 'group_type',
'width' => '15',
'align' => 'left',
'align' => 'center',
),
array(
'name' => 'actions',
'index' => 'actions',
'width' => '20',
'align' => 'left',
'width' => '10',
'align' => 'center',
'sortable' => 'false',
),
);

Loading…
Cancel
Save