[Bps-public-commit] App-Changeloggr branch, master, updated. 92ca48ef2bc81bfc91f7229f70ef6be4c5cb0c75

Alex M Vandiver alexmv at bestpractical.com
Tue Apr 28 13:12:23 EDT 2009


The branch, master has been updated
       via  92ca48ef2bc81bfc91f7229f70ef6be4c5cb0c75 (commit)
       via  d0ba930bc065797354966a01ec8b749d85dfa437 (commit)
       via  115723549195699be7da21f58350d5dff51be850 (commit)
       via  a96889e79b235c17b126891f84632aa77a811a3d (commit)
      from  cbd84fd0e33cb6a45afed4391e80a0ba8ee7a6c9 (commit)

Summary of changes:
 lib/App/Changeloggr/Dispatcher.pm |   20 +++++++++++++++++++-
 lib/App/Changeloggr/View/Admin.pm |    4 ++--
 2 files changed, 21 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit a96889e79b235c17b126891f84632aa77a811a3d
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Tue Apr 28 13:08:26 2009 -0400

    Fix copy and paste error in admin templates

diff --git a/lib/App/Changeloggr/View/Admin.pm b/lib/App/Changeloggr/View/Admin.pm
index 03bc4ef..683f663 100644
--- a/lib/App/Changeloggr/View/Admin.pm
+++ b/lib/App/Changeloggr/View/Admin.pm
@@ -30,7 +30,7 @@ template '/changelog' => page {
     };
 };
 
-template '/changelog/tags' => page {
+template '/changelog/changes' => page {
     my $changelog = Changelog(id => get('id'));
     add_changes_to($changelog);
 };

commit 115723549195699be7da21f58350d5dff51be850
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Tue Apr 28 13:08:44 2009 -0400

    Use helper procedures

diff --git a/lib/App/Changeloggr/View/Admin.pm b/lib/App/Changeloggr/View/Admin.pm
index 683f663..2817bf2 100644
--- a/lib/App/Changeloggr/View/Admin.pm
+++ b/lib/App/Changeloggr/View/Admin.pm
@@ -90,7 +90,7 @@ sub edit_links {
 
 sub edit_tags {
     my $changelog = shift;
-    my $tags = M("TagCollection", changelog_id => $changelog);
+    my $tags = $changelog->tags;
 
     while (my $tag = $tags->next) {
         form {

commit d0ba930bc065797354966a01ec8b749d85dfa437
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Tue Apr 28 13:11:59 2009 -0400

    Error handling on bad admin token

diff --git a/lib/App/Changeloggr/Dispatcher.pm b/lib/App/Changeloggr/Dispatcher.pm
index 12706ce..81dd8ca 100644
--- a/lib/App/Changeloggr/Dispatcher.pm
+++ b/lib/App/Changeloggr/Dispatcher.pm
@@ -40,7 +40,10 @@ on qr{^/admin/changelog/([^/]+)(?:/([^/]+))?$} => run {
         undef $subpage;
     }
 
-    set id => Changelog(admin_token => $uuid)->id;
+    my $cl = Changelog(admin_token => $uuid);
+    show "/errors/404" unless $cl->id;
+
+    set id => $cl->id;
     show "/admin/changelog" . ($subpage ? "/$subpage" : "");
 };
 

commit 92ca48ef2bc81bfc91f7229f70ef6be4c5cb0c75
Author: Alex Vandiver <alexmv at mit.edu>
Date:   Tue Apr 28 13:12:16 2009 -0400

    Nav for admin UI

diff --git a/lib/App/Changeloggr/Dispatcher.pm b/lib/App/Changeloggr/Dispatcher.pm
index 81dd8ca..eb691bb 100644
--- a/lib/App/Changeloggr/Dispatcher.pm
+++ b/lib/App/Changeloggr/Dispatcher.pm
@@ -43,6 +43,21 @@ on qr{^/admin/changelog/([^/]+)(?:/([^/]+))?$} => run {
     my $cl = Changelog(admin_token => $uuid);
     show "/errors/404" unless $cl->id;
 
+    my $admin = Jifty->web->navigation->child(
+        $cl->name => url => "/admin/changelog/$uuid",
+        active => 1,
+    );
+    $admin->child(
+        Changes => url => "/admin/changelog/changes/$uuid",
+        label   => "Upload changes",
+    );
+    $admin->child(
+        Tags => url => "/admin/changelog/tags/$uuid",
+    );
+    $admin->child(
+        Links => url => "/admin/changelog/links/$uuid",
+    );
+
     set id => $cl->id;
     show "/admin/changelog" . ($subpage ? "/$subpage" : "");
 };

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



More information about the Bps-public-commit mailing list