[Rt-commit] r4349 - in rt/branches/3.7-EXPERIMENTAL:
html/Admin/CustomFields
ruz at bestpractical.com
ruz at bestpractical.com
Sun Dec 25 04:12:45 EST 2005
Author: ruz
Date: Sun Dec 25 02:45:05 2005
New Revision: 4349
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Admin/CustomFields/index.html
Log:
r1555 at cubic-pc: cubic | 2005-12-25 10:48:44 +0300
r1552 at cubic-pc: cubic | 2005-12-22 05:43:57 +0300
* checkbax to search disabled CFs
* type selector save state
Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/CustomFields/index.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/CustomFields/index.html (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/CustomFields/index.html Sun Dec 25 02:45:05 2005
@@ -50,8 +50,8 @@
% my @types;
% my $prev_lookup = '';
-% while (my $CustomFieldObj = $CustomFields->Next) {
-% $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next;
+% while (my $CustomFieldObj = $CustomFields->Next) {
+% next unless $CustomFieldObj->CurrentUserHasRight('AdminCustomField');
% my $lookup = $CustomFieldObj->FriendlyLookupType;
% if ($lookup ne $prev_lookup) {
% if ($prev_lookup) {
@@ -64,7 +64,7 @@
% }
%
<li>
-<a href="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
+<a href="Modify.html?id=<% $CustomFieldObj->id %>"><% $CustomFieldObj->Name %>: <% $CustomFieldObj->Description %></a>
</li>
% }
% if ($prev_lookup) {
@@ -73,19 +73,27 @@
<form action="<%$RT::WebPath%>/Admin/CustomFields/index.html" method="GET">
<&|/l&>Only show custom fields for:</&>
-<select name="type">
+<select name="Type">
% for (@types) {
-<option value="<% $_->[1] %>"><% $_->[0] %></option>
+<option value="<% $_->[1] %>" <% $_->[1] eq $Type && 'selected'%> ><% $_->[0] %></option>
% }
-</select> <input type="submit" value="<%loc('Go')%>" />
+</select>
+<br />
+<input type="checkbox" class="checkbox" name="ShowDisabled" value="1" <% $ShowDisabled && 'checked' %> />
+<&|/l&>Include disabled custom fields in listing.</&>
+<br />
+
+<input type="submit" value="<% loc('Go') %>" />
</form>
<%args>
-$type => undef
+$Type => ''
+$ShowDisabled => 0
</%args>
<%INIT>
my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
-$CustomFields->UnLimit();
-$CustomFields->LimitToLookupType($type) if defined $type;
+$CustomFields->UnLimit;
+$CustomFields->{'find_disabled_rows'} = 1 if $ShowDisabled;
+$CustomFields->LimitToLookupType( $Type ) if $Type;
$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } );
</%INIT>
More information about the Rt-commit
mailing list