use Moose;
use namespace::autoclean;
use FrBr::Common;
+use URI;
+use File::Basename;
BEGIN {extends 'Catalyst::Controller'; }
my ( $self, $c ) = @_;
my $K = ( caller(0) )[3] . "(): ";
+ $c->log->debug( $K . "aufgerufen." );
+
$c->stash->{'menu_path'} = [] unless $c->stash->{'menu_path'};
push @{ $c->stash->{'menu_path'} }, {
'path' => $c->web_path("/impressum"),
$imp->{'mobile'} = $c->config->{'impressum'}{'mobile'};
$imp->{'email'} = $c->config->{'impressum'}{'email'} || 'frank@brehm-online.com';
+ my $url = '$URL$';
+ $url =~ s/^\$url:\s*//i;
+ $url =~ s/\s*\$\s*$//;
+ my $uri_cur_module = URI->new($url);
+ my $module_path = $uri_cur_module->path();
+ my $module_dir = dirname($module_path);
+ my $base_path = $module_dir;
+ $base_path =~ s|/lib/FrBr/Books/Controller$||;
+ $uri_cur_module->path($base_path);
+ $imp->{'repo_uri'} = $uri_cur_module->as_string();
+
$imp->{'foto'} = {};
$imp->{'foto'}{'src'} = $c->config->{'impressum'}{'foto'}{'src'} || 'pic/FrankBrehm.jpg';
$imp->{'foto'}{'width'} = $c->config->{'impressum'}{'foto'}{'width'} || 112;
$imp->{'foto'}{'height'} = $c->config->{'impressum'}{'foto'}{'height'} || 120;
$c->stash->{'impressum'} = $imp;
-
+ $c->log->debug( get_output_string( $K, "Impressums-Infos: ", $imp ) );
$c->stash->{'template'} = 'impressum.tt2';
sub default : Private {
my ( $self, $c ) = @_;
+ my $K = ( caller(0) )[3] . "(): ";
+
+ $c->log->debug( $K . "aufgerufen." );
#$c->stash->{'site_title'} = sprintf( $c->localize( "%s's Cookbook" ) , 'Frank Brehm' );
$c->stash->{'site_title'} = "Willkommen in Franks Büchersammlung";
sub end : ActionClass('RenderView') {
my ( $self, $c ) = @_;
- my $K = __PACKAGE__ . "::end(): ";
+ my $K = ( caller(0) )[3] . "(): ";
+
+ $c->log->debug( $K . "aufgerufen." );
#pop @{ $c->stash->{'menu_path'} };
my $i = 0;
my ( $self, $c ) = @_;
my $K = ( caller(0) )[3] . "(): ";
+ $c->log->debug( $K . "aufgerufen." );
+
my $self_url = $c->request->base . $c->request->path;
$self_url =~ s#^https?://[^/]+/#/#;
$c->stash->{'self_url'} = $self_url;
my ( $self, $c ) = @_;
my $K = ( caller(0) )[3] . "(): ";
+ $c->log->debug( $K . "aufgerufen." );
+
$c->stash->{'template'} = 'not_allowed.tt2';
}
<dd><a href="http://www.mysql.com">MySQL</a></dd>
</dl>
</p>
+<p>Software-Repository: <i><a href="[% impressum.repo_uri %]">[% impressum.repo_uri %]</a></i></p>
<p>Die Anwendung entspricht den Standards <i>HTML 4.01 Transitional</i> und <i>CSS 2.1</i>.</p>
<p><a href="http://validator.w3.org/check?uri=referer"><img
style="border: 0;" src="http://www.w3.org/Icons/valid-html401-blue"