diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 805931fa9..b81d118f5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -17,7 +17,6 @@ class ApplicationController < ActionController::Base @aspect = nil @object_aspect_ids = [] @all_aspects = current_user.aspects.includes(:aspect_memberships) - @aspects_dropdown_array = @all_aspects.collect{|x| [x.to_s, x.id]} @notification_count = Notification.for(current_user, :unread =>true).count end end diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml index 45fc2b88b..bc22cd3ea 100644 --- a/app/views/invitations/new.html.haml +++ b/app/views/invitations/new.html.haml @@ -24,10 +24,8 @@ %h4 = t('.aspect') - - unless @aspect.is_a? Aspect - = invite.select(:aspects, @aspects_dropdown_array) - - else - = invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id) + = invite.select(:aspects, options_from_collection_for_select(@all_aspects, 'id', 'name')) + %br %br diff --git a/app/views/services/finder.html.haml b/app/views/services/finder.html.haml index 14b8d001a..502fb49a0 100644 --- a/app/views/services/finder.html.haml +++ b/app/views/services/finder.html.haml @@ -9,11 +9,12 @@ %h3 Facebook friend finder -.span-10.prepend-7 +.span-12.prepend-6 .contact_list = search_field_tag :contact_search, "", :class => 'contact_list_search', :results => 5, :placeholder => t('shared.contact_list.all_contacts') %ul - - for friend in @friends.values + - for uid in @friends.keys + - friend = @friends[uid] %li .right -if friend[:contact] && !friend[:contact].pending @@ -27,6 +28,12 @@ :id => friend[:person].id}, :class => 'button', :rel => 'facebox' + - else + = form_tag service_inviter_path do + = select_tag (:aspect_id, options_from_collection_for_select(@all_aspects, 'id', 'name')) + = hidden_field_tag :uid, uid + = hidden_field_tag :provider, 'facebook' + = submit_tag "invite" - if friend[:person] = person_image_link(friend[:person])