本文整理汇总了PHP中HTML::icon方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::icon方法的具体用法?PHP HTML::icon怎么用?PHP HTML::icon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML
的用法示例。
在下文中一共展示了HTML::icon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_list
/**
* List tags
*
* @uses Request::is_datatables
* @uses ORM::dataTables
* @uses Text::plain
* @uses HTML::icon
* @uses Route::url
* @uses Route::get
* @uses Assets::popup
*/
public function action_list()
{
Assets::popup();
$is_datatables = Request::is_datatables();
if ($is_datatables) {
$tags = ORM::factory('tag');
$this->_datatables = $tags->dataTables(array('name', 'id', 'type'));
foreach ($this->_datatables->result() as $tag) {
$this->_datatables->add_row(array(Text::plain($tag->name), HTML::anchor($tag->url, $tag->url), Text::plain($tag->type), HTML::icon($tag->edit_url, 'fa-edit', array('class' => 'btn btn-sm btn-default action-edit', 'title' => __('Edit Tag'))) . ' ' . HTML::icon($tag->delete_url, 'fa-trash-o', array('class' => 'btn btn-sm btn-default action-delete', 'title' => __('Delete Tag'), 'data-toggle' => 'popup', 'data-table' => '#admin-list-tags'))));
}
}
$this->title = __('Tags');
$url = Route::url('admin/tag', array('action' => 'list'), TRUE);
$view = View::factory('admin/tag/list')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('url', $url);
$this->response->body($view);
}
示例2: action_list
/**
* List user roles
*
* @uses Request::is_datatables
* @uses ORM::dataTables
*/
public function action_list()
{
$is_datatables = Request::is_datatables();
if ($is_datatables) {
$roles = ORM::factory('role');
$this->_datatables = $roles->dataTables(array('name', 'description', 'special'));
foreach ($this->_datatables->result() as $role) {
$this->_datatables->add_row(array(Text::plain($role->name), Text::plain($role->description), $role->special ? '<i class="fa fa-check-circle"></i>' : '<i class="fa fa-ban"></i>', $role->special ? HTML::icon($role->perm_url, 'fa-lock', array('title' => __('Edit Permissions'))) : HTML::icon($role->edit_url, 'fa-edit', array('title' => __('Edit Role'))) . ' ' . HTML::icon($role->delete_url, 'fa-trash-o', array('title' => __('Delete Role'))) . ' ' . HTML::icon($role->perm_url, 'fa-lock', array('title' => __('Edit Permissions')))));
}
}
$this->title = __('Roles');
$add_url = Route::get('admin/role')->uri(array('action' => 'add'));
$url = Route::url('admin/role', array('action' => 'list'), TRUE);
$view = View::factory('admin/role/list')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('add_url', $add_url)->set('url', $url);
$this->response->body($view);
}
示例3: action_list
/**
* List Category Groups
*
* @uses Assets::popup
* @uses Request::is_datatables
* @uses Text::plain
* @uses HTML::icon
* @uses Route::get
* @uses Route::uri
* @uses Route::url
*/
public function action_list()
{
Assets::popup();
$is_datatables = Request::is_datatables();
$terms = ORM::factory('term')->where('lft', '=', 1);
if ($is_datatables) {
$this->_datatables = $terms->dataTables(array('name', 'description'));
foreach ($this->_datatables->result() as $term) {
$this->_datatables->add_row(array(Text::plain($term->name) . '<div class="description">' . Text::plain($term->description) . '</div>', HTML::icon(Route::get('admin/term')->uri(array('action' => 'list', 'id' => $term->id)), 'fa-th-list', array('class' => 'action-list', 'title' => __('List Categories'))), HTML::icon(Route::get('admin/term')->uri(array('action' => 'add', 'id' => $term->id)), 'fa-plus', array('class' => 'action-add', 'title' => __('Add Category'))), HTML::icon(Route::get('admin/taxonomy')->uri(array('action' => 'edit', 'id' => $term->id)), 'fa-edit', array('class' => 'action-edit', 'title' => __('Edit Group'))), HTML::icon(Route::get('admin/taxonomy')->uri(array('action' => 'delete', 'id' => $term->id)), 'fa-trash-o', array('class' => 'action-delete', 'title' => __('Delete Group'), 'data-toggle' => 'popup', 'data-table' => '#admin-list-vocabs'))));
}
}
$this->title = __('Category Groups');
$add_url = Route::get('admin/taxonomy')->uri(array('action' => 'add'));
$url = Route::url('admin/taxonomy', array('action' => 'list'), TRUE);
$view = View::factory('admin/taxonomy/list')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('add_url', $add_url)->set('url', $url);
$this->response->body($view);
}
示例4: action_list
/**
* Displays a list of all users
*
* @uses Request::is_datatables
* @uses ORM::dataTables
* @uses Text::plain
* @uses Text::auto_link
* @uses User::roles
* @uses HTML::anchor
* @uses HTML::icon
* @uses Route::get
* @uses Route::url
* @uses Date::formatted_time
* @uses Assets::popup
*/
public function action_list()
{
$is_datatables = Request::is_datatables();
if ($is_datatables) {
$users = ORM::factory('user');
// @todo fix dummy id column for roles to match the column order
$this->_datatables = $users->dataTables(array('name', 'mail', 'created', 'login', 'id', 'status'));
foreach ($this->_datatables->result() as $user) {
$this->_datatables->add_row(array(HTML::anchor($user->url, Text::plain($user->nick)), Text::auto_link($user->mail), Date::formatted_time($user->created, 'M d, Y'), $user->login > 0 ? Date::formatted_time($user->login, 'M d, Y') : __('Never'), User::roles($user), $user->status == 1 ? '<span class="status-active"><i class="fa fa-check-circle"></i></span>' : '<span class="status-blocked"><i class="fa fa-ban"></i></span>', HTML::icon(Route::get('admin/user')->uri(array('action' => 'edit', 'id' => $user->id)), 'fa-edit', array('class' => 'action-edit', 'title' => __('Edit User'))) . ' ' . HTML::icon(Route::get('admin/permission')->uri(array('action' => 'user', 'id' => $user->id)), 'fa-key', array('class' => '', 'title' => __('Edit Permission'))) . ' ' . HTML::icon($user->delete_url, 'fa-trash-o', array('class' => 'action-delete', 'title' => __('Delete User'), 'data-toggle' => 'popup', 'data-table' => '#admin-list-users'))));
}
}
Assets::popup();
$this->title = __('Users');
$url = Route::url('admin/user', array('action' => 'list'), TRUE);
$view = View::factory('admin/user/list')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('url', $url);
$this->response->body($view);
}
示例5: action_list
/**
* List menus
*
* @uses ORM::reset
* @uses ORM::dataTables
* @uses Route::get
* @uses Route::uri
* @uses Route::url
* @uses Assets::popup
* @uses Request::is_datatables
* @uses Text::plain
* @uses HTML::icon
*/
public function action_list()
{
Assets::popup();
$is_datatables = Request::is_datatables();
$menus = ORM::factory('menu')->where('lft', '=', 1);
if ($is_datatables) {
$this->_datatables = $menus->dataTables(array('title', 'descp'));
foreach ($this->_datatables->result() as $menu) {
$this->_datatables->add_row(array(Text::plain($menu->title) . '<div class="description">' . Text::plain($menu->descp) . '</div>', HTML::icon($menu->list_items_url, 'fa-th-list', array('class' => 'action-list', 'title' => __('List Links'))), HTML::icon($menu->add_item_url, 'fa-plus', array('class' => 'action-add', 'title' => __('Add Link'))), HTML::icon($menu->edit_url, 'fa-edit', array('class' => 'action-edit', 'title' => __('Edit Menu'))), HTML::icon($menu->delete_url, 'fa-trash-o', array('class' => 'action-delete', 'title' => __('Delete Menu'), 'data-toggle' => 'popup', 'data-table' => '#admin-list-menus'))));
}
}
$this->title = __('Menus');
$add_url = Route::get('admin/menu')->uri(array('action' => 'add'));
$url = Route::url('admin/menu', array('action' => 'list'), TRUE);
$view = View::factory('admin/menu/list')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('add_url', $add_url)->set('url', $url);
$this->response->body($view);
}
示例6: action_list
public function action_list()
{
if (Request::is_datatables()) {
if (!ACL::check('access oaclient2')) {
throw new HTTP_Exception_404('You have no permission to access oauth2 clients.');
}
$posts = ORM::factory('oaclient');
if (!User::is_admin()) {
$user = Auth::instance()->get_user();
$posts->where('user_id', '=', $user->id);
}
$this->_datatables = $posts->dataTables(array('title', 'client_id', 'user_id', 'created'));
foreach ($this->_datatables->result() as $oaclient) {
$this->_datatables->add_row(array(HTML::anchor($oaclient->url, Text::plain($oaclient->title)), $oaclient->client_id, $oaclient->user->nick, System::date('M d, Y', $oaclient->created), HTML::icon($oaclient->edit_url, 'fa-edit', array('class' => 'action-edit', 'data-toggle' => 'popup1', 'title' => __('Edit'))) . ' ' . HTML::icon($oaclient->delete_url, 'fa-trash-o', array('class' => 'action-delete', 'data-toggle' => 'popup', 'title' => __('Delete')))));
}
}
$this->title = __('Oauth Clients');
$view = View::factory('client/list')->bind('datatables', $this->_datatables)->set('url', Route::url('oauth2/client', array('action' => 'list'), TRUE))->set('show', TRUE);
$this->response->body($view);
}
示例7: action_inbox
/**
* Display a list of incoming messages
*
* @uses Assets::popup
* @uses Route::url
* @uses Route::get
* @uses Route::uri
* @uses Request::is_datatables
* @uses Form::checkbox
* @uses HTML::anchor
* @uses Date::formatted_time
* @uses HTML::icon
* @uses Text::limit_chars
*/
public function action_inbox()
{
Assets::popup();
$url = Route::url('user/message', array('action' => 'inbox'), TRUE);
$redirect = Route::get('user/message')->uri(array('action' => 'inbox'));
$form_action = Route::get('user/message')->uri(array('action' => 'bulk', 'id' => PM::INBOX));
$destination = '?destination=' . $redirect;
$is_datatables = Request::is_datatables();
/** @var $messages Model_Message */
$messages = ORM::factory('Message')->loadInbox();
if ($is_datatables) {
$this->_datatables = $messages->dataTables(array('id', 'subject', 'sender', 'sent'));
foreach ($this->_datatables->result() as $message) {
$this->_datatables->add_row(array(Form::checkbox('messages[' . $message->id . ']', $message->id, isset($_POST['messages'][$message->id])), HTML::anchor($message->user->url, $message->user->nick, array('class' => 'message-' . $message->status)), HTML::anchor($message->url, Text::limit_chars($message->subject, 20), array('class' => 'message-' . $message->status)) . ' ' . HTML::anchor($message->url, Text::limit_chars(strip_tags($message->body), 80)), Date::formatted_time($message->sent, 'M d, Y'), HTML::icon($message->delete_url . $destination, 'fa-trash-o', array('title' => __('Delete Message'), 'data-toggle' => 'popup', 'data-table' => '#user-message-inbox'))));
}
}
$this->title = __('Inbox');
$view = View::factory('message/inbox')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('action', $form_action)->set('url', $url);
$this->response->body($view);
}
示例8: ucfirst
<a href="<?php
echo $row->getLink();
?>
" target="blank" class="btn btn-link unstyled-link" data-toggle="tooltip" data-trigger="hover" data-placement="auto" title="View <?php
echo ucfirst(get_class($row));
?>
"><?php
echo HTML::icon('eye-open');
?>
</a>
示例9: action_list
/**
* Blog list
*
* @uses Route::url
* @uses Route::get
* @uses Route::uri
* @uses Request::is_datatables
* @uses Form::checkbox
* @uses HTML::anchor
* @uses HTML::label
* @uses HTML::icon
* @uses Post::bulk_actions
* @uses Assets::popup
*/
public function action_list()
{
Assets::popup();
$this->title = __('Blog List');
$url = Route::url('admin/blog', array('action' => 'list'), TRUE);
$redirect = Route::get('admin/blog')->uri(array('action' => 'list'));
$action = Route::get('admin/blog')->uri(array('action' => 'bulk'));
$destination = '?destination=' . $redirect;
$is_datatables = Request::is_datatables();
$blogs = ORM::factory('blog');
if ($is_datatables) {
$this->_datatables = $blogs->dataTables(array('id', 'title', 'author', 'status', 'updated'));
foreach ($this->_datatables->result() as $blog) {
$this->_datatables->add_row(array(Form::checkbox('blogs[' . $blog->id . ']', $blog->id, isset($_POST['blogs'][$blog->id])), HTML::anchor($blog->url, $blog->title), HTML::anchor($blog->user->url, $blog->user->nick), HTML::label(__($blog->status), $blog->status), Date::formatted_time($blog->updated, 'M d, Y'), HTML::icon($blog->edit_url . $destination, 'fa-edit', array('class' => 'btn btn-sm btn-default action-edit', 'title' => __('Edit Blog'))) . ' ' . HTML::icon($blog->delete_url . $destination, 'fa-trash-o', array('class' => 'btn btn-sm btn-default action-delete', 'title' => __('Delete Blog'), 'data-toggle' => 'popup', 'data-table' => '#admin-list-blogs'))));
}
}
$view = View::factory('admin/blog/list')->bind('datatables', $this->_datatables)->set('is_datatables', $is_datatables)->set('action', $action)->set('actions', Post::bulk_actions(TRUE, 'blog'))->set('url', $url);
$this->response->body($view);
}
示例10: array
<div class="row">
<div class="col-md-1 post-social pull-right">
<?php
echo HTML::icon($rss_link, 'fa-rss', array('title' => 'RSS 2.0', 'class' => 'post-rss'));
?>
</div>
<?php
foreach ($posts as $i => $post) {
?>
<article id="post-<?php
echo $post->id;
?>
" class="col-md-12 post-list <?php
echo $post->sticky ? ' sticky' : ' post-' . $post->status;
?>
" itemscope itemtype="http://schema.org/Article">
<header>
<h2 class="post-title" itemprop="name">
<?php
echo HTML::anchor($post->url, $post->title, array('itemprop' => 'url'));
?>
</h2>
</header>
<?php
if ($post->promote) {
?>
<i class="post-bookmark clearfix"></i>
<?php
}
示例11: ucfirst
<?php
echo Form::open(array('url' => Request::url() . '/' . $row->id, 'method' => 'delete'));
?>
<button class="btn btn-link unstyled-link" type="submit" data-toggle="tooltip" data-trigger="hover" data-placement="auto" title="Delete <?php
echo ucfirst(get_class($row));
?>
"><?php
echo HTML::icon('trash');
?>
</button>
<?php
echo Form::close();
示例12: buttonText
function buttonText($href, $icon, $title, $modal = false)
{
return '<a class="btn btn-primary ' . ($modal ? 'abrir-modal' : '') . '" href="' . url($href) . '" title="' . $title . '" target="_blank">' . \HTML::icon($icon) . ' ' . $title . '</a>';
}
示例13:
echo HTML::icon('download-alt');
?>
<br />CSV</a>
@endif
@if(in_array('deleted', $button))
<a class="btn btn-danger" href="<?php
echo Request::url() . '?trashed=true';
?>
"><?php
echo HTML::icon('trash');
?>
<br />Trash</a>
@endif
@if(in_array('current', $button))
<a class="btn btn-primary" href="<?php
echo Request::url();
?>
"><?php
echo HTML::icon('record');
?>
<br />Current</a>
@endif
</div>
</span>
</div>
@endif
</div>
示例14:
<?php
echo Form::open(array('url' => Request::url() . '/restore/' . $row->id, 'method' => 'POST'));
?>
<button class="btn btn-link unstyled-link" type="submit" data-toggle="tooltip" data-trigger="hover" data-placement="auto" title="Restore"><?php
echo HTML::icon('refresh');
?>
</button>
<?php
echo Form::close();
示例15: glyphicon
/**
* Glyphicon icon
*/
public static function glyphicon($icon_class)
{
return HTML::icon('glyphicon glyphicon-' . $icon_class);
}