|
|
@ -10,6 +10,8 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
use Symfony\Component\HttpFoundation\Request as HttpRequest; |
|
|
|
use Symfony\Component\HttpFoundation\Request as HttpRequest; |
|
|
|
|
|
|
|
use Chamilo\CoreBundle\Component\Utils\ActionIcon; |
|
|
|
|
|
|
|
use Chamilo\CoreBundle\Component\Utils\StateIcon; |
|
|
|
|
|
|
|
|
|
|
|
$cidReset = true; |
|
|
|
$cidReset = true; |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
@ -120,28 +122,28 @@ if (-1 == $current_access_url_id) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$actions = Display::url( |
|
|
|
$actions = Display::url( |
|
|
|
Display::return_icon('new_link.png', get_lang('Add URL'), [], ICON_SIZE_MEDIUM), |
|
|
|
Display::getMdiIcon('new_link', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add URL')), |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit.php' |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit.php' |
|
|
|
); |
|
|
|
); |
|
|
|
$actions .= Display::url( |
|
|
|
$actions .= Display::url( |
|
|
|
Display::return_icon('user.png', get_lang('Manage users'), [], ICON_SIZE_MEDIUM), |
|
|
|
Display::getMdiIcon('user', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Manage users')), |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_users_to_url.php' |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_users_to_url.php' |
|
|
|
); |
|
|
|
); |
|
|
|
$actions .= Display::url( |
|
|
|
$actions .= Display::url( |
|
|
|
Display::return_icon('course.png', get_lang('Manage courses'), [], ICON_SIZE_MEDIUM), |
|
|
|
Display::getMdiIcon('course', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Manage courses')), |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_courses_to_url.php' |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_courses_to_url.php' |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$userGroup = new UserGroupModel(); |
|
|
|
$userGroup = new UserGroupModel(); |
|
|
|
if ($userGroup->getUseMultipleUrl()) { |
|
|
|
if ($userGroup->getUseMultipleUrl()) { |
|
|
|
$actions .= Display::url( |
|
|
|
$actions .= Display::url( |
|
|
|
Display::return_icon('class.png', get_lang('Manage user groups'), [], ICON_SIZE_MEDIUM), |
|
|
|
Display::getMdiIcon('class', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Manage user groups')), |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_usergroup_to_url.php' |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_usergroup_to_url.php' |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$actions .= Display::url( |
|
|
|
$actions .= Display::url( |
|
|
|
Display::return_icon('folder.png', get_lang('Manage course categories'), [], ICON_SIZE_MEDIUM), |
|
|
|
Display::getMdiIcon('folder', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Manage course categories')), |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_course_category_to_url.php' |
|
|
|
api_get_path(WEB_CODE_PATH).'admin/access_url_edit_course_category_to_url.php' |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -158,27 +160,27 @@ foreach ($data as $row) { |
|
|
|
//Status |
|
|
|
//Status |
|
|
|
$active = $row['active']; |
|
|
|
$active = $row['active']; |
|
|
|
$action = 'unlock'; |
|
|
|
$action = 'unlock'; |
|
|
|
$image = 'wrong'; |
|
|
|
$image = StateIcon::ACTIVE; |
|
|
|
if ('1' == $active) { |
|
|
|
if ('1' == $active) { |
|
|
|
$action = 'lock'; |
|
|
|
$action = 'lock'; |
|
|
|
$image = 'right'; |
|
|
|
$image = StateIcon::ACTIVE; |
|
|
|
} |
|
|
|
} |
|
|
|
// you cannot lock the default |
|
|
|
// you cannot lock the default |
|
|
|
if ('1' == $row['id']) { |
|
|
|
if ('1' == $row['id']) { |
|
|
|
$status = Display::return_icon($image.'.gif', get_lang(ucfirst($action))); |
|
|
|
$status = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang(ucfirst($action))); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$status = '<a href="access_urls.php?action='.$action.'&url_id='.$row['id'].'">'. |
|
|
|
$status = '<a href="access_urls.php?action='.$action.'&url_id='.$row['id'].'">'. |
|
|
|
Display::return_icon($image.'.gif', get_lang(ucfirst($action))).'</a>'; |
|
|
|
Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang(ucfirst($action))).'</a>'; |
|
|
|
} |
|
|
|
} |
|
|
|
// Actions |
|
|
|
// Actions |
|
|
|
$url_id = $row['id']; |
|
|
|
$url_id = $row['id']; |
|
|
|
$actions = Display::url( |
|
|
|
$actions = Display::url( |
|
|
|
Display::return_icon('edit.png', get_lang('Edit'), [], ICON_SIZE_SMALL), |
|
|
|
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')), |
|
|
|
"access_url_edit.php?url_id=$url_id" |
|
|
|
"access_url_edit.php?url_id=$url_id" |
|
|
|
); |
|
|
|
); |
|
|
|
if ('1' != $url_id) { |
|
|
|
if ('1' != $url_id) { |
|
|
|
$actions .= '<a href="access_urls.php?action=delete_url&url_id='.$url_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."'".')) return false;">'. |
|
|
|
$actions .= '<a href="access_urls.php?action=delete_url&url_id='.$url_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."'".')) return false;">'. |
|
|
|
Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL).'</a>'; |
|
|
|
Display::getMdiIcon('delete', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>'; |
|
|
|
} |
|
|
|
} |
|
|
|
$urls[] = [$url, $description, $status, $createdAt, $actions]; |
|
|
|
$urls[] = [$url, $description, $status, $createdAt, $actions]; |
|
|
|
} |
|
|
|
} |
|
|
|