| 1 | <% content_for :meta_head do %> |
| 2 | <title><%= @meta_title %></title> |
| 3 | <meta name="description" content="<%= @meta_description %>"> |
| 4 | <meta property="og:title" content="<%= @meta_title %>" /> |
| 5 | <meta property="og:description" content="<%= @meta_description %>" /> |
| 6 | <meta property="og:url" content="<%= @meta_url %>" /> |
| 7 | <% end %> |
| 8 | <main> |
| 9 | <div class="row g-5"> |
| 10 | <div class="col-md-12"> |
| 11 | <h1><%= @page_title %> / Review</h1> |
| 12 | <%= render "shared/flash_message", object: flash %> |
| 13 | </div> |
| 14 | </div> |
| 15 | <div class="row g-5"> |
| 16 | <div class="col-sm-1"> |
| 17 | <div class="position-sticky" style="top: 1rem;"> |
| 18 | <div class="text-center mt-4"> |
| 19 | <%= link_to( |
| 20 | "<i class='bi #{@chord.status_symbol} #{@chord.status_color}' style='font-size: 1.5rem;'></i>".html_safe, |
| 21 | guitar_chord_history_path, |
| 22 | title: "Status: #{@chord.status}" |
| 23 | ) %> |
| 24 | </div> |
| 25 | <div class="text-center mt-4"> |
| 26 | <% if user_signed_in? && @chord.users.include?(current_user) %> |
| 27 | <%= link_to( |
| 28 | '<i class="bi bi-heart-fill"></i>'.html_safe, |
| 29 | chord_unvote_path(id: @chord.id), |
| 30 | remote: true, |
| 31 | method: :delete, |
| 32 | :id => "ajax_trigger" |
| 33 | ) |
| 34 | %> |
| 35 | <% else %> |
| 36 | <%= link_to( |
| 37 | '<i class="bi bi-heart"></i>'.html_safe, |
| 38 | chord_vote_path(id: @chord.id), |
| 39 | remote: true, |
| 40 | method: :post, |
| 41 | title: t('somebody_to_love'), |
| 42 | :id => "ajax_trigger" |
| 43 | ) |
| 44 | %> |
| 45 | <% end %> |
| 46 | <span class="badge rounded-pill bg-warning text-dark"><%= @chord.users.count %></span> |
| 47 | </div> |
| 48 | <div class="text-center mt-4"> |
| 49 | <i class="bi bi-graph-up-arrow"></i> |
| 50 | <span class="badge rounded-pill bg-warning text-dark"><%= @chord.views_count %></span> |
| 51 | </div> |
| 52 | </div> |
| 53 | </div> |
| 54 | <div class="col-sm-11"> |
| 55 | <div class="mb-3"> |
| 56 | <li class="list-group-item d-flex justify-content-between align-items-center"> |
| 57 | <div class="ms-2 me-auto"> |
| 58 | <div class="fw-bold fst-italic"> |
| 59 | 1. Check the chords. |
| 60 | </div> |
| 61 | Chords name are standard and no mistakes. |
| 62 | </div> |
| 63 | <span class="badge bg-success rounded-pill fst-italic fw-light">OK</span> |
| 64 | </li> |
| 65 | <li class="list-group-item d-flex justify-content-between align-items-center"> |
| 66 | <div class="ms-2 me-auto"> |
| 67 | <div class="fw-bold fst-italic"> |
| 68 | 2. Play the song. |
| 69 | </div> |
| 70 | Chord progressions are OK. Minor mistakes are fine. |
| 71 | </div> |
| 72 | <span class="badge bg-success rounded-pill fst-italic fw-light">OK</span> |
| 73 | </li> |
| 74 | </div> |
| 75 | <%= @chord.chord.html_safe %> |
| 76 | <div class="mb-2 mt-2"> |
| 77 | <%= link_to('Approve chord?', guitar_chord_review_path, method: :patch, class: 'btn btn-primary btn-lg px-4') %> |
| 78 | </div> |
| 79 | </div> |
| 80 | </div> |
| 81 | <%= render 'shared/partial_breadcrumbs' do %> |
| 82 | <li class="breadcrumb-item"> |
| 83 | <%= link_to( |
| 84 | t('guitar_chord_link', slug: @chord.link_title), |
| 85 | guitar_chord_detail_path(@chord.slug) |
| 86 | ) %> |
| 87 | </li> |
| 88 | <% end %> |
| 89 | </main> |