`name` varchar(100) NOT NULL,
`descr` text NOT NULL,
`statisch` enum('n','y') NOT NULL DEFAULT 'n' COMMENT 'Ort darf nicht gelöscht oder verändert werden',
+ `emphased` enum('n','y') NOT NULL DEFAULT 'n' COMMENT 'Soll der Aufbewahrungsort hervorgehoben werden?',
`created_at` datetime NOT NULL COMMENT 'Wann erstellt',
`created_by` int(10) unsigned NOT NULL COMMENT 'Von welcher User-Id erstellt',
`changed_at` datetime NOT NULL COMMENT 'Wann geändert',
-- Dumping data for table `orte`
--
+INSERT INTO `orte` (`id`, `name`, `descr`, `statisch`, `emphased`, `created_at`, `created_by`, `changed_at`, `changed_by`) VALUES
+(1, 'Ausgeliehen', 'Irgendwohin hausgeliehen', 'y', 'y', NOW(), 1, NOW(), 1)
--
-- Table structure for table `serien`
}
$c->stash->{'ort_edit'}{'statisch'} = to_bool( $c->stash->{'ort_edit'}{'statisch'} ) ? 'y' : 'n';
+ $c->stash->{'ort_edit'}{'emphased'} = to_bool( $c->stash->{'ort_edit'}{'emphased'} ) ? 'y' : 'n';
return 1;
# ist es statischer (nicht änderbarer) Aufbewahrungsort ?
$c->session->{'ort_data_edit'}{'statisch'} = to_bool( $c->request->params->{'ort_statisch'} ) ? 'y' : 'n';
+ # ist es hervorgehobener Aufbewahrungsort ?
+ $c->session->{'ort_data_edit'}{'emphased'} = to_bool( $c->request->params->{'ort_emphased'} ) ? 'y' : 'n';
+
return 1;
}
$c->stash->{'ort_edit'}{'name'} = $c->session->{'ort_data_edit'}{'name'} if $c->session->{'ort_data_edit'}{'name'};
$c->stash->{'ort_edit'}{'descr'} = $c->session->{'ort_data_edit'}{'descr'};
$c->stash->{'ort_edit'}{'statisch'} = $c->session->{'ort_data_edit'}{'statisch'};
+ $c->stash->{'ort_edit'}{'emphased'} = $c->session->{'ort_data_edit'}{'emphased'};
$c->stash->{'return_target_ort_save'} = $c->session->{'return_target_ort_save'} || $c->web_path('/ort');
"name" => { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 100, },
"descr" => { data_type => "TEXT", default_value => undef, is_nullable => 0, size => 65535, },
"statisch" => { data_type => "ENUM", default_value => "n", is_nullable => 0, size => 1 },
+ "emphased" => { data_type => "ENUM", default_value => "n", is_nullable => 0, size => 1 },
"created_at" => { data_type => "DATETIME", default_value => undef, is_nullable => 0, size => 19, },
"created_by" => { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
"changed_at" => { data_type => "DATETIME", default_value => undef, is_nullable => 0, size => 19, },
'kurzinhalt' => 'Bla bla bla, tolles Buch',
'notes' => 'naja, geht so',
'ort_beschreibung' => undef,
- 'ort_ist_statisch' => undef,
+ 'ort_ist_statisch' => 'n',
+ 'ort_emphased' => 'n',
'orts_id' => undef,
'ortsname' => undef,
'preis' => '7.45',
'ort.name',
'ort.descr',
'ort.statisch',
+ 'ort.emphased',
'me.created_by',
'created_by.vorname',
'created_by.nachname',
'ortsname',
'ort_beschreibung',
'ort_ist_statisch',
+ 'ort_emphased',
'created_by',
'created_by_vorname',
'created_by_nachname',
$buch->{'ortsname'} = $book->get_column('ortsname');
$buch->{'ort_beschreibung'} = $book->get_column('ort_beschreibung');
$buch->{'ort_ist_statisch'} = $book->get_column('ort_ist_statisch');
+ $buch->{'ort_emphased'} = $book->get_column('ort_emphased');
$buch->{'id_created_by'} = $book->get_column('created_by');
$buch->{'created_at'} = $book->get_column('created_at');
'name' => 'Ausgeliehen',
'descr' => '',
'statisch' => 'y',
+ 'emphased' => 'y',
'count_books' => 16,
'created_at' => '2010-02-22 12:13:14',
'id_created_by' => 1,
'me.name',
'me.descr',
'me.statisch',
+ 'me.emphased',
'me.created_by',
'created_by.vorname',
'created_by.nachname',
'name',
'descr',
'statisch',
+ 'emphased',
'created_by',
'created_by_vorname',
'created_by_nachname',
$ort->{'name'} = $ort_rs->name();
$ort->{'descr'} = $ort_rs->descr();
$ort->{'statisch'} = $ort_rs->statisch();
+ $ort->{'emphased'} = $ort_rs->emphased();
$ort->{'count_books'} = $ort_rs->get_column('count_books');
$ort->{'id_created_by'} = $ort_rs->get_column('created_by');
$row->{'descr'} = defined $tmp ? $tmp : undef;
$row->{'statisch'} = to_bool( $ort->{'statisch'} ) ? 'y' : 'n';
+ $row->{'emphased'} = to_bool( $ort->{'emphased'} ) ? 'y' : 'n';
my $user_id = $c->stash->{'current_user_id'} || 1;
$row->{'changed_at'} = \'NOW()';
line = site.rgb.dunkelgraugelb
message = site.rgb.green
error = site.rgb.red
+ emphased = site.rgb.rotbraun
warn = site.rgb.darkgreen
alink = site.rgb.darkblue
statusbarbg = site.rgb.mittelmgenta
font-style: italic;
}
+SPAN.emphased {
+ font-weight: bold;
+ color: [% site.col.emphased %];
+}
+
DIV.error {
white-space: pre;
}
<td class="[% rowstyle %]">[% book.title %][% IF book.untertitel %]<br /><span class="book_subtitle">[% book.untertitel %]</span>[% END %][% IF book.title_original %]<br /><span class="book_orgtitle">("[% book.title_original %]")</span>[% END %]</td>
<td class="[% rowstyle %]">[% tt_cat = [ ]; tt_cat.push(cat) FOREACH cat = book.kategorien %][% tt_cat.join(',<br />') %]</td>
<td class="[% rowstyle %]">[% book.verlagsname_short %]</td>
- <td class="[% rowstyle %]">[% IF book.orts_id %][% book.ortsname %][% ELSE %]unbekannt[% END %]</td>
+ <td class="[% rowstyle %]">[% IF book.orts_id %][% IF book.ort_emphased == 'y' %]<span class="emphased">[% END %][% book.ortsname %][% IF book.ort_emphased == 'y' %]</span>[% END %][% ELSE %]unbekannt[% END %]</td>
<td class="[% rowstyle %] button"><a href="[% path('/books/view') %]?view_book_id=[% book.id %]">Ansehen</a></td>
[% IF Catalyst.user_exists %]<td class="[% rowstyle %] button"><a href="[% path('/books/edit') %]?edit_book_id=[% book.id %]">Ändern</a></td>
<td class="[% rowstyle %] button"><a href="[% path('/books/delete') %]?delete_book_id=[% book.id %]">Löschen</a></td>[% END %]
'name_created_by' => 'Frank Brehm',
'notes' => 'tolles Buch, wie gesagt',
'ort_beschreibung' => undef,
- 'ort_ist_statisch' => undef,
+ 'ort_ist_statisch' => 'n',
+ 'ort_emphased' => 'n',
'orts_id' => undef,
'ortsname' => undef,
'preis' => '7.45',
<td>[% book.verlagsname_long | html %]</td>
</tr><tr>
<th>Aufbewahrungsort:</th>
- <td>[% book.ortsname | html %]</td>
+ <td>[% IF book.ort_emphased == 'y' %]<span class="emphased">[% END %][% book.ortsname | html %][% IF book.ort_emphased == 'y' %]</span>[% END %]</td>
</tr><tr>
<th>Bindungsart:</th>
<td>[% book.bindungsart | html %]</td>
<td><input type="text" name="orts_name" size="50" maxlength="100" value="[% ort_edit.name | html %]" /></td>
</tr><tr>
<td colspan="2"> </td>
+ </tr><tr>
+ <th>Hervorgehobene Darstellung:</th>
+ <td><input type="radio" name="ort_emphased" id="ort_em_off" value="0"[%- IF ort_edit.emphased != 'y' %] checked[% END %]><label for="ort_em_off">Nein</label>
+ <input type="radio" name="ort_emphased" id="ort_em_on" value="1"[%- IF ort_edit.emphased == 'y' %] checked[% END %]><label for="ort_em_on">Ja</label>
+ </tr><tr>
+ <td colspan="2"> </td>
</tr><tr>
<th>Beschreibung:</th>
<td><textarea name="orts_descr" cols="50" rows="10">[% ort_edit.descr | html %]</textarea></td>
</tr>[% PROCESS navrow %]
[% rowstyle = 'even' %][%- FOREACH ort IN orte -%]
<tr>
- <td class="[% rowstyle %]">[% ort.name %]</td>
+ <td class="[% rowstyle %]">[% IF ort.emphased == 'y' %]<span class="emphased">[% END %][% ort.name %][% IF ort.emphased == 'y' %]</span>[% END %]</td>
<td class="[% rowstyle %]">[% ort.descr %]</td>
<td class="[% rowstyle %]" style="text-align: right;">[% ort.count_books %]</td>
<td class="button [% rowstyle %]"><a href="[% path('/ort/view') %]?view_orts_id=[% ort.id %]">Ansehen</a></td>
'id' => '1',
'name' => 'Ausgeliehen',
'statisch' => 'y',
+ 'emphased' => 'y',
'changed_at' => '2010-02-25 21:45:18',
'created_at' => '2010-02-25 21:45:18',
'id_changed_by' => '1',
</tr><tr>
<th>Aufbewahrungsort:</th>
<td>[%- ort.name | html -%]</td>
+ </tr><tr>
+ <th>Hervorgehobene Darstellung:</th>
+ <td>[% IF ort.emphased == 'y' %]Ja[% ELSE %]Nein[% END %]</td>
</tr><tr>
<th>Beschreibung:</th>
<td>[%- ort.descr | html %]</td>