10 |
|
|
11 |
sub display_columns { |
sub display_columns { |
12 |
my $self = shift; |
my $self = shift; |
13 |
return ( qw/name inv_id campaign material dimensions discovered_at description chronology location/ ); |
return ( qw/ |
14 |
|
unit_id |
15 |
|
name |
16 |
|
subcategory |
17 |
|
category |
18 |
|
site |
19 |
|
gps |
20 |
|
placement |
21 |
|
context |
22 |
|
discovery |
23 |
|
function |
24 |
|
reusage |
25 |
|
ownership |
26 |
|
presevation_place |
27 |
|
inventory_nr |
28 |
|
dimensions |
29 |
|
condition |
30 |
|
toplogy |
31 |
|
technique |
32 |
|
description |
33 |
|
contstruction |
34 |
|
iconography |
35 |
|
decoration |
36 |
|
motifs |
37 |
|
inscription |
38 |
|
language |
39 |
|
font |
40 |
|
author |
41 |
|
chronology |
42 |
|
chronostyle |
43 |
|
explored |
44 |
|
conservations |
45 |
|
restorations |
46 |
|
legal |
47 |
|
links |
48 |
|
sources |
49 |
|
bibliography |
50 |
|
copyright |
51 |
|
/ ); |
52 |
} |
} |
53 |
|
|
54 |
#private template search_region => sub {}; |
#private template search_region => sub {}; |
70 |
$editing = 0 unless $self->current_user->editing; |
$editing = 0 unless $self->current_user->editing; |
71 |
warn "## editing ",$editing ? 'ok' : 'DENIED'; |
warn "## editing ",$editing ? 'ok' : 'DENIED'; |
72 |
|
|
73 |
|
div { { class is 'unit' } |
74 |
|
|
75 |
if ( $editing ) { |
if ( $editing ) { |
76 |
form { |
form { |
77 |
outs_raw($delete->button( |
outs_raw($delete->button( |
78 |
label => _('Delete'), |
label => _('Delete unit'), |
79 |
class => 'float-crud-button', |
class => 'float-crud-button button-delete', |
80 |
onclick => { |
onclick => { |
81 |
submit => $delete, |
submit => $delete, |
82 |
confirm => _('Really delete?'), |
confirm => _('Really delete?'), |
89 |
}; |
}; |
90 |
}; |
}; |
91 |
|
|
92 |
|
|
93 |
form { |
form { |
94 |
foreach my $f ( $self->display_columns ) { |
foreach my $f ( $self->display_columns ) { |
95 |
if ( $f eq 'material' ) { |
if ( $f eq 'material' ) { |
121 |
}; |
}; |
122 |
} |
} |
123 |
}; |
}; |
124 |
|
|
125 |
|
}; # div class unit |
126 |
|
|
127 |
|
show('/unitpictures/fragment', $record); |
128 |
|
|
129 |
hr {}; |
hr {}; |
130 |
}; |
}; |
131 |
|
|
142 |
form { |
form { |
143 |
|
|
144 |
foreach my $f ( $self->display_columns ) { |
foreach my $f ( $self->display_columns ) { |
145 |
render_param( $create => $f ) unless $f eq 'material'; |
# last if $f eq 'material' && ! $id; |
146 |
|
render_param( $create => $f ); # unless $f eq 'material'; |
147 |
|
#warn "## $f"; |
148 |
} |
} |
149 |
|
|
150 |
div { |
div { |
154 |
onclick => [ |
onclick => [ |
155 |
{ |
{ |
156 |
submit => $create, |
submit => $create, |
157 |
# args => { |
# args => { |
158 |
# }, |
# }, |
159 |
}, |
}, |
160 |
{ refresh_self => 1 }, |
{ refresh_self => 1 }, |
161 |
{ |
{ |