Commit fb61c078cf05c8a5eec1d140ac7db1931f5a0e7c
1 parent
d5199c08
Exists in
temp_ratings
Add user profile avatar
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com
Showing
3 changed files
with
38 additions
and
6 deletions
Show diff stats
plugins/communities_ratings/lib/communities_ratings_plugin.rb
@@ -13,6 +13,10 @@ class CommunitiesRatingsPlugin < Noosfero::Plugin | @@ -13,6 +13,10 @@ class CommunitiesRatingsPlugin < Noosfero::Plugin | ||
13 | def communities_ratings_plugin_comments_extra_fields | 13 | def communities_ratings_plugin_comments_extra_fields |
14 | nil | 14 | nil |
15 | end | 15 | end |
16 | + | ||
17 | + def communities_ratings_plugin_star_message | ||
18 | + nil | ||
19 | + end | ||
16 | end | 20 | end |
17 | 21 | ||
18 | def stylesheet? | 22 | def stylesheet? |
plugins/communities_ratings/style.css
@@ -22,4 +22,19 @@ | @@ -22,4 +22,19 @@ | ||
22 | 22 | ||
23 | .star-hide { | 23 | .star-hide { |
24 | display: none; | 24 | display: none; |
25 | -} | ||
26 | \ No newline at end of file | 25 | \ No newline at end of file |
26 | +} | ||
27 | + | ||
28 | +.star-rate-data { | ||
29 | + width: 100%; | ||
30 | + position: relative; | ||
31 | + overflow: auto; | ||
32 | +} | ||
33 | + | ||
34 | +.star-profile-information, .star-rate-form { | ||
35 | + position: relative; | ||
36 | + float: left; | ||
37 | +} | ||
38 | + | ||
39 | +.star-rate-form { | ||
40 | + margin-left: 15px; | ||
41 | +} |
plugins/communities_ratings/views/communities_ratings_plugin_profile/new_rating.html.erb
@@ -3,11 +3,23 @@ | @@ -3,11 +3,23 @@ | ||
3 | 3 | ||
4 | <div class="star-notice star-hide"></div> | 4 | <div class="star-notice star-hide"></div> |
5 | 5 | ||
6 | -<div> | ||
7 | - <div></div> | 6 | +<div class="star-rate-data"> |
7 | + <div class="star-profile-information"> | ||
8 | + <div class="star-profile-image"> | ||
9 | + <%= profile_image(current_user.person, :portrait) %> | ||
10 | + </div> | ||
11 | + | ||
12 | + <div class="star-profile-name"> | ||
13 | + <%= current_user.name %> | ||
14 | + </div> | ||
15 | + </div> | ||
8 | 16 | ||
9 | - <div> | 17 | + <div class="star-rate-form"> |
10 | <div data-rate-url=<%= url_for controller: "communities_ratings_plugin_profile", :action => "rate" %>> | 18 | <div data-rate-url=<%= url_for controller: "communities_ratings_plugin_profile", :action => "rate" %>> |
19 | + <div class="star-rate-text"> | ||
20 | + <%= @plugins.dispatch(:communities_ratings_plugin_star_message).collect { |content| instance_exec(&content) }.join("") %> | ||
21 | + </div> | ||
22 | + | ||
11 | <div class="star-container"> | 23 | <div class="star-container"> |
12 | <% (1..5).each do |rate_number| %> | 24 | <% (1..5).each do |rate_number| %> |
13 | <% if rate_number <= @actual_rate_value %> | 25 | <% if rate_number <= @actual_rate_value %> |
@@ -19,7 +31,8 @@ | @@ -19,7 +31,8 @@ | ||
19 | </div> | 31 | </div> |
20 | 32 | ||
21 | </div> | 33 | </div> |
22 | - <div> | 34 | + |
35 | + <div class="star-comment-container"> | ||
23 | <%= form_for :comments do |c| %> | 36 | <%= form_for :comments do |c| %> |
24 | <div class="formfieldline formfield type-text"> | 37 | <div class="formfieldline formfield type-text"> |
25 | <%= c.label :body, _('Comment:'), :class => "formlabel" %> | 38 | <%= c.label :body, _('Comment:'), :class => "formlabel" %> |
@@ -27,7 +40,7 @@ | @@ -27,7 +40,7 @@ | ||
27 | </div> | 40 | </div> |
28 | 41 | ||
29 | <%= @plugins.dispatch(:communities_ratings_plugin_comments_extra_fields).collect { |content| instance_exec(&content) }.join("") %> | 42 | <%= @plugins.dispatch(:communities_ratings_plugin_comments_extra_fields).collect { |content| instance_exec(&content) }.join("") %> |
30 | - <%= c.submit _("Send") %> | 43 | + <%= c.submit _("Send Data") %> |
31 | <% end %> | 44 | <% end %> |
32 | </div> | 45 | </div> |
33 | </div> | 46 | </div> |