本文整理汇总了PHP中Display::grid_js方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::grid_js方法的具体用法?PHP Display::grid_js怎么用?PHP Display::grid_js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::grid_js方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$columns = array(get_lang('Name'), get_lang('Value'), get_lang('Order'), get_lang('Actions'));
//Column config
$column_model = array(array('name' => 'option_display_text', 'index' => 'option_display_text', 'width' => '180', 'align' => 'left'), array('name' => 'option_value', 'index' => 'option_value', 'width' => '', 'align' => 'left', 'sortable' => 'false'), array('name' => 'option_order', 'index' => 'option_order', 'width' => '', 'align' => 'left', 'sortable' => 'false'), array('name' => 'actions', 'index' => 'actions', 'width' => '100', '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&' . $params . '&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&' . $params . '&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>' . '\';
}';
$htmlHeadXtra[] = '
<script>
$(function() {
// grid definition see the $obj->display() function
' . Display::grid_js('extra_field_options', $url, $columns, $column_model, $extra_params, array(), $action_links, true) . '
});
</script>';
// The header.
Display::display_header($tool_name);
echo Display::page_header($extra_field_info['field_display_text']);
$obj = new ExtraFieldOption($extra_field->type);
$obj->field_id = $field_id;
// Action handling: Add
switch ($action) {
case 'add':
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
}
$url = api_get_self() . '?action=' . Security::remove_XSS($_GET['action']) . '&' . $params;
示例2: array
$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
echo Display::grid_html('results');
Display :: display_footer();
示例3: 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;
}
示例4: count
$count_courses_in_session = count(Tracking::get_courses_followed_by_coach($user_id, $session['id']));
$count_users_in_session = count(SessionManager::get_users_by_session($session['id'], 0));
$row = array();
$row['name'] = $session['name'];
$row['display_start_date'] = api_get_local_time($session['display_start_date'], null, null, true);
$row['display_end_date'] = api_get_local_time($session['display_end_date'], null, null, true);
$row['number_student_per_session'] = $count_courses_in_session;
$row['courses_per_session'] = $count_users_in_session;
if ($visibility == SESSION_INVISIBLE) {
$row['details'] = '<img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow_na.gif" />';
} else {
$row['details'] = '<a href="' . api_get_self() . '?session_id=' . $session['id'] . '"><img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow.gif" border="0" /></a>';
}
$all_data[] = $row;
}
echo "<script>\n \$(function() {\n " . Display::grid_js('sessions', null, $columns, $column_model, $extra_params, $all_data) . "\n });\n </script>";
$nb_sessions_past = $nb_sessions_current = 0;
$courses = array();
foreach ($sessions as $session) {
$visibility = api_get_session_visibility($session['id']);
if ($visibility == SESSION_AVAILABLE) {
$nb_sessions_current++;
} else {
$nb_sessions_past++;
}
$courses = array_merge($courses, Tracking::get_courses_list_from_session($session['id']));
}
$nb_courses_per_session = null;
$nb_students_per_session = null;
if ($count_sessions > 0) {
$nb_courses_per_session = round(count($courses) / $count_sessions, 2);
示例5: api_get_path
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_extra_fields&type=' . $extraFieldType;
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = $obj->getJqgridColumnNames();
//Column config
$column_model = $obj->getJqgridColumnModel();
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$extra_params['sortname'] = 'field_order';
$action_links = $obj->getJqgridActionLinks($token);
$htmlHeadXtra[] = '<script>
$(function() {
// grid definition see the $obj->display() function
' . Display::grid_js($obj->type . '_fields', $url, $columns, $column_model, $extra_params, array(), $action_links, true) . '
$("#field_type").on("change", function() {
id = $(this).val();
switch(id) {
case "1":
$("#example").html("' . addslashes(Display::return_icon('userfield_text.png')) . '");
break;
case "2":
$("#example").html("' . addslashes(Display::return_icon('userfield_text_area.png')) . '");
break;
case "3":
$("#example").html("' . addslashes(Display::return_icon('add_user_field_howto.png')) . '");
break;
case "4":
$("#example").html("' . addslashes(Display::return_icon('userfield_drop_down.png')) . '");
示例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: get_lang
$sortable_data = '';
$table_footer = get_lang('NoDocsInFolder');
}
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Type'), get_lang('Name'), get_lang('Size'));
//Column config
$column_model = array(array('name' => 'type', 'index' => 'type', 'width' => '28', 'align' => 'center', 'sortable' => 'false'), array('name' => 'name', 'index' => 'name', 'width' => '500', 'align' => 'left'), array('name' => 'size', 'index' => 'size', 'width' => '35', 'align' => 'right', 'sortable' => 'true'));
//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(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES)) . "\\'" . ')) return false;" href="?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="?action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>' . '\';
}';
$js_content = Display::grid_js('documents', '', $columns, $column_model, $extra_params, $sortable_data, $action_links, true);
$htmlHeadXtra[] = '<script>
$(function() {
// grid definition see the $career->display() function
' . $js_content . '
});
</script>';
require_once 'controller.php';
$controller = new DocumentController();
$tpl = $controller->tpl->get_template('layout/layout_2_col.tpl');
$content = Display::grid_html('documents');
if (!is_null($docs_and_folders)) {
// Show download zipped folder icon
global $total_size;
if (!$is_certificate_mode && $total_size != 0 && (api_get_setting('students_download_folders') == 'true' || api_is_allowed_to_edit() || api_is_platform_admin())) {
//for student does not show icon into other shared folder, and does not show into main path (root)
示例8: array
if (api_is_allowed_to_edit()) {
$extra_params['multiselect'] = true;
$editOptions = '
$("#announcements").jqGrid(
"navGrid",
"#announcements_pager",
{ edit: false, add: false, del: true },
{ height:280, reloadAfterSubmit:false }, // edit options
{ height:280, reloadAfterSubmit:false }, // add options
{ reloadAfterSubmit:false, url: "' . $deleteUrl . '" }, // del options
{ width:500 } // search options
);
';
}
$content = '<script>
$(function() {' . Display::grid_js('announcements', $url, $columns, $columnModel, $extra_params, array(), '', true) . $editOptions . '
});
</script>';
$count = AnnouncementManager::getAnnouncements($stok, $announcement_number, true);
if (empty($count)) {
$html = '';
if ((api_is_allowed_to_edit(false, true) || api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous()) && (empty($_GET['origin']) || $_GET['origin'] !== 'learnpath')) {
$html .= '<div id="no-data-view">';
$html .= '<h3>' . get_lang('Announcements') . '</h3>';
$html .= Display::return_icon('valves.png', '', array(), 64);
$html .= '<div class="controls">';
$html .= Display::url(get_lang('AddAnnouncement'), api_get_self() . "?" . api_get_cidreq() . "&action=add", array('class' => 'btn btn-primary'));
$html .= '</div>';
$html .= '</div>';
} else {
$html = Display::return_message(get_lang('NoAnnouncements'), 'warning');
示例9: showStudentList
/**
* @param int $workId
* @return string
*/
function showStudentList($workId)
{
$columnModel = array(
array('name'=>'student', 'index'=>'student', 'width'=>'150', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'works', 'index'=>'works', 'width'=>'50', 'align'=>'left', 'sortable' => 'false')
);
$token = null;
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_work_student_list_overview&work_id='.$workId.'&'.api_get_cidreq();
$columns = array(
get_lang('Students'),
get_lang('Works')
);
$order = api_is_western_name_order() ? 'firstname' : 'lastname';
$params = array(
'autowidth' => 'true',
'height' => 'auto',
'rowNum' => 10,
'sortname' => $order,
'sortorder' => 'asc'
);
$html = '<script>
$(function() {
'.Display::grid_js('studentList', $url, $columns, $columnModel, $params, array(), null, true).'
$("#workList").jqGrid(
"navGrid",
"#studentList_pager",
{ edit: false, add: false, del: false },
{ height:280, reloadAfterSubmit:false }, // edit options
{ height:280, reloadAfterSubmit:false }, // add options
{ width:500 } // search options
);
});
</script>';
$html .= Display::grid_html('studentList');
return $html;
}
示例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_timelines';
//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' => '120', 'align' => 'left'), array('name' => 'actions', 'index' => 'actions', 'width' => '100', 'align' => 'left', '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)
$htmlHeadXtra[] = '
<script>
$(function() {
// grid definition see the $timeline->display() function
' . Display::grid_js('timelines', $url, $columns, $column_model, $extra_params, array(), null, true) . '
});
</script>';
$timeline = new Timeline();
// Action handling: Add
switch ($action) {
case 'add':
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
api_not_allowed();
}
$url = api_get_self() . '?action=' . Security::remove_XSS($_GET['action']);
$form = $timeline->return_form($url, 'add');
// The validation or display
if ($form->validate()) {
if ($check) {
$values = $form->exportValues();
示例11: array
if ($table->get_total_number_of_items() > 0) {
$table->display();
}*/
//jqgrid will use this URL to do the selects
//$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_careers';
//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('Description'), get_lang('CountDoneAttendance'));
//Column config
$column_model = array(array('name' => 'name', 'index' => 'name', 'width' => '300', 'align' => 'left'), array('name' => 'description', 'index' => 'description', 'width' => '200', 'align' => 'left', 'sortable' => 'false'), array('name' => 'attendance_qualify_max', 'index' => 'attendance_qualify_max', 'width' => '80', 'align' => 'left', 'sortable' => 'false'));
if (api_is_allowed_to_edit(null, true)) {
$columns[] = get_lang('Actions');
$column_model[] = array('name' => 'actions', 'index' => 'actions', 'width' => '100', 'align' => 'left', 'sortable' => 'false');
}
$extra_params = array();
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$data = Attendance::get_attendance_data();
?>
<script>
$(function() {
<?php
// grid definition see the $career->display() function
echo Display::grid_js('attendance', 'false', $columns, $column_model, $extra_params, $data, null, true);
?>
});
</script>
<?php
echo Display::grid_html('attendance');
示例12: 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();
示例13: function
$( big_image ).dialog("open");
return false;
});
/* Binds a tab id in the url */
$("#tabs").bind('tabsselect', function(event, ui) {
window.location.href=ui.tab;
});
<?php
//Displays js code to use a jqgrid
echo Display::grid_js('courses', '', $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list);
echo Display::grid_js('list_default', $url, $columns, $column_model, $extra_params, array(), '');
echo Display::grid_js('list_course', $url_by_course, $columns, $column_model, $extra_params_course, array(), '');
echo Display::grid_js('list_week', $url_week, $column_week, $column_week_model, $extra_params_week, array(), '');
if (!api_is_anonymous()) {
echo Display::grid_js('exercises', '', $column_exercise, $column_exercise_model, $extra_params_exercise, $my_real_array);
}
?>
});
</script>
<?php
$courseCode = isset($_GET['course']) ? $_GET['course'] : null;
$reportingTab = '';
if (!api_is_anonymous()) {
$reportingTab = Tracking::show_user_progress(api_get_user_id(), $session_id, '#tabs-4', false, false);
if (!empty($reportingTab)) {
$reportingTab .= '<br />' . Tracking::show_course_detail(api_get_user_id(), $courseCode, $session_id);
}
if (empty($reportingTab)) {
$reportingTab = Display::return_message(get_lang('NoDataAvailable'), 'warning');
示例14: array
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'70', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'70', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'skills_acquired', 'index'=>'skills_acquired', 'width'=>'30 ', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'currently_learning', 'index'=>'currently_learning', 'width'=>'30', 'align'=>'left', 'sortable' => 'false'),
array('name'=>'rank', 'index'=>'rank', 'width'=>'30', 'align'=>'left', 'sortable' => 'false')
);
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
//$extra_params['excel'] = 'excel';
//$extra_params['rowList'] = array(10, 20 ,30);
$jqgrid = Display::grid_js('skill_ranking', $url,$columns,$column_model,$extra_params, array(), $action_links,true);
$content = Display::grid_html('skill_ranking');
$tpl = new Template($tool_name);
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->assign('jqgrid_html', $jqgrid);
$content .= $tpl->fetch('default/skill/skill_ranking.tpl');
$tpl->assign('content', $content);
$tpl->display_one_col_template();
示例15: api_get_path
$content = $event_controller->listingAction();
break;
default:
case 'listing':
$content = $event_controller->listingAction();
break;
}
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_event_email_template';
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Subject'), get_lang('EventTypeName'), get_lang('Language'), get_lang('Status'), get_lang('Actions'));
//Column config
$column_model = array(array('name' => 'subject', 'index' => 'subject', 'width' => '80', 'align' => 'left'), array('name' => 'event_type_name', 'index' => 'event_type_name', 'width' => '80', 'align' => 'left'), array('name' => 'language_id', 'index' => 'language_id', 'width' => '80', 'align' => 'left'), array('name' => 'activated', 'index' => 'activated', 'width' => '80', 'align' => 'left'), array('name' => 'actions', 'index' => 'actions', 'width' => '100'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$htmlHeadXtra[] = api_get_jqgrid_js();
$htmlHeadXtra[] = '<script>
$(function() {
' . Display::grid_js('event_email_template', $url, $columns, $column_model, $extra_params, array(), $action_links, true) . '
});
</script>';
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Events'));
$app['title'] = $tool_name;
$tpl = $app['template'];
$tpl->assign('actions', $actions);
$tpl->assign('message', $message);
$tpl->assign('content', $content);
$tpl->display_one_col_template();