浏览代码

[core] Hide the navigation bar on the login page

Romain Rigaux 11 年之前
父节点
当前提交
958508662f

+ 0 - 1
desktop/core/src/desktop/auth/views.py

@@ -36,7 +36,6 @@ from django.utils.translation import ugettext as _
 from hadoop.fs.exceptions import WebHdfsException
 from useradmin.views import ensure_home_directory
 
-from desktop.auth.backend import AllowFirstUserDjangoBackend
 from desktop.auth.forms import UserCreationForm, AuthenticationForm
 from desktop.lib.django_util import render
 from desktop.lib.django_util import login_notrequired

+ 6 - 3
desktop/core/src/desktop/templates/common_header.mako

@@ -13,6 +13,7 @@
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
+
 <%!
 from desktop import conf
 import urllib
@@ -288,7 +289,8 @@ from django.utils.translation import ugettext as _
 
 <div class="navigator">
   <div class="pull-right">
-  % if user.is_authenticated():
+
+  % if user.is_authenticated() and section != 'login':
   <ul class="nav nav-pills">
     <li class="divider-vertical"></li>
     % if 'filebrowser' in apps:
@@ -317,12 +319,12 @@ from django.utils.translation import ugettext as _
     <li id="jHueTourFlagPlaceholder"></li>
   </ul>
   % endif
+
   </div>
     <a class="brand nav-tooltip pull-left" title="${_('About Hue')}" rel="navigator-tooltip" href="/about"><img src="/static/art/hue-logo-mini-white.png" data-orig="/static/art/hue-logo-mini-white.png" data-hover="/static/art/hue-logo-mini-white-hover.png"/></a>
+    % if user.is_authenticated() and section != 'login':
      <ul class="nav nav-pills pull-left">
-       % if user.is_authenticated():
        <li><a title="${_('My documents')}" rel="navigator-tooltip" href="${ url('desktop.views.home') }" style="padding-bottom:2px!important"><i class="fa fa-home" style="font-size: 19px"></i></a></li>
-       % endif
        <%
          query_apps = count_apps(apps, ['beeswax', 'impala', 'rdbms', 'pig', 'jobsub', 'spark']);
        %>
@@ -415,6 +417,7 @@ from django.utils.translation import ugettext as _
        </li>
        % endif
      </ul>
+   % endif
 
 </div>
 

+ 2 - 0
desktop/core/src/desktop/templates/login.mako

@@ -13,11 +13,13 @@
 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
+
 <%!
   from desktop import conf
   from django.utils.translation import ugettext as _
   from desktop.views import commonheader, commonfooter
 %>
+
 ${ commonheader("Welcome to Hue", "login", user, "50px") | n,unicode }
 
 <style type="text/css">