--- /dev/null
+package FrBr::Books::Controller::Verlag;
+
+# $Id$
+# $URL$
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+use FrBr::Common;
+use FrBr::Books::Util::Verlag;
+
+=head1 NAME
+
+FrBr::Books::Controller::Verlag - Catalyst Controller fuer alles rund um verlage
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+#-------------------------------------------------------
+
+=head2 auto
+
+=cut
+
+sub auto : Private {
+
+ my ( $self, $c ) = @_;
+ my $K = __PACKAGE__ . "::auto(): ";
+
+ $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("/verlag"),
+ 'name' => "Verlag"
+ };
+
+ $c->stash->{'cssfiles'} = [] unless $c->stash->{'cssfiles'};
+ push @{$c->stash->{'cssfiles'}}, 'verlag/styles.css';
+
+ 1;
+
+} ## end sub auto :
+
+#-------------------------------------------------------
+
+=head2 index
+
+=cut
+
+sub index : Private {
+ my ( $self, $c ) = @_;
+
+ $c->stash->{'template'} = 'verlag/index.tt2';
+}
+
+#-------------------------------------------------------
+
+=head2 default
+
+=cut
+
+sub default : Private {
+
+ my ( $self, $c ) = @_;
+ my $K = __PACKAGE__ . "::default(): ";
+
+ $c->stash->{'template'} = 'not_implemented.tt2';
+
+ push @{ $c->stash->{'menu_path'} }, {
+ 'path' => $c->web_path("/verlag/default"),
+ 'name' => "Nicht Implementiert"
+ };
+
+} ## end sub default :
+
+
+#-------------------------------------------------------
+
+=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;
window.location.href = target;
}
+function goto_new_verlag() {
+ var target = '[% Catalyst.web_path( '/verlag/new', { 'return_target_form' => self_url } ) %]';
+ window.location.href = target;
+}
+
//]]></script>
<form method="post" name="book_form" action="[% self_url %]">
<td><select name="verlags_id" size="1">
<option value="">-- Verlag auswählen --</option>[% FOR verlagsid IN verlags_ids %]
<option value="[% verlagsid %]"[% IF book_edit.verlags_id == verlagsid %] selected[% END %]>[% verlagsliste.$verlagsid %]</option>[% END %]
- </select> <input type="button" name="neuer_verlag" value="*" class="shift_button" title="Neuer Verlag" /></td>
+ </select> <input type="button" name="neuer_verlag" value="*" class="shift_button" title="Neuer Verlag" onclick="goto_new_verlag();" /></td>
</tr><tr>
<th>Kategorie(n):</th>
<td>
<select name="waehrungs_id" size="1">
<option value="">-- Währung auswählen --</option>[% FOR waehrungsid IN waehrungs_ids %]
<option value="[% waehrungsid %]"[% IF book_edit.waehrungs_id == waehrungsid %] selected[% END %]>[% waehrungsliste.$waehrungsid.kuerzel %]</option>[% END %]
- </select></td>
+ </select> <input type="button" name="neue_waehrung" value="*" class="shift_button" title="Neue Währung" /></td>
</tr><tr>
<td colspan="2"> </td>
</tr><tr>
--- /dev/null
+[%#
+
+ index.tt2 - Index-Template (Menue) fuer Verlags-Dinge
+
+ #$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('/verlag/list') %]">Liste der Verlage</a></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="empty">
+ </td>
+ </tr>
+ <tr>
+ <td class="button">
+ </td>
+ <td class="item">
+ <a href="[% path('/verlag/new') %]">Neuer Verlag</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 fuer Stylesheets Verlage
+ #
+ # $Id$
+ # $URL$
+ #
+-%]
+Stylesheets Verlage */
+
+
--- /dev/null
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'FrBr::Books' }
+BEGIN { use_ok 'FrBr::Books::Controller::Verlag' }
+
+ok( request('/verlag')->is_success, 'Request should succeed' );
+
+