From b747638bc6bb4b26aa45fb22a6e865fe7d06d1ec Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 10 Jan 2013 18:29:34 +0100 Subject: [PATCH] return couchdb link in -dev mode --- angular-server.pl | 2 ++ app/partials/list.html.ep | 3 +++ 2 files changed, 5 insertions(+) diff --git a/angular-server.pl b/angular-server.pl index 4dad17b..d76b11e 100755 --- a/angular-server.pl +++ b/angular-server.pl @@ -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') ); }; diff --git a/app/partials/list.html.ep b/app/partials/list.html.ep index 7fbbb32..81476f4 100644 --- a/app/partials/list.html.ep +++ b/app/partials/list.html.ep @@ -37,6 +37,9 @@ Search: {{registration.user.registration_type}} {{registration._id}} {{registration._id | registration_timestamp}} +% if ( $lang =~ m/-dev/ ) { + couchdb +% }

{{registration.user.firstname}} -- 2.20.1