$c->stash->{'autor_edit'}{'nachname'} = $c->session->{'autor_data_edit'}{'nachname'} if $c->session->{'autor_data_edit'}{'nachname'};
$c->stash->{'autor_edit'}{'name_suffix'} = $c->session->{'autor_data_edit'}{'name_suffix'} if exists $c->session->{'autor_data_edit'}{'name_suffix'};
$c->stash->{'autor_edit'}{'descr'} = $c->session->{'autor_data_edit'}{'descr'} if exists $c->session->{'autor_data_edit'}{'descr'};
+ $c->stash->{'autor_edit'}{'about'} = $c->session->{'autor_data_edit'}{'about'} if exists $c->session->{'autor_data_edit'}{'about'};
$c->stash->{'return_target_autor_save'} = $c->session->{'return_target_autor_save'} || $c->web_path('/autor');
# Genauere Beschreibung des Autors
$c->session->{'autor_data_edit'}{'descr'} = $c->request->params->{'autor_desc'} if defined $c->request->params->{'autor_desc'};
+ # Lebenslauf des Autors und ähnliches
+ $c->session->{'autor_data_edit'}{'about'} = $c->request->params->{'autor_about'} if defined $c->request->params->{'autor_about'};
+
return 1;
}
"nachname" => { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 150, },
"name_suffix" => { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 100, },
"autor_descr" => { data_type => "TEXT", default_value => undef, is_nullable => 0, size => 65535, },
+ "about" => { data_type => "TEXT", default_value => undef, is_nullable => 0, size => 65535, },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->add_unique_constraint( "name", [ "nachname", "vorname", "mittelname", "name_suffix" ] );
'nachname' => 'Tolkien',
'name_suffix' => undef,
'descr' => 'Bla Blub',
+ 'about' => 'Der Autor wurde ...',
'books' => [
{
'id' => 22,
'nachname',
'name_suffix',
'autor_descr',
+ 'about',
];
$other_params->{'as'} = [
'id',
'nachname',
'name_suffix',
'autor_descr',
+ 'about',
];
if ( $page ) {
$autor->{'nachname'} = $autor_rs->nachname();
$autor->{'name_suffix'} = $autor_rs->name_suffix();
$autor->{'descr'} = $autor_rs->autor_descr();
+ $autor->{'about'} = $autor_rs->about();
$autor->{'books'} = [];
my @N;
push @N, $autor->{'titel'} if $autor->{'titel'};
$tmp =~ s/\s+$//;
$row->{'autor_descr'} = $tmp;
+ $tmp = $autor->{'about'};
+ $tmp = '' unless defined $tmp;
+ $tmp =~ s/^\s+//;
+ $tmp =~ s/\s+$//;
+ $row->{'about'} = $tmp eq '' ? undef : $tmp;
+
my $saved_aid = get_autor_id( $c, $search_params );
# Zuerst einmal Test im nichgelocktem Zustand ...
-[%#
+<!-- [%#
Template fuer Autorenangaben
vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
-%]
-<!-- Autoren-Formular -->
+Autoren-Formular -->
<form method="post" name="autor_form" action="[% self_url %]">
<input type="hidden" name="autor_form_sent" value="sent" />
<td><input type="text" name="autor_name_suffix" size="50" maxlength="100" value="[% autor_edit.name_suffix | html %]" /></td>
</tr><tr>
<th>Zusätzliche Angaben:</th>
- <td><textarea name="autor_desc" cols="50" rows="5">[% autor_edit.descr | html %]</textarea></td>
+ <td><textarea name="autor_desc" cols="80" rows="3">[% autor_edit.descr | html %]</textarea></td>
+ </tr><tr>
+ <th>Über den Autor:</th>
+ <td><textarea name="autor_about" cols="80" rows="10">[% autor_edit.about | html %]</textarea></td>
</tr><tr>
<td colspan="2"> </td>
</tr><tr>
--- /dev/null
+<!-- [%#
+
+ Template zum Löschen eines Autors
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+ Übergebene Struktur in [autor]:
+
+ $autor = {
+ 'id' => 1,
+ 'name' => 'J.R.R. Tolkien',
+ 'titel' => undef,
+ 'vorname' => 'J.R.R.',
+ 'mittelname' => undef,
+ 'nachname' => 'Tolkien',
+ 'name_suffix' => undef,
+ 'descr' => 'Bla Blub',
+ 'books' => [],
+ };
+-%]
+
+Autor löschen -->
+
+<form method="post" name="autor_form" action="[% self_url %]">
+<input type="hidden" name="really_delete_author" value="yes" />
+<input type="hidden" name="delete_autor_id" value="[% autor.id | html %]" />
+
+<table class="ftable" cellspacing="0">
+ <tr>
+ <th colspan="2" class="title">Möchten Sie den Autor '[% autor.name | html %]' wirklich löschen?</th>
+ </tr><tr>
+ <td colspan="2" class="empty"></td>
+ </tr><tr>
+ <th>Titel des Autors :</th>
+ <td>[% autor.title | html %]</td>
+ </tr><tr>
+ <th>Vorname:</th>
+ <td>[% autor.vorname | html %]</td>
+ </tr><tr>
+ <th>Zweiter Vorname (oder Vatersname o.ä.):</th>
+ <td>[% autor.mittelname | html %]</td>
+ </tr><tr>
+ <th>Nachname:</th>
+ <td>[% autor.nachname | html %]</td>
+ </tr><tr>
+ <th>Namenssuffix (Jr. o.ä.):</th>
+ <td>[% autor.name_suffix | html %]</td>
+ </tr><tr>
+ <th>Zusätzliche Angaben:</th>
+ <td>[% autor.descr | html %]</td>
+ </tr><tr>
+ <td colspan="2" class="empty"></td>
+ </tr><tr>
+ <th colspan="2" class="button"><input type="submit" name="do_delete" value=" Löschen " /></th>
+</table>
+
+[%- IF error_message %]
+<div class="error">
+<span class="bold">Fehler:</span> [% error_message %]
+</div>
+[% END -%]
+
+<div class="back">
+<h2><a href="[% return_target %]">[% 'Zurück' %]</a></h2>
+</div>
+
--- /dev/null
+<!-- [%#
+
+ Template zum Melden des erfolgreichen Löschen eines Autors
+
+ vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+ $Id$
+ $URL$
+
+ Übergebene Struktur in [autor]:
+
+ $autor = {
+ 'id' => 1,
+ 'name' => 'J.R.R. Tolkien',
+ 'titel' => undef,
+ 'vorname' => 'J.R.R.',
+ 'mittelname' => undef,
+ 'nachname' => 'Tolkien',
+ 'name_suffix' => undef,
+ 'descr' => 'Bla Blub',
+ 'books' => [],
+ };
+-%]
+
+Autor wurde gelöscht -->
+
+<div style="text-align: center">
+
+Der Autor <b>"[% autor.name | html %]"</b> wurde erfolgreich gelöscht.
+
+</div>
+
+<div class="back">
+<h2><a href="[% return_target %]">[% 'OK' %]</a></h2>
+</div>
+
};
-%]
+[% USE ForumCode %]
[%- BLOCK book_entry -%]
<a href="[% Catalyst.web_path( '/books/view', { 'return_target_form' => self_url, view_book_id => b.id, } ) %]">[% b.title | html %]</a>[% IF b.untertitel %]<br />
<i>([% b.untertitel | html %])</i>[% END %]
</tr><tr>
<th>Zusätzliche Angaben:</th>
<td>[% autor.descr | html %]</td>
+ </tr><tr>
+ <th>Über den Autor:</th>
+ <td>[% ForumCode.forumcode( autor.about ) %]</td>
</tr><tr>
<th>Bücher:</th>
<td>[% IF autor.books.size > 0 %][% IF autor.books.size > 1 %]<ul>[% FOR buch IN autor.books %]<li>[% PROCESS book_entry b=buch %]</li>