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

Contents of /lib/Arh/Model/Chronology.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Thu Nov 29 17:17:16 2007 UTC (16 years, 4 months ago) by dpavlin
File size: 790 byte(s)
added users/passowrds all over the place
1 use strict;
2 use warnings;
3
4 package Arh::Model::Chronology;
5 use Jifty::DBI::Schema;
6
7 use Arh::Record schema {
8
9 column name =>
10 type is 'text',
11 label is _("Name"),
12 is mandatory;
13
14 column year_from =>
15 type is 'text',
16 label is _("From year");
17
18 column year_to =>
19 type is 'text',
20 label is _("To year");
21
22 column part_of =>
23 label is _("Part of"),
24 refers_to Arh::Model::Chronology;
25
26 };
27
28 #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
29
30 # Your model-specific methods go here.
31
32 sub since { '0.0.3' }
33
34 sub current_user_can {
35 my ( $self, $action,$item,$name ) = @_;
36 return 1 if $self->current_user->superuser || $self->current_user->administrator;
37 return 1 if $self->current_user->id && $action eq 'read';
38 return 0;
39 }
40
41 1;
42

  ViewVC Help
Powered by ViewVC 1.1.26