Commit 13387253 authored by Dennis Schubert's avatar Dennis Schubert

Merge pull request #6492 from marienfressinaud/6062-add-search-and-invte-links-when-no-contacts

Add invite links when no contacts
parents 800be9b2 461e4cfd
......@@ -11,6 +11,7 @@ app.views.Stream = app.views.InfScroll.extend({
this.setupNSFW();
this.setupInfiniteScroll();
this.markNavSelected();
this.initInvitationModal();
},
postClass : app.views.StreamPost,
......@@ -27,6 +28,12 @@ app.views.Stream = app.views.InfScroll.extend({
var streamSelection = $("#stream_selection");
streamSelection.find("[data-stream]").removeClass("selected");
streamSelection.find("[data-stream='" + activeStream + "']").addClass("selected");
},
initInvitationModal : function() {
$(".invitations-link").click(function() {
app.helpers.showModal("#invitationsModal");
});
}
});
// @license-end
......@@ -3,10 +3,15 @@
-# the COPYRIGHT file.
#no_contacts.empty_message
= t('.you_should_add_some_more_contacts')
%br
%br
= t('.try_adding_some_more_contacts')
- if AppConfig.settings.community_spotlight.enable?
!= t('.or_spotlight', :link => link_to(t(".community_spotlight") , community_spotlight_path))
%p.lead
= t(".you_should_add_some_more_contacts")
%p
!= t(".try_adding_some_more_contacts",
invite_link: link_to(t(".invite_link_text"),
"#",
class: "invitations-link",
data: {toggle: "modal"}))
- if AppConfig.settings.community_spotlight.enable?
!= t(".or_spotlight", link: link_to(t(".community_spotlight"), community_spotlight_path))
= t('.share_this')
= t(".share_this")
= invite_link(current_user.invitation_code)
#invitations-button.btn.btn-link{ "data-toggle" => "modal"}
.invitations-link.btn.btn-link#invitations-button{"data-toggle" => "modal"}
= t(".by_email")
= render 'shared/modal',
= render "shared/modal",
path: new_user_invitation_path,
id: 'invitationsModal',
title: t('invitations.new.invite_someone_to_join')
-# This will have to be extracte in a JS view
:javascript
$("#invitations-button").click(function(){
app.helpers.showModal("#invitationsModal");
});
id: "invitationsModal",
title: t("invitations.new.invite_someone_to_join")
......@@ -204,7 +204,8 @@ en:
start_talking: "Nobody has said anything yet!"
no_contacts_message:
you_should_add_some_more_contacts: "You should add some more contacts!"
try_adding_some_more_contacts: "You can search or invite more contacts."
try_adding_some_more_contacts: "You can search or %{invite_link} more contacts."
invite_link_text: "invite"
or_spotlight: "Or you can share with %{link}"
community_spotlight: "Community spotlight"
aspect_listings:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment