/[Arh]/lib/Arh/View/UnitPictures.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Arh/View/UnitPictures.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by dpavlin, Mon Apr 7 15:50:57 2008 UTC revision 67 by dpavlin, Tue Apr 8 23:22:22 2008 UTC
# Line 31  template 'list' => sub { Line 31  template 'list' => sub {
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    
# Line 70  template 'view' => sub :CRUDView { Line 70  template 'view' => sub :CRUDView {
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",
# Line 82  template 'view' => sub :CRUDView { Line 81  template 'view' => sub :CRUDView {
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 } };
# Line 115  template 'new_picture' => sub { Line 113  template 'new_picture' => sub {
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') );

Legend:
Removed from v.64  
changed lines
  Added in v.67

  ViewVC Help
Powered by ViewVC 1.1.26