mirror of
https://github.com/discourse/discourse.git
synced 2025-03-12 18:45:21 +08:00
FEATURE: show login and signup button on no-ember layout (#7867)
This commit is contained in:
parent
7b0517895e
commit
324e182842
@ -15,6 +15,23 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
.header-row {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.logo-wrapper {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.auth-buttons {
|
||||||
|
float: right;
|
||||||
|
margin-top: 0.4em;
|
||||||
|
|
||||||
|
.login-button,
|
||||||
|
.signup-button {
|
||||||
|
padding: 8px 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,4 +501,10 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
absolute_url
|
absolute_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def can_sign_up?
|
||||||
|
SiteSetting.allow_new_registrations &&
|
||||||
|
!SiteSetting.invite_only &&
|
||||||
|
!SiteSetting.enable_sso
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<header class="d-header">
|
<header class="d-header">
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
<div class="row">
|
<div class="header-row">
|
||||||
<div class="logo-wrapper">
|
<div class="logo-wrapper">
|
||||||
<a href="<%= path "/" %>">
|
<a href="<%= path "/" %>">
|
||||||
<%- if application_logo_url.present? %>
|
<%- if application_logo_url.present? %>
|
||||||
@ -12,6 +12,14 @@
|
|||||||
<%- end %>
|
<%- end %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<%- unless current_user %>
|
||||||
|
<div class='auth-buttons'>
|
||||||
|
<%- if can_sign_up? %>
|
||||||
|
<a href="<%= path "/signup"%>" class='btn btn-primary btn-small signup-button'><%= I18n.t('sign_up') %></a>
|
||||||
|
<%- end %>
|
||||||
|
<a href="<%= path "/login"%>" class='btn btn-primary btn-small login-button'><%= I18n.t('log_in') %></a>
|
||||||
|
</div>
|
||||||
|
<%- end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -64,6 +64,7 @@ en:
|
|||||||
posts: "posts"
|
posts: "posts"
|
||||||
loading: "Loading"
|
loading: "Loading"
|
||||||
powered_by_html: 'Powered by <a href="https://www.discourse.org">Discourse</a>, best viewed with JavaScript enabled'
|
powered_by_html: 'Powered by <a href="https://www.discourse.org">Discourse</a>, best viewed with JavaScript enabled'
|
||||||
|
sign_up: "Sign Up"
|
||||||
log_in: "Log In"
|
log_in: "Log In"
|
||||||
submit: "Submit"
|
submit: "Submit"
|
||||||
purge_reason: "Automatically deleted as abandoned, deactivated account"
|
purge_reason: "Automatically deleted as abandoned, deactivated account"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user