Exemplo n.º 1
0
    $i = 1;
    foreach ($this->rows as $row) {
        if ($i > $this->limit) {
            break;
        }
        $row = new \Components\Answers\Models\Question($row);
        $i++;
        $name = Lang::txt('PLG_RESOURCES_QUESTIONS_ANONYMOUS');
        if (!$row->get('anonymous')) {
            $name = $this->escape(stripslashes($row->creator('name', $name)));
            if ($row->creator('public')) {
                $name = '<a href="' . Route::url($row->creator()->getLink()) . '">' . $name . '</a>';
            }
        }
        $cls = $row->get('state') == 1 ? 'answered' : '';
        $cls = $row->isReported() ? 'flagged' : $cls;
        $cls .= $row->get('created_by') == User::get('username') ? ' mine' : '';
        ?>
			<tr<?php 
        echo $cls ? ' class="' . $cls . '"' : '';
        ?>
>
				<th>
					<span class="entry-id"><?php 
        echo $row->get('id');
        ?>
</span>
				</th>
				<td>
				<?php 
        if (!$row->isReported()) {