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

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

revision 8 by dpavlin, Thu Nov 29 16:08:13 2007 UTC revision 10 by dpavlin, Thu Nov 29 17:17:16 2007 UTC
# Line 16  use Arh::Record schema { Line 16  use Arh::Record schema {
16                  label is _("Number"),                  label is _("Number"),
17                  is mandatory;                  is mandatory;
18    
19            column campaign =>
20                    label is _("Part of campaign"),
21                    refers_to Arh::Model::Campaign,
22                    is mandatory,
23                    since '0.0.9';
24    
25          column dimensions =>          column dimensions =>
26                  label is _("Dimensions"),                  label is _("Dimensions"),
27                  hit is _("Separate values with ; (semicolumn)"),                  hit is _("Separate values with ; (semicolumn)"),
# Line 40  use Arh::Record schema { Line 46  use Arh::Record schema {
46    
47  };  };
48    
49    #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
50    
51  # Your model-specific methods go here.  # Your model-specific methods go here.
52    
53  sub material {  sub material {
# Line 49  sub material { Line 57  sub material {
57          return $m;          return $m;
58  }  }
59    
60    sub current_user_can {
61            my ( $self, $action,$item,$name ) = @_;
62            return 1 if $self->current_user->superuser || $self->current_user->administrator;
63            return 1 if $self->current_user->id && $action eq 'read';
64        return 0;
65    }
66    
67  1;  1;
68    

Legend:
Removed from v.8  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26