Ver Fonte

[core] Link the correct home to the topbar home icon

Enrico Berti há 9 anos atrás
pai
commit
cae6e7f0d5
1 ficheiros alterados com 9 adições e 1 exclusões
  1. 9 1
      desktop/core/src/desktop/templates/common_header.mako

+ 9 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -18,6 +18,14 @@
 from desktop import conf
 from desktop.lib.i18n import smart_unicode
 from django.utils.translation import ugettext as _
+
+home_url = url('desktop.views.home')
+try:
+  from beeswax.conf import USE_NEW_EDITOR
+  if USE_NEW_EDITOR.get():
+    home_url = url('desktop.views.home2')
+except:
+  pass
 %>
 
 <%def name="is_selected(selected)">
@@ -413,7 +421,7 @@ from django.utils.translation import ugettext as _
     <a class="brand nav-tooltip pull-left" title="${_('About Hue')}" rel="navigator-tooltip" href="/about"><img src="${ static('desktop/art/hue-logo-mini-white.png') }" data-orig="${ static('desktop/art/hue-logo-mini-white.png') }" data-hover="${ static('desktop/art/hue-logo-mini-white-hover.png') }" /></a>
     % if user.is_authenticated() and section != 'login':
      <ul class="nav nav-pills pull-left">
-       <li><a title="${_('My documents')}" rel="navigator-tooltip" href="${ url('desktop.views.home2') }" style="padding-bottom:2px!important"><i class="fa fa-home" style="font-size: 19px"></i></a></li>
+       <li><a title="${_('My documents')}" rel="navigator-tooltip" href="${ home_url }" style="padding-bottom:2px!important"><i class="fa fa-home" style="font-size: 19px"></i></a></li>
        <%
          query_apps = count_apps(apps, ['beeswax', 'impala', 'rdbms', 'pig', 'jobsub', 'spark']);
        %>