you are now able to invite friends from the mobile site
This commit is contained in:
parent
657a9f96ef
commit
ba11bb6d89
3 changed files with 40 additions and 2 deletions
|
|
@ -8,8 +8,12 @@ class InvitationsController < Devise::InvitationsController
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@sent_invitations = current_user.invitations_from_me.includes(:recipient)
|
@sent_invitations = current_user.invitations_from_me.includes(:recipient)
|
||||||
|
respond_to do |format|
|
||||||
|
format.html do
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
if !AppConfig[:open_invitations] && current_user.invites == 0
|
if !AppConfig[:open_invitations] && current_user.invites == 0
|
||||||
|
|
|
||||||
28
app/views/invitations/new.mobile.haml
Normal file
28
app/views/invitations/new.mobile.haml
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
:javascript
|
||||||
|
$(function() {
|
||||||
|
$("#user_email").focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
%h2
|
||||||
|
= t('.invite_someone_to_join')
|
||||||
|
|
||||||
|
#email_invitation
|
||||||
|
= form_for User.new, :url => invitation_path(User) do |invite|
|
||||||
|
%h4
|
||||||
|
= t('email')
|
||||||
|
= invite.text_field :email, :title => t('.comma_seperated_plz')
|
||||||
|
%br
|
||||||
|
|
||||||
|
%h4
|
||||||
|
= t('.aspect')
|
||||||
|
= invite.select(:aspects, options_from_collection_for_select(all_aspects, 'id', 'name'))
|
||||||
|
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
|
||||||
|
%h4
|
||||||
|
= t('.personal_message')
|
||||||
|
= invite.text_area :invite_messages, :rows => 3, :value => ""
|
||||||
|
|
||||||
|
%p
|
||||||
|
= invite.submit t('.send_an_invitation')
|
||||||
|
|
@ -86,6 +86,12 @@
|
||||||
.ui-li-count
|
.ui-li-count
|
||||||
= @unread_message_count
|
= @unread_message_count
|
||||||
|
|
||||||
|
|
||||||
|
%h4
|
||||||
|
= t('shared.invitations.invite_your_friends')
|
||||||
|
%ul{:data => {:role => 'listview', :inset => 'true'}}
|
||||||
|
%li
|
||||||
|
= link_to t('.by_email'), new_user_invitation_path
|
||||||
%h4
|
%h4
|
||||||
= t('.your_aspects')
|
= t('.your_aspects')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue