/[A3C]/lib/A3C/Model/StrixInstanceSelection.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/A3C/Model/StrixInstanceSelection.pm

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

lib/A3C/Model/StrixSiteSelection.pm revision 158 by dpavlin, Sun Jun 15 11:03:50 2008 UTC lib/A3C/Model/StrixInstanceSelection.pm revision 174 by dpavlin, Mon Jun 16 16:48:16 2008 UTC
# Line 1  Line 1 
1  use strict;  use strict;
2  use warnings;  use warnings;
3    
4  package A3C::Model::StrixSiteSelection;  package A3C::Model::StrixInstanceSelection;
5  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
6    
7  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
8    
9  use A3C::Record schema {  use A3C::Record schema {
10    
11          column strix =>          column instance =>
12                  label is _('Site identifier'),                  label is _('Instance identifier'),
13                  is mandatory,                  is mandatory,
14                  type is 'text',                  type is 'text',
15                  refers_to A3C::Model::StrixSite by 'site';                  refers_to A3C::Model::StrixInstance by 'instance';
16    
17          column by_user =>          column by_user =>
18                  label is ('Selected by user'),                  label is ('Selected by user'),
# Line 26  use A3C::Record schema { Line 26  use A3C::Record schema {
26    
27  sub since { '0.0.4' };  sub since { '0.0.4' };
28    
29  sub validate_strix {  sub validate_instance {
30          my $self = shift;          my $self = shift;
31          my $site = shift;          my $instance = shift;
32    
33          my $strix = A3C::Model::StrixSiteSelection->new;          my $strix = A3C::Model::StrixInstanceSelection->new;
34          $strix->load_by_cols( strix => $site );          $strix->load_by_cols( instance => $instance );
35    
36          return ( 0, _('Site %1 is allready selected', $site) ) if $strix->id;          return ( 0, _('Instance %1 is allready selected', $instance) ) if $strix->id;
37          return 1;          return 1;
38  }  }
39    

Legend:
Removed from v.158  
changed lines
  Added in v.174

  ViewVC Help
Powered by ViewVC 1.1.26