[Bps-public-commit] rt-extension-assets branch, master, updated. 1.0rc1-1-gf21a7f6
Alex Vandiver
alexmv at bestpractical.com
Tue Feb 18 18:30:21 EST 2014
The branch, master has been updated
via f21a7f66b69bb8f80cbd717c66ad04d2c9d53d7a (commit)
from f253e14179e3129435ea6e4eb096ae19715287ef (commit)
Summary of changes:
html/Asset/ModifyCFs.html | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit f21a7f66b69bb8f80cbd717c66ad04d2c9d53d7a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Feb 18 18:28:42 2014 -0500
We link to ModifyCFs.html with no grouping; render it properly
This also makes consistent the application of the asset-info-cfs class
on CF groupings.
diff --git a/html/Asset/ModifyCFs.html b/html/Asset/ModifyCFs.html
index 744b48e..d1fda52 100755
--- a/html/Asset/ModifyCFs.html
+++ b/html/Asset/ModifyCFs.html
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Modify [_3] for asset #[_1]: [_2]", $asset->id, $asset->Name, $Grouping) &>
+<& /Elements/Header, Title => loc("Modify [_3] for asset #[_1]: [_2]", $asset->id, $asset->Name, $Grouping || loc("Custom Fields") ) &>
<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
@@ -55,7 +55,7 @@
<input type="hidden" name="id" value="<% $asset->id %>">
<input type="hidden" name="Grouping" value="<% $Grouping %>">
- <&| /Widgets/TitleBox, title => loc($Grouping), class => CSSClass("asset-info-cfs-\L$Grouping") &>
+ <&| /Widgets/TitleBox, title => $Grouping ? loc($Grouping) : loc("Custom Fields"), class => "asset-info-cfs ".($Grouping ? CSSClass("asset-info-cfs-\L$Grouping") : ""), title_class => "inverse" &>
<& /Elements/EditCustomFields, Object => $asset, Grouping => $Grouping &>
</&>
@@ -66,12 +66,9 @@
<%args>
$id => undef
$Update => 0
-$Grouping => undef
+$Grouping => ''
</%args>
<%init>
-Abort(loc("No grouping specified"))
- unless $Grouping;
-
my $asset = LoadAsset($id);
my @results;
@@ -79,7 +76,7 @@ my $CFs = $asset->CustomFields;
$CFs->LimitToGrouping($asset => $Grouping);
Abort(loc("No custom fields found for grouping '[_1]'", $Grouping))
- unless $CFs->Count;
+ if $Grouping and not $CFs->Count;
if ($Update) {
my ($cf_ok, @cf_errors) = $m->comp(
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list