| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package OpusVL::Preferences::Schema::ResultSet::PrfDefault; |
|
3
|
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1666
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
26
|
|
|
5
|
1
|
|
|
1
|
|
14
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
22
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Moose; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
5
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'DBIx::Class::ResultSet'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub active |
|
11
|
|
|
|
|
|
|
{ |
|
12
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
13
|
0
|
|
|
|
|
|
return $self->search({ active => 1 }, { |
|
14
|
|
|
|
|
|
|
order_by => ['name'], # just ensure we always have a consistent order |
|
15
|
|
|
|
|
|
|
}); |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub active_first |
|
19
|
|
|
|
|
|
|
{ |
|
20
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
21
|
0
|
|
|
|
|
|
return $self->search(undef, { |
|
22
|
|
|
|
|
|
|
order_by => [ { -desc => ['active'] }, { -asc => ['display_order', 'name'] } ], |
|
23
|
|
|
|
|
|
|
}); |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub not_hidden |
|
27
|
|
|
|
|
|
|
{ |
|
28
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
29
|
0
|
|
|
|
|
|
return $self->search({ -or => [ hidden => 0, hidden => undef ] }); |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub display_order |
|
33
|
|
|
|
|
|
|
{ |
|
34
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
35
|
0
|
|
|
|
|
|
return $self->search(undef, { order_by => [ 'display_order', 'name' ] } ); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub display_on_search |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
41
|
0
|
|
|
|
|
|
return $self->search({ display_on_search => 1 }); |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub searchable |
|
45
|
|
|
|
|
|
|
{ |
|
46
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
47
|
0
|
|
|
|
|
|
return $self->search({ searchable => 1 }); |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub for_search |
|
51
|
|
|
|
|
|
|
{ |
|
52
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
53
|
0
|
|
|
|
|
|
return $self->active->display_on_search->display_order; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub for_search_criteria |
|
57
|
|
|
|
|
|
|
{ |
|
58
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
59
|
0
|
|
|
|
|
|
return $self->active->searchable->display_order; |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub for_report |
|
63
|
|
|
|
|
|
|
{ |
|
64
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
65
|
0
|
|
|
|
|
|
return $self->active->not_hidden->display_order; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
return 1; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=pod |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=encoding UTF-8 |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 NAME |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
OpusVL::Preferences::Schema::ResultSet::PrfDefault |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 VERSION |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
version 0.27 |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 METHODS |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 active |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 active_first |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 not_hidden |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 display_on_search |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 for_search |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 searchable |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 for_search_criteria |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 display_order |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Returns the preferences in the display order. |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 for_report |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Returns a resultset ordered and filtered for use on the transaction report. |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 AUTHOR |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
OpusVL - www.opusvl.com |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
This software is copyright (c) 2011 by OpusVL - www.opusvl.com. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
121
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |