Browse Source

[search] Display the name of the 2d dimension in map if non edit mode

Only if there there is one obviously
Romain Rigaux 10 năm trước cách đây
mục cha
commit
c02b2f5b0e
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      apps/search/src/search/templates/search.mako

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

@@ -1157,8 +1157,18 @@ ${ dashboard.layout_skeleton() }
         </div>
       </div>
       <div class="clearfix"></div>
+    </div>
 
+    <div class="margin-bottom-10" data-bind="visible: ! $root.isEditing()">
+      <div data-bind="with: $root.collection.getFacetById($parent.id())">
+        <!-- ko if: $data.properties.facets().length == 1 -->
+          <div class="margin-bottom-10">
+            <span data-bind="text: $data.properties.facets()[0].field"></span>
+          </div>
+        <!-- /ko -->
+      </div>
     </div>
+
     <div data-bind="with: $root.collection.getFacetById($parent.id())">
       <div data-bind="mapChart: {data: {counts: $parent.count, scope: $root.collection.getFacetById($parent.id).properties.scope()},
         transformer: mapChartDataTransformer,