diaspora/app/views/contacts/_aspect_listings.haml
Jonne Haß a2d894cb39 Improve stability for manages_aspects.feature:79
page.execute_scripts looks to be asynchronous, .synced is already set
by default, so the previous expectation would be fulfilled before
the script got to run, running into the page reload in the next step
which then aborts or hasen't seen the to be triggered request yet.

The fix is to use Capybaras drag_to instead
2015-06-24 04:01:15 +02:00

28 lines
1.3 KiB
Text

#aspect_nav
%ul.list-group.ui-sortable
%a.list-group-item.ui-sortable-handle.all_contacts{class: ("active" if params["set"] == "all"), href: contacts_path(set: "all")}
= t('contacts.index.all_contacts')
.badge.badge-default.pull-right
= all_contacts_count
%a.list-group-item.ui-sortable-handle.all_aspects{class: ("active" if !params["set"] && !params["a_id"] && !@spotlight), href: contacts_path}
= t('contacts.index.my_contacts')
.badge.badge-default.pull-right
= my_contacts_count
- all_aspects.each do |aspect|
%a.list-group-item.ui-sortable-handle.aspect{data: {aspect_id: aspect.id}, class: ("active" if params["a_id"].to_i == aspect.id), href: contacts_path(a_id: aspect.id)}
.badge.badge-default.pull-right
= aspect.contacts.size
.name
= aspect
%a.list-group-item.ui-sortable-handle.new_aspect{ data: { toggle: "modal", target: "#newAspectModal" }, href: "#"}
= t('aspects.aspect_listings.add_an_aspect')
#newAspectContainer
-# JS
%a.list-group-item.ui-sortable-handle.only_sharing{ class: ("active" if params["set"] == "only_sharing"), href: contacts_path(set: "only_sharing")}
= t('contacts.index.only_sharing_with_me')
.badge.badge-default.pull-right
= only_sharing_count