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

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

revision 9 by dpavlin, Thu Nov 29 16:40:10 2007 UTC revision 11 by dpavlin, Thu Nov 29 19:04:56 2007 UTC
# Line 82  template '/units' => page { Line 82  template '/units' => page {
82  sub unit {  sub unit {
83          my $unit = shift || die "no unit?";          my $unit = shift || die "no unit?";
84          my $a = new_action( class => 'UpdateUnit', record => $unit );          my $a = new_action( class => 'UpdateUnit', record => $unit );
85            warn "## current_user = ",dump( current_user );
86          form {          form {
87                  foreach my $f ( qw/name number campaign material dimensions position description chronology location/ ) {                  foreach my $f ( qw/name number campaign material dimensions position description chronology location/ ) {
88                          if ( $f eq 'material' ) {                          if ( $f eq 'material' ) {
# Line 91  sub unit { Line 92  sub unit {
92                                          render_param( $m => 'name', label => _("Material"), render_mode => 'read' );                                          render_param( $m => 'name', label => _("Material"), render_mode => 'read' );
93                                  }                                  }
94                          } else {                          } else {
95                                  render_param( $a => $f, render_mode => 'read' );                                  my %opt;
96                                    $opt{render_mode} = 'read'; # unless
97                                    warn "write $f ",$unit->current_user_can('write',$f) ? 'ok' : 'DENIED';
98                                    render_param( $a => $f, %opt );
99                          }                          }
100                  }                  }
101          }          }

Legend:
Removed from v.9  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26