Hide sign up link in mobile header when registrations are disabled
closes #8060
This commit is contained in:
parent
1d72f95705
commit
1e642be040
3 changed files with 3 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
## Bug fixes
|
||||
* Fix error while trying to fetch some sites with invalid OpenGraph data [#8049](https://github.com/diaspora/diaspora/pull/8049)
|
||||
* Don't show sign up link on mobile when registrations are disabled [#8060](https://github.com/diaspora/diaspora/pull/8060)
|
||||
|
||||
## Features
|
||||
* Add cronjob to cleanup pending photos which were never posted [#8041](https://github.com/diaspora/diaspora/pull/8041)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ module SessionsHelper
|
|||
end
|
||||
|
||||
def display_registration_link?
|
||||
AppConfig.settings.enable_registrations? && devise_mapping.registerable? && controller_name != "registrations"
|
||||
AppConfig.settings.enable_registrations? && controller_name != "registrations"
|
||||
end
|
||||
|
||||
def display_password_reset_link?
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
%ul.nav.navbar-nav.navbar-right
|
||||
- unless current_page?(controller: "/registrations", action: :new)
|
||||
- if display_registration_link? && !current_page?(controller: "/registrations", action: :new)
|
||||
%li= link_to t("devise.shared.links.sign_up"), new_user_registration_path, class: "login"
|
||||
- unless current_page?(controller: "/sessions", action: :new)
|
||||
%li= link_to t("devise.shared.links.sign_in"), new_user_session_path, class: "login"
|
||||
|
|
|
|||
Loading…
Reference in a new issue