public function browse() { // Parameters $params = array('join_columns' => array(), 'join_items' => array()); // Process filters $params = $this->parseCounters($params); // Process query string $qstring = $this->parseQuerystring($params['total']); // Actions $actions = array(0 => __('select', 'system'), 'approve' => __('approve', 'system'), 'decline' => __('decline', 'system'), 'delete' => __('delete', 'system')); // Check form action if (input::post('do_action')) { // Delete selected blogs if (input::post('action') && isset($actions[input::post('action')]) && input::post('blog_id') && is_array(input::post('blog_id'))) { foreach (input::post('blog_id') as $blogID) { $blogID = (int) $blogID; if ($blogID && $blogID > 0) { $this->action(input::post('action'), $blogID); } } } // Success view::setInfo(__('action_applied', 'system')); router::redirect('cp/plugins/blogs?' . $qstring['url'] . 'page=' . $qstring['page']); } // Get blogs $blogs = array(); if ($params['total']) { $blogs = $this->blogs_model->getBlogs('in_list', $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']); } // Create table grid $grid = array('uri' => 'cp/plugins/blogs', 'keyword' => 'blogs', 'header' => array('check' => array('html' => 'blog_id', 'class' => 'check'), 'data_title' => array('html' => __('name', 'system'), 'class' => 'name', 'sortable' => true), 'user' => array('html' => __('user', 'system'), 'class' => 'user'), 'post_date' => array('html' => __('post_date', 'system'), 'class' => 'date', 'sortable' => true), 'status' => array('html' => __('status', 'system'), 'class' => 'status'), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array()); // Create grid content foreach ($blogs as $blog) { if ($blog['active'] == 1) { $status = html_helper::anchor('cp/plugins/blogs/decline/' . $blog['blog_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('active', 'system'), array('class' => 'label small success')); } else { $status = html_helper::anchor('cp/plugins/blogs/approve/' . $blog['blog_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], $blog['active'] ? __('pending', 'system') : __('inactive', 'system'), array('class' => 'label small ' . ($blog['active'] ? 'info' : 'important'))); } $grid['content'][] = array('check' => array('html' => $blog['blog_id']), 'data_title' => array('html' => html_helper::anchor('cp/plugins/blogs/edit/' . $blog['blog_id'], text_helper::truncate($blog['data_title'], 64))), 'user' => array('html' => users_helper::anchor($blog['user'])), 'post_date' => array('html' => date_helper::formatDate($blog['post_date'])), 'status' => array('html' => $status), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/plugins/blogs/edit/' . $blog['blog_id'], __('edit', 'system'), array('class' => 'edit')), 'delete' => html_helper::anchor('cp/plugins/blogs/delete/' . $blog['blog_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('blog_delete?', 'blogs'), 'data-role' => 'confirm', 'class' => 'delete'))))); } // Set pagination $config = array('base_url' => config::siteURL('cp/plugins/blogs?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->blogsPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page'); $pagination = loader::library('pagination', $config, null); // Filter hooks hook::filter('cp/plugins/blogs/browse/grid', $grid); hook::filter('cp/plugins/blogs/browse/actions', $actions); // Assign vars view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination)); // Set title view::setTitle(__('blogs_manage', 'system_navigation')); // Set trail if ($qstring['search_id']) { view::setTrail('cp/plugins/blogs?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system')); } // Assign actions view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#blogs-search\').toggle();return false;')); // Load view view::load('cp/plugins/blogs/browse'); }
public function browse() { // Parameters $params = array('join_columns' => array()); // Process filters $params = $this->parseCounters($params); // Process query string $qstring = $this->parseQuerystring($params['total']); // Actions $actions = array(0 => __('select', 'system'), 'delete' => __('delete', 'system')); // Check form action if (input::post('do_action')) { // Delete selected messages if (input::post('action') == 'delete') { if (input::post('message_id') && is_array(input::post('message_id'))) { foreach (input::post('message_id') as $messageID) { $messageID = (int) $messageID; if ($messageID && $messageID > 0) { $this->delete($messageID); } } } } // Success view::setInfo(__('action_applied', 'system')); router::redirect('cp/plugins/messages?' . $qstring['url'] . 'page=' . $qstring['page']); } // Get messages $messages = array(); if ($params['total']) { $messages = $this->messages_model->getMessages($params['join_columns'], $qstring['order'], $qstring['limit']); } // Create table grid $grid = array('uri' => 'cp/plugins/messages', 'keyword' => 'messages', 'header' => array('check' => array('html' => 'message_id', 'class' => 'check'), 'message' => array('html' => __('message', 'messages'), 'class' => 'name'), 'user' => array('html' => __('user', 'system'), 'class' => 'user'), 'post_date' => array('html' => __('post_date', 'system'), 'class' => 'date', 'sortable' => true), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array()); // Create grid content foreach ($messages as $message) { $grid['content'][] = array('check' => array('html' => $message['message_id']), 'message' => array('html' => html_helper::anchor('cp/plugins/messages/edit/' . $message['message_id'], text_helper::truncate($message['message'], 64))), 'user' => array('html' => users_helper::anchor($message['user'])), 'post_date' => array('html' => date_helper::formatDate($message['post_date'])), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/plugins/messages/edit/' . $message['message_id'], __('edit', 'system'), array('class' => 'edit')), 'delete' => html_helper::anchor('cp/plugins/messages/delete/' . $message['message_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('message_delete?', 'messages'), 'data-role' => 'confirm', 'class' => 'delete'))))); } // Set pagination $config = array('base_url' => config::siteURL('cp/plugins/messages?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->messagesPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page'); $pagination = loader::library('pagination', $config, null); // Filter hooks hook::filter('cp/plugins/messages/browse/grid', $grid); hook::filter('cp/plugins/messages/browse/actions', $actions); // Assign vars view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination)); // Set title view::setTitle(__('messages_manage', 'system_navigation')); // Set trail if ($qstring['search_id']) { view::setTrail('cp/plugins/messages?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system')); } // Assign actions view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#messages-search\').toggle();return false;')); // Load view view::load('cp/plugins/messages/browse'); }
<div class="item-article"> <div class="action-header"> <?php echo __('user_signup', 'timeline', array('[name]' => users_helper::anchor($user))); ?> </div> </div>
if (!$user) { ?> <span class="required">*</span><?php } ?> </label> <div class="field"> <?php if ($user) { ?> <span class="static"> <?php echo users_helper::anchor($user); ?> </span> <?php } else { ?> <?php view::load('system/elements/field/edit', array('prefix' => 'message_edit', 'field' => array('keyword' => 'recipients', 'type' => 'text'), 'value' => '')); ?> <?php } ?>
?> <?php } else { ?> <?php view::load('users/profile/elements/picture', array('picture_file_suffix' => 't')); ?> <?php } ?> </figure> <header class="item-header"> <h2> <?php echo users_helper::anchor($conversation['users'][$message['user_id']]); ?> </h2> </header> <div class="item-article"> <?php echo nl2br($message['message']); ?> </div> <footer class="item-footer"> <ul class="unstyled content-meta clearfix"> <li class="date"> <?php echo __('message_date', 'messages', array('%date' => date_helper::formatDate($message['post_date'])));
break; ?> <?php } ?> <?php } ?> <?php echo html_helper::anchor('messages/people/' . $conversation['conversation_id'], '+' . ($conversation['total_recipients'] - 1)); ?> <?php } else { ?> <?php echo users_helper::anchor($conversations['users'][$conversations['recipients'][$conversation['conversation_id']]['user_id']]); ?> <?php } ?> </li> <li class="actions"> <?php echo html_helper::anchor('messages/delete/' . $conversation['conversation_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('conversation_delete?', 'messages'), 'data-role' => 'confirm')); ?> </li> </ul> </footer> </article>
<?php view::load('users/profile/elements/picture', array_merge($notice['user'], array('picture_file_suffix' => 't'))); ?> </figure> <div class="item-article"> <?php echo $notice['html']; ?> </div> <footer class="item-footer"> <ul class="unstyled content-meta clearfix"> <li class="date"> <?php echo __('author_date', 'system_info', array('%author' => users_helper::anchor($notice['user']), '%date' => date_helper::formatDate($notice['post_date']))); ?> </li> </ul> </footer> </article> </li> <?php } ?> <li class="clearfix loader <?php echo text_helper::alternate('odd', 'even');
public function commentTimeline($notice) { $notice['html'] = __('timeline_comment', 'timeline_notices', array('%user' => users_helper::anchor($notice['user'])), array('%' => html_helper::anchor(session::item('slug'), '\\1'))); return $notice; }
?> <div class="overlay element pictures"> <?php echo __('pictures_num' . ($album['total_pictures'] == 1 ? '_one' : ''), 'system_info', array('%pictures' => $album['total_pictures'])); ?> </div> </div> <figcaption class="image-caption"> <span class="nowrap nooverflow name"><?php echo html_helper::anchor('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), $album['data_title']); ?> </span> <span class="nowrap nooverflow user"><?php echo __('author', 'system_info', array('%author' => users_helper::anchor($album['user']))); ?> </span> </figcaption> </figure> </li> <?php } ?> </ul>
public function browse() { // Parameters $params = array('join_columns' => array()); // Process filters $params = $this->parseCounters($params); // Process query string $qstring = $this->parseQuerystring($params['total']); // Create actions $actions = array(0 => __('select', 'system'), 'dismiss' => __('report_dismiss', 'reports')); // Check form action if (input::post('do_action')) { // Delete selected reports if (input::post('action') == 'dismiss') { if (input::post('report_id') && is_array(input::post('report_id'))) { foreach (input::post('report_id') as $reportID) { $reportID = (int) $reportID; if ($reportID && $reportID > 0) { $this->dismiss($reportID); } } } } // Success view::setInfo(__('action_applied', 'system')); router::redirect('cp/content/reports?' . $qstring['url'] . 'page=' . $qstring['page']); } // Get reports $reports = array(); if ($params['total']) { $reports = $this->reports_model->getReports('', $params['join_columns'], $qstring['order'], $qstring['limit']); } // Load subjects model loader::model('reports/subjects', array(), 'reports_subjects_model'); // Get subjects $subjects = array(); $data = $this->reports_subjects_model->getSubjects(); foreach ($data as $subject) { $subjects[$subject['subject_id']] = $subject['name']; } // Create table grid $grid = array('uri' => 'cp/content/reports', 'keyword' => 'reports', 'header' => array('check' => array('html' => 'report_id', 'class' => 'check'), 'subject' => array('html' => __('report_subject', 'reports'), 'class' => 'subject'), 'message' => array('html' => __('report_message', 'reports'), 'class' => 'comment'), 'item' => array('html' => __('report_item', 'reports'), 'class' => 'item'), 'user' => array('html' => __('reporter', 'reports'), 'class' => 'user'), 'post_date' => array('html' => __('post_date', 'system'), 'class' => 'date', 'sortable' => true), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array()); // Create grid content foreach ($reports as $report) { $grid['content'][] = array('check' => array('html' => $report['report_id']), 'subject' => array('html' => isset($subjects[$report['subject_id']]) ? $subjects[$report['subject_id']] : ''), 'message' => array('html' => text_helper::truncate($report['message'], 56) . (utf8::strlen($report['message']) > 56 ? ' ' . html_helper::anchor('', __('view', 'system'), array('data-title' => __('message', 'reports'), 'data-role' => 'modal', 'data-display' => 'html', 'data-html' => text_helper::entities($report['message']))) : '')), 'item' => array('html' => __(config::item('resources', 'core', $report['resource_id']), config::item('resources', 'core', config::item('resources', 'core', $report['resource_id']), 'plugin'))), 'user' => array('html' => users_helper::anchor($report['user'])), 'post_date' => array('html' => date_helper::formatDate($report['post_date'])), 'actions' => array('html' => array('actions' => html_helper::anchor('cp/content/reports/actions/' . $report['report_id'], __('report_actions', 'reports'), array('class' => 'action', 'data-role' => 'modal', 'data-display' => 'iframe', 'data-title' => __('report_action_select', 'reports'))), 'view' => html_helper::anchor('cp/content/reports/view/' . $report['report_id'], __('report_view', 'reports'), array('class' => 'view')), 'dismiss' => html_helper::anchor('cp/content/reports/dismiss/' . $report['report_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('report_dismiss', 'reports'), array('data-html' => __('report_dismiss?', 'reports'), 'data-role' => 'confirm', 'class' => 'delete'))))); } // Set pagination $config = array('base_url' => config::siteURL('cp/content/reports?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->reportsPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page'); $pagination = loader::library('pagination', $config, null); // Filter hooks hook::filter('cp/content/reports/browse/grid', $grid); hook::filter('cp/content/reports/browse/actions', $actions); // Assign vars view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination)); // Set title view::setTitle(__('reports_manage', 'system_navigation')); // Set trail if ($qstring['search_id']) { view::setTrail('cp/content/reports?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system')); } // Assign actions view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#reports-search\').toggle();return false;')); // Load view view::load('cp/content/reports/browse'); }
public function commentBlog($notice) { $notice['html'] = __('blog_comment', 'timeline_notices', array('%user' => users_helper::anchor($notice['user'])), array('%' => html_helper::anchor('blogs/view/' . $notice['item_id'], '\\1'))); return $notice; }
<div class="item-article"> <div class="action-header"> <?php echo __('user_picture', 'timeline', array('[name]' => users_helper::anchor($user))); ?> </div> <div class="target-article media clearfix"> <figure class="image users-image"> <?php view::load('users/profile/elements/picture', array_merge($user, array('picture_file_suffix' => 'l'))); ?> </figure> </div> </div>
<div class="item-article"> <div class="action-header"> <?php echo __('message_post' . ($user['user_id'] == $poster['user_id'] ? '_self' : ''), 'timeline', array('[poster.name]' => users_helper::anchor($poster), '[name]' => users_helper::anchor($user))); ?> </div> <div class="target-article"> <?php echo $message['message']; ?> </div> </div>
public function voteAlbum($notice) { $notice['html'] = __('picture_album_vote', 'timeline_notices', array('%user' => users_helper::anchor($notice['user'])), array('%' => html_helper::anchor('pictures/index/' . $notice['item_id'], '\\1'))); return $notice; }
<div class="item-article"> <div class="action-header"> <?php echo __('classified_ad_post', 'timeline', array('[name]' => users_helper::anchor($user))); ?> </div> <div class="target-article media"> <div class="target-header"> <?php echo html_helper::anchor('classifieds/view/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), $ad['data_title']); ?> - <?php echo money_helper::symbol(config::item('ad_currency', 'classifieds')) . $ad['data_price']; ?> </div> <?php if ($ad['file_service_id'] && $ad['total_pictures']) { ?> <figure class="image classifieds-image"> <div class="image thumbnail" style="background-image:url('<?php echo storage_helper::getFileURL($ad['file_service_id'], $ad['file_path'], $ad['file_name'], $ad['file_ext'], 't', $ad['file_modify_date']); ?> ');"> <?php echo html_helper::anchor('classifieds/view/' . $ad['ad_id'] . '/' . text_helper::slug($ad['data_title'], 100), '<span class="name">' . $ad['data_title'] . '</span>', array('class' => 'image')); ?> </div> </figure> <?php
echo $comment['comment_id']; ?> "> <article class="item"> <figure class="image users-image"> <?php view::load('users/profile/elements/picture', array_merge($comment['user'], array('picture_file_suffix' => 't'))); ?> </figure> <div class="item-article"> <span class="author"> <?php echo users_helper::anchor($comment['user']); ?> </span> <?php echo $comment['comment']; ?> </div> <ul class="unstyled content-meta clearfix"> <li class="date"> <?php echo date_helper::humanSpan($comment['post_date']); ?> </li> <?php if (session::permission('comments_delete', 'comments') && ($comment['poster_id'] == session::item('user_id') || $comment['user_id'] && $comment['user_id'] == session::item('user_id'))) {
echo text_helper::alternate('one', 'two', 'three'); ?> " id="row-helper-<?php echo $user['user_id']; ?> "> <figure class="image users-image"> <?php view::load('users/profile/elements/picture', array_merge($user, array('picture_file_suffix' => 'l'))); ?> <figcaption class="image-caption"> <span class="nowrap nooverflow"><?php $user['name'] = utf8::str_replace(' ', '<br/>', $user['name']); echo users_helper::anchor($user, array('title' => $user['name'])); ?> </span> </figcaption> </figure> </li> <?php } ?> </ul> </div>
<div class="item-article"> <div class="action-header"> <?php echo __('picture_post', 'timeline', array('[name]' => users_helper::anchor($user), '[params.count]' => $params['count'], '[album]' => html_helper::anchor('pictures/index/' . $album['album_id'] . '/' . text_helper::slug($album['data_title'], 100), $album['data_title']))); ?> </div> <div class="target-article gallery"> <ul class="unstyled content-gallery clearfix <?php echo text_helper::alternate(); ?> "> <?php foreach ($pictures as $picture) { ?> <li class="<?php echo text_helper::alternate('odd', 'even'); ?> " id="row-picture-<?php echo $picture['picture_id']; ?> "> <figure class="image pictures-image"> <div class="image thumbnail" style="background-image:url('<?php echo storage_helper::getFileURL($picture['file_service_id'], $picture['file_path'], $picture['file_name'], $picture['file_ext'], 't', $picture['file_modify_date']); ?> ');">
public function browse() { // Get gateways $gateways = array(); foreach ($this->gateways_model->getGateways(false, false) as $gateway) { $gateways[$gateway['gateway_id']] = $gateway['name']; } // Parameters $params = array('join_columns' => array()); // Process filters $params = $this->parseCounters($params, $gateways); // Process query string $qstring = $this->parseQuerystring($params['total']); // Create actions $actions = array(0 => __('select', 'system'), 'delete' => __('delete', 'system')); // Check form action if (input::post('do_action')) { // Delete selected transactions if (input::post('action') == 'delete') { if (input::post('transaction_id') && is_array(input::post('transaction_id'))) { foreach (input::post('transaction_id') as $transactionID) { $transactionID = (int) $transactionID; if ($transactionID && $transactionID > 0) { $this->delete($transactionID); } } } } // Success view::setInfo(__('action_applied', 'system')); router::redirect('cp/billing/transactions?' . $qstring['url'] . 'page=' . $qstring['page']); } // Get transaction $transactions = array(); if ($params['total']) { $transactions = $this->transactions_model->getTransactions($params['join_columns'], $qstring['order'], $qstring['limit']); } // Create table grid $grid = array('uri' => 'cp/billing/transactions', 'keyword' => 'billing_transactions', 'header' => array('check' => array('html' => 'transaction_id', 'class' => 'check'), 'product' => array('html' => __('product', 'billing'), 'class' => 'product'), 'user' => array('html' => __('user', 'system'), 'class' => 'user'), 'gateway' => array('html' => __('payment_gateway', 'billing'), 'class' => 'gateway'), 'amount' => array('html' => __('price', 'billing'), 'class' => 'price', 'sortable' => true), 'post_date' => array('html' => __('payment_date', 'billing'), 'class' => 'date', 'sortable' => true), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array()); // Create grid content foreach ($transactions as $transaction) { $grid['content'][] = array('check' => array('html' => $transaction['transaction_id']), 'product' => array('html' => html_helper::anchor('cp/billing/transactions/view/' . $transaction['transaction_id'], $transaction['name'])), 'user' => array('html' => users_helper::anchor($transaction['user'])), 'gateway' => array('html' => $gateways[$transaction['gateway_id']]), 'amount' => array('html' => money_helper::symbol(config::item('currency', 'billing')) . $transaction['amount']), 'post_date' => array('html' => date_helper::formatDate($transaction['post_date'])), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/billing/transactions/view/' . $transaction['transaction_id'], __('details', 'system'), array('class' => 'details')), 'delete' => html_helper::anchor('cp/billing/transactions/delete/' . $transaction['transaction_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('delete', 'system'), array('data-html' => __('transaction_delete?', 'billing_transactions'), 'data-role' => 'confirm', 'class' => 'delete'))))); } // Set pagination $config = array('base_url' => config::siteURL('cp/billing/transactions?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->transactionPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page'); $pagination = loader::library('pagination', $config, null); // Filter hooks hook::filter('cp/billing/transactions/browse/grid', $grid); hook::filter('cp/billing/transactions/browse/actions', $actions); // Assign vars view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination)); // Set title view::setTitle(__('billing_transactions_manage', 'system_navigation')); // Set trail if ($qstring['search_id']) { view::setTrail('cp/billing/transactions?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system')); } // Assign actions view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#transactions-search\').toggle();return false;')); // Load view view::load('cp/billing/transactions/browse'); }
public function browse() { // Parameters $params = array('join_columns' => array(), 'join_items' => array()); // Process filters $params = $this->parseCounters($params, 0); // Process query string $qstring = $this->parseQuerystring($params['total']); // Actions $actions = array(0 => __('select', 'system'), 'approve' => __('approve', 'system'), 'approve_email' => __('approve_email', 'system'), 'decline' => __('decline', 'system'), 'decline_email' => __('decline_email', 'system'), 'verify' => __('status_verify', 'users'), 'unverify' => __('status_unverify', 'users'), 'delete' => __('delete', 'system')); // Check form action if (input::post('do_action')) { // Delete selected users if (input::post('action') && isset($actions[input::post('action')]) && input::post('user_id') && is_array(input::post('user_id'))) { foreach (input::post('user_id') as $userID) { $userID = (int) $userID; if ($userID && $userID > 0) { $this->action(input::post('action'), $userID); } } } // Success view::setInfo(__('action_applied', 'system')); router::redirect('cp/users?' . $qstring['url'] . 'page=' . $qstring['page']); } // Get users $users = array(); if ($params['total']) { $users = $this->users_model->getUsers('in_list', isset($params['values']['type_id']) ? $params['values']['type_id'] : 0, $params['join_columns'], $params['join_items'], $qstring['order'], $qstring['limit']); } // Create table grid $grid = array('uri' => 'cp/users', 'keyword' => 'users', 'header' => array('check' => array('html' => 'user_id', 'class' => 'check'), 'name1' => array('html' => __('user', 'system'), 'class' => 'name'), 'group' => array('html' => __('user_group', 'users'), 'class' => 'group'), 'type' => array('html' => __('user_type', 'users'), 'class' => 'type'), 'join_date' => array('html' => __('join_date', 'users'), 'class' => 'date', 'sortable' => true), 'active' => array('html' => __('active', 'system'), 'class' => 'status'), 'verified' => array('html' => __('verified', 'users'), 'class' => 'status'), 'actions' => array('html' => __('actions', 'system'), 'class' => 'actions')), 'content' => array()); // Create grid content foreach ($users as $user) { if ($user['active']) { $status = html_helper::anchor('cp/users/decline/' . $user['user_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('yes', 'system'), array('class' => 'label small success')); } else { $status = html_helper::anchor('cp/users/approve/' . $user['user_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('no', 'system'), array('class' => 'label small important')); } if ($user['verified']) { $verified = html_helper::anchor('cp/users/unverify/' . $user['user_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('yes', 'system'), array('class' => 'label small success')); } else { $verified = html_helper::anchor('cp/users/verify/' . $user['user_id'] . '?' . $qstring['url'] . 'page=' . $qstring['page'], __('no', 'system'), array('class' => 'label small important')); } $grid['content'][] = array('check' => array('html' => $user['user_id']), 'name1' => array('html' => users_helper::anchor($user)), 'group' => array('html' => text_helper::entities(config::item('usergroups', 'core', $user['group_id']))), 'type' => array('html' => text_helper::entities(config::item('usertypes', 'core', 'names', $user['type_id']))), 'join_date' => array('html' => date_helper::formatDate($user['join_date'])), 'status' => array('html' => $status), 'verified' => array('html' => $verified), 'actions' => array('html' => array('edit' => html_helper::anchor('cp/users/edit/' . $user['user_id'], __('edit', 'system'), array('class' => 'edit')), 'delete' => html_helper::anchor('cp/users/delete/' . $user['user_id'], __('delete', 'system'), array('data-html' => __('user_delete?', 'users'), 'data-role' => 'confirm', 'class' => 'delete'))))); } // Set pagination $config = array('base_url' => config::siteURL('cp/users?' . $qstring['url']), 'total_items' => $params['total'], 'items_per_page' => $this->usersPerPage, 'current_page' => $qstring['page'], 'uri_segment' => 'page'); $pagination = loader::library('pagination', $config, null); // Filter hooks hook::filter('cp/users/browse/grid', $grid); hook::filter('cp/users/browse/actions', $actions); // Assign vars view::assign(array('grid' => $grid, 'actions' => $actions, 'pagination' => $pagination)); // Set title view::setTitle(__('users_manage', 'system_navigation')); // Set trail if ($qstring['search_id']) { view::setTrail('cp/users?' . $qstring['url'] . 'page=' . $qstring['page'], __('search_results', 'system')); } // Assign actions view::setAction('cp/users/edit', __('user_new', 'users'), array('class' => 'icon-text icon-users-new')); view::setAction('#', __('search', 'system'), array('class' => 'icon-text icon-system-search', 'onclick' => '$(\'#users-search\').toggle();return false;')); // Load view view::load('cp/users/browse'); }
<div class="item-article"> <div class="action-header"> <?php echo __('blog_post', 'timeline', array('[name]' => users_helper::anchor($user))); ?> </div> <div class="target-article article"> <div class="target-header"> <?php echo html_helper::anchor('blogs/view/' . $blog['blog_id'] . '/' . text_helper::slug($blog['data_title'], 100), $blog['data_title']); ?> </div> <?php echo text_helper::truncate($blog['data_body'], 310); ?> </div> </div>