From: Dobrica Pavlinusic Date: Thu, 10 Jan 2013 17:29:34 +0000 (+0100) Subject: return couchdb link in -dev mode X-Git-Tag: 0.4~8 X-Git-Url: http://git.rot13.org/?p=angular-drzb;a=commitdiff_plain;h=b747638bc6bb4b26aa45fb22a6e865fe7d06d1ec return couchdb link in -dev mode --- 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}}