Refactor to aspect partial
This commit is contained in:
parent
9891577fa5
commit
c034113a7c
2 changed files with 10 additions and 8 deletions
9
app/views/aspects/_aspect.haml
Normal file
9
app/views/aspects/_aspect.haml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
%li
|
||||
%h4
|
||||
= link_to aspect, aspect
|
||||
%span
|
||||
= t('contacts', :count => contact_count)
|
||||
|
||||
- if contact_count > 0
|
||||
- for person in people
|
||||
= person_image_link(person)
|
||||
|
|
@ -45,15 +45,8 @@
|
|||
|
||||
%ul
|
||||
- for a_hash in @aspect_hashes
|
||||
%li
|
||||
%h4
|
||||
= link_to a_hash[:aspect], a_hash[:aspect]
|
||||
%span
|
||||
= t('contacts', :count=>a_hash[:contact_count])
|
||||
= render :partial => 'aspects/aspect', :locals => a_hash
|
||||
|
||||
- if a_hash[:contact_count] > 0
|
||||
- for person in a_hash[:people]
|
||||
= person_image_link(person)
|
||||
.section
|
||||
%h3= t('.invites')
|
||||
= render "shared/invitations", :invites => @invites
|
||||
|
|
|
|||
Loading…
Reference in a new issue