本文整理汇总了PHP中Display::grid_html方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::grid_html方法的具体用法?PHP Display::grid_html怎么用?PHP Display::grid_html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::grid_html方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Displays the title + grid
*/
public function display()
{
// action links
$content = Display::actions(array(array('url' => 'event_type.php', 'content' => Display::return_icon('new_document.png', get_lang('Add'), array(), ICON_SIZE_MEDIUM))));
$content .= Display::grid_html('event_email_template');
return $content;
}
示例2: display
/**
* Displays the title + grid
*/
public function display()
{
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="career_dashboard.php">' . Display::return_icon('back.png', get_lang('Back'), '', '32') . '</a>';
echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('new_career.png', get_lang('Add'), '', '32') . '</a>';
echo '</div>';
echo Display::grid_html('careers');
}
示例3: display
/**
* Displays the title + grid
*/
public function display()
{
// action links
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="grade_models.php">' . Display::return_icon('back.png', get_lang('Back'), '', '32') . '</a>';
echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('add.png', get_lang('Add'), '', '32') . '</a>';
echo '</div>';
echo Display::grid_html('grade_model');
}
示例4: listing
/**
* Displays the title + grid
*/
public function listing()
{
// action links
$html = '<div class="actions">';
//$html .= '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
$html .= '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('add.png', get_lang('Add'), '', '32') . '</a>';
$html .= '</div>';
$html .= Display::grid_html('timelines');
return $html;
}
示例5: display_tracking_access_overview
/**
* Display a sortable table that contains an overview off all the access to a session
* @author César Perales <cesar.perales@beeznest.com>, Beeznest Team
* @version Chamilo 1.9.6
*/
static function display_tracking_access_overview($sessionId = 0, $courseId = 0, $studentId = '', $profile = '', $date_from, $date_to) {
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(
get_lang('LoginDate'),
get_lang('UserName'),
get_lang('LastName'),
get_lang('FirstName'),
get_lang('Clicks'),
get_lang('IP'),
get_lang('TimeLoggedIn'),
get_lang('Section'),
);
$column_model = array(
array('name'=>'logindate', 'index'=>'loginDate', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'align'=>'left', 'search' => 'true'),
array('name'=>'firstname', 'index'=>'firstname', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'align'=>'left', 'search' => 'true'),
array('name'=>'clicks', 'index'=>'clicks', 'align'=>'left', 'search' => 'true'),
array('name'=>'ip', 'index'=>'ip', 'align'=>'left', 'search' => 'true'),
array('name'=>'timeloggedin', 'index'=>'timeLoggedIn', 'align'=>'left', 'search' => 'true'),
array('name'=>'session', 'index'=>'session', 'align'=>'left')
);
$action_links = '';
// jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_session_access_overview&session_id=' . $sessionId . '&course_id=' . $courseId . '&student_id=' . $studentId . '&profile=' . $profile . '&date_to=' . $date_to . '&date_from=' . $date_from;
//Table Id
$tableId = 'accessOverview';
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$table = Display::grid_js($tableId, $url, $columns, $column_model, $extra_params, array(), $action_links, true);
$return = '<script>$(function() {'. $table .
'jQuery("#'.$tableId.'").jqGrid("navGrid","#'.$tableId.'_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
jQuery("#'.$tableId.'").jqGrid("navButtonAdd","#'.$tableId.'_pager",{
caption:"",
title:"' . get_lang('ExportExcel') . '",
onClickButton : function () {
jQuery("#'.$tableId.'").jqGrid("excelExport",{"url":"'.$url.'&export_format=xls"});
}
});
});</script>';
$return .= Display::grid_html($tableId);
return $return;
}
示例6: action_formatter
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=copy&id=\'+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="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
'\';
}';*/
$action_links = null;
$room = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_room');
$room = $room['exam_room'];
$schedule = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_schedule');
$schedule = $schedule['exam_schedule'];
echo Display::page_subheader(get_lang('UserList') . ": " . $room . " - " . $schedule);
?>
<script>
$(function() {
<?php
echo Display::grid_js('user_list', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
jQuery("#user_list").jqGrid("navGrid","#user_list_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
jQuery("#user_list").jqGrid("navButtonAdd","#user_list_pager",{
caption:"",
onClickButton : function () {
jQuery("#user_list").jqGrid("excelExport",{"url": "<? echo $url?>&export_format=xls"});
}
});
});
</script>
<?php
echo Display::grid_html('user_list');
Display::display_footer();
示例7: api_get_cidreq
";
}
}
}
/**
* initiate datepicker
*/
$(function() {
$( "#datepicker_start" ).datepicker({
defaultDate: "",
changeMonth: false,
numberOfMonths: 1
});
});
</script>
<form id="export_report_form" method="post" action="exercise_report.php?<?php
echo api_get_cidreq();
?>
">
<input type="hidden" name="csvBuffer" id="csvBuffer" value="" />
<input type="hidden" name="export_report" id="export_report" value="1" />
<input type="hidden" name="exerciseId" id="exerciseId" value="<?php
echo $exercise_id;
?>
" />
</form>
<?php
echo Display::grid_html('results');
Display::display_footer();
示例8: jQuery
edit:false,
add:false,
del:false,
search:false,
excel:true
});
jQuery("#user_course_report").jqGrid("navButtonAdd","#user_course_report_pager", {
caption:"",
onClickButton : function () {
jQuery("#user_course_report").jqGrid("excelExport",{"url":"' . $url . '&export_format=xls"});
}
});
});
</script>';
$actions = null;
if (api_is_student_boss()) {
$actions .= Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "auth/my_progress.php");
$actions .= Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "mySpace/student.php");
$actions .= Display::url(Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM), "#");
$actions .= Display::url(Display::return_icon("certificate_list.png", get_lang("GradebookSeeListOfStudentsCertificates"), [], ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php");
}
$content = '<div class="actions">';
if (!empty($actions)) {
$content .= $actions;
}
$content .= Display::url(get_lang("CompanyReportResumed"), api_get_path(WEB_CODE_PATH) . "mySpace/company_reports_resumed.php", array('class' => 'btn btn-success'));
$content .= '</div>';
$content .= '<h1 class="page-header">' . get_lang('CompanyReport') . '</h1>';
$content .= Display::grid_html('user_course_report');
echo $content;
示例9: display
/**
* Displays the title + grid
*/
public function display()
{
// action links
echo '<div class="actions">';
echo '<a href="../admin/index.php">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '<a href="' . api_get_self() . '?action=add&type=' . $this->type . '">' . Display::return_icon('add_user_fields.png', get_lang('Add'), '', ICON_SIZE_MEDIUM) . '</a>';
echo '</div>';
echo Display::grid_html($this->type . '_fields');
}
示例10: api_get_path
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_group_reporting&course_id=' . $course_id;
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('Time'), get_lang('Progress'), get_lang('Score'), get_lang('Works'), get_lang('Messages'), get_lang('Actions'));
//Column config
$column_model = array(array('name' => 'name', 'index' => 'name', 'width' => '200', 'align' => 'left'), array('name' => 'time', 'index' => 'time', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'progress', 'index' => 'progress', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'score', 'index' => 'score', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'works', 'index' => 'works', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'messages', 'index' => 'messages', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'actions', 'index' => 'actions', 'width' => '50', 'align' => 'left', 'formatter' => 'action_formatter', 'sortable' => 'false'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$action_links = '
function action_formatter(cellvalue, options, rowObject) {
return \'<a href="course_log_tools.php?id_session=0&cidReq=' . $course_code . '&gidReq=\'+options.rowId+\'">' . Display::return_icon('2rightarrow.gif', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>' . '\';
}';
//Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();
$htmlHeadXtra[] = '
<script>
$(function() {
' . Display::grid_js('group_users', $url, $columns, $column_model, $extra_params, array(), $action_links, true) . '
});
</script>';
Display::display_header();
echo '<div class="actions">';
echo Display::url(Display::return_icon('user.png', get_lang('StudentsTracking'), array(), 32), 'courseLog.php?' . api_get_cidreq(true, false));
echo Display::url(Display::return_icon('group_na.png', get_lang('GroupReporting'), array(), 32), '#');
echo Display::url(Display::return_icon('course.png', get_lang('CourseTracking'), array(), 32), 'course_log_tools.php?' . api_get_cidreq(true, false));
echo Display::url(Display::return_icon('tools.png', get_lang('ResourcesTracking'), array(), 32), 'course_log_resources.php?' . api_get_cidreq(true, false));
echo '</div>';
echo Display::grid_html('group_users');
Display::display_footer();
示例11: get_lang
}
// Sub headers
/*$sub_header = array(
get_lang('AllLearningPaths'),
get_lang('PerWeek'),
get_lang('ByCourse')
);
// Sub headers data
$lpTab = Display::tabs(
$sub_header,
array(
//Display::grid_html('list_default'),
Display::grid_html('list_week'),
//Display::grid_html('list_course')
),
'sub_tab'
);*/
$coursesTab = Display::grid_html('courses');
$starTab = Display::grid_html('list_default');
$tabs = array($starTab, $coursesTab, Display::grid_html('list_course'), Display::grid_html('exercises'), $reportingTab);
$tabToHide = api_get_configuration_value('session_hide_tab_list');
if (!empty($tabToHide)) {
foreach ($tabToHide as $columnId) {
unset($headers[$columnId]);
unset($tabs[$columnId]);
}
}
// Main headers data
echo Display::tabs($headers, $tabs);
Display::display_footer();
示例12: display
/**
* Displays the title + grid
*/
public function display()
{
// action links
echo Display::grid_html('gradebooks');
}
示例13: api_get_path
$objQuestion->delete();
break;
}
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_course_exercise_medias';
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('Actions'));
//Column config
$column_model = array(array('name' => 'name', 'index' => 'name', 'width' => '200', 'align' => 'left'), array('name' => 'actions', 'index' => 'actions', 'width' => '50', 'align' => 'left', 'formatter' => 'action_formatter', 'sortable' => 'false'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&id=\'+options.rowId+\'">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>' . ' <a onclick="javascript:if(!confirm(' . "\\'" . addslashes(get_lang("ConfirmYourChoice")) . "\\'" . ')) return false;" href="?sec_token=' . $token . '&action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>' . '\';
}';
?>
<script>
$(function() {
<?php
// grid definition see the $career->display() function
echo Display::grid_js('medias', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
});
</script>
<?php
$items = array(array('content' => Display::return_icon('add.png'), 'url' => $page_url . '&action=add'));
echo Display::actions($items);
echo Display::grid_html('medias');
Display::display_footer();
示例14: array
// Sub headers
$sub_header = array(
get_lang('AllLearningPaths'),
get_lang('PerWeek'),
get_lang('ByCourse')
);
// Sub headers data
$lp_tabs = Display::tabs(
$sub_header,
array(
Display::grid_html('list_default'),
Display::grid_html('list_week'),
Display::grid_html('list_course')
),
'sub_tab'
);
$courses_tab = Display::grid_html('courses');
// Main headers data
echo Display::tabs(
$headers,
array(
$courses_tab,
$lp_tabs,
Display::grid_html('exercises'),
$my_reporting
)
);
Display::display_footer();
示例15: getWorkDateValidationStatus
}
$result = getWorkDateValidationStatus($work_data);
echo $result['message'];
$check_qualification = intval($my_folder_data['qualification']);
if (!api_is_invitee()) {
if (!empty($work_data['enable_qualification']) && !empty($check_qualification)) {
$type = 'simple';
$columns = array(get_lang('Type'), get_lang('Title'), get_lang('Qualification'), get_lang('Date'), get_lang('Status'), get_lang('Actions'));
$column_model = array(array('name' => 'type', 'index' => 'file', 'width' => '5', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'), array('name' => 'title', 'index' => 'title', 'width' => '40', 'align' => 'left', 'search' => 'false', 'wrap_cell' => 'true'), array('name' => 'qualification', 'index' => 'qualification', 'width' => '10', 'align' => 'left', 'search' => 'true'), array('name' => 'sent_date', 'index' => 'sent_date', 'width' => '30', 'align' => 'left', 'search' => 'true', 'wrap_cell' => 'true'), array('name' => 'qualificator_id', 'index' => 'qualificator_id', 'width' => '20', 'align' => 'left', 'search' => 'true'), array('name' => 'actions', 'index' => 'actions', 'width' => '20', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'));
} else {
$type = 'complex';
$columns = array(get_lang('Type'), get_lang('Title'), get_lang('Feedback'), get_lang('Date'), get_lang('Actions'));
$column_model = array(array('name' => 'type', 'index' => 'file', 'width' => '5', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'), array('name' => 'title', 'index' => 'title', 'width' => '60', 'align' => 'left', 'search' => 'false', 'wrap_cell' => "true"), array('name' => 'qualification', 'index' => 'qualification', 'width' => '10', 'align' => 'left', 'search' => 'true'), array('name' => 'sent_date', 'index' => 'sent_date', 'width' => '30', 'align' => 'left', 'search' => 'true', 'wrap_cell' => 'true', 'sortable' => 'false'), array('name' => 'actions', 'index' => 'actions', 'width' => '20', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'));
}
$extra_params = array('autowidth' => 'true', 'height' => 'auto', 'sortname' => 'firstname');
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_work_user_list&work_id=' . $workId . '&type=' . $type;
?>
<script>
$(function() {
<?php
echo Display::grid_js('results', $url, $columns, $column_model, $extra_params);
?>
});
</script>
<?php
$html = '';
$tableWork = Display::grid_html('results');
$html = Display::panel($tableWork);
echo $html;
}
Display::display_footer();