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
plugins/communities_ratings/style.css
| ... | ... | @@ -22,4 +22,19 @@ |
| 22 | 22 | |
| 23 | 23 | .star-hide { |
| 24 | 24 | display: none; |
| 25 | -} | |
| 26 | 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 | 3 | |
| 4 | 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 | 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 | 23 | <div class="star-container"> |
| 12 | 24 | <% (1..5).each do |rate_number| %> |
| 13 | 25 | <% if rate_number <= @actual_rate_value %> |
| ... | ... | @@ -19,7 +31,8 @@ |
| 19 | 31 | </div> |
| 20 | 32 | |
| 21 | 33 | </div> |
| 22 | - <div> | |
| 34 | + | |
| 35 | + <div class="star-comment-container"> | |
| 23 | 36 | <%= form_for :comments do |c| %> |
| 24 | 37 | <div class="formfieldline formfield type-text"> |
| 25 | 38 | <%= c.label :body, _('Comment:'), :class => "formlabel" %> |
| ... | ... | @@ -27,7 +40,7 @@ |
| 27 | 40 | </div> |
| 28 | 41 | |
| 29 | 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 | 44 | <% end %> |
| 32 | 45 | </div> |
| 33 | 46 | </div> | ... | ... |