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

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

revision 4 by dpavlin, Thu Nov 29 11:20:24 2007 UTC revision 10 by dpavlin, Thu Nov 29 17:17:16 2007 UTC
# Line 17  use Arh::Record schema { Line 17  use Arh::Record schema {
17                  is mandatory;                  is mandatory;
18                    
19          column date_from =>          column date_from =>
20                    label is _("From date"),
21                  type is 'date',                  type is 'date',
22                  filters are qw( Jifty::DBI::Filter::Date Jifty::DBI::Filter::DateTime ),                  filters are qw( Jifty::DBI::Filter::Date ),
23                    render as 'date',
24                  is mandatory;                  is mandatory;
25    
26          column date_to =>          column date_to =>
27                    label is _("To date"),
28                  type is 'date',                  type is 'date',
29                  filters are qw( Jifty::DBI::Filter::Date Jifty::DBI::Filter::DateTime ),                  filters are qw( Jifty::DBI::Filter::Date ),
30                    render as 'date',
31                  is mandatory;                  is mandatory;
32                    
33          column note =>          column note =>
34                  label is _("Note"),                  label is _("Note"),
35                  render as 'testarea';                  render as 'textarea';
36    
37  };  };
38    
39    #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
40    
41  # Your model-specific methods go here.  # Your model-specific methods go here.
42    
43  sub since { '0.0.3' }  sub since { '0.0.3' }
44    
45    sub current_user_can {
46            my ( $self, $action,$item,$name ) = @_;
47            return 1 if $self->current_user->superuser || $self->current_user->administrator;
48            return 1 if $self->current_user->id && $action eq 'read';
49        return 0;
50    }
51    
52  1;  1;
53    

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

  ViewVC Help
Powered by ViewVC 1.1.26