[Bps-public-commit] rt-extension-assets branch, master, updated. 3068d879dd99edf03bdcd5633fa3142ffc236ef5

Alex Vandiver alexmv at bestpractical.com
Wed Oct 16 15:41:18 EDT 2013


The branch, master has been updated
       via  3068d879dd99edf03bdcd5633fa3142ffc236ef5 (commit)
       via  c7a403ff94b46159965cb72367ec1e7219b8cb1c (commit)
       via  8bf3d5fc7805f2b915349150c0b169bd4f6a48bf (commit)
      from  8e0ee647bc1fa4d4a2feaf74c72bca4392814c55 (commit)

Summary of changes:
 html/Asset/Elements/AssetSearchBasics              | 15 ----------
 .../Elements/{AssetSearchCFs => AssetSearchPeople} | 33 ++++++++++++++--------
 html/Asset/Search/index.html                       |  5 +++-
 lib/RT/Extension/Assets.pm                         |  1 +
 4 files changed, 27 insertions(+), 27 deletions(-)
 copy html/Asset/Elements/{AssetSearchCFs => AssetSearchPeople} (73%)

- Log -----------------------------------------------------------------
commit 8bf3d5fc7805f2b915349150c0b169bd4f6a48bf
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Oct 16 15:37:12 2013 -0400

    Ensure that OCF SortORder is applied, not CF SortOrder

diff --git a/lib/RT/Extension/Assets.pm b/lib/RT/Extension/Assets.pm
index eed1a23..12c0f4a 100644
--- a/lib/RT/Extension/Assets.pm
+++ b/lib/RT/Extension/Assets.pm
@@ -360,6 +360,7 @@ RT->AddJavaScript("RTx-Assets.js");
           if defined $catalog;
 
         $self->LimitToLookupType( RT::Asset->CustomFieldLookupType );
+        $self->ApplySortOrder;
 
         unless ($self->ContextObject) {
             my $obj = RT::Catalog->new( $self->CurrentUser );

commit c7a403ff94b46159965cb72367ec1e7219b8cb1c
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Oct 16 15:37:30 2013 -0400

    Split People out into their own box

diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchBasics
index f4ebe67..6830407 100644
--- a/html/Asset/Elements/AssetSearchBasics
+++ b/html/Asset/Elements/AssetSearchBasics
@@ -65,20 +65,6 @@
     <td class="value"><input type="text" id="Description" name="Description" value="<% $ARGS{Description} || ''%>" /></td>
     <td class="label"><label for="!Description"><&|/l&>but not</&></td>
     <td class="value"><input type="text" id="!Description" name="!Description" value="<% $ARGS{"!Description"} || ''%>" /></td></tr>
-% for my $role (RT::Asset->Roles) {
-<tr class="asset-role-<% CSSClass($role) %>">
-  <td class="label"><label for="Role.<% $role %>"><% loc($role) %></td>
-  <td class="value">
-      <input type="text" id="Role.<% $role %>" name="Role.<% $role %>"
-             data-autocomplete="Users" value="<% $ARGS{"Role.$role"} || '' %>" />
-  </td>
-  <td class="label"><label for="!Role.<% $role %>"><&|/l&>but not</&></td>
-  <td class="value">
-      <input type="text" id="!Role.<% $role %>" name="!Role.<% $role %>"
-             data-autocomplete="Users" value="<% $ARGS{"!Role.$role"} || '' %>" />
-  </td>
-</tr>
-% }
 % my $CFs = RT::CustomFields->new( $session{CurrentUser} );
 % $CFs->LimitToCatalog( $CatalogObj->Id );
 % $CFs->LimitToGrouping( "RT::Asset" => "Basics" );
@@ -94,7 +80,6 @@
 </tr>
 % }
 </table>
-<& /Elements/Submit, Label => loc('Search'), Name => 'SearchAssets' &>
 </&>
 <%args>
 $CatalogObj => undef
diff --git a/html/Asset/Elements/AssetSearchBasics b/html/Asset/Elements/AssetSearchPeople
similarity index 68%
copy from html/Asset/Elements/AssetSearchBasics
copy to html/Asset/Elements/AssetSearchPeople
index f4ebe67..90cb20c 100644
--- a/html/Asset/Elements/AssetSearchBasics
+++ b/html/Asset/Elements/AssetSearchPeople
@@ -45,26 +45,8 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => 'Basics' &>
+<&| /Widgets/TitleBox, title => 'People' &>
 <table>
-<tr class="asset-catalog"><td class="label"><label for="Catalog"><&|/l&>Catalog</&></label></td>
-    <td class="value" colspan="3">
-<& /Asset/Elements/SelectCatalog, Name => 'Catalog', CheckRight => "ShowCatalog",
-       Default => $ARGS{'Catalog'}, OnChange => "jQuery('#AssetSearch').submit()" &>
-</td></tr>
-<tr class="asset-status"><td class="label"><label for="Status"><&|/l&>Status</&></label></td>
-    <td class="value" colspan="3">
-<& /Asset/Elements/SelectStatus, Name => 'Status', CatalogObj => $CatalogObj, DefaultValue => 1,
-       Default => ($ARGS{'Status'} || '') &>
-</td></tr>
-<tr class="asset-name"><td class="label"><label for="Name"><&|/l&>Name</&></label></td>
-    <td class="value"><input type="text" id="Name" name="Name" value="<% $ARGS{Name} || ''%>" /></td>
-    <td class="label"><label for="!Name"><&|/l&>but not</&></td>
-    <td class="value"><input type="text" id="!Name" name="!Name" value="<% $ARGS{"!Name"} || ''%>" /></td></tr>
-<tr class="asset-description"><td class="label"><label for="Description"><&|/l&>Description</&></label></td>
-    <td class="value"><input type="text" id="Description" name="Description" value="<% $ARGS{Description} || ''%>" /></td>
-    <td class="label"><label for="!Description"><&|/l&>but not</&></td>
-    <td class="value"><input type="text" id="!Description" name="!Description" value="<% $ARGS{"!Description"} || ''%>" /></td></tr>
 % for my $role (RT::Asset->Roles) {
 <tr class="asset-role-<% CSSClass($role) %>">
   <td class="label"><label for="Role.<% $role %>"><% loc($role) %></td>
@@ -81,7 +63,7 @@
 % }
 % my $CFs = RT::CustomFields->new( $session{CurrentUser} );
 % $CFs->LimitToCatalog( $CatalogObj->Id );
-% $CFs->LimitToGrouping( "RT::Asset" => "Basics" );
+% $CFs->LimitToGrouping( "RT::Asset" => "People" );
 % while (my $cf = $CFs->Next) {
 % my $name = "CF.{" . $cf->Name . "}";
 % my $value  = ref($ARGS{$name}) ? $ARGS{$name}[0] : $ARGS{$name} || '';
@@ -94,7 +76,6 @@
 </tr>
 % }
 </table>
-<& /Elements/Submit, Label => loc('Search'), Name => 'SearchAssets' &>
 </&>
 <%args>
 $CatalogObj => undef
diff --git a/html/Asset/Search/index.html b/html/Asset/Search/index.html
index e199fde..8ae09f5 100644
--- a/html/Asset/Search/index.html
+++ b/html/Asset/Search/index.html
@@ -71,6 +71,9 @@ my %search = ProcessAssetsSearchArguments(
 <form action="<% RT->Config->Get('WebPath') %>/Asset/Search/index.html" id="AssetSearch">
 <&| /Widgets/TitleBox, title => "Search Assets" &>
 <& /Asset/Elements/AssetSearchBasics, %ARGS, CatalogObj => $catalog_obj &>
+<& /Asset/Elements/AssetSearchPeople, %ARGS, CatalogObj => $catalog_obj &>
+<& /Elements/Submit, Label => loc('Search'), Name => 'SearchAssets' &>
+
 % foreach my $group ( RT::CustomField->CustomGroupings( "RT::Asset" ), '' ) {
     <& /Asset/Elements/AssetSearchCFs, %ARGS, Grouping => $group,
        CatalogObj => $catalog_obj &>

commit 3068d879dd99edf03bdcd5633fa3142ffc236ef5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Oct 16 15:40:45 2013 -0400

    Ensure that CFs in Dates and Links also get a chance to show

diff --git a/html/Asset/Search/index.html b/html/Asset/Search/index.html
index 8ae09f5..3867774 100644
--- a/html/Asset/Search/index.html
+++ b/html/Asset/Search/index.html
@@ -74,7 +74,7 @@ my %search = ProcessAssetsSearchArguments(
 <& /Asset/Elements/AssetSearchPeople, %ARGS, CatalogObj => $catalog_obj &>
 <& /Elements/Submit, Label => loc('Search'), Name => 'SearchAssets' &>
 
-% foreach my $group ( RT::CustomField->CustomGroupings( "RT::Asset" ), '' ) {
+% foreach my $group ( 'Dates', 'Links', RT::CustomField->CustomGroupings( "RT::Asset" ), '' ) {
     <& /Asset/Elements/AssetSearchCFs, %ARGS, Grouping => $group,
        CatalogObj => $catalog_obj &>
 % }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list