当前位置: 首页>>代码示例>>PHP>>正文


PHP Assets::popup方法代码示例

本文整理汇总了PHP中Assets::popup方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::popup方法的具体用法?PHP Assets::popup怎么用?PHP Assets::popup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assets的用法示例。


在下文中一共展示了Assets::popup方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:27,代码来源:tag.php

示例2: 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);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:28,代码来源:taxonomy.php

示例3: 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'))) . '&nbsp;' . HTML::icon(Route::get('admin/permission')->uri(array('action' => 'user', 'id' => $user->id)), 'fa-key', array('class' => '', 'title' => __('Edit Permission'))) . '&nbsp;' . 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);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:32,代码来源:user.php

示例4: 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);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:30,代码来源:menu.php

示例5: 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);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:34,代码来源:message.php

示例6: 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'))) . '&nbsp;' . 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);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:33,代码来源:blog.php

示例7: action_view

 /**
  * View user account information
  *
  * @throws  HTTP_Exception_403
  *
  * @uses    Auth::get_user
  * @uses    ACL::check
  * @uses    Text::ucfirst
  * @uses    Assets::popup
  */
 public function action_view()
 {
     $id = (int) $this->request->param('id', 0);
     $user = ORM::factory('user', $id);
     $account = FALSE;
     $is_owner = FALSE;
     $request = FALSE;
     $isFriend = FALSE;
     $friends = array();
     $enable_buddy = (bool) Config::load('auth.enable_buddy', FALSE);
     // Add Schema.org support
     $this->schemaType = 'ProfilePage';
     if (!$user->loaded()) {
         Log::error('Attempt to access non-existent user.');
         // No user is currently logged in
         $this->request->redirect(Route::get('user')->uri(array('action' => 'login')), 401);
     }
     if ($this->_auth->logged_in() and $user->id > 1) {
         $account = Auth::instance()->get_user();
     }
     if ($account and $account->id == $user->id) {
         Assets::popup();
         $this->title = __('My Account');
     } elseif ($account and (ACL::check('access profiles') and $user->status or ACL::check('administer users'))) {
         $this->title = __('Profile %title', array('%title' => Text::ucfirst($user->nick)));
     } elseif (ACL::check('access profiles') and $user->status and $user->id > User::GUEST_ID) {
         $this->title = __('Profile %title', array('%title' => Text::ucfirst($user->nick)));
     } else {
         throw HTTP_Exception::factory(403, 'Attempt to access without required privileges.');
     }
     if ($account and $user->id === $account->id and $enable_buddy) {
         $is_owner = TRUE;
     }
     if ($account && $user && $enable_buddy) {
         $request = Model::factory('buddy')->isRequest($account->id, $user->id);
         $isFriend = Model::factory('buddy')->isFriend($account->id, $user->id);
         $friends = Model::factory('buddy')->friends($user->id, 5);
     }
     $view = View::factory('user/profile')->set('user', $user)->set('is_owner', $is_owner)->set('request', $request)->set('isfriend', $isFriend)->set('friends', $friends)->set('enable_buddy', $enable_buddy);
     $this->response->body($view);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:51,代码来源:user.php

示例8: action_spam

 /**
  * Spam Comments
  *
  * @uses  Assets::popup
  */
 public function action_spam()
 {
     Assets::popup();
     $this->_prepare_list(ORM::factory('comment')->where('status', '=', 'spam'));
     $this->title = __('Spam Comments');
     $view = View::factory('admin/comment/list')->bind('datatables', $this->_datatables)->set('is_datatables', Request::is_datatables())->set('bulk_actions', Comment::bulk_actions(TRUE))->set('action', $this->_form_action)->set('url', Route::url('admin/comment', array('action' => 'pending'), TRUE));
     $this->response->body($view);
 }
开发者ID:MenZil-Team,项目名称:cms,代码行数:13,代码来源:comment.php


注:本文中的Assets::popup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。