Subversion Repositories VORC

Rev

Rev 229 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 229 Rev 230
Line 99... Line 99...
99
    } else {
99
    } else {
100
      return "$colName like \"%$filter%\"";
100
      return "$colName like \"%$filter%\"";
101
    }
101
    }
102
  } else {
102
  } else {
103
    my @options = ();
103
    my @options = ();
104
    my $tmpFormValue = param ("filter-".$colName); $tmpFormValue //= url_param ("filter-".$colName);
104
    my $tmpFormValue = getFilterValue ($colName);
Line 105... Line 105...
105
    
105
    
106
    push @options, "-blank-" unless $LVL < 4;
106
    push @options, "-blank-" unless $LVL < 4;
Line 107... Line 107...
107
    push @options, ($LVL < 4 and $ORCUSER->{department}->{VCI} < 2) ? grep { $ORCUSER->{department}->{$_} >= 2 } sort keys %{$ORCUSER->{department}} : sort keys %{$DepartmentNames};
107
    push @options, ($LVL < 4 and $ORCUSER->{department}->{VCI} < 2) ? grep { $ORCUSER->{department}->{$_} >= 2 } sort keys %{$ORCUSER->{department}} : sort keys %{$DepartmentNames};
Line 125... Line 125...
125
  if ($filter ne "")  {
125
  if ($filter ne "")  {
126
    $filtered_by_access = $filter;
126
    $filtered_by_access = $filter;
127
    return $filter eq "-1" ? "$colName = $filter" : "($colName = $filter or department like '%$filter%')";
127
    return $filter eq "-1" ? "$colName = $filter" : "($colName = $filter or department like '%$filter%')";
128
  } else {
128
  } else {
129
    my @options = (-1, 0, 1, 2, 3, 4, 5);
129
    my @options = (-1, 0, 1, 2, 3, 4, 5);
130
    my $tmpFormValue = param ("filter-".$colName); $tmpFormValue //= url_param ("filter-".$colName);
130
    my $tmpFormValue = getFilterValue ($colName);
Line 131... Line 131...
131
    
131
    
132
    @options = map { $tmpFormValue eq $_ ?
132
    @options = map { $tmpFormValue eq $_ ?
133
                       ( $h->option ({ selected=>[], value=>$_ }, $ROLE->{$_}) ) :
133
                       ( $h->option ({ selected=>[], value=>$_ }, $ROLE->{$_}) ) :
Line 146... Line 146...
146
  
146
  
147
  if ($filter)  {
147
  if ($filter)  {
148
    return $filter =~ /^R-/ ? "$colName = '$filter'" : $filter eq "pass" ? "isnull($colName) = 0" : "isnull($colName) = 1";
148
    return $filter =~ /^R-/ ? "$colName = '$filter'" : $filter eq "pass" ? "isnull($colName) = 0" : "isnull($colName) = 1";
149
  } else {
149
  } else {
150
    my @options = ("", "pass", "no pass");
150
    my @options = ("", "pass", "no pass");
Line 151... Line 151...
151
    my $tmpFormValue = param ("filter-".$colName); $tmpFormValue //= url_param ("filter-".$colName);
151
    my $tmpFormValue = getFilterValue ($colName);
152
    
152
    
153
    @options = map { $tmpFormValue eq $_ ?
153
    @options = map { $tmpFormValue eq $_ ?
Line 165... Line 165...
165
  
165
  
166
  if ($filter ne "")  {
166
  if ($filter ne "")  {
167
    return join " and ", "department like '%EMT%'", $filter eq "True" ? "$colName = 1" : "$colName = 0";
167
    return join " and ", "department like '%EMT%'", $filter eq "True" ? "$colName = 1" : "$colName = 0";
168
  } else {
168
  } else {
169
    my @options = ("", "True", "False");
169
    my @options = ("", "True", "False");
Line 170... Line 170...
170
    my $tmpFormValue = param ("filter-".$colName); $tmpFormValue //= url_param ("filter-".$colName);
170
    my $tmpFormValue = getFilterValue ($colName);
171
    
171
    
172
    @options = map { $tmpFormValue eq $_ ?
172
    @options = map { $tmpFormValue eq $_ ?