本文整理汇总了PHP中UserList::global_icon方法的典型用法代码示例。如果您正苦于以下问题:PHP UserList::global_icon方法的具体用法?PHP UserList::global_icon怎么用?PHP UserList::global_icon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserList
的用法示例。
在下文中一共展示了UserList::global_icon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UserList
}
// query which groups have users (in order to prevent deletion of groups which have users)
global $usedgroups;
// We need this in a callback below
$usedgroups = $DB->get_col('SELECT grp_ID
FROM T_groups INNER JOIN T_users ON user_grp_ID = grp_ID
GROUP BY grp_ID');
$UserList = new UserList('admin', $UserSettings->get('results_per_page'), 'users_', array('join_city' => false));
$default_filters = array('order' => '/user_lastseen_ts/D');
$UserList->title = T_('Groups & Users') . get_manual_link('users_and_groups');
/*
* Table icons:
*/
if ($current_User->check_perm('users', 'edit', false)) {
// create new user/group link
$UserList->global_icon(T_('Refresh users list...'), 'refresh', '?ctrl=users&filter=refresh', T_('Refresh') . ' »', 3, 4);
$UserList->global_icon(T_('Create a new user...'), 'new', '?ctrl=user&action=new&user_tab=profile', T_('Add user') . ' »', 3, 4);
$UserList->global_icon(T_('Create a new group...'), 'new', '?ctrl=groups&action=new', T_('Add group') . ' »', 3, 4);
}
$UserList->set_default_filters($default_filters);
$UserList->load_from_Request();
if ($UserList->filters['group'] != -1) {
// List is grouped
/*
* Grouping params:
*/
$UserList->group_by = 'grp_ID';
/*
* Group columns:
*/
$UserList->grp_cols[] = array('td_class' => 'firstcol' . ($current_User->check_perm('users', 'edit', false) ? '' : ' lastcol'), 'td_colspan' => -1, 'td' => '<a href="?ctrl=groups&grp_ID=$grp_ID$">$grp_name$</a>' . '~conditional( (#grp_ID# == ' . $Settings->get('newusers_grp_ID') . '), \' <span class="notes">(' . T_('default group for new users') . ')</span>\' )~');