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 |
|
|
67 |
warn "## view id: $id unit $unit"; |
warn "## view id: $id unit $unit"; |
68 |
|
|
69 |
form { |
form { |
70 |
img { attr { src => "/pictures/show/" . $record->filename } } |
{ class is 'single-picture' }; |
|
tt { $record->filename } |
|
|
span { $record->type->name }; |
|
71 |
|
|
72 |
if ( $record->current_user_can('delete') && $self->current_user->editing ) { |
if ( $record->current_user_can('delete') && $self->current_user->editing ) { |
73 |
outs_raw( $delete->button( |
outs_raw( $delete->button( |
82 |
}, |
}, |
83 |
)); |
)); |
84 |
}; |
}; |
85 |
|
|
86 |
|
img { attr { src => "/static/pics/thumb/" . $record->thumbnail } }; |
87 |
|
span { $record->type->name }; |
88 |
|
tt { $record->filename }; |
89 |
|
|
90 |
}; |
}; |
91 |
|
|
92 |
}; |
}; |
107 |
); |
); |
108 |
|
|
109 |
my $attach_to = |
my $attach_to = |
110 |
# Jifty->web->current_region->parent ? |
Jifty->web->current_region->parent ? |
111 |
# Jifty->web->current_region->parent->get_element( 'div.list' ) : |
Jifty->web->current_region->parent->get_element( 'div.list' ) : |
112 |
# Jifty->web->current_region; |
Jifty->web->current_region; |
|
Jifty->web->current_region->parent->get_element( 'div.list' ); |
|
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') ); |
120 |
|
=for firefox-only |
121 |
hyperlink( |
hyperlink( |
122 |
label => _("Add picture"), |
label => _("Add picture"), |
123 |
class => "float-crud-button button-add", |
class => "float-crud-button button-add", |
138 |
], |
], |
139 |
as_button => 1, |
as_button => 1, |
140 |
); |
); |
141 |
|
=cut |
142 |
}; |
}; |
143 |
}; |
}; |
144 |
|
|