/[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 61 by dpavlin, Mon Apr 7 14:33:31 2008 UTC revision 64 by dpavlin, Mon Apr 7 15:50:57 2008 UTC
# Line 66  template 'view' => sub :CRUDView { Line 66  template 'view' => sub :CRUDView {
66    
67          warn "## view id: $id unit $unit";          warn "## view id: $id unit $unit";
68    
69          form {          div {
70                  img { attr { src => "/static/pics/thumb/" . $record->thumbnail } }                  { 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                            form {
74                          outs_raw( $delete->button(                          outs_raw( $delete->button(
75                                  label   => _("Delete picture"),                                  label   => _("Delete picture"),
76                                  class   => "float-crud-button button-delete",                                  class   => "float-crud-button button-delete",
# Line 83  template 'view' => sub :CRUDView { Line 82  template 'view' => sub :CRUDView {
82                                          args => { id => $id },                                          args => { id => $id },
83                                  },                                  },
84                          ));                          ));
85                            }
86                  };                  };
87    
88                    img { attr { src => "/static/pics/thumb/" . $record->thumbnail } };
89                    span { $record->type->name };
90                    tt { $record->filename };
91    
92          };          };
93    
94  };  };
# Line 113  template 'new_picture' => sub { Line 118  template 'new_picture' => sub {
118      form {      form {
119                  render_action( $create => [ 'campaign', 'content', 'type' ] );                  render_action( $create => [ 'campaign', 'content', 'type' ] );
120                  outs_raw( $create->hidden( unit => $unit ) );                  outs_raw( $create->hidden( unit => $unit ) );
121                    form_submit( label => _('Add picture') );
122    =for firefox-only
123                  hyperlink(                  hyperlink(
124                          label   => _("Add picture"),                          label   => _("Add picture"),
125                          class   => "float-crud-button button-add",                          class   => "float-crud-button button-add",
# Line 133  template 'new_picture' => sub { Line 140  template 'new_picture' => sub {
140                          ],                          ],
141                          as_button => 1,                          as_button => 1,
142                  );                  );
143    =cut
144      };      };
145  };  };
146    

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

  ViewVC Help
Powered by ViewVC 1.1.26