[Rt-commit] rt branch, 5.0/add-viewonly-custom-field-column, repushed
Dianne Skoll
dianne at bestpractical.com
Fri Oct 30 13:32:33 EDT 2020
The branch 5.0/add-viewonly-custom-field-column was deleted and repushed:
was b70aa953b055467848a84566d4a94ef607b96d90
now aec69aede6f3251c800ff9bde876b8db28f4a9f1
1: b70aa953b0 ! 1: aec69aede6 Add "CustomFieldView" column type for view-only (non-editable) custom fields.
@@ -1,6 +1,6 @@
Author: Dianne Skoll <dianne at bestpractical.com>
- Add "CF_ViewOnly" column type for view-only (non-editable) custom fields.
+ Add "CustomFieldView" column type for view-only (non-editable) custom fields.
The idea here is to allow inline editing, but have the ability to turn off
inline editing on a per-custom-field basis for search results. This will
@@ -23,13 +23,13 @@
$COLUMN_MAP->{'CF'} = $COLUMN_MAP->{'CustomField'};
-+# Add a CF_ViewOnly column for custom fields, but with editing disabled
-+$COLUMN_MAP->{'CF_ViewOnly'} = {};
++# Add a CustomFieldView column for custom fields, but with editing disabled
++$COLUMN_MAP->{'CustomFieldView'} = {};
+
-+# We copy all keys from CF to CF_ViewOnly except for "edit"
++# We copy all keys from CF to CustomFieldView except for "edit"
+foreach my $key (keys(%{$COLUMN_MAP->{'CF'}})) {
+ next if $key eq 'edit';
-+ $COLUMN_MAP->{'CF_ViewOnly'}->{$key} = $COLUMN_MAP->{'CF'}->{$key};
++ $COLUMN_MAP->{'CustomFieldView'}->{$key} = $COLUMN_MAP->{'CF'}->{$key};
+}
+
Scalar::Util::weaken($WCOLUMN_MAP);
@@ -45,7 +45,7 @@
push @fields, "CustomField.{" . $CustomField->Name . "}";
+ # If inline editing is enabled, add a display-only version
+ if (RT->Config->Get('InlineEdit', $session{CurrentUser})) {
-+ push @fields, "CF_ViewOnly.{" . $CustomField->Name . "}";
++ push @fields, "CustomFieldView.{" . $CustomField->Name . "}";
+ }
}
}
@@ -56,7 +56,7 @@
push @fields, "CustomField.{" . $CustomField->Name . "}";
+ # If inline editing is enabled, add a display-only version
+ if (RT->Config->Get('InlineEdit', $session{CurrentUser})) {
-+ push @fields, "CF_ViewOnly.{" . $CustomField->Name . "}";
++ push @fields, "CustomFieldView.{" . $CustomField->Name . "}";
+ }
}
@@ -67,7 +67,7 @@
push @fields, "CustomField.{" . $CustomField->Name . "}";
+ # If inline editing is enabled, add a display-only version
+ if (RT->Config->Get('InlineEdit', $session{CurrentUser})) {
-+ push @fields, "CF_ViewOnly.{" . $CustomField->Name . "}";
++ push @fields, "CustomFieldView.{" . $CustomField->Name . "}";
+ }
}
More information about the rt-commit
mailing list