Author: weaverryan
Date: 2010-02-07 22:01:32 +0100 (Sun, 07 Feb 2010)
New Revision: 27673
Added:
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/listSuccess.php
Removed:
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/monthSuccess.php
Modified:
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/lib/Basesympal_blogActions.class.php
Log:
[1.4][sfSympalBlogPlugin][1.0] Centralizing the month action to a list
template, which will allow me to use this same type of functionality to filter
in other ways (e.g. by tags).
Modified:
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/lib/Basesympal_blogActions.class.php
===================================================================
---
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/lib/Basesympal_blogActions.class.php
2010-02-07 21:00:04 UTC (rev 27672)
+++
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/lib/Basesympal_blogActions.class.php
2010-02-07 21:01:32 UTC (rev 27673)
@@ -12,10 +12,17 @@
{
public function executeMonth($request)
{
+ $month = $request->getParameter('m');
+ $year = $request->getParameter('y');
+
$this->menuItem =
Doctrine::getTable('sfSympalMenuItem')->findOneBySlug('blog');
- $this->month = $request->getParameter('m');
- $this->year = $request->getParameter('y');
- $this->pager =
Doctrine::getTable('sfSympalBlogPost')->retrieveBlogMonth($this->month,
$this->year);
+ $this->pager =
Doctrine::getTable('sfSympalBlogPost')->retrieveBlogMonth($month, $year);
$this->content = $this->pager->getResults();
+
+
+ $this->breadcrumbsTitle = date('M Y', strtotime($month.'/01/'.$year));
+ $this->title = 'Posts for the month of ' . $this->breadcrumbsTitle;
+
+ $this->setTemplate('list');
}
}
Copied:
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/listSuccess.php
(from rev 27671,
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/monthSuccess.php)
===================================================================
---
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/listSuccess.php
(rev 0)
+++
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/listSuccess.php
2010-02-07 21:01:32 UTC (rev 27673)
@@ -0,0 +1,15 @@
+<?php use_stylesheet('/sfSympalBlogPlugin/css/blog.css', 'first') ?>
+<?php echo get_sympal_breadcrumbs($menuItem, $breadcrumbsTitle) ?>
+<?php $sf_response->setTitle($title) ?>
+
+<div id="sympal_blog">
+ <div class="list">
+ <h2><?php echo $title ?></h2>
+
+ <?php echo get_partial('sympal_blog/blog_list', array('pager' => $pager,
'menuItem' => $menuItem, 'content' => $content)) ?>
+ </div>
+</div>
+
+<?php slot('sympal_right_sidebar') ?>
+ <?php echo get_component('sympal_blog', 'sidebar') ?>
+<?php end_slot() ?>
\ No newline at end of file
Deleted:
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/monthSuccess.php
===================================================================
---
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/monthSuccess.php
2010-02-07 21:00:04 UTC (rev 27672)
+++
plugins/sfSympalBlogPlugin/branches/1.4/modules/sympal_blog/templates/monthSuccess.php
2010-02-07 21:01:32 UTC (rev 27673)
@@ -1,15 +0,0 @@
-<?php use_stylesheet('/sfSympalBlogPlugin/css/blog.css', 'first') ?>
-<?php echo get_sympal_breadcrumbs($menuItem, $date = date('M Y',
strtotime($month.'/01/'.$year))) ?>
-<?php $sf_response->setTitle('Posts for the month of ' . $date) ?>
-
-<div id="sympal_blog">
- <div class="list">
- <h2>Posts for the month of <?php echo $date ?></h2>
-
- <?php echo get_partial('sympal_blog/blog_list', array('pager' => $pager,
'menuItem' => $menuItem, 'content' => $content)) ?>
- </div>
-</div>
-
-<?php slot('sympal_right_sidebar') ?>
- <?php echo get_component('sympal_blog', 'sidebar') ?>
-<?php end_slot() ?>
\ No newline at end of file
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.