Fix invite link on /contacts

closes #7690
This commit is contained in:
Janakas 2018-01-03 06:52:04 +01:00 committed by Benjamin Neff
parent c135ace407
commit d150a6b2af
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
8 changed files with 10 additions and 9 deletions

View file

@ -4,6 +4,7 @@
## Bug fixes ## Bug fixes
* Fix notifications when people remove their birthday date [#7691](https://github.com/diaspora/diaspora/pull/7691) * Fix notifications when people remove their birthday date [#7691](https://github.com/diaspora/diaspora/pull/7691)
* Fix invite link on the contacts page when the user has now contacts [#7690](https://github.com/diaspora/diaspora/pull/7690)
## Features ## Features
* Check if redis is running in script/server [#7685](https://github.com/diaspora/diaspora/pull/7685) * Check if redis is running in script/server [#7685](https://github.com/diaspora/diaspora/pull/7685)

View file

@ -9,7 +9,7 @@ app.pages.Contacts = Backbone.View.extend({
"click #chat_privilege_toggle" : "toggleChatPrivilege", "click #chat_privilege_toggle" : "toggleChatPrivilege",
"click #change_aspect_name" : "showAspectNameForm", "click #change_aspect_name" : "showAspectNameForm",
"click .conversation_button": "showMessageModal", "click .conversation_button": "showMessageModal",
"click #invitations-button": "showInvitationsModal" "click .invitations-button": "showInvitationsModal"
}, },
initialize: function(opts) { initialize: function(opts) {

View file

@ -186,7 +186,7 @@ app.Router = Backbone.Router.extend({
}, },
spotlight: function() { spotlight: function() {
$("#invitations-button").click(function() { $(".invitations-button").click(function() {
app.helpers.showModal("#invitationsModal"); app.helpers.showModal("#invitationsModal");
}); });
}, },

View file

@ -3,7 +3,7 @@
.term { font-weight: 700; } .term { font-weight: 700; }
small { margin-left: 15px; } small { margin-left: 15px; }
} }
#invitations-button { padding-left: 0; } .invitations-button { padding-left: 0; }
} }
#people-stream { #people-stream {
.media, .media-body { .media, .media-body {

View file

@ -11,7 +11,7 @@
class: "btn btn-link" class: "btn btn-link"
- if AppConfig.settings.invitations.open? - if AppConfig.settings.invitations.open?
.text-center .text-center
.btn.btn-link#invitations-button{"data-toggle" => "modal"} .btn.btn-link.invitations-button{"data-toggle" => "modal"}
= t("invitations.new.invite_someone_to_join") = t("invitations.new.invite_someone_to_join")
= render "shared/modal", = render "shared/modal",
path: new_user_invitation_path, path: new_user_invitation_path,

View file

@ -27,7 +27,7 @@
!= t(".no_contacts_message", != t(".no_contacts_message",
community_spotlight: link_to(t(".community_spotlight"), community_spotlight_path)) community_spotlight: link_to(t(".community_spotlight"), community_spotlight_path))
%p %p
.btn.btn-link{"data-toggle" => "modal"} .btn.btn-link.invitations-button{"data-toggle" => "modal"}
= t("invitations.new.invite_someone_to_join") = t("invitations.new.invite_someone_to_join")
#paginate #paginate

View file

@ -2,7 +2,7 @@
= invite_link(current_user.invitation_code) = invite_link(current_user.invitation_code)
- if AppConfig.mail.enable? - if AppConfig.mail.enable?
.invitations-link.btn.btn-link#invitations-button{"data-toggle" => "modal"} .invitations-link.btn.btn-link.invitations-button{"data-toggle" => "modal"}
= t(".by_email") = t(".by_email")
- content_for :after_content do - content_for :after_content do

View file

@ -36,13 +36,13 @@ Feature: Invitations
And I log out And I log out
And I sign in as "alice@alice.alice" And I sign in as "alice@alice.alice"
And I click on "Invite your friends" navbar title And I click on "Invite your friends" navbar title
And I click on selector "#invitations-button" And I click on selector ".invitations-button"
Then I should see one less invite Then I should see one less invite
Scenario: sends an invitation from the sidebar Scenario: sends an invitation from the sidebar
When I sign in as "alice@alice.alice" When I sign in as "alice@alice.alice"
And I click on "Invite your friends" navbar title And I click on "Invite your friends" navbar title
And I click on selector "#invitations-button" And I click on selector ".invitations-button"
And I fill in the following: And I fill in the following:
| email_inviter_emails | alex@example.com | | email_inviter_emails | alex@example.com |
And I press "Send an invitation" And I press "Send an invitation"
@ -67,7 +67,7 @@ Feature: Invitations
When I sign in as "alice@alice.alice" When I sign in as "alice@alice.alice"
And I search for "test" And I search for "test"
Then I should see "Users matching test" within "#search_title" Then I should see "Users matching test" within "#search_title"
When I click on selector "#invitations-button" When I click on selector ".invitations-button"
And I fill in the following: And I fill in the following:
| email_inviter_emails | alex@example.com | | email_inviter_emails | alex@example.com |
And I press "Send an invitation" And I press "Send an invitation"