Open invite link in modal

This commit is contained in:
Giniouxe 2015-07-12 02:22:40 +02:00 committed by Marien Fressinaud
parent da1b0b5666
commit 1ae838b596

View file

@ -5,7 +5,25 @@
#no_contacts.empty_message
%p.lead
= t('.you_should_add_some_more_contacts')
%p
!= t('.try_adding_some_more_contacts', search_link: link_to(t(".search_link_text"), search_path), invite_link: link_to(t(".invite_link_text"), new_user_invitation_path))
- if AppConfig.settings.community_spotlight.enable?
!= t('.or_spotlight', :link => link_to(t(".community_spotlight") , community_spotlight_path))
!= t('.try_adding_some_more_contacts',
search_link: link_to(t('.search_link_text'), search_path),
invite_link: link_to(t('.invite_link_text'),
"invitationsModal",
id: "invitations-link",
data: {toggle: "modal"}))
= render "shared/modal",
path: new_user_invitation_path,
id: "invitationsModal",
title: t("invitations.new.invite_someone_to_join")
- if AppConfig.settings.community_spotlight.enable?
!= t('.or_spotlight', :link => link_to(t(".community_spotlight") , community_spotlight_path))
-# This will have to be extracte in a JS view
:javascript
$("#invitations-link").click(function(){
app.helpers.showModal("#invitationsModal");
});