public function content()
    {
        global $CONFIG, $STRINGS;
        $this->_data->week == date('W') ? $next = false : ($next = true);
        if (empty($this->_data->intervals)) {
            return BootstrapHelper::alert('info', Lang::get('event:noactivity'), Lang::get('event:noactivitythisweek:message'));
        }
        $intervals_list = '<table class="table inner-table">';
        foreach ($this->_data->intervals as $interval) {
            $intervals_list .= '<tr>
			<td>' . $interval->d . 'd ' . $interval->h . 'h  ' . $interval->i . 'm  ' . $interval->s . 's</td>
			<td><span class="label label-success">
			' . date('G:i:s D M j Y', $interval->timestart) . '
			</span></td>
			<td><span class="label label-important">
			' . date('G:i:s D M j Y', $interval->timestop) . '
			</span></td>
			</tr>';
        }
        $intervals_list .= '</table>';
        $incidences_list = '<ul>';
        foreach ($this->_data->incidences as $incidence) {
            $incidences_list .= '<li>
			<span class="label label-warning">
			' . date('G:i:s D M j Y', $incidence->timestamp) . '
			</span>
			</li>';
        }
        $incidences_list .= '</ul>';
        $monday = date('d/m/Y', strtotime('Last Monday', mktime(1, 1, 1, 1, 7 * $this->_data->week, date('Y'))));
        $sunday = date('d/m/Y', strtotime('Next Sunday', mktime(1, 1, 1, 1, 7 * $this->_data->week, date('Y'))));
        return '
		<section id="user-activity" class="well">
		<div class="week-header">
		<b>' . Lang::get('period') . '</b> ' . $monday . ' - ' . $sunday . '
		</div>
		<table class="table report-table">
		<tr>
		<td><strong>' . $STRINGS['intervals'] . ' </strong></td>
		<td>' . $intervals_list . '</td>
		</tr>
		<tr>
		<td><strong>' . $STRINGS['incidences'] . '</strong></td>
		<td>' . $incidences_list . '</td>
		</tr>
		</table>
		' . MenuHelper::get_pagination_links($CONFIG->wwwroot . '/user/activity/', $this->_data->week, $next) . '
		<div class="container"></div>
		</section>';
    }
    public function content()
    {
        global $CONFIG, $STRINGS;
        $users_table_content = '';
        if (empty($this->_data->users)) {
            return BootstrapHelper::alert('info', $STRINGS['event:nousers'], $STRINGS['event:nouser:message']);
        }
        //check if there is a next page
        $this->_data->page + 1 < UserModel::pages() ? $next = true : ($next = false);
        foreach ($this->_data->users as $user) {
            $users_table_content .= '
			<tr>
			<td>' . $user->id . '</td>
			<td>' . utf8_encode($user->firstname) . '</td>
			<td>' . utf8_encode($user->lastname) . '</td>
			<td>' . $user->role . '</td>
			<td>' . $user->position . '</td>
			<td><a href="' . $CONFIG->wwwroot . '/admin/users/' . $user->id . '/details">' . $user->identifier . '</a></td>
			</tr>
			';
        }
        return '
		<section id="users" class="well">
		<table class="table">
		<thead>
		<tr>
		<th>#</th>
		<th>' . $STRINGS['firstname'] . '</th>
		<th>' . $STRINGS['lastname'] . '</th>
		<th>' . $STRINGS['role'] . '</th>
		<th>' . $STRINGS['position'] . '</th>
		<th>' . $STRINGS['identifier'] . '</th>
		</tr>
		</thead>
		<tbody>
		' . $users_table_content . '
		</tbody>
		</table>
		<form action="' . $CONFIG->wwwroot . '/admin/users/new/add" method="post">
		<button class="btn btn-success ">+ ' . $STRINGS['add:user'] . '</button>
		' . MenuHelper::get_pagination_links($CONFIG->wwwroot . '/admin/users/', $this->_data->page, $next) . '
		</form>

		</section>';
    }
    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>';
    }