[Bps-public-commit] App-Changeloggr branch, master, updated. 4868e364c7a47d17c5a7f5eb24676b690cddb87a

sartak at bestpractical.com sartak at bestpractical.com
Fri May 22 17:45:14 EDT 2009


The branch, master has been updated
       via  4868e364c7a47d17c5a7f5eb24676b690cddb87a (commit)
      from  a3f14a2cf4d6253ee800d0bcdf88889c45f41191 (commit)

Summary of changes:
 lib/App/Changeloggr/View.pm |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

- Log -----------------------------------------------------------------
commit 4868e364c7a47d17c5a7f5eb24676b690cddb87a
Author: Shawn M Moore <sartak at gmail.com>
Date:   Fri May 22 17:44:48 2009 -0400

    Finish removing the redirect, whoops

diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 2dc3f41..ef311b6 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -25,21 +25,19 @@ template '/' => page {
 
     my $count = $changelogs->count;
 
-    if ($count > 1) {
-        h2 { "These projects need your help!" };
-        ul {
-            while (my $changelog = $changelogs->next) {
-                li { changelog_summary($changelog) }
-            }
-        };
-        h2 { "Recent news" };
-        render_region(
-            name => 'news',
-            path => '/news/list',
-        );
-    } else {
-        redirect '/admin/create-changelog';
-    }
+    redirect '/admin/create-changelog' if $count == 0;
+
+    h2 { "These projects need your help!" };
+    ul {
+        while (my $changelog = $changelogs->next) {
+            li { changelog_summary($changelog) }
+        }
+    };
+    h2 { "Recent news" };
+    render_region(
+        name => 'news',
+        path => '/news/list',
+    );
 };
 
 template '/changelog' => page {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list