Browse Source

[search] Fixes for the empty dashboards admin page

Enrico Berti 11 years ago
parent
commit
8afc15bde0

+ 4 - 6
apps/search/src/search/templates/admin_collections.mako

@@ -43,8 +43,8 @@ ${ commonheader(_('Search'), "search", user, "29px") | n,unicode }
       </%def>
       </%def>
 
 
       <%def name="actions()">
       <%def name="actions()">
-        <a class="btn" data-bind="click: $root.copyCollections, clickBubble: false"><i class="fa fa-files-o"></i> ${_('Copy')}</a>
-        <a class="btn" data-bind="click: $root.markManyForDeletion, clickBubble: false"><i class="fa fa-times"></i> ${_('Delete')}</a>
+        <a class="btn" data-bind="visible: collections().length > 0 && !isLoading(), click: $root.copyCollections, clickBubble: false"><i class="fa fa-files-o"></i> ${_('Copy')}</a>
+        <a class="btn" data-bind="visible: collections().length > 0 && !isLoading(), click: $root.markManyForDeletion, clickBubble: false"><i class="fa fa-times"></i> ${_('Delete')}</a>
       </%def>
       </%def>
 
 
       <%def name="creation()">
       <%def name="creation()">
@@ -54,12 +54,10 @@ ${ commonheader(_('Search'), "search", user, "29px") | n,unicode }
 
 
     <div class="row-fluid" data-bind="visible: collections().length == 0 && !isLoading()">
     <div class="row-fluid" data-bind="visible: collections().length == 0 && !isLoading()">
       <div class="span10 offset1 center importBtn pointer">
       <div class="span10 offset1 center importBtn pointer">
-        <i class="fa fa-plus-circle waiting"></i>
+        <a href="${ url('search:new_search') }"><i class="fa fa-plus-circle waiting"></i></a>
         <h1 class="emptyMessage">
         <h1 class="emptyMessage">
           ${ _('There are currently no dashboards defined.') }<br/>
           ${ _('There are currently no dashboards defined.') }<br/>
-          <a class="btn importBtn" href="${ url('search:new_search') }">
-            <i class="fa fa-plus-circle"></i> ${ _('Dashboard') }
-          </a>
+          <a href="${ url('search:new_search') }">${ _('Click here to add') }</a> ${ _('one or more.') }</h1>
         </h1>
         </h1>
       </div>
       </div>
     </div>
     </div>

+ 1 - 1
apps/search/src/search/templates/search.mako

@@ -45,7 +45,7 @@ ${ commonheader(_('Search'), "search", user, "80px") | n,unicode }
     % if user.is_superuser:
     % if user.is_superuser:
       &nbsp;&nbsp;&nbsp;
       &nbsp;&nbsp;&nbsp;
       <a class="btn" href="${ url('search:new_search') }" title="${ _('New') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-file-o"></i></a>
       <a class="btn" href="${ url('search:new_search') }" title="${ _('New') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-file-o"></i></a>
-      <a class="btn" href="${ url('search:admin_collections') }" title="${ _('Collections') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-tags"></i></a>
+      <a class="btn" href="${ url('search:admin_collections') }" title="${ _('Dashboards') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}"><i class="fa fa-tags"></i></a>
     % endif
     % endif
   </div>
   </div>
 
 

+ 12 - 1
apps/search/static/css/admin.css

@@ -60,4 +60,15 @@
 .collection-actions {
 .collection-actions {
    cursor: pointer;
    cursor: pointer;
    margin: 10px 10px 0 0;
    margin: 10px 10px 0 0;
- }
+}
+
+.waiting {
+  font-size: 196px;
+  color: #DDD;
+}
+
+h1.emptyMessage {
+  margin-top: 50px;
+  color: #BBB;
+  line-height: 60px;
+}

+ 2 - 2
desktop/core/src/desktop/templates/actionbar.mako

@@ -19,12 +19,12 @@
 
 
 <%def name="render()">
 <%def name="render()">
     <div style="padding: 10px;">
     <div style="padding: 10px;">
-        <div class="pull-right" style="margin:0">
+        <div class="pull-right actionbar-creation">
             %if hasattr(caller, "creation"):
             %if hasattr(caller, "creation"):
                 ${caller.creation()}
                 ${caller.creation()}
             %endif
             %endif
         </div>
         </div>
-        <div style="margin: 0px 0px 10px 0px">
+        <div class="actionbar-actions">
             %if hasattr(caller, "search"):
             %if hasattr(caller, "search"):
                 ${caller.search()}
                 ${caller.search()}
             %else:
             %else:

+ 8 - 0
desktop/core/static/css/hue3.css

@@ -1687,4 +1687,12 @@ border-bottom-left-radius: 0px;
 
 
 .inline {
 .inline {
   display: inline;
   display: inline;
+}
+
+.actionbar-creation {
+  margin: 0;
+}
+
+.actionbar-actions {
+  margin: 0px 0px 10px 0px;
 }
 }

+ 2 - 2
desktop/libs/indexer/src/indexer/templates/collections.mako

@@ -150,7 +150,7 @@ ${ commonheader(_('Search Indexes'), "indexer", user, "29px") | n,unicode }
     <div data-bind="with: manage">
     <div data-bind="with: manage">
       <%actionbar:render>
       <%actionbar:render>
         <%def name="search()">
         <%def name="search()">
-          <div data-bind="visible: collections().length > 0 && !isLoading()">
+          <div data-bind="visible: collections().length > 0 && !isLoading()" style="min-height: 20px">
             <input type="text" data-bind="filter: { 'list': collections, 'filteredList': filteredCollections, 'test': filterTest }"
             <input type="text" data-bind="filter: { 'list': collections, 'filteredList': filteredCollections, 'test': filterTest }"
                 placeholder="${_('Filter indexes...')}" class="input-xlarge search-query">
                 placeholder="${_('Filter indexes...')}" class="input-xlarge search-query">
             <button data-bind="clickBubble: false, disable: selectedCloudCollections().length == 0" class="btn toolbarBtn"
             <button data-bind="clickBubble: false, disable: selectedCloudCollections().length == 0" class="btn toolbarBtn"
@@ -168,7 +168,7 @@ ${ commonheader(_('Search Indexes'), "indexer", user, "29px") | n,unicode }
 
 
       <div class="row-fluid" data-bind="visible: collections().length == 0 && !isLoading()">
       <div class="row-fluid" data-bind="visible: collections().length == 0 && !isLoading()">
         <div class="span10 offset1 center importBtn" style="cursor: pointer">
         <div class="span10 offset1 center importBtn" style="cursor: pointer">
-          <i class="fa fa-plus-circle waiting"></i>
+          <a href="#create"><i class="fa fa-plus-circle waiting"></i></a>
           <h1 class="emptyMessage">${ _('There are currently no indexes defined.') }<br/><a href="#create">${ _('Click here to add') }</a> ${ _('one or more.') }</h1>
           <h1 class="emptyMessage">${ _('There are currently no indexes defined.') }<br/><a href="#create">${ _('Click here to add') }</a> ${ _('one or more.') }</h1>
         </div>
         </div>
       </div>
       </div>

+ 4 - 0
desktop/libs/indexer/static/css/admin.css

@@ -161,3 +161,7 @@ h1.emptyMessage {
   color: #000;
   color: #000;
   border: 1px dashed #CCCCCC;
   border: 1px dashed #CCCCCC;
 }
 }
+
+.actionbar-actions {
+  min-height: 20px;
+}