$c->log->debug( $K . "Aktuelle Script-URL: '" . $c->stash->{'self_url'} . "'." ) if $c->stash->{'debug_level'} >= 2;
# Listenlaenge festlegen
- $c->stash->{'list_length'} = $c->session->{'list_length'} || $c->config->{'default_list_length'} || 10;
+ $c->stash->{'list_length'} = $c->session->{'list_length'} || $c->config->{'default_list_length'} || 20;
1;
}
$c->stash->{'return_target_action'} = $c->session->{'return_target_new'};
- return $self->do_save_book($c);
+ my $res = $self->do_save_book($c);
+ delete $c->session->{'book_list_page'} if $res and exists $c->session->{'book_list_page'};
+ return $res;
}
$c->stash->{'template'} = 'books/delete_success.tt2';
delete $c->session->{'delete_book_id'} if exists $c->session->{'delete_book_id'};
delete $c->session->{'book_data_edit'} if exists $c->session->{'book_data_edit'};
+ delete $c->session->{'book_list_page'} if exists $c->session->{'book_list_page'};
}
}
# Ueberfluessige Sitzungsdaten weg ...
my @Keys = qw(
+ autor_data_edit
+ book_data_edit
+ book_list_page
+ category_data_edit
+ delete_book_id
+ from_book_list
list_length
+ ort_data_edit
+ return_target_autor_save
+ return_target_category_save
+ return_target_ort_save
+ return_target_serie_save
+ return_target_verlag_save
+ return_target_del
+ return_target_edit
+ return_target_new
+ return_target_view
+ serie_data_edit
+ verlag_data_edit
);
for my $key (@Keys) {
delete $c->session->{$key} if $c->session->{$key};
my ( $self, $c ) = @_;
my $K = __PACKAGE__ . "::end(): ";
- pop @{ $c->stash->{'menu_path'} };
+ #pop @{ $c->stash->{'menu_path'} };
+ my $i = 0;
+ my $last = scalar( @{ $c->stash->{'menu_path'} } ) - 1;
+ for my $m ( @{ $c->stash->{'menu_path'} } ) {
+ unless ( exists $m->{'show'} ) {
+ $m->{'show'} = ( $i == $last ) ? 0 : 1;
+ }
+ $i++;
+ }
$c->log->debug( get_output_string( $K, "Menue-Pfad: ", $c->stash->{'menu_path'} ) ) if $c->stash->{'debug_level'};
}
--- /dev/null
+package FrBr::Books::Controller::SessionOpts;
+
+# $Id$
+# $URL$
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use FrBr::Common;
+
+=head1 NAME
+
+FrBr::Books::Controller::SessionOpts - Catalyst Controller fuer Sitzungseinstellungen
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+#-------------------------------------------------------
+
+=head2 auto
+
+=cut
+
+sub auto : Private {
+
+ my ( $self, $c ) = @_;
+ my $K = ( caller(0) )[3] . "(): ";
+
+ $c->log->debug( $K . "aufgerufen." ) if $c->stash->{'debug_level'} > 2;
+
+ $c->stash->{'menu_path'} = [] unless $c->stash->{'menu_path'};
+ push @{ $c->stash->{'menu_path'} }, {
+ 'path' => $c->web_path("/sessionopts"),
+ 'name' => "Sitzungseinstellungen"
+ };
+
+ $c->stash->{'cssfiles'} = [] unless $c->stash->{'cssfiles'};
+ push @{$c->stash->{'cssfiles'}}, 'sessionopts/styles.css';
+
+ 1;
+
+} ## end sub auto :
+
+#-------------------------------------------------------
+
+=head2 index
+
+=cut
+
+sub index : Private {
+
+ my ( $self, $c ) = @_;
+
+ $c->stash->{'site_title'} = "Sitzungseinstellungen";
+
+ return 1 unless $c->request->params->{'submit'};
+
+ # Listenlaenge festlegen
+ my $length = $c->request->params->{'list_length'};
+ if ( $length and to_int( $length ) ) {
+ $length = to_int( $length );
+ $length = 5 if $length < 5;
+ $length = 500 if $length > 500;
+ $c->session->{'list_length'} = $length;
+ $c->stash->{'list_length'} = $length;
+ }
+
+}
+
+#-------------------------------------------------------
+
+=head1 AUTHOR
+
+Frank Brehm
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
+
+__END__
+
+# vim: noai : ts=4 fenc=utf-8 filetype=perl expandtab :
[%- IF login_action == 'none' -%]
[%- ELSE -%]
- [% tt_menu = [ ]; tt_menu.push( "<a href=\"${item.path}\">${item.name}</a>" ) FOREACH item IN menu_path %][% tt_menu.join(' » ') %]
+ [%- tt_menu = [ ]; %][% FOR item IN menu_path -%]
+ [%- IF item.show -%][%- tt_menu.push( "<a href=\"${item.path}\">${item.name}</a>" ) -%]
+ [%- ELSE -%][%- tt_menu.push( item.name ) -%]
+ [%- END -%]
+ [%- END -%]
+ [% tt_menu.join(' » ') %]
[%- END -%]
</td>
<td style="text-align: right;">
margin-top: 20px;
margin-bottom: 20px;
border-spacing: 0;
+ border-collapse: separate;
padding: 2px;
}
TABLE.menu TD.empty {
margin: 0;
padding: 0;
- font-size: 6pt;
+ border-style: none;
+}
+
+TABLE.menu TD.empty_row {
+ margin: 0;
+ padding: 0;
+ border-style: none;
+ height: 12px;
}
TABLE.menu TD.button {
padding: 5px;
}
+TABLE.menu TD.empty_button {
+ background-color: [% site.col.head %];
+ border: 1px solid [% site.col.line %];
+ border-right-style: none;
+ margin: 0;
+ padding: 0;
+ width: 10px;
+}
+
+TABLE.menu TD.vertical_row {
+ background-color: [% site.col.head %];
+ border: 1px solid [% site.col.line %];
+ margin: 0;
+ padding: 0;
+ width: 5px;
+}
+
TABLE.menu TD.item {
background-color: [% site.col.statusbarbg %];
<th colspan="2">Menü</th>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/autor/list') %]">Liste der Buchautoren</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
[% IF Catalyst.user_exists %]<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/autor/new') %]">Neuer Autor</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>[% END %]
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
</tr>
[% IF rowstyle == 'even' %][% rowstyle = 'odd'%][% ELSE %][% rowstyle = 'even' %][% END %][% END -%]
</table></td></tr></table>
</div>
+<br />
<tr>
<th colspan="2">Menü</th>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/books/search') %]">Suchen ...</a></td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/books/list') %]">Bücherliste</a></td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
[% IF Catalyst.user_exists %]</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/books/new') %]">Neues Buch</a></td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>[% END %]
+ <td colspan="2" class="empty_row"></td>[% END %]
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
</tr>
[% IF rowstyle == 'even' %][% rowstyle = 'odd'%][% ELSE %][% rowstyle = 'even' %][% END %][% END -%]
[% PROCESS navrow %]</table></td></tr></table>
</div>
-
+<br />
padding-right: 1em;
}
+TABLE.buchliste TABLE.nav {
+ width: 100%;
+ margin: 0;
+ border-style: none;
+}
+
+TABLE.buchliste TABLE.nav TD {
+ margin: 0;
+ border-style: none;
+}
+
<th colspan="2">Menü</th>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/kategorie/list') %]">Liste der Kategorien</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
[% IF Catalyst.user_exists %]<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/kategorie/new') %]">Neue Kategorie</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>[% END %]
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
</tr>
-[%#
+<!-- [%#
message.tt2 - Universal-Template
$Id$
$URL$
--%]
+%]
+
+Hauptmenü
+
+-->
+
[%- META title = 'Willkommen in Franks Büchersammlung' -%]
+[%- rowspan_vline = 13 -%]
<div style="text-align: center">
-<table class="menu" cellspacing="0">
+<table class="menu" cellspacing="0" width="525">
<tr>
- <th colspan="2">Menü</th>
+ <th colspan="7">Menü</th>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="7" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <th colspan="2" width="250">Daten</th>
+ <td class="empty" width="10"></td>
+ <td class="vertical_row" rowspan="[% rowspan_vline %]"> </td>
+ <td class="empty" width="10"></td>
+ <th colspan="2" width="250">Einstellungen</th>
+ </tr><tr>
+ <td colspan="3" class="empty_row"></td>
+ <td colspan="3" class="empty_row"></td>
+ </tr><tr>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/books') %]">Bücher</a></td>
+ <td class="empty"></td>
+ <td class="empty"></td>
+ <td class="empty_button"></td>
+ <td class="item">
+ <a href="[% path('/sessionopts') %]">Sitzung</a></td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="3" class="empty_row"></td>
+ <td colspan="3" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/autor') %]">Autoren</a></td>
+ <td class="empty"></td>
+ <td colspan="3" class="empty"></td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="3" class="empty_row"></td>
+ <td colspan="3" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/verlag') %]">Verlage</a></td>
+ <td class="empty"></td>
+ <td colspan="3" class="empty"> </td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="3" class="empty_row"></td>
+ <td colspan="3" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/kategorie') %]">Kategorien</a></td>
+ <td class="empty"></td>
+ <td colspan="3" class="empty"> </td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="3" class="empty_row"></td>
+ <td colspan="3" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/serie') %]">Buchserien</a></td>
+ <td class="empty"></td>
+ <td colspan="3" class="empty"> </td>
</tr><tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="3" class="empty_row"></td>
+ <td colspan="3" class="empty_row"></td>
</tr><tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/ort') %]">Aufbewahrungsorte</a></td>
+ <td class="empty"></td>
+ <td colspan="3" class="empty"> </td>
</tr>
</table>
</div>
<th colspan="2">Menü</th>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/ort/list') %]">Liste der Aufbewahrungsorte</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
[% IF Catalyst.user_exists %]<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/ort/new') %]">Neuer Aufbewahrungsort</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>[% END %]
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
</tr>
<th colspan="2">Menü</th>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/serie/list') %]">Liste der Buchserien</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
[% IF Catalyst.user_exists %]<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/serie/new') %]">Neue Buchserie</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>[% END %]
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
</tr>
--- /dev/null
+<!-- [%#
+
+ Template zur Darstellung des Formulars für Sitzungseinstellungen
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+-%]
+
+Formulars für Sitzungseinstellungen -->
+
+[%- META title = 'Sitzungseinstellungen' -%]
+[%- entries = [ 5, 10, 20, 50, 100, 200, 500 ] -%]
+
+<div class="center">
+
+<form method="post" action="[% self_url %]">
+ <table class="sessionopts" cellspacing="0">
+ <tr>
+ <th colspan="2" class="title">Sitzungseinstellungen</th>
+ </tr><tr>
+ <td colspan="2" class="empty"></td>
+ </tr><tr>
+ <th>Maximale Listenlänge:</th>
+ <td><select name="list_length" size="1">
+ [% FOR e IN entries %]<option class="number" value="[% e %]"[% IF e == list_length %] selected[% END %]>[% e %]</option>[% END %]
+ </select></td>
+ </tr><tr>
+ <td colspan="2" class="empty"></td>
+ </tr><tr>
+ <th colspan="2" class="button"><input type="submit" name="submit" value="OK" /></th>
+ </tr>
+ </table>
+</form>
+[%- IF error_msg %]
+<div class="error">
+<span class="bold">Fehler:</span> [% error_msg %]
+</div>
+[% END %]
+<div class="back">
+<h2><a href="[% path('/') %]">Zurück</a></h2>
+</div>
+
+</div>
+
+<br />
--- /dev/null
+/* [%#
+ # Template fuer Stylesheets Login-Formular
+ #
+ # $Id$
+ # $URL$
+ #
+-%]
+
+Stylesheets Autoren */
+
+DIV.center {
+ margin: auto;
+ text-align: center;
+ width: auto;
+}
+
+TABLE.wrapper {
+ border-spacing: 0;
+ margin: auto;
+}
+
+TABLE.wrapper TH {
+ text-align: center;
+ font-size: 1.2em;
+}
+
+TABLE.wrapper TD {
+ text-align: left;
+}
+
+TABLE.wrapper TD.action {
+ font-weight: bolder;
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+
+TABLE.sessionopts {
+ border-width: 2px;
+ border-style: solid;
+ border-top-color: [% site.col.tab_rahmen_hell %];
+ border-left-color: [% site.col.tab_rahmen_hell %];
+ border-right-color: [% site.col.tab_rahmen_dkl %];
+ border-bottom-color: [% site.col.tab_rahmen_dkl %];
+ border-collapse: separate;
+ border-spacing: 0;
+ margin: auto;
+}
+
+TABLE.sessionopts TH {
+ vertical-align: top;
+ text-align: left;
+ font-size: 1em;
+ padding: 2px;
+ border-width: 1px;
+ border-style: solid;
+ border-top-color: [% site.col.tab_rahmen_dkl %];
+ border-left-color: [% site.col.tab_rahmen_dkl %];
+ border-right-color: [% site.col.tab_rahmen_hell %];
+ border-bottom-color: [% site.col.tab_rahmen_hell %];
+ background-color: [% site.col.list_head %];
+}
+
+TABLE.sessionopts TD {
+ vertical-align: top;
+ font-size: 1em;
+ padding: 2px;
+ border-width: 1px;
+ border-style: solid;
+ border-top-color: [% site.col.tab_rahmen_dkl %];
+ border-left-color: [% site.col.tab_rahmen_dkl %];
+ border-right-color: [% site.col.tab_rahmen_hell %];
+ border-bottom-color: [% site.col.tab_rahmen_hell %];
+ background-color: [% site.col.list_row_bold %];
+}
+
+TABLE.sessionopts OPTION.number {
+ text-align: right;
+}
+
+TABLE.sessionopts TD.empty {
+ height: 3px;
+}
+
+TABLE.sessionopts TH.button {
+ font-weight: bolder;
+ text-align: center;
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
+TABLE.sessionopts TH.button INPUT {
+ font-weight: bolder;
+ font-size: 1.2em;
+ padding-left: 2em;
+ padding-right: 2em;
+}
+
<th colspan="2">Menü</th>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/verlag/list') %]">Liste der Verlage</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>
[% IF Catalyst.user_exists %]<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/verlag/new') %]">Neuer Verlag</a></td>
</tr>
<tr>
- <td colspan="2" class="empty">
- </td>
+ <td colspan="2" class="empty_row"></td>
</tr>[% END %]
<tr>
- <td class="button">
- </td>
+ <td class="empty_button"></td>
<td class="item">
<a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
</tr>