pwd
-CATALYST_DEBUG=1 DBIC_TRACE=1 script/frbr_books_server.pl
+CATALYST_DEBUG=3 DBIC_TRACE=1 script/frbr_books_server.pl
$self->verlag_session2stash($c);
$c->stash->{'verlag_edit'}{'name'} = "Neuer Verlag" unless $c->stash->{'verlag_edit'}{'name'};
- $c->stash->{'return_target_verlag_save'} = $c->session->{'return_target_verlag_save'} || $c->web_path('/verlag');
-
return 1 unless $c->request->params->{'verlag_form_sent'} and $c->request->params->{'do_save'};
return $self->do_save_verlag($c);
my ( $self, $c ) = @_;
my $K = __PACKAGE__ . "::verlag_cgi2session(): ";
- return 1 unless $c->request->params->{'verlag_form_sent'};
-
$c->session->{'return_target_verlag_save'} = $c->request->params->{'return_target_form'} if $c->request->params->{'return_target_form'};
+ return 1 unless $c->request->params->{'verlag_form_sent'};
+
# Basis anlegen, wenn notwendig
$c->session->{'verlag_data_edit'} = {} unless $c->session->{'verlag_data_edit'};
my ( $self, $c ) = @_;
my $K = __PACKAGE__ . "::verlag_session2stash(): ";
+ $c->log->debug( get_output_string( $K . "Verlag in der Session:", $c->session->{'verlag_data_edit'} ) ) if $c->stash->{'debug_level'} > 2;
+ $c->log->debug( $K . "Rücksprungadresse in der Session: '" . $c->session->{'return_target_verlag_save'} . "'" ) if $c->stash->{'debug_level'} > 2;
+
$c->stash->{'verlag_edit'} = {} unless $c->stash->{'verlag_edit'};
$c->stash->{'verlag_edit'}{'id'} = $c->session->{'verlag_data_edit'}{'id'} if $c->session->{'verlag_data_edit'}{'id'};
$c->stash->{'verlag_edit'}{'name'} = $c->session->{'verlag_data_edit'}{'name'} if $c->session->{'verlag_data_edit'}{'name'};
$c->stash->{'verlag_edit'}{'name_long'} = $c->session->{'verlag_data_edit'}{'name_long'} if $c->session->{'verlag_data_edit'}{'desc'};
+ $c->stash->{'return_target_verlag_save'} = $c->session->{'return_target_verlag_save'} || $c->web_path('/verlag');
+
return 1;
}
--- /dev/null
+[%#
+
+ Template für Kategorieangaben
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+-%]
+
+<!-- Kategorie-Formular -->
+
+<form method="post" name="category_form" action="[% self_url %]">
+<input type="hidden" name="category_form_sent" value="sent" />
+[%- IF category_edit.id %]<input type="hidden" name="category_id" value="[% category_edit.id | html %]" />[% END %]
+ <table class="ftable" cellspacing="0">
+ <tr>
+ <th colspan="2" class="title">[% category_form_title %]</th>
+ </tr><tr>
+ <td colspan="2"> </td>
+ </tr><tr>
+ <th>Kategorie:</th>
+ <td><input type="text" name="category_name" size="50" maxlength="100" value="[% category_edit.name | html %]" /></td>
+ </tr><tr>
+ <td colspan="2"> </td>
+ </tr><tr>
+ <th colspan="2" class="button"><input type="submit" name="do_save" value=" OK " /></th>
+ </tr>
+ </table>
+</form>
+[%- IF error_message %]
+<div class="error">
+<span class="bold">Fehler:</span> [% error_message %]
+</div>
+[% END -%]
--- /dev/null
+[%#
+ # Template fuer Stylesheets Kategorieformulare
+ #
+ # $Id$
+ # $URL$
+ #
+-%]
+/* Stylesheets Kategorie-Formulare */
+
+
--- /dev/null
+[%#
+
+ index.tt2 - Index-Template (Menue) fuer Kategorien
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+-%]
+<div style="text-align: center">
+<table class="menu" cellspacing="0">
+ <tr>
+ <th colspan="2">Menü</th>
+ </tr>
+ <tr>
+ <td colspan="2" class="empty">
+ </td>
+ </tr>
+ <tr>
+ <td class="button">
+ </td>
+ <td class="item">
+ <a href="[% path('/category/list') %]">Liste der Kategorien</a></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="empty">
+ </td>
+ </tr>
+ <tr>
+ <td class="button">
+ </td>
+ <td class="item">
+ <a href="[% path('/category/new') %]">Neue Kategorie</a></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="empty">
+ </td>
+ </tr>
+ <tr>
+ <td class="button">
+ </td>
+ <td class="item">
+ <a href="[% path('/') %]">Zurück zum Hauptmenü</a></td>
+ </tr>
+</table>
+</div>
--- /dev/null
+[%#
+
+ Template für neue Kategorie
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+-%]
+[%- book_form_title = 'Neue Kategorie' -%]
+[% PROCESS category/cat_form.tt2 %]
+
+<div class="back">
+<h2><a href="[% return_target_category_save ) %]">[% 'Zurück' %]</a></h2>
+</div>
--- /dev/null
+[%#
+
+ save_success.tt2 - Template fuer erfolgreiches Speichern der Kategorie
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+-%]
+<div style="text-align: center">
+
+Die Kategorie <b>"[% category_edit.name %]</b> wurde erfolgreich gespeichert.
+
+<h2><a href="[% return_target_category_save %]">OK</a></h2>
+
+</div>
--- /dev/null
+/* [%#
+ # Template fuer Stylesheets Kategorien
+ #
+ # $Id$
+ # $URL$
+ #
+-%]
+ Stylesheets Kategorien */
+
+
[% PROCESS verlag/verlag_form.tt2 %]
<div class="back">
-<h2><a href="[% path('/books') %]">[% 'Zurück' %]</a></h2>
+<h2><a href="[% return_target_verlag_save %]">[% 'Zurück' %]</a></h2>
</div>