/[Arh]/lib/Arh/View/Units.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/Units.pm

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

revision 42 by dpavlin, Sun Apr 6 12:04:31 2008 UTC revision 63 by dpavlin, Mon Apr 7 15:03:03 2008 UTC
# Line 6  use warnings; Line 6  use warnings;
6  use base 'Jifty::View::Declare::CRUD';  use base 'Jifty::View::Declare::CRUD';
7  use Jifty::View::Declare -base;  use Jifty::View::Declare -base;
8    
9    use Data::Dump qw/dump/;
10    
11  sub object_type { 'Unit' };  sub object_type { 'Unit' };
12    
13  sub display_columns {  sub display_columns {
# Line 30  sub display_columns { Line 32  sub display_columns {
32                  toplogy                  toplogy
33                  technique                  technique
34                  description                  description
35                  contstruction                  construction
36                  iconography                  iconography
37                  decoration                  decoration
38                  motifs                  motifs
# Line 48  sub display_columns { Line 50  sub display_columns {
50                  sources                  sources
51                  bibliography                  bibliography
52                  copyright                  copyright
53                    material
54          / );          / );
55  }  }
56    
# Line 104  template 'view' => sub :CRUDView { Line 107  template 'view' => sub :CRUDView {
107                                  );                                  );
108                          } else {                          } else {
109                                  my %opt;                                  my %opt;
110                                  $opt{render_mode} = 'read' if ! $editing;                                  if ( ! $editing ) {
111                                            $opt{render_mode} = 'read';
112                                            # skip fields without values
113                                            $opt{render_as} = 'hidden' if ! defined( $update->record->$f );
114                                    }
115                                  render_param( $update => $f, %opt );                                  render_param( $update => $f, %opt );
116                          }                          }
117                  };                  };
# Line 143  template 'new_item' => sub { Line 150  template 'new_item' => sub {
150    
151                  foreach my $f ( $self->display_columns ) {                  foreach my $f ( $self->display_columns ) {
152  #                       last if $f eq 'material' && ! $id;  #                       last if $f eq 'material' && ! $id;
153                          render_param( $create => $f ); # unless $f eq 'material';                          render_param( $create => $f ) unless $f eq 'material';
154                          #warn "## $f";                          #warn "## $f";
155                  }                  }
156    

Legend:
Removed from v.42  
changed lines
  Added in v.63

  ViewVC Help
Powered by ViewVC 1.1.26