Просмотр исходного кода

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

Only if there there is one obviously
Romain Rigaux 10 лет назад
Родитель
Сommit
c02b2f5b0e
1 измененных файлов с 10 добавлено и 0 удалено
  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,