you are now able to invite friends from the mobile site

This commit is contained in:
Ilyaaaaaaaaaaaaa Zhitomirskiy 2011-08-14 15:38:12 -07:00
parent 657a9f96ef
commit ba11bb6d89
3 changed files with 40 additions and 2 deletions

View file

@ -8,7 +8,11 @@ class InvitationsController < Devise::InvitationsController
def new
@sent_invitations = current_user.invitations_from_me.includes(:recipient)
render :layout => false
respond_to do |format|
format.html do
render :layout => false
end
end
end
def create

View 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')

View file

@ -85,7 +85,13 @@
= link_to t('conversations.index.message_inbox'), conversations_path
.ui-li-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
= t('.your_aspects')