diff --git a/app/views/aspects/_aspect_listings.haml b/app/views/aspects/_aspect_listings.haml index d899a1567..8d875333f 100644 --- a/app/views/aspects/_aspect_listings.haml +++ b/app/views/aspects/_aspect_listings.haml @@ -7,9 +7,11 @@ .root_element= link_to t('aspects.index.your_aspects'), aspects_path %ul.sub_nav - %a.toggle_selector{:href => '#'} + - if defined?(stream) + %a.toggle_selector{:href => '#'} + = stream.for_all_aspects? ? t('.deselect_all') : t('.select_all') - for aspect in all_aspects - %li{:data => {:aspect_id => aspect.id}, :class => ("active" if defined?(selected_aspects) && selected_aspects.include?(aspect.id))} + %li{:data => {:aspect_id => aspect.id}, :class => ("active" if defined?(stream) && stream.aspect_ids.include?(aspect.id))} .edit = link_to image_tag("icons/pencil.svg", :height => 12, :title => t('.edit_aspect', :name => aspect.name)), edit_aspect_path(aspect), :rel => "facebox" diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 2d20e1478..a7e42d6aa 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -19,7 +19,7 @@ = link_to "Welcome", getting_started_path, :class => "home_selector" .section - = render 'aspects/aspect_listings', :selected_aspects => @stream.aspect_ids + = render 'aspects/aspect_listings', :stream => @stream .section %ul.left_nav diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index b6ba95914..da6256401 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -120,6 +120,8 @@ en: or_featured: "Or you can share with %{link}" featured_users: "featured users" aspect_listings: + select_all: "Select all" + deselect_all: "Deselect all" edit_aspect: "Edit %{name}" add_an_aspect: "+ Add an aspect" selected_contacts: diff --git a/public/javascripts/widgets/aspect-navigation.js b/public/javascripts/widgets/aspect-navigation.js index 786f08934..dadf06bdf 100644 --- a/public/javascripts/widgets/aspect-navigation.js +++ b/public/javascripts/widgets/aspect-navigation.js @@ -15,7 +15,6 @@ toggleSelector: aspectNavigation.find("a.toggle_selector") }); - self.calculateToggleText(); self.aspectSelectors.click(self.toggleAspect); self.toggleSelector.click(self.toggleAll); });