diaspora/app/views/shared/_aspect_dropdown.html.haml
Sarah Mei b60101b9ad Use explicit parameters instead of request format to determine whether we render a remote or non-remote form in aspects#new.
Facebox needs to get back a text/html response. We were using text/javascript to indicate that we wanted a remote form and text/html to indicate we wanted a non-remote form. The trouble is, if we request with text/javascript then that is the format we get back. It doesn't really make sense to use formats that way anyway, so I changed it to an explicit parameter. This had the nice side effect of simplifying our new-aspect views.
2011-08-28 16:08:57 -07:00

21 lines
1,011 B
Text

-# Copyright (c) 2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.dropdown{:class => ["hang_#{hang}", defined?(dropdown_class) && dropdown_class]}
.button.toggle{:class => ("in_aspects" if selected_aspects.size > 0)}
- if selected_aspects.size == 1
= selected_aspects.first.name
- else
= t('.toggle', :count => selected_aspects.size)
▼
.wrapper
%ul.dropdown_list{:unSelectable => 'on', 'data-person_id' => (person.id if defined?(person) && person), 'data-service_uid' => (service_uid if defined?(service_uid))}
- for aspect in all_aspects
= aspect_dropdown_list_item(aspect, selected_aspects.include?(aspect) )
- if (dropdown_may_create_new_aspect && defined?(person) && person)
%li.newItem
.add_aspect
= link_to t('contacts.index.add_a_new_aspect'), new_aspect_path(:person_id => person.id, :remote => true), :rel => 'facebox'