浏览代码

HUE-7823 [core] Remove data search text from top search if metadata is not enabled

Romain Rigaux 8 年之前
父节点
当前提交
4a4229f
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      desktop/core/src/desktop/templates/ko_components/ko_global_search.mako

+ 5 - 3
desktop/core/src/desktop/templates/ko_components/ko_global_search.mako

@@ -15,10 +15,12 @@
 ## limitations under the License.
 
 <%!
+from django.utils.translation import ugettext as _
+
+from metadata.conf import has_navigator
+
 from desktop import conf
 from desktop.lib.i18n import smart_unicode
-
-from django.utils.translation import ugettext as _
 from desktop.views import _ko
 %>
 
@@ -30,7 +32,7 @@ from desktop.views import _ko
       params: {
         hasFocus: searchHasFocus,
         disableNavigation: true,
-        placeHolder: '${ _ko('Search data and saved documents...') }',
+        placeHolder: '${ _ko('Search data and saved documents...') if has_navigator(user) else _ko('Search saved documents...') }',
         querySpec: querySpec,
         onClear: function () { selectedIndex(null); searchResultVisible(false); },
         facets: ['type', 'tags'],