[Bps-public-commit] App-Changeloggr branch, master, updated. 37ac04acb20e01837423469529c3b6e3c84218ae
sartak at bestpractical.com
sartak at bestpractical.com
Mon Apr 27 10:25:04 EDT 2009
The branch, master has been updated
via 37ac04acb20e01837423469529c3b6e3c84218ae (commit)
from 7bdd40b5c111053cc5ccfd83d86ad077dfb1739d (commit)
Summary of changes:
lib/App/Changeloggr/Dispatcher.pm | 10 +++++-----
lib/App/Changeloggr/View.pm | 2 +-
lib/App/Changeloggr/View/Admin.pm | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 37ac04acb20e01837423469529c3b6e3c84218ae
Author: Shawn M Moore <sartak at gmail.com>
Date: Mon Apr 27 10:24:53 2009 -0400
Move admin elements from / to /admin
diff --git a/lib/App/Changeloggr/Dispatcher.pm b/lib/App/Changeloggr/Dispatcher.pm
index e7bab53..5b4d51b 100644
--- a/lib/App/Changeloggr/Dispatcher.pm
+++ b/lib/App/Changeloggr/Dispatcher.pm
@@ -5,14 +5,14 @@ use JiftyX::ModelHelpers;
before '*' => run {
my $top = Jifty->web->navigation;
$top->child(Home => url => '/');
- $top->child(New => url => '/create-changelog', label => 'New Changelog');
+ $top->child(New => url => '/admin/create-changelog', label => 'New Changelog');
Jifty->web->session->expires( '+1y' );
};
-on '/created-changelog' => run {
+on '/admin/created-changelog' => run {
my $id = Jifty->web->response->result('create-changelog')->content('id');
my $admin_token = Changelog($id)->as_superuser->admin_token;
- redirect "/changelog/$admin_token/admin";
+ redirect "/admin/changelog/$admin_token";
};
on '/changelog/*' => run {
@@ -31,10 +31,10 @@ on '/changelog/*/*/Changes' => run {
show '/changelog/download';
};
-on '/changelog/*/admin' => run {
+on '/admin/changelog/*' => run {
my $uuid = $1;
set id => Changelog(admin_token => $uuid)->id;
- show '/changelog/admin';
+ show '/admin/changelog';
};
1;
diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index bded841..dbde416 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
require App::Changeloggr::View::Admin;
-alias App::Changeloggr::View::Admin under '/';
+alias App::Changeloggr::View::Admin under '/admin';
# No salutation, ever
template '/salutation' => sub {};
diff --git a/lib/App/Changeloggr/View/Admin.pm b/lib/App/Changeloggr/View/Admin.pm
index 634d3a9..621699a 100644
--- a/lib/App/Changeloggr/View/Admin.pm
+++ b/lib/App/Changeloggr/View/Admin.pm
@@ -8,12 +8,12 @@ template '/create-changelog' => page {
my $create = new_action('CreateChangelog', moniker => 'create-changelog');
form {
render_action $create, ['name'];
- form_next_page url => '/created-changelog';
+ form_next_page url => '/admin/created-changelog';
form_submit(label => 'Create');
};
};
-template '/changelog/admin' => page {
+template '/changelog' => page {
my $changelog = Changelog(id => get('id'));
my $update = $changelog->as_update_action;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list