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

sartak at bestpractical.com sartak at bestpractical.com
Tue Apr 28 11:12:35 EDT 2009


The branch, master has been updated
       via  f082a9cb5f4d78f7060c61415356e096890c32a4 (commit)
      from  ba2445801e6bef6346c08ed00fc8a88d010a1cbb (commit)

Summary of changes:
 lib/App/Changeloggr/Dispatcher.pm |   13 ++++++++++---
 lib/App/Changeloggr/View/Admin.pm |    7 +++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit f082a9cb5f4d78f7060c61415356e096890c32a4
Author: Shawn M Moore <sartak at gmail.com>
Date:   Tue Apr 28 11:11:08 2009 -0400

    Move tags editing into its own page

diff --git a/lib/App/Changeloggr/Dispatcher.pm b/lib/App/Changeloggr/Dispatcher.pm
index 5b4d51b..12706ce 100644
--- a/lib/App/Changeloggr/Dispatcher.pm
+++ b/lib/App/Changeloggr/Dispatcher.pm
@@ -31,10 +31,17 @@ on '/changelog/*/*/Changes' => run {
     show '/changelog/download';
 };
 
-on '/admin/changelog/*' => run {
-    my $uuid = $1;
+# match /admin/changelog/SUBTAB/UUID
+# or    /admin/changelog/UUID
+on qr{^/admin/changelog/([^/]+)(?:/([^/]+))?$} => run {
+    my ($subpage, $uuid) = ($1, $2);
+    if (!$uuid) {
+        $uuid = $subpage;
+        undef $subpage;
+    }
+
     set id => Changelog(admin_token => $uuid)->id;
-    show '/admin/changelog';
+    show "/admin/changelog" . ($subpage ? "/$subpage" : "");
 };
 
 1;
diff --git a/lib/App/Changeloggr/View/Admin.pm b/lib/App/Changeloggr/View/Admin.pm
index ba62eaf..28602af 100644
--- a/lib/App/Changeloggr/View/Admin.pm
+++ b/lib/App/Changeloggr/View/Admin.pm
@@ -26,8 +26,6 @@ template '/changelog' => page {
 
     edit_links($changelog);
 
-    edit_tags($changelog);
-
     my $delete = $changelog->as_delete_action;
     form {
         render_action($delete);
@@ -36,6 +34,11 @@ template '/changelog' => page {
     };
 };
 
+template '/changelog/tags' => page {
+    my $changelog = Changelog(id => get('id'));
+    edit_tags($changelog);
+};
+
 sub add_changes_to {
     my $changelog = shift;
 

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



More information about the Bps-public-commit mailing list