|
1 | 1 | <div class="mdc-deprecated-list-item non-clickable-list-item">
|
2 |
| - Puntuación: |
3 |
| - <div class="rating-container"> |
4 |
| - <div class="average-rating"> |
5 |
| - <span class="material-icons">star</span> |
6 |
| - <%= @subject.average_rating || "Sin calificar" %> |
7 |
| - </div> |
8 |
| - <div class="rating-items"> |
9 |
| - <% 5.downto(1).each do |value| %> |
10 |
| - <% filled = @user_review.present? && @user_review.rating >= value %> |
11 |
| - <% selected = @user_review.present? && @user_review.rating == value %> |
12 |
| - <% url = selected ? review_path(@user_review) : reviews_path %> |
13 |
| - <% method = selected ? :delete : :post %> |
14 |
| - <%= form_with(url:, method:, class: "interactive-star") do |f| %> |
15 |
| - <%= f.hidden_field :subject_id, value: @subject.id %> |
16 |
| - <%= f.hidden_field :rating, value: %> |
17 |
| - <%= f.button filled ? 'star' : 'star_outline', class: "material-icons mdc-icon-button" %> |
18 |
| - <% end %> |
| 2 | + <span class="mdc-deprecated-list-item__text"> |
| 3 | + Puntuación: <%= @subject.average_rating || "Sin calificar" %> |
| 4 | + </span> |
| 5 | +</div> |
| 6 | +<div class="mdc-deprecated-list-item non-clickable-list-item"> |
| 7 | + <span class="mdc-deprecated-list-item__text"> |
| 8 | + Tu puntuación: |
| 9 | + </span> |
| 10 | + <div class="rating-items"> |
| 11 | + <% 5.downto(1).each do |value| %> |
| 12 | + <% filled = @user_review.present? && @user_review.rating >= value %> |
| 13 | + <% selected = @user_review.present? && @user_review.rating == value %> |
| 14 | + <% url = selected ? review_path(@user_review) : reviews_path %> |
| 15 | + <% method = selected ? :delete : :post %> |
| 16 | + <%= form_with(url:, method:, class: "interactive-star") do |f| %> |
| 17 | + <%= f.hidden_field :subject_id, value: @subject.id %> |
| 18 | + <%= f.hidden_field :rating, value: %> |
| 19 | + <%= f.button filled ? 'star' : 'star_outline', class: "material-icons mdc-icon-button" %> |
19 | 20 | <% end %>
|
20 |
| - </div> |
| 21 | + <% end %> |
21 | 22 | </div>
|
22 | 23 | </div>
|
0 commit comments