Refactor display setup for De/select_all aspects link
This commit is contained in:
parent
c694b4aa4e
commit
f655b12e98
4 changed files with 7 additions and 4 deletions
|
|
@ -7,9 +7,11 @@
|
|||
.root_element= link_to t('aspects.index.your_aspects'), aspects_path
|
||||
|
||||
%ul.sub_nav
|
||||
- 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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
toggleSelector: aspectNavigation.find("a.toggle_selector")
|
||||
});
|
||||
|
||||
self.calculateToggleText();
|
||||
self.aspectSelectors.click(self.toggleAspect);
|
||||
self.toggleSelector.click(self.toggleAll);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue