Преглед на файлове

HUE-1811 [search] Alert message when using a demo collection without a valid Solr

Romain Rigaux преди 11 години
родител
ревизия
38da4f3
променени са 2 файла, в които са добавени 133 реда и са изтрити 3 реда
  1. 126 3
      apps/search/src/search/examples.py
  2. 7 0
      apps/search/src/search/templates/search.mako

Файловите разлики са ограничени, защото са твърде много
+ 126 - 3
apps/search/src/search/examples.py


+ 7 - 0
apps/search/src/search/templates/search.mako

@@ -113,6 +113,13 @@ ${ commonheader(_('Search'), "search", user, "90px") | n,unicode }
 </div>
 % else:
 <div class="container results">
+
+% if 'is_demo' in response['responseHeader']:
+ <div class="alert alert-warn">
+  ${ _('A demo index is used. In order to be interactive, please ') } <a href="">${ _('create the indexes') }</a> ${ _(' in Solr.') }
+ </div>
+% endif 
+
   <div id="mainContent" class="row hide">
     % if response and 'response' in response and 'docs' in response['response'] and len(response['response']['docs']) > 0 and 'normalized_facets' in response:
       <% shown_facets = 0 %>

Някои файлове не бяха показани, защото твърде много файлове са промени