[Bps-public-commit] SD - A distributed issue tracker branch, master, updated. 3d0e69e535739c122e75e8608965368ad3a285a5

jesse jesse at bestpractical.com
Sat Jan 31 00:23:27 EST 2009


The branch, master has been updated
       via  3d0e69e535739c122e75e8608965368ad3a285a5 (commit)
      from  5a472271e4baaa59699a8679179f8b3e8cd312b5 (commit)

Summary of changes:
 lib/App/SD/Server/Dispatcher.pm |    5 +++--
 lib/App/SD/Server/View.pm       |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 3d0e69e535739c122e75e8608965368ad3a285a5
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Jan 31 00:22:43 2009 -0500

    Move view of tickets to not have files that are also directories. (to
    make export easier)

diff --git a/lib/App/SD/Server/Dispatcher.pm b/lib/App/SD/Server/Dispatcher.pm
index d7281e1..7e87d04 100644
--- a/lib/App/SD/Server/Dispatcher.pm
+++ b/lib/App/SD/Server/Dispatcher.pm
@@ -66,16 +66,17 @@ under 'GET' => sub {
         on '' => sub {
             my $self = shift;
             if ( my $id = $self->server->cgi->param('id') ) {
-                $self->server->_send_redirect( to => "/ticket/$id" );
+                $self->server->_send_redirect( to => "/ticket/$id/view" );
             } else {
                 next_rule;
             }
         };
 
         on 'new'                 => sub { shift->show_template('new_ticket') };
+        on qr'^([\w\d-]+)/?$'    => sub { shift->server->_send_redirect( to => "/ticket/$1/view" ) };
         on qr'^([\w\d-]+)/edit$' => sub { shift->show_template( 'edit_ticket', $1 ) };
         on qr'^([\w\d-]+)/history$' => sub { shift->show_template( 'show_ticket_history', $1 ) };
-        on qr'^([\w\d-]+)/?$'    => sub { shift->show_template( 'show_ticket', $1 ) };
+        on qr'^([\w\d-]+)/view$'    => sub { shift->show_template( 'show_ticket', $1 ) };
     };
 };
 
diff --git a/lib/App/SD/Server/View.pm b/lib/App/SD/Server/View.pm
index 3b2a6cd..8c81fe3 100644
--- a/lib/App/SD/Server/View.pm
+++ b/lib/App/SD/Server/View.pm
@@ -788,7 +788,7 @@ sub ticket_page_actions {
     my $ticket = shift;
 
     ul { {class is 'actions'};
-        li { a {{ href is '/ticket/'.$ticket->uuid.''}; 'Show'}; };
+        li { a {{ href is '/ticket/'.$ticket->uuid.'/view'}; 'Show'}; };
         li { a {{ href is '/ticket/'.$ticket->uuid.'/edit'}; 'Update'}; };
         li { a {{ href is '/ticket/'.$ticket->uuid.'/history'}; 'History'}; };
     };
@@ -898,7 +898,7 @@ sub ticket_link {
         a {
             {
                 class is 'ticket';
-                href is '/ticket/' . $ticket->uuid;
+                href is '/ticket/' . $ticket->uuid."/view";
             };
             $label;
         }

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



More information about the Bps-public-commit mailing list