From 7fdbc9015b6eb04567a319fef9996b772739b9c3 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 3 Dec 2010 00:57:53 -0800 Subject: [PATCH] swapped new invitation lightbox for a proper page. --- app/views/aspects/_new_aspect.haml | 2 +- app/views/invitations/_new.haml | 24 ----------- app/views/invitations/new.html.haml | 40 ++++++++++++++++++ app/views/people/show.html.haml | 10 ++--- app/views/shared/_add_contact.html.haml | 6 +-- app/views/shared/_invitations.haml | 6 +-- app/views/users/edit.html.haml | 40 ++++++++++-------- config/locales/diaspora/en.yml | 2 +- .../icons/monotone_email_letter_round.png | Bin 0 -> 1004 bytes public/javascripts/view.js | 6 ++- public/stylesheets/sass/application.sass | 27 +++--------- 11 files changed, 81 insertions(+), 82 deletions(-) delete mode 100644 app/views/invitations/_new.haml create mode 100644 app/views/invitations/new.html.haml create mode 100644 public/images/icons/monotone_email_letter_round.png diff --git a/app/views/aspects/_new_aspect.haml b/app/views/aspects/_new_aspect.haml index d211d9503..c5d4a5537 100644 --- a/app/views/aspects/_new_aspect.haml +++ b/app/views/aspects/_new_aspect.haml @@ -11,5 +11,5 @@ %p = aspect.label :name , t('.name') = aspect.text_field :name - = aspect.submit t('.create'), :class => 'button' + = aspect.submit t('.create'), :class => 'button' diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml deleted file mode 100644 index cc4c1ca49..000000000 --- a/app/views/invitations/_new.haml +++ /dev/null @@ -1,24 +0,0 @@ -.span-12.last - .modal_title_bar - %h4 - = t('.invite_someone_to_join') - %i - = t('.if_they_accept_info') - %br - = t('.comma_seperated_plz') - = form_for User.new, :url => invitation_path(User) do |invite| - %p - = invite.label :email , t('email') - = invite.text_field :email - = t('.to') - - unless @aspect.is_a? Aspect - = invite.select(:aspects, @aspects_dropdown_array) - - else - = invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id) - %br - = t('.message') - - = invite.text_area :invite_messages, :value => "" - - %p= invite.submit t('.send_an_invitation') - diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml new file mode 100644 index 000000000..ca25e5a8f --- /dev/null +++ b/app/views/invitations/new.html.haml @@ -0,0 +1,40 @@ +:javascript + $(function() { + $('#new_user [title]').tipsy({trigger: 'focus', gravity: 'w'}); + $("#user_email").focus(); + }); + +.span-3.append-1.prepend-3 + = image_tag 'icons/monotone_email_letter_round.png', :height => "128px", :width => "128px" + +.span-15.last + %h2 + = t('.invite_someone_to_join') + .description + = t('.if_they_accept_info') + %br + + = form_for User.new, :url => invitation_path(User) do |invite| + %h4 + Email + %p + = invite.label :email , t('email') + = invite.text_field :email, :title => t('.comma_seperated_plz') + %br + + %h4 + Aspect + - unless @aspect.is_a? Aspect + = invite.select(:aspects, @aspects_dropdown_array) + - else + = invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id) + %br + %br + + %h4 + = t('.personal_message') + = invite.text_area :invite_messages, :rows => 3, :value => "" + + %p + = invite.submit t('.send_an_invitation') + diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 45e4e6195..329bb6db4 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -20,17 +20,15 @@ = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :is_contact => @is_contact} .span-15.last - %h4 - -if @post_type == :photos - Photos - - else - Recent Posts - - if @contact || current_user.person == @person - if @posts.count > 0 -if @post_type == :photos + %h4 + Photos = render 'photos/index', :photos => @posts - else + %h4 + Recent Posts = render 'shared/stream', :posts => @post_hashes = will_paginate @posts diff --git a/app/views/shared/_add_contact.html.haml b/app/views/shared/_add_contact.html.haml index f09014bc6..68d481e2e 100644 --- a/app/views/shared/_add_contact.html.haml +++ b/app/views/shared/_add_contact.html.haml @@ -21,9 +21,5 @@ %ul#request_result{:aspect_id => aspect_id} %li.error.hidden #message - = link_to t('.know_email'), "#invite_user_pane", :class => "invite_user_button" - %br - .yo{ :style => "display:none;"} - #invite_user_pane - = render "invitations/new" + = link_to t('.know_email'), new_user_invitation_path diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index 5f08b4559..3bfd3fb5d 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -2,12 +2,8 @@ = t('.invites_closed') -else -if invites > 0 - = link_to t('.invite_someone'), "#invite_user_pane", :class => "invite_user_button", :title => t('.invite_someone') + = link_to t('.invite_someone'), new_user_invitation_path, :title => t('.invite_someone') = t('.invitations_left', :count => invites) - %br - .yo{ :style => "display:none;"} - #invite_user_pane - = render "invitations/new" - else = t('.dont_have_now') diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index e0d75e6d7..b7c9e002f 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -40,12 +40,12 @@ %h2 = t('account') - .span-8.append-1.last + .span-8.append-2 %h3 = t('.your_handle') %p %b= current_user.diaspora_handle - .span-8.prepend-2.last + .span-8.last %h3 = t('.your_email') %p @@ -53,10 +53,7 @@ %br %br - %br - %br - %br - %br + %hr %br %h3 @@ -76,6 +73,11 @@ = t('or') = f.submit t('.change_password') + %br + %br + %hr + %br + %h3 = t('.change_language') = form_for @user do |f| @@ -85,19 +87,21 @@ = f.select :language, available_language_options = f.submit t('.change_language') - %br - - %h3 - = t('.export_data') - = link_to t('.download_xml'), users_export_path, :class => "button" - = link_to t('.download_photos'), users_export_photos_path, :class => "button" - %br %br + %hr %br - %h3 - = t('.close_account') - = link_to t('.close_account'), current_user, - :confirm => t('are_you_sure'), :method => :delete, - :class => "button" + + .span-8.append-2 + %h3 + = t('.export_data') + = link_to t('.download_xml'), users_export_path, :class => "button" + = link_to t('.download_photos'), users_export_photos_path, :class => "button" + + .span-8.last + %h3 + = t('.close_account') + = link_to t('.close_account'), current_user, + :confirm => t('are_you_sure'), :method => :delete, + :class => "button" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 577dfef91..4f627247b 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -279,7 +279,7 @@ en: if_they_accept_info: "if they accept, they will be added to the aspect you invited them." comma_seperated_plz: "You can enter multiple email addresses separated by commas." to: "To" - message: "Message:" + personal_message: "Personal message" send_an_invitation: "Send an invitation" send_invitation: "Send invitation" check_token: diff --git a/public/images/icons/monotone_email_letter_round.png b/public/images/icons/monotone_email_letter_round.png new file mode 100644 index 0000000000000000000000000000000000000000..30af3047ba4877d0a5a7d6a36ac624339d208568 GIT binary patch literal 1004 zcmVC0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUyGf+%aMFa;2frEp1RCwC#+6|7SAPfND@+%;y_do4qH`zD(o=98DOg5nh zkWYky1vq{=U;-v!0w!PrCSU?4;6DY#q@06)Vcf1t_%T3SzneZs_Q{S11eM_-cCvv6 zC=Oa-d>95u8BjqY-~k2MJduC}1P7EbN*J&jAjT2}0oDN{lo&u8V1=_XfCSvYe109sva;VzFF6G$H`lxqtBWK`gE(R*V8c_gvDnNm71R6lP1L|D>s19(75x6d>05WHH_5SE~>mE!^XXC^De=IzZ=R?vXEB(RY>A>OSd8x|1n>kkp% zzQV7GKv;*cLow7AQi}xmz8}u|kE})l>N^3mwnyJi+nNDl0$(O%qx4XoRWKy4uE8Mqk*eSRwWsAGv{@2@lLp;C;uHHR3TI z3CNhONOYItxaGaaJz&S}g~ICoQkTkE5r0FX*qgBiARqyH5Fn$s<%0ko4RB)s2@P1s z04y31h5#1A@A)zUkO+Wv1i%si?=>n3fG5?6-u}+KW&|P))&W7fN_V>wJ{2mxG(Zyp z;fFe)Uaa0^0g()lE!KL*c|j6v-&oF(jgtcu)|rvqNAS#3vm(^~8PF10`E_)mubfIk}zrnHQ@$i%xygga)z zUFCYJK=bR`1VEz*%_wS<0f(iGgp5C8B3x(;*y)fH{-LxhonbS=&66*++Vs3lF_1B&-ZcDtI%{^DUUq4~7<012M`vgqD1WdpLOuz(8z^?