本文整理汇总了PHP中ActivityModel::pages方法的典型用法代码示例。如果您正苦于以下问题:PHP ActivityModel::pages方法的具体用法?PHP ActivityModel::pages怎么用?PHP ActivityModel::pages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActivityModel
的用法示例。
在下文中一共展示了ActivityModel::pages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content
public function content()
{
global $CONFIG;
if (empty($this->_data->activity)) {
return BootstrapHelper::alert('info', Lang::get('event:noactivity'), Lang::get('event:noactivity:message'));
}
//check if there is a next page (page count starts at 0 thus the +1)
$this->_data->page + 1 < ActivityModel::pages() ? $next = true : ($next = false);
$activity_table_content = '';
foreach ($this->_data->activity as $entry) {
$activity_table_content .= '<tr>
<td>' . $entry->id . '</td>
<td><span class="label ' . BootstrapHelper::get_label_for_action($entry->action) . '">' . BootstrapHelper::get_event_description($entry->action) . '</span></td>
<td>' . Lang::get('dayofweek' . date('N', $entry->timestamp)) . '</td>
<td>' . date('d/m/Y', $entry->timestamp) . '</td>
<td>' . date('G:i:s', $entry->timestamp) . '</td>
<td>' . utf8_encode($entry->firstname) . '</td>
<td>' . utf8_encode($entry->lastname) . '</td>
<td><a href="' . $CONFIG->wwwroot . '/admin/users/' . $entry->userid . '/details">' . $entry->identifier . '</a></td>
</tr>
';
}
return '
<section id="activity" class="well">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>' . Lang::get('action') . '</th>
<th>' . Lang::get('day') . '</th>
<th>' . Lang::get('date') . '</th>
<th>' . Lang::get('time') . '</th>
<th>' . Lang::get('firstname') . '</th>
<th>' . Lang::get('lastname') . '</th>
<th>' . Lang::get('identifier') . '</th>
</tr>
</thead>
<tbody>' . $activity_table_content . '
</tbody>
</table>
' . MenuHelper::get_pagination_links($CONFIG->wwwroot . '/admin/activity/', $this->_data->page, $next) . '
<div class="container"></div>
</section>';
}