Only display invite link on contacts page if invitations are enabled

fixes #7340

closes #7342
This commit is contained in:
Steffen van Bergerem 2017-02-19 20:59:15 +01:00 committed by Benjamin Neff
parent 0627cdaf43
commit bb2826842f
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 16 additions and 11 deletions

View file

@ -13,6 +13,7 @@
* Make the \#newhere post public again [#7311](https://github.com/diaspora/diaspora/pull/7311) * Make the \#newhere post public again [#7311](https://github.com/diaspora/diaspora/pull/7311)
* Remove whitespace from author link [#7330](https://github.com/diaspora/diaspora/pull/7330) * Remove whitespace from author link [#7330](https://github.com/diaspora/diaspora/pull/7330)
* Fix autosize in modals [#7339](https://github.com/diaspora/diaspora/pull/7339) * Fix autosize in modals [#7339](https://github.com/diaspora/diaspora/pull/7339)
* Only display invite link on contacts page if invitations are enabled [#7342](https://github.com/diaspora/diaspora/pull/7342)
## Features ## Features
* Add support for [Liberapay](https://liberapay.com) donations [#7290](https://github.com/diaspora/diaspora/pull/7290) * Add support for [Liberapay](https://liberapay.com) donations [#7290](https://github.com/diaspora/diaspora/pull/7290)

View file

@ -2,14 +2,18 @@
%h3 %h3
= t("contacts.index.title") = t("contacts.index.title")
= render "contacts/aspect_listings" = render "contacts/aspect_listings"
%hr - if AppConfig.settings.community_spotlight.enable? || AppConfig.settings.invitations.open?
- if AppConfig.settings.community_spotlight.enable? %hr
.text-center.spotlight - if AppConfig.settings.community_spotlight.enable?
= link_to t("contacts.spotlight.community_spotlight"), community_spotlight_path, class: "btn btn-link" .text-center.spotlight
.text-center = link_to t("contacts.spotlight.community_spotlight"),
#invitations-button.btn.btn-link{ "data-toggle" => "modal" } community_spotlight_path,
= t("invitations.new.invite_someone_to_join") class: "btn btn-link"
= render "shared/modal", - if AppConfig.settings.invitations.open?
path: new_user_invitation_path, .text-center
id: "invitationsModal", .btn.btn-link#invitations-button{"data-toggle" => "modal"}
title: t("invitations.new.invite_someone_to_join") = t("invitations.new.invite_someone_to_join")
= render "shared/modal",
path: new_user_invitation_path,
id: "invitationsModal",
title: t("invitations.new.invite_someone_to_join")