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

HUE-2022 [core] Add login button to top bar when not authenticated

Reverted last changes
Added button to About page
Enrico Berti 11 лет назад
Родитель
Сommit
55865b1e36

+ 9 - 5
apps/about/src/about/templates/admin_wizard.mako

@@ -16,6 +16,7 @@
 
 <%!
 from desktop.views import commonheader, commonfooter
+from django.core.urlresolvers import reverse
 from django.utils.encoding import smart_unicode
 from django.utils.translation import ugettext as _
 %>
@@ -239,13 +240,16 @@ ${ header.menubar() }
         <div class="pull-right muted">${ _('Hue and the Hue logo are trademarks of Cloudera, Inc.') }</div>
       </div>
       % else:
+       <div class="card-body">
         <p>
-        </br>
-        &nbsp;&nbsp;&nbsp;${ _('Learn more about Hue and Hadoop on') } <a href="http://gethue.com" target="_blank">http://gethue.com</a>.
+          ${ _('Learn more about Hue and Hadoop on') } <a href="http://gethue.com" target="_blank">http://gethue.com</a>.
+          <span class="muted">${ _('Hue and the Hue logo are trademarks of Cloudera, Inc.') }</span>
+          % if not user.is_authenticated():
+            <br/>
+            <a href="${ reverse('desktop.auth.views.dt_login') }" class="btn btn-primary" style="margin-top: 50px;margin-bottom: 20px"><i class="fa fa-sign-in"></i> ${ _('Sign in now!') }</a>
+          % endif
         </p>
-        <div class="form-actions">
-          <div class="pull-right muted">${ _('Hue and the Hue logo are trademarks of Cloudera, Inc.') }</div>
-        </div>
+       </div>
       % endif
 
     </div>

+ 0 - 4
desktop/core/src/desktop/templates/common_header.mako

@@ -18,7 +18,6 @@
 from desktop import conf
 import urllib
 from desktop.lib.i18n import smart_unicode
-from django.core.urlresolvers import reverse
 from django.utils.translation import ugettext as _
 %>
 
@@ -317,9 +316,6 @@ from django.utils.translation import ugettext as _
   </ul>
   % else:
   <ul class="nav nav-pills" style="margin-right: 40px">
-    <li id="login">
-      <a href="${ reverse('desktop.auth.views.dt_login') }" title="${_('Sign in')}" rel="navigator-tooltip"><i class="fa fa-sign-in"></i></a>
-    </li>
     <li id="jHueTourFlagPlaceholder"></li>
   </ul>
   % endif