Пример #1
0
 public function history()
 {
     $this->set_title('Note History');
     if ($this->params()->id) {
         $this->notes = NoteVersion::where("note_id = ?", (int) $this->params()->id)->order("id DESC")->paginate($this->page_number(), 25);
     } elseif ($this->params()->post_id) {
         $this->notes = NoteVersion::where("post_id = ?", (int) $this->params()->post_id)->order("id DESC")->paginate($this->page_number(), 50);
     } elseif ($this->params()->user_id) {
         $this->notes = NoteVersion::where("user_id = ?", (int) $this->params()->user_id)->order("id DESC")->paginate($this->page_number(), 50);
     } else {
         $this->notes = NoteVersion::order("id DESC")->paginate($this->page_number(), 25);
     }
     $this->respond_to_list("notes");
 }
Пример #2
0
        ?>
%</td>
          <td><?php 
        echo round(100 * Post::where("user_id = ? and status = 'active' and score < -1", $user->id)->count() / $user->post_count());
        ?>
%</td>
        <?php 
    } else {
        ?>
          <td></td>
          <td></td>
        <?php 
    }
    ?>
        <td><?php 
    echo $this->linkTo(NoteVersion::where('user_id = ' . $user->id)->count(), ['note#history', 'user_id' => $user->id]);
    ?>
</td>
        <td><?php 
    echo $user->pretty_level();
    ?>
</td>
        <td><span title="<?php 
    echo $user->created_at;
    ?>
"><?php 
    echo $this->t(['time.x_ago', 't' => $this->timeAgoInWords($user->created_at)]);
    ?>
</span></td>
      </tr>
    <?php 
Пример #3
0
      <td><strong><?php 
echo $this->t('user_tag_edits');
?>
</strong></td>
      <td><?php 
echo $this->linkTo(History::where(['user_id' => $this->user->id, 'group_by_table' => 'posts'])->count(), array('history#index', 'search' => 'type:post user:'******'user_note_edits');
?>
</strong></td>
      <td><?php 
echo $this->linkTo(NoteVersion::where(['user_id' => $this->user->id])->count(), array('note#history', 'user_id' => $this->user->id));
?>
</td>
    </tr>
    <tr>
      <td><strong><?php 
echo $this->t('user_wiki_edits');
?>
</strong></td>
      <td><?php 
echo $this->linkTo(WikiPageVersion::where(['user_id' => $this->user->id])->count(), array('wiki#recent_changes', 'user_id' => $this->user->id));
?>
</td>
    </tr>
    <tr>
      <td><strong><?php