Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaldrian <faldrian@och-noe.de>2015-01-26 04:20:22 +0300
committerFaldrian <faldrian@och-noe.de>2015-02-16 00:08:15 +0300
commit8f3c03edfaf73103048c95e6e0ecfabd4246609c (patch)
treea6ab7eb39a5138bcdc776f5e9493003bf0747ef1 /app/views/aspect_memberships
parente05ae411eb6807122929b1969215e6f763a71cdb (diff)
Added dropdown to add/remove people from/to aspects in mobile view
Diffstat (limited to 'app/views/aspect_memberships')
-rw-r--r--app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml b/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml
new file mode 100644
index 000000000..b7a8ffc1e
--- /dev/null
+++ b/app/views/aspect_memberships/_aspect_membership_dropdown.mobile.haml
@@ -0,0 +1,13 @@
+%div
+ %select{:name => 'user_aspects', :class => 'user_aspects', 'data-person-id' => @person.id}
+ %option{:value => 'list_cover', :class => 'list_cover', :disabled => 'true', :selected => 'true'}
+ = t("add_contact")
+ - contact = current_user.contact_for(@person)
+ - current_user.aspects.each do |aspect|
+ - if contact.try(:in_aspect?, aspect)
+ - membership_id = contact.aspect_memberships.where(:aspect_id => aspect.id).limit(1).pluck(:id).first
+ %option{:value => aspect.id, 'data-name' => aspect.name, 'data-membership_id' => membership_id, :class => 'selected'}
+ = "✓ #{t('shared.aspect_dropdown.mobile_row_checked', name: aspect.name)}"
+ - else
+ %option{:value => aspect.id, 'data-name' => aspect.name}
+ = "– #{t('shared.aspect_dropdown.mobile_row_unchecked', name: aspect.name)}"