浏览代码

HUE-8114 [dashboard] Add helper arrows/pointers on an empty dashboard

Enrico Berti 7 年之前
父节点
当前提交
94cc5bc
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      desktop/core/src/desktop/templates/common_dashboard.mako

+ 8 - 1
desktop/core/src/desktop/templates/common_dashboard.mako

@@ -109,7 +109,7 @@
 
 
 <%def name="layout_skeleton(suffix='')">
 <%def name="layout_skeleton(suffix='')">
   <div id="emptyDashboard" data-bind="fadeVisible: !isEditing() && columns().length == 0">
   <div id="emptyDashboard" data-bind="fadeVisible: !isEditing() && columns().length == 0">
-  <div style="float:left; padding-top: 90px; margin-right: 20px; text-align: center; width: 260px">${ _('Click on the pencil to get started with your dashboard!') }</div>
+    <div style="float:left; padding-top: 90px; margin-right: 20px; text-align: center; width: 260px">${ _('Click on the pencil to get started with your dashboard!') }</div>
     <img src="${ static('desktop/art/hint_arrow.png') }" alt="${ _('Hint arrow') }" />
     <img src="${ static('desktop/art/hint_arrow.png') }" alt="${ _('Hint arrow') }" />
   </div>
   </div>
 
 
@@ -118,6 +118,13 @@
     <img src="${ static('desktop/art/hint_arrow_horiz_flipped.png') }" alt="${ _('Hint arrow') }" />
     <img src="${ static('desktop/art/hint_arrow_horiz_flipped.png') }" alt="${ _('Hint arrow') }" />
   </div>
   </div>
 
 
+  <!-- ko if: $root.isGridster -->
+  <div id="emptyDashboardEditing" data-bind="visible: $root.gridItems().length === 0 && columns().length > 0">
+    <div style="float:left; padding-top: 90px; margin-right: 20px; text-align: center; width: 260px">${_('Drag any of the top widgets inside your dashboard')}</div>
+    <img src="${ static('desktop/art/hint_arrow.png') }" alt="${ _('Hint arrow') }" />
+  </div>
+  <!-- /ko -->
+
 
 
   <div data-bind="visible: isEditing() && previewColumns() != '' && columns().length == 0, css:{'with-top-margin': isEditing()}">
   <div data-bind="visible: isEditing() && previewColumns() != '' && columns().length == 0, css:{'with-top-margin': isEditing()}">
     <div class="container-fluid">
     <div class="container-fluid">