Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Fixed pagination, built out journal component.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Nov 29, 2010
1 parent ddfd08f commit 66e1a17
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/journal/controllers/entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private function _Prep ( ) {

$this->Model->Entries ( $this->_Focus->Id, array ( 'start' => $this->_PageStart, 'step' => $this->_PageStep ) );

$link = '/articles/(.*)';
$link = '/profile/' . $this->_Focus->Username . '/journal/(.*)';

$pageData = array ( 'start' => $this->_PageStart, 'step' => $this->_PageStep, 'total' => $this->Model->Get ( "Total" ), 'link' => $link );
$pageControls = $this->View->Find ("nav[class=pagination]");
Expand Down
2 changes: 1 addition & 1 deletion components/journal/models/journal.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function Store ( $pUserId, $pIdentifier, $pTitle, $pBody ) {

public function Entries ( $pUserId, $pLimit ) {

$this->Retrieve ( array ( 'Owner_FK' => $pUserId ) );
$this->Retrieve ( array ( 'Owner_FK' => $pUserId ), 'Created DESC', $pLimit );

}

Expand Down
2 changes: 0 additions & 2 deletions components/journal/views/entries.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<nav class="pagination">
</nav>

<h1>Article Summaries Title</h1>

<ul class="article-list">
<li class="summary">
<article>
Expand Down

0 comments on commit 66e1a17

Please sign in to comment.