31 |
my $fragment_for_new_picture = $self->fragment_for('new_picture'); |
my $fragment_for_new_picture = $self->fragment_for('new_picture'); |
32 |
my $collection = $self->_current_collection(); |
my $collection = $self->_current_collection(); |
33 |
# XXX show just pictures from current unit |
# XXX show just pictures from current unit |
34 |
$collection->limit( column => 'unit', value => $unit ) if $unit; |
$collection->limit( column => 'unit', value => $unit ); |
35 |
|
|
36 |
warn "## list page: $page unit: $unit fragment_for_new_picture: $fragment_for_new_picture item_path: $item_path"; |
warn "## list page: $page unit: $unit fragment_for_new_picture: $fragment_for_new_picture item_path: $item_path"; |
37 |
|
|
70 |
{ class is 'single-picture' }; |
{ class is 'single-picture' }; |
71 |
|
|
72 |
if ( $record->current_user_can('delete') && $self->current_user->editing ) { |
if ( $record->current_user_can('delete') && $self->current_user->editing ) { |
|
form { |
|
73 |
outs_raw( $delete->button( |
outs_raw( $delete->button( |
74 |
label => _("Delete picture"), |
label => _("Delete picture"), |
75 |
class => "float-crud-button button-delete", |
class => "float-crud-button button-delete", |
81 |
args => { id => $id }, |
args => { id => $id }, |
82 |
}, |
}, |
83 |
)); |
)); |
|
} |
|
84 |
}; |
}; |
85 |
|
|
86 |
img { attr { src => "/static/pics/thumb/" . $record->thumbnail } }; |
img { attr { src => "/static/pics/thumb/" . $record->thumbnail } }; |
113 |
|
|
114 |
warn "## attach_to = $attach_to"; |
warn "## attach_to = $attach_to"; |
115 |
|
|
116 |
form { |
div { |
117 |
render_action( $create => [ 'campaign', 'content', 'type' ] ); |
render_action( $create => [ 'campaign', 'content', 'type' ] ); |
118 |
outs_raw( $create->hidden( unit => $unit ) ); |
outs_raw( $create->hidden( unit => $unit ) ); |
119 |
form_submit( label => _('Add picture') ); |
form_submit( label => _('Add picture') ); |