Bug 13022 [QA Followup] - Highlight the results with inaccurate status, add explanati...
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Apr 2015 14:41:13 +0000 (10:41 -0400)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Thu, 31 Dec 2015 18:11:21 +0000 (18:11 +0000)
Bug 13022 [QA Followup] - Revert changes in whitespace back to original for items count lines

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

index 0188019..b35e6be 100644 (file)
@@ -1043,6 +1043,10 @@ div.help {
        color : #990000;
 }
 
+.inaccurate-item-statuses {
+    color : #990000;
+}
+
 .circmessage li {
        list-style : url(../../img/arrow-bullet.gif);
        margin-bottom : .2em;
index b337c8c..65f35f1 100644 (file)
@@ -472,6 +472,7 @@ var holdForPatron = function () {
                         <th>Location</th>
                     </tr>
                         <!-- Actual Search Results -->
+                        [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %]
                         [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
                          [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
                             [% IF ( AmazonCoverImages || LocalCoverImages ) %]
@@ -575,8 +576,18 @@ var holdForPatron = function () {
                                 </td>
 
                                 <td><div class="availability">
-                                    [% IF ( SEARCH_RESULT.items_count ) %]<strong>[% SEARCH_RESULT.items_count %]
-                                    [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]</strong>
+                                    [% IF ( SEARCH_RESULT.items_count ) %]
+                                        <strong>
+                                            [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
+                                                <span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses">
+                                            [% END %]
+
+                                            [% SEARCH_RESULT.items_count %] [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %]
+
+                                            [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
+                                                </span>
+                                            [% END %]
+                                        </strong>
 
                                     [% IF ( SEARCH_RESULT.availablecount ) %]
                                     <ul>