Commit 6ae99cef94360781c39a41b2c4ca48caa6339c77
Committed by
Antonio Terceiro
1 parent
a54bd711
Exists in
master
and in
28 other branches
Balloon links appear in communities block too
Showing
2 changed files
with
15 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
| ... | ... | @@ -538,7 +538,9 @@ module ApplicationHelper |
| 538 | 538 | # #profile_image) and its name and number of members beside it. |
| 539 | 539 | def community_image_link( profile, size=:portrait, tag='li' ) |
| 540 | 540 | name = h(profile.name) |
| 541 | + links = links_for_balloon(profile) | |
| 541 | 542 | content_tag tag, |
| 543 | + (environment.enabled?(:show_balloon_with_profile_links_when_clicked) ? link_to( content_tag( 'span', _('Profile links')), '#', :onclick => "toggleSubmenu(this, '#{profile.short_name}', #{links.to_json}); return false", :class => 'menu-submenu-trigger' ) : "") + | |
| 542 | 544 | link_to( |
| 543 | 545 | content_tag( 'span', profile_image( profile, size ), :class => 'profile-image' ) + |
| 544 | 546 | content_tag( 'span', name, :class => 'org' ) + | ... | ... |
features/balloon.feature
| ... | ... | @@ -29,7 +29,7 @@ Feature: balloon |
| 29 | 29 | Then I should not see "Friends" |
| 30 | 30 | |
| 31 | 31 | @selenium |
| 32 | - Scenario: I should see balloon when clicked on block trigger | |
| 32 | + Scenario: I should see balloon when clicked on people block trigger | |
| 33 | 33 | Given the following blocks |
| 34 | 34 | | owner | type | |
| 35 | 35 | | environment | PeopleBlock | |
| ... | ... | @@ -41,6 +41,18 @@ Feature: balloon |
| 41 | 41 | And I should see "Home Page" |
| 42 | 42 | |
| 43 | 43 | @selenium |
| 44 | + Scenario: I should see balloon when clicked on community block trigger | |
| 45 | + Given the following blocks | |
| 46 | + | owner | type | | |
| 47 | + | environment | CommunitiesBlock | | |
| 48 | + And feature "show_balloon_with_profile_links_when_clicked" is enabled on environment | |
| 49 | + And I go to the homepage | |
| 50 | + When I click ".menu-submenu-trigger" | |
| 51 | + Then I should see "Profile" | |
| 52 | + And I should see "Members" | |
| 53 | + And I should see "Agenda" | |
| 54 | + | |
| 55 | + @selenium | |
| 44 | 56 | Scenario: I should not see trigger if not enabled on page |
| 45 | 57 | Given feature "show_balloon_with_profile_links_when_clicked" is disabled on environment |
| 46 | 58 | And I go to /assets/communities | ... | ... |