Commit 3412dfc60b38315c8bd3fd488265d71eadd11080

Authored by Álvaro Fernando Matos de Souza
1 parent 92ff8438

Link to profile on organization ratings

plugins/organization_ratings/features/rate_community.feature
... ... @@ -28,3 +28,9 @@ Feature: rate_community
28 28 Scenario: display rate button inside communities ratings block
29 29 Given I am on mycommunity's homepage
30 30 Then I should see "Rate Community" within ".make-report-block"
  31 +
  32 + Scenario: redirect to profile page
  33 + Given I am on mycommunity's homepage
  34 + When I follow "Rate this Community"
  35 + Then I should see "Joao Silva" within ".star-profile-name"
  36 + And I should see Joao Silva's profile image
31 37 \ No newline at end of file
... ...
plugins/organization_ratings/style.css
... ... @@ -122,6 +122,10 @@
122 122 width: 66px;
123 123 }
124 124  
  125 +.star-profile-name a:link {
  126 + text-decoration: none;
  127 +}
  128 +
125 129 .star-rate-data .star-rate-form .star-comment-container .formfield textarea {
126 130 width: 361px;
127 131 }
... ...
plugins/organization_ratings/views/organization_ratings_plugin_profile/_new_rating_fields.html.erb
... ... @@ -9,11 +9,11 @@
9 9  
10 10 <div class="star-profile-information">
11 11 <div class="star-profile-image">
12   - <%= profile_image(current_user.person, :portrait) %>
  12 + <%= link_to profile_image(current_user.person, :portrait), current_user.person.url %>
13 13 </div>
14 14  
15 15 <div class="star-profile-name">
16   - <%= current_user.name %>
  16 + <%= link_to current_user.person.name, current_user.person.url %>
17 17 </div>
18 18 </div>
19 19  
... ...
plugins/organization_ratings/views/shared/_make_report_block.html.erb
1   -<% logged_in_image = profile_image(current_user.person, :portrait) if current_user %>
  1 +<% logged_in_image = link_to profile_image(current_user.person, :portrait), current_user.person.url if current_user %>
  2 +<% logged_in_name = link_to current_user.person.name, current_user.person.url if current_user %>
2 3 <% logged_out_image = image_tag('plugins/organization_ratings/public/images/user-not-logged.png') %>
3 4  
4 5 <div class="make-report-block">
... ... @@ -8,7 +9,7 @@
8 9 </div>
9 10  
10 11 <div class="star-profile-name">
11   - <%= logged_in? ? current_user.person.name : _('User not logged') %>
  12 + <%= logged_in? ? logged_in_name : _('User not logged') %>
12 13 </div>
13 14 </div>
14 15  
... ...
plugins/organization_ratings/views/shared/_user_rating_container.html.erb
1 1 <div class="user-rating-block">
2 2 <div class="star-profile-information">
3 3 <div class="star-profile-image">
4   - <%= profile_image(user_rate.person, :portrait) %>
  4 + <%= link_to profile_image(user_rate.person, :portrait), user_rate.person.url %>
5 5 </div>
6 6  
7 7 <div class="star-profile-name">
8   - <%= user_rate.person.name %>
  8 + <%= link_to user_rate.person.name, user_rate.person.url %>
9 9 </div>
10 10 </div>
11 11  
... ...