From af936d474281df05dc2cb368530782cb7cdcde74 Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Thu, 6 Sep 2007 17:42:07 +0000 Subject: [PATCH] Fleshing out content and committed some new files. --- .../modules/blog/actions/actions.class.php | 4 +++- .../modules/blog/actions/components.class.php | 10 ++++++++++ .../modules/blog/templates/_latest_blog_posts.php | 8 ++++++++ .../modules/blog/templates/indexSuccess.php | 15 +++++++++++++++ .../modules/blog/templates/viewSuccess.php | 6 +++++- .../modules/main/actions/actions.class.php | 3 --- .../modules/main/templates/indexSuccess.php | 9 +-------- website/apps/frontend/templates/_menu.php | 1 + 8 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 website/apps/frontend/modules/blog/actions/components.class.php create mode 100644 website/apps/frontend/modules/blog/templates/_latest_blog_posts.php diff --git a/website/apps/frontend/modules/blog/actions/actions.class.php b/website/apps/frontend/modules/blog/actions/actions.class.php index 62510af4a..48e27568d 100644 --- a/website/apps/frontend/modules/blog/actions/actions.class.php +++ b/website/apps/frontend/modules/blog/actions/actions.class.php @@ -16,7 +16,9 @@ class blogActions extends sfActions */ public function executeIndex() { - + $blogPostTable = Doctrine_Manager::getInstance()->getTable('BlogPost'); + + $this->latestBlogPosts = $blogPostTable->retrieveLatest(5); } public function executeView() diff --git a/website/apps/frontend/modules/blog/actions/components.class.php b/website/apps/frontend/modules/blog/actions/components.class.php new file mode 100644 index 000000000..790669a99 --- /dev/null +++ b/website/apps/frontend/modules/blog/actions/components.class.php @@ -0,0 +1,10 @@ +getTable('BlogPost'); + + $this->latestBlogPosts = $blogPostTable->retrieveLatest(5); + } +} \ No newline at end of file diff --git a/website/apps/frontend/modules/blog/templates/_latest_blog_posts.php b/website/apps/frontend/modules/blog/templates/_latest_blog_posts.php new file mode 100644 index 000000000..a34fffa22 --- /dev/null +++ b/website/apps/frontend/modules/blog/templates/_latest_blog_posts.php @@ -0,0 +1,8 @@ +
+

Latest Blog Posts

+ +
\ No newline at end of file diff --git a/website/apps/frontend/modules/blog/templates/indexSuccess.php b/website/apps/frontend/modules/blog/templates/indexSuccess.php index e69de29bb..3e880370e 100644 --- a/website/apps/frontend/modules/blog/templates/indexSuccess.php +++ b/website/apps/frontend/modules/blog/templates/indexSuccess.php @@ -0,0 +1,15 @@ +
+

Doctrine Blog

+ + +
+

getName(), '@blog_post?slug='.$blogPost->getSlug()); ?>

+ +

getBody(); ?>

+
+ +
+ + + $latestBlogPosts)); ?> + \ No newline at end of file diff --git a/website/apps/frontend/modules/blog/templates/viewSuccess.php b/website/apps/frontend/modules/blog/templates/viewSuccess.php index aa6b85a2f..4fbfea5cb 100644 --- a/website/apps/frontend/modules/blog/templates/viewSuccess.php +++ b/website/apps/frontend/modules/blog/templates/viewSuccess.php @@ -4,4 +4,8 @@ - \ No newline at end of file + +

+ + + diff --git a/website/apps/frontend/modules/main/actions/actions.class.php b/website/apps/frontend/modules/main/actions/actions.class.php index 4add2076e..9638f9f0d 100644 --- a/website/apps/frontend/modules/main/actions/actions.class.php +++ b/website/apps/frontend/modules/main/actions/actions.class.php @@ -16,9 +16,6 @@ class mainActions extends sfActions */ public function executeIndex() { - $blogPostTable = Doctrine_Manager::getInstance()->getTable('BlogPost'); - - $this->latestBlogPosts = $blogPostTable->retrieveLatest(5); } public function executeAbout() diff --git a/website/apps/frontend/modules/main/templates/indexSuccess.php b/website/apps/frontend/modules/main/templates/indexSuccess.php index 6b8a6f64f..c624e0e1a 100644 --- a/website/apps/frontend/modules/main/templates/indexSuccess.php +++ b/website/apps/frontend/modules/main/templates/indexSuccess.php @@ -17,12 +17,5 @@ -
-

Latest Blog Posts

- -
+ \ No newline at end of file diff --git a/website/apps/frontend/templates/_menu.php b/website/apps/frontend/templates/_menu.php index 38ba30bf8..2304a9c01 100644 --- a/website/apps/frontend/templates/_menu.php +++ b/website/apps/frontend/templates/_menu.php @@ -4,5 +4,6 @@
  • +
  • \ No newline at end of file