本文整理汇总了PHP中Display::toolbarAction方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::toolbarAction方法的具体用法?PHP Display::toolbarAction怎么用?PHP Display::toolbarAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::toolbarAction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_form
function display_form()
{
$html = '';
$sessions = SessionManager::get_sessions_list(array(), array('name', 'ASC'));
// Actions
// Link back to the documents overview
$actionsLeft = '<a href="../admin/index.php">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM) . '</a>';
$html .= Display::toolbarAction('toolbar-copysession', array(0 => $actionsLeft));
$html .= Display::return_message(get_lang('CopyCourseFromSessionToSessionExplanation'), 'warning');
$html .= '<form class="form-horizontal" name="formulaire" method="post" action="' . api_get_self() . '" >';
$html .= '<div class="form-group">';
// origin
$html .= '<label class="col-sm-2 control-label">' . get_lang('OriginCoursesFromSession') . ': </label>';
$html .= '<div class="col-sm-5">' . make_select_session_list('sessions_list_origin', $sessions, array('onchange' => 'javascript: xajax_search_courses(this.value,\'origin\');')) . '</div>';
$html .= '<div class="col-sm-5" id="ajax_list_courses_origin">';
$html .= '<select id="origin" class="form-control" name="SessionCoursesListOrigin[]" ></select>';
$html .= '</div></div>';
//destination
$html .= '<div class="form-group">';
$html .= '<label class="col-sm-2 control-label">' . get_lang('DestinationCoursesFromSession') . ': </label>';
$html .= '<div class="col-sm-5" id="ajax_sessions_list_destination">';
$html .= '<select class="form-control" name="sessions_list_destination" onchange="javascript: xajax_search_courses(this.value,\'destination\');">';
$html .= '<option value = "0">' . get_lang('ThereIsNotStillASession') . '</option></select ></div>';
$html .= '<div class="col-sm-5" id="ajax_list_courses_destination">';
$html .= '<select id="destination" class="form-control" name="SessionCoursesListDestination[]" ></select>';
$html .= '</div></div>';
$options = '<div class="radio"><label><input type="radio" id="copy_option_1" name="copy_option" value="full_copy" checked="checked"/>';
$options .= get_lang('FullCopy') . '</label></div>';
$options .= '<div class="radio"><label><input type="radio" id="copy_option_2" name="copy_option" value="select_items" disabled="disabled"/>';
$options .= ' ' . get_lang('LetMeSelectItems') . '</label></div>';
$options .= '<div class="checkbox"><label><input type="checkbox" id="copy_base_content_id" name="copy_only_session_items" />' . get_lang('CopyOnlySessionItems') . '</label></div>';
$html .= Display::panel($options, get_lang('TypeOfCopy'));
$html .= '<div class="form-group"><div class="col-sm-12">';
$html .= '<button class="btn btn-success" type="submit" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . "'" . ')) return false;"><em class="fa fa-files-o"></em> ' . get_lang('CopyCourse') . '</button>';
// Add Security token
$html .= '<input type="hidden" value="' . Security::get_token() . '" name="sec_token">';
$html .= '</div></div>';
$html .= '</form>';
echo $html;
}
示例2: display_glossary
/**
* This is the main function that displays the list or the table with all
* the glossary terms
* @param string View ('table' or 'list'). Optional parameter.
* Defaults to 'table' and prefers glossary_view from the session by default.
* @return void
* @author Patrick Cool <patrick.cool@ugent.be>, Ghent University, Belgium
* @version januari 2009, dokeos 1.8.6
*/
public static function display_glossary($view = 'table')
{
// This function should always be called with the corresponding
// parameter for view type. Meanwhile, use this cheap trick.
$glossaryView = Session::read('glossary_view');
if (empty($glossaryView)) {
Session::write('glossary_view', $view);
}
// action links
//echo '<div class="actions">';
$actionsLeft = '';
if (api_is_allowed_to_edit(null, true)) {
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=addglossary&msg=add?' . api_get_cidreq() . '">' . Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=export">' . Display::return_icon('export_csv.png', get_lang('ExportGlossaryAsCSV'), '', ICON_SIZE_MEDIUM) . '</a>';
if (api_is_allowed_to_edit(null, true)) {
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=import">' . Display::return_icon('import_csv.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=export_to_pdf">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
if (isset($_SESSION['glossary_view']) && $_SESSION['glossary_view'] == 'table' or !isset($_SESSION['glossary_view'])) {
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=list">' . Display::return_icon('view_detailed.png', get_lang('ListView'), '', ICON_SIZE_MEDIUM) . '</a>';
} else {
$actionsLeft .= '<a href="index.php?' . api_get_cidreq() . '&action=changeview&view=table">' . Display::return_icon('view_text.png', get_lang('TableView'), '', ICON_SIZE_MEDIUM) . '</a>';
}
/* BUILD SEARCH FORM */
$form = new FormValidator('search', 'get', api_get_self() . '?' . api_get_cidreq(), '', array(), FormValidator::LAYOUT_INLINE);
$form->addText('keyword', '', false, array('class' => 'col-md-2'));
$form->addElement('hidden', 'cidReq', api_get_course_id());
$form->addElement('hidden', 'id_session', api_get_session_id());
$form->addButtonSearch(get_lang('Search'));
$actionsRight = $form->returnForm();
$toolbar = Display::toolbarAction('toolbar-document', array(0 => $actionsLeft, 1 => $actionsRight));
echo $toolbar;
if ($glossaryView == 'table') {
$table = new SortableTable('glossary', array('GlossaryManager', 'get_number_glossary_terms'), array('GlossaryManager', 'get_glossary_data'), 0);
//$table->set_header(0, '', false);
$table->set_header(0, get_lang('TermName'), true);
$table->set_header(1, get_lang('TermDefinition'), true);
if (api_is_allowed_to_edit(null, true)) {
$table->set_header(2, get_lang('Actions'), false, 'width=90px', array('class' => 'td_actions'));
$table->set_column_filter(2, array('GlossaryManager', 'actions_filter'));
}
$table->display();
}
if ($glossaryView == 'list') {
GlossaryManager::display_glossary_list();
}
}
示例3: api_get_path
//Block Social Menu
$social_menu_block = SocialManager::show_social_menu('messages');
}
//Right content
$social_right_content = null;
$keyword = '';
if (api_get_setting('social.allow_social_tool') == 'true') {
$actionsLeft = '<a href="' . api_get_path(WEB_PATH) . 'main/messages/new_message.php?f=social">' . Display::return_icon('new-message.png', get_lang('ComposeMessage'), array(), 32) . '</a>';
$actionsLeft .= '<a href="' . api_get_path(WEB_PATH) . 'main/messages/outbox.php?f=social">' . Display::return_icon('outbox.png', get_lang('Outbox'), array(), 32) . '</a>';
$form = MessageManager::getSearchForm(api_get_path(WEB_PATH) . 'main/messages/inbox.php');
if ($form->validate()) {
$values = $form->getSubmitValues();
$keyword = $values['keyword'];
}
$actionsRight = $form->returnForm();
$social_right_content .= Display::toolbarAction('toolbar', [$actionsLeft, $actionsRight]);
}
//MAIN CONTENT
if (!isset($_GET['del_msg'])) {
$social_right_content .= MessageManager::inbox_display();
} else {
$num_msg = intval($_POST['total']);
for ($i = 0; $i < $num_msg; $i++) {
if ($_POST[$i]) {
//the user_id was necesarry to delete a message??
Display::addFlash(MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_POST['_' . $i]));
}
}
$social_right_content .= MessageManager::inbox_display();
}
if (api_get_setting('social.allow_social_tool') == 'true') {
示例4: get_lang
$form_action['delete'] = get_lang('Delete');
$portfolio_actions = Portfolio::actions();
foreach ($portfolio_actions as $action) {
$form_action[$action->get_name()] = $action->get_title();
}
$table->set_form_actions($form_action, 'ids');
}
}
//Display::display_header('', 'Doc');
/* Introduction section (editable by course admins) */
if (!empty($groupId)) {
Display::display_introduction_section(TOOL_DOCUMENT . $groupId);
} else {
Display::display_introduction_section(TOOL_DOCUMENT);
}
$toolbar = Display::toolbarAction('toolbar-document', array(0 => $actionsLeft, 1 => $actionsRight));
echo $toolbar;
echo $templateForm;
echo $moveForm;
echo $dirForm;
echo $selector;
$table->display();
if (count($documentAndFolders) > 1) {
if ($is_allowed_to_edit || $group_member_with_upload_rights) {
// Getting the course quota
$course_quota = DocumentManager::get_course_quota();
// Calculating the total space
$already_consumed_space_course = DocumentManager::documents_total_space(api_get_course_int_id());
// Displaying the quota
DocumentManager::display_simple_quota($course_quota, $already_consumed_space_course);
}
示例5: isset
/* Here we do all the work */
$unzip = isset($_POST['unzip']) ? $_POST['unzip'] : null;
$index = isset($_POST['index_document']) ? $_POST['index_document'] : null;
// User has submitted a file
if (!empty($_FILES)) {
DocumentManager::upload_document($_FILES, $_POST['curdirpath'], $_POST['title'], $_POST['comment'], $unzip, $_POST['if_exists'], $index, true);
}
// Actions
// Link back to the documents overview
if ($is_certificate_mode) {
$actions = '<a href="document.php?id=' . $document_id . '&selectcat=' . $selectcat . '&' . api_get_cidreq() . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM) . '</a>';
} else {
$actions = '<a href="document.php?id=' . $document_id . '&' . api_get_cidreq() . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM) . '</a>';
}
// Link to create a folder
echo $toolbar = Display::toolbarAction('toolbar-upload', array(0 => $actions), 1);
// Form to select directory
$folders = DocumentManager::get_all_document_folders($_course, $groupId, $is_allowed_to_edit);
if (!$is_certificate_mode) {
echo DocumentManager::build_directory_selector($folders, $document_id, isset($group_properties['directory']) ? $group_properties['directory'] : array());
}
$action = api_get_self() . '?' . api_get_cidreq() . '&id=' . $document_id;
$form = new FormValidator('upload', 'POST', $action . '#tabs-2', '', array('enctype' => 'multipart/form-data'));
$form->addElement('hidden', 'id', $document_id);
$form->addElement('hidden', 'curdirpath', $path);
$course_quota = format_file_size(DocumentManager::get_course_quota() - DocumentManager::documents_total_space());
$label = get_lang('MaxFileSize') . ': ' . ini_get('upload_max_filesize') . '<br/>' . get_lang('DocumentQuota') . ': ' . $course_quota;
$form->addElement('file', 'file', array(get_lang('File'), $label), 'style="width: 250px" id="user_upload"');
$form->addElement('text', 'title', get_lang('Title'), array('id' => 'title_file'));
$form->addElement('textarea', 'comment', get_lang('Comment'));
// Advanced parameters
示例6: api_get_path
$actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/add_user.php?' . api_get_cidreq() . '&id=' . $workId . '">';
$actionsLeft .= Display::return_icon('addworkuser.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM) . '</a>';
$actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/work_list_all.php?' . api_get_cidreq() . '&id=' . $workId . '&action=export_pdf">';
$actionsLeft .= Display::return_icon('pdf.png', get_lang('Export'), '', ICON_SIZE_MEDIUM) . '</a>';
$display_output = '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/work_missing.php?' . api_get_cidreq() . '&id=' . $workId . '&list=without">' . Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM) . "</a>";
$count = get_count_work($workId);
if ($count > 0) {
$display_output .= '<a href="downloadfolder.inc.php?id=' . $workId . '&' . api_get_cidreq() . '">' . Display::return_icon('save_pack.png', get_lang('Save'), null, ICON_SIZE_MEDIUM) . '</a>';
}
$actionsLeft .= $display_output;
$actionsLeft .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/edit_work.php?' . api_get_cidreq() . '&id=' . $workId . '">';
$actionsLeft .= Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>';
$url = api_get_path(WEB_CODE_PATH) . 'work/upload_corrections.php?' . api_get_cidreq() . '&id=' . $workId;
$actionsLeft .= Display::toolbarButton(get_lang('UploadCorrections'), $url, 'upload', 'success');
}
echo Display::toolbarAction('toolbar-worklist', array(0 => $actionsLeft));
if (!empty($my_folder_data['title'])) {
echo Display::page_subheader($my_folder_data['title']);
}
$error_message = Session::read('error_message');
if (!empty($error_message)) {
echo $error_message;
Session::erase('error_message');
}
if (!empty($my_folder_data['description'])) {
$contentWork = Security::remove_XSS($my_folder_data['description']);
$html = '';
$html .= Display::panel($contentWork, get_lang('Description'));
echo $html;
}
$check_qualification = intval($my_folder_data['qualification']);
示例7: get_lang
default:
$affected_rows = 0;
}
if ($affected_rows) {
$msg = get_lang('AssignedUsersHaveBeenUpdatedSuccessfully');
}
}
// Display header
Display::display_header($tool_name);
// actions
if ($userStatus != STUDENT_BOSS) {
$actionsLeft = Display::url(Display::return_icon('course-add.png', get_lang('AssignCourses'), null, ICON_SIZE_MEDIUM), "dashboard_add_courses_to_user.php?user={$user_id}");
$actionsLeft .= Display::url(Display::return_icon('session-add.png', get_lang('AssignSessions'), null, ICON_SIZE_MEDIUM), "dashboard_add_sessions_to_user.php?user={$user_id}");
}
$actionsRight = Display::url('<em class="fa fa-search"></em> ' . get_lang('AdvancedSearch'), '#', array('class' => 'btn btn-default advanced_options', 'id' => 'advanced_search'));
$toolbar = Display::toolbarAction('toolbar-dashboard', $content = array(0 => $actionsLeft, 1 => $actionsRight));
echo $toolbar;
echo '<div id="advanced_search_options" style="display:none">';
$searchForm->display();
echo '</div>';
echo Display::page_header(sprintf(get_lang('AssignUsersToX'), api_get_person_name($user_info['firstname'], $user_info['lastname'])), null, $size = 'h3');
$assigned_users_to_hrm = array();
switch ($userStatus) {
case DRH:
//no break;
//no break;
case PLATFORM_ADMIN:
$assigned_users_to_hrm = UserManager::get_users_followed_by_drh($user_id);
break;
case STUDENT_BOSS:
$assigned_users_to_hrm = UserManager::getUsersFollowedByStudentBoss($user_id);
示例8: api_get_cidreq
if (in_array($_REQUEST['filter'], array_keys($values))) {
$default_filter = $_REQUEST['filter'];
}
} else {
$default_filter = 'today';
}
$renderer = $form->defaultRenderer();
$renderer->setCustomElementTemplate('<div class="col-md-2">{label}</div><div class="col-md-10"> {element} </div>');
$form->setDefaults(array('filter' => $default_filter, 'group_id' => $groupId));
if (!$is_locked_attendance || api_is_platform_admin()) {
$actionsLeft = '<a style="float:left;" href="index.php?' . api_get_cidreq() . '&action=calendar_list&attendance_id=' . $attendance_id . '">' . Display::return_icon('attendance_calendar.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM) . '</a>';
$actionsLeft .= '<a id="pdf_export" style="float:left;" href="index.php?' . api_get_cidreq() . '&action=attendance_sheet_export_to_pdf&attendance_id=' . $attendance_id . '&filter=' . $default_filter . '&group_id=' . $groupId . '">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
//if (count($users_in_course) > 0) {
$actionsRight = $form->returnForm();
//}
$toolbar = Display::toolbarAction('toolbar-attendance', array(0 => $actionsLeft, 1 => $actionsRight), 2, false);
echo $toolbar;
}
$message_information = get_lang('AttendanceSheetDescription');
if (!empty($message_information)) {
$message = '<strong>' . get_lang('Information') . '</strong><br />';
$message .= $message_information;
Display::display_normal_message($message, false);
}
if ($is_locked_attendance) {
Display::display_warning_message(get_lang('TheAttendanceSheetIsLocked'), false);
}
$param_filter = '&filter=' . Security::remove_XSS($default_filter) . '&group_id=' . $groupId;
if (count($users_in_course) > 0) {
?>
<script>
示例9: array
$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
} else {
foreach ($document_data['parents'] as $document_sub_data) {
$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
}
}
}
Display::display_header($nameTools, "Doc");
// actions
// link back to the documents overview
if ($is_certificate_mode) {
$actionsLeft = '<a href="document.php?certificate=true&id=' . $folder_id . '&selectcat=' . Security::remove_XSS($_GET['selectcat']) . '">' . Display::return_icon('back.png', get_lang('Back') . ' ' . get_lang('To') . ' ' . get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM) . '</a>';
} else {
$actionsLeft = '<a href="document.php?curdirpath=' . Security::remove_XSS($dir) . '">' . Display::return_icon('back.png', get_lang('Back') . ' ' . get_lang('To') . ' ' . get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM) . '</a>';
}
echo $toolbar = Display::toolbarAction('actions-documents', array(0 => $actionsLeft, 1 => ''));
if ($is_certificate_mode) {
$all_information_by_create_certificate = DocumentManager::get_all_info_to_certificate(api_get_user_id(), api_get_course_id());
$str_info = '';
foreach ($all_information_by_create_certificate[0] as $info_value) {
$str_info .= $info_value . '<br/>';
}
$create_certificate = get_lang('CreateCertificateWithTags');
Display::display_normal_message($create_certificate . ': <br /><br/>' . $str_info, false);
}
// HTML-editor
echo '<div class="row" style="overflow:hidden">
<div id="template_col" class="col-md-2">
<div class="panel panel-default">
<div class="panel-body">
<div id="frmModel" class="items-templates scrollbar-macosx"></div>
示例10: api_sort_by_first_name
}
$sort_by_first_name = api_sort_by_first_name();
$actionsLeft = '';
if (api_is_drh()) {
$menu_items = array(Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "auth/my_progress.php"), Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), 'student.php'), Display::url(Display::return_icon('teacher_na.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'), Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'), Display::url(Display::return_icon('session.png', get_lang('Sessions'), array(), ICON_SIZE_MEDIUM), 'session.php'));
$nb_menu_items = count($menu_items);
if ($nb_menu_items > 1) {
foreach ($menu_items as $key => $item) {
$actionsLeft .= $item;
}
}
}
$actionsRight = '';
$actionsRight .= Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', array('onclick' => 'javascript: window.print();'));
$actionsRight .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), api_get_self() . '?export=csv&keyword=' . $keyword);
$toolbar = Display::toolbarAction('toolbar-teachers', $content = array(0 => $actionsLeft, 1 => $actionsRight));
$table = new SortableTable('tracking_teachers', 'get_count_users', 'get_users', ($is_western_name_order xor $sort_by_first_name) ? 1 : 0, 10);
$params = array('keyword' => $keyword, 'active' => $active, 'sleeping_days' => $sleepingDays);
$table->set_additional_parameters($params);
if ($is_western_name_order) {
$table->set_header(0, get_lang('FirstName'), false);
$table->set_header(1, get_lang('LastName'), false);
} else {
$table->set_header(0, get_lang('LastName'), false);
$table->set_header(1, get_lang('FirstName'), false);
}
$table->set_header(2, get_lang('FirstLogin'), false);
$table->set_header(3, get_lang('LastConnexion'), false);
$table->set_header(4, get_lang('Details'), false);
if ($export_csv) {
if ($is_western_name_order) {
示例11: showActionBar
/**
* Get actions bar
* @return string
*/
public function showActionBar()
{
$_course = $this->courseInfo;
$session_id = $this->session_id;
$groupId = $this->group_id;
$page = $this->page;
$actionsLeft = '';
$actionsLeft .= '<a href="index.php?action=showpage&title=index&cidReq=' . $_course['id'] . '&session_id=' . $session_id . '&group_id=' . $groupId . '">' . Display::return_icon('home.png', get_lang('Home'), '', ICON_SIZE_MEDIUM) . '</a>';
if (api_is_allowed_to_session_edit(false, true) && api_is_allowed_to_edit()) {
// menu add page
$actionsLeft .= '<a href="index.php?cidReq=' . $_course['id'] . '&action=addnew&session_id=' . $session_id . '&group_id=' . $groupId . '"' . self::is_active_navigation_tab('addnew') . '>' . Display::return_icon('add.png', get_lang('AddNew'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$lock_unlock_addnew = null;
$protect_addnewpage = null;
if (api_is_allowed_to_edit(false, true) || api_is_platform_admin()) {
// page action: enable or disable the adding of new pages
if (self::check_addnewpagelock() == 0) {
$protect_addnewpage = Display::return_icon('off.png', get_lang('AddOptionProtected'));
$lock_unlock_addnew = 'unlockaddnew';
} else {
$protect_addnewpage = Display::return_icon('on.png', get_lang('AddOptionUnprotected'));
$lock_unlock_addnew = 'lockaddnew';
}
}
// menu find
$actionsLeft .= '<a href="index.php?cidReq=' . $_course['id'] . '&action=searchpages&session_id=' . $session_id . '&group_id=' . $groupId . '"' . self::is_active_navigation_tab('searchpages') . '>' . Display::return_icon('search.png', get_lang('SearchPages'), '', ICON_SIZE_MEDIUM) . '</a></li>';
///menu more
$actionsLeft .= '<a href="index.php?action=morectitle=' . api_htmlentities(urlencode($page)) . '"' . self::is_active_navigation_tab('more') . '>' . Display::return_icon('stats.png', get_lang('Statistics'), '', ICON_SIZE_MEDIUM) . '</a></li>';
// menu all pages
$actionsLeft .= '<a class="btn btn-default" href="index.php?cidReq=' . $_course['id'] . '&action=allpages&session_id=' . $session_id . '&group_id=' . $groupId . '"' . self::is_active_navigation_tab('allpages') . '>' . get_lang('AllPages') . '</a>';
// menu recent changes
$actionsLeft .= '<a class="btn btn-default" href="index.php?cidReq=' . $_course['id'] . '&action=recentchanges&session_id=' . $session_id . '&group_id=' . $groupId . '"' . self::is_active_navigation_tab('recentchanges') . '>' . get_lang('RecentChanges') . '</a>';
echo Display::toolbarAction('toolbar-wiki', array(0 => $actionsLeft));
}
示例12: get_lang
$actionsLeft = Display::url(Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM), $url);
if (isset($keyword)) {
$actionsLeft .= '<a href="subscribe_user.php?type=' . $type . '&' . api_get_cidreq() . '">' . Display::return_icon('clean_group.gif') . ' ' . get_lang('ClearSearchResults') . '</a>';
}
if (isset($_GET['subscribe_user_filter_value']) && !empty($_GET['subscribe_user_filter_value'])) {
$actionsLeft .= '<a href="subscribe_user.php?type=' . $type . '&' . api_get_cidreq() . '">' . Display::return_icon('clean_group.gif') . ' ' . get_lang('ClearFilterResults') . '</a>';
}
if (api_get_setting('profile.profiling_filter_adding_users') == 'true') {
display_extra_profile_fields_filter();
}
// Build search-form
$form = new FormValidator('search_user', 'get', api_get_self() . '?' . api_get_cidreq(), '', null, FormValidator::LAYOUT_INLINE);
$form->addText('keyword', '', false);
$form->addElement('hidden', 'type', $type);
$form->addButtonSearch(get_lang('Search'));
echo Display::toolbarAction('toolbar-subscriber', array(0 => $actionsLeft, 1 => $form->returnForm()));
$option = $type == COURSEMANAGER ? 2 : 1;
echo UserManager::getUserSubscriptionTab($option);
// Display table
$table->display();
/* SHOW LIST OF USERS */
/**
** Get the users to display on the current page.
*/
function get_number_of_users()
{
// Database table definition
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_session_rel_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$table_user_field_values = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
示例13: array
if (!empty($group_id)) {
$group_properties = GroupManager::get_group_properties($group_id);
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'group/group.php?' . api_get_cidreq(), 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'group/group_space.php?' . api_get_cidreq(), 'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']);
}
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'work/work.php?' . api_get_cidreq(), 'name' => get_lang('StudentPublications'));
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'work/work_list.php?' . api_get_cidreq() . '&id=' . $workId, 'name' => $my_folder_data['title']);
$documentsAddedInWork = getAllDocumentsFromWorkToString($workId, $courseInfo);
Display::display_header(null);
$actionsLeft = '<a href="' . api_get_path(WEB_CODE_PATH) . 'work/work.php?' . api_get_cidreq() . '&origin=' . $origin . '">' . Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM) . '</a>';
if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !api_is_invitee()) {
$url = api_get_path(WEB_CODE_PATH) . 'work/upload.php?' . api_get_cidreq() . '&id=' . $workId . '&origin=' . $origin;
//$actionsRight .= Display::return_icon('upload_file.png', get_lang('UploadADocument'), '', ICON_SIZE_MEDIUM).' ' . get_lang('UploadADocument') . '</a>';
$actionsRight = Display::toolbarButton(get_lang('UploadMyAssignment'), $url, 'upload', 'success');
}
echo Display::toolbarAction('toolbar-work', array(0 => $actionsLeft . $actionsRight));
if (!empty($my_folder_data['title'])) {
echo Display::page_subheader($my_folder_data['title']);
}
$error_message = Session::read('error_message');
if (!empty($error_message)) {
echo $error_message;
Session::erase('error_message');
}
if (!empty($my_folder_data['description'])) {
$contentWork = Security::remove_XSS($my_folder_data['description']);
$html = '';
$html .= Display::panel($contentWork, get_lang('Description'));
echo $html;
}
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
示例14: array
$errorMsg = $firstLetterCourse = '';
$UserList = array();
$msg = '';
if (isset($_POST['formSent']) && intval($_POST['formSent']) == 1) {
$courses_list = $_POST['CoursesList'];
$affected_rows = CourseManager::subscribeCoursesToDrhManager($user_id, $courses_list);
if ($affected_rows) {
$msg = get_lang('AssignedCoursesHaveBeenUpdatedSuccessfully');
}
}
// display header
Display::display_header($tool_name);
// actions
$actionsLeft = '<a href="dashboard_add_users_to_user.php?user=' . $user_id . '">' . Display::return_icon('add-user.png', get_lang('AssignUsers'), null, ICON_SIZE_MEDIUM) . '</a>';
$actionsLeft .= '<a href="dashboard_add_sessions_to_user.php?user=' . $user_id . '">' . Display::return_icon('session-add.png', get_lang('AssignSessions'), null, ICON_SIZE_MEDIUM) . '</a>';
echo $html = Display::toolbarAction('toolbar-dashboard', array($actionsLeft));
echo Display::page_header(sprintf(get_lang('AssignCoursesToX'), api_get_person_name($user_info['firstname'], $user_info['lastname'])), null, 'h3');
$assigned_courses_to_hrm = CourseManager::get_courses_followed_by_drh($user_id);
$assigned_courses_code = array_keys($assigned_courses_to_hrm);
foreach ($assigned_courses_code as &$value) {
$value = "'" . $value . "'";
}
$without_assigned_courses = '';
if (count($assigned_courses_code) > 0) {
$without_assigned_courses = " AND c.code NOT IN(" . implode(',', $assigned_courses_code) . ")";
}
$needle = '%';
$firstLetter = null;
if (isset($_POST['firstLetterCourse'])) {
$firstLetter = $_POST['firstLetterCourse'];
$needle = Database::escape_string($firstLetter . '%');
示例15: api_get_user_info
if (isset($_POST['formSent']) && intval($_POST['formSent']) == 1) {
$sessions_list = $_POST['SessionsList'];
$userInfo = api_get_user_info($user_id);
$affected_rows = SessionManager::suscribe_sessions_to_hr_manager($userInfo, $sessions_list);
if ($affected_rows) {
Display::addFlash(Display::return_message(get_lang('AssignedSessionsHaveBeenUpdatedSuccessfully')));
}
}
// display header
Display::display_header($tool_name);
// actions
if ($user_info['status'] != SESSIONADMIN) {
$actionsLeft = '<a href="dashboard_add_users_to_user.php?user=' . $user_id . '">' . Display::return_icon('add-user.png', get_lang('AssignUsers'), null, ICON_SIZE_MEDIUM) . '</a>';
$actionsLeft .= '<a href="dashboard_add_courses_to_user.php?user=' . $user_id . '">' . Display::return_icon('course-add.png', get_lang('AssignCourses'), null, ICON_SIZE_MEDIUM) . '</a>';
}
echo Display::toolbarAction('toolbar-dashboard', array(0 => $actionsLeft, 1 => ''));
echo Display::page_header(sprintf(get_lang('AssignSessionsToX'), api_get_person_name($user_info['firstname'], $user_info['lastname'])), null, 'h3');
$assigned_sessions_to_hrm = SessionManager::get_sessions_followed_by_drh($user_id);
$assigned_sessions_id = array_keys($assigned_sessions_to_hrm);
$without_assigned_sessions = '';
if (count($assigned_sessions_id) > 0) {
$without_assigned_sessions = " AND s.id NOT IN (" . implode(',', $assigned_sessions_id) . ") ";
}
$needle = '%';
if (!empty($firstLetterSession)) {
$needle = Database::escape_string($firstLetterSession . '%');
}
if (api_is_multiple_url_enabled()) {
$sql = "SELECT s.id, s.name\n\t FROM {$tbl_session} s\n LEFT JOIN {$tbl_session_rel_access_url} a ON (s.id = a.session_id)\n WHERE\n s.name LIKE '{$needle}%' {$without_assigned_sessions} AND\n access_url_id = " . api_get_current_access_url_id() . "\n ORDER BY s.name";
} else {
$sql = "SELECT s.id, s.name FROM {$tbl_session} s\n\t\t WHERE s.name LIKE '{$needle}%' {$without_assigned_sessions}\n ORDER BY s.name";