return couchdb link in -dev mode
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 10 Jan 2013 17:29:34 +0000 (18:29 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 10 Jan 2013 17:29:34 +0000 (18:29 +0100)
angular-server.pl
app/partials/list.html.ep

index 4dad17b..d76b11e 100755 (executable)
@@ -12,6 +12,7 @@ sub new_uuid { Time::HiRes::time * 100000 }
 
 
 my $couchdb = $ENV{COUCHDB} || 'http://localhost:5984';
+my $couchdb_view = 'http://10.60.0.92:5984/_utils/document.html?drzb2013v2/';
 my $client = Mojo::UserAgent->new;
 
 sub _couchdb_put {
@@ -75,6 +76,7 @@ get '/lang/:lang/:template' => sub {
 
 get '/lang/:lang/partials/:template' => sub {
        my $self = shift;
+       $self->stash( couchdb_view => $couchdb_view );
        $self->render( 'partials/' . $self->stash('template') , lang => $self->stash('lang') );
 };
 
index 7fbbb32..81476f4 100644 (file)
@@ -37,6 +37,9 @@ Search:
  {{registration.user.registration_type}}
  <tt>{{registration._id}}</tt>
  {{registration._id | registration_timestamp}}
+% if ( $lang =~ m/-dev/ ) {
+ <a href="<%= $couchdb_view %>{{registration._id}}" target="couchdb">couchdb</a>
+% }
 
        <p>
         {{registration.user.firstname}}