diff --git a/app/assets/stylesheets/components/btn.css.scss b/app/assets/stylesheets/components/btn.css.scss index 03d843b89b..23fd329d05 100644 --- a/app/assets/stylesheets/components/btn.css.scss +++ b/app/assets/stylesheets/components/btn.css.scss @@ -384,6 +384,12 @@ --d-on-btn-color: var(--d-on-success); } +.btn.d-btn-secondary { + --d-btn-color: var(--d-secondary); + --d-btn-color-rgb: var(--d-secondary-rgb); + --d-on-btn-color: var(--d-on-secondary); +} + .btn-toggle { min-width: fit-content; } diff --git a/app/assets/stylesheets/components/evaluations.css.scss b/app/assets/stylesheets/components/evaluations.css.scss index d66e597577..de06ae6203 100644 --- a/app/assets/stylesheets/components/evaluations.css.scss +++ b/app/assets/stylesheets/components/evaluations.css.scss @@ -153,7 +153,61 @@ } } -.feedback { +ul.feedback-list { + width: 100%; + letter-spacing: 0.04em; + text-decoration: inherit; + text-transform: inherit; + margin: 0; + padding: 0; + list-style-type: none; + color: var(--d-on-surface-variant); + + li a { + display: flex; + align-items: center; + justify-content: flex-start; + text-transform: inherit; + position: relative; + padding-left: 16px; + padding-right: 24px; + margin-bottom: 4px; + outline: none; + color: var(--d-on-surface); + text-decoration: none; + height: 56px; + border-radius: 28px; + + &.active, + &:hover, + &:focus { + font-weight: 400; + background: var(--d-secondary-container); + color: var(--d-on-secondary-container); + opacity: 0.75; + + .feedback-icon .circle { + fill: var(--d-secondary-container); + opacity: 0.75; + } + } + + .feedback-icon { + margin-right: 12px; + } + } +} + +.btn-icon { + &:hover, + &:focus { + .feedback-icon .circle { + opacity: 0; + } + } +} + +.feedback-icon { color: var(--d-on-surface-muted) !important; i { @@ -163,6 +217,10 @@ i.completed { color: var(--d-secondary) !important; } + + .circle { + fill: var(--d-surface); + } } .evaluation-form-title { diff --git a/app/views/evaluations/_evaluation_table.html.erb b/app/views/evaluations/_evaluation_table.html.erb index c92f8ef543..af6ebc8248 100644 --- a/app/views/evaluations/_evaluation_table.html.erb +++ b/app/views/evaluations/_evaluation_table.html.erb @@ -15,7 +15,12 @@ <%= link_to user.full_name, course_member_path(@evaluation.series.course, user), title: user.full_name, class: "ellipsis-overflow", target: "_blank" %> <% feedback_l.each do |feedback| %> - <%= render partial: 'feedback_status', locals: { evaluation: feedback.evaluation, feedback: feedback } %> + <%= link_to evaluation_feedback_path(evaluation, feedback), + title: feedback_title(feedback), + "data-bs-toggle": "tooltip", + class: "btn btn-icon d-btn-secondary" do %> + <%= render partial: 'feedback_status', locals: { evaluation: feedback.evaluation, feedback: feedback } %> + <% end %> <% end %> diff --git a/app/views/evaluations/_feedback_status.html.erb b/app/views/evaluations/_feedback_status.html.erb index c1e4491653..2cda72a761 100644 --- a/app/views/evaluations/_feedback_status.html.erb +++ b/app/views/evaluations/_feedback_status.html.erb @@ -1,25 +1,20 @@ -<%= link_to evaluation_feedback_path(evaluation, feedback), - title: feedback_title(feedback), - "data-bs-toggle": "tooltip", - class: "feedback btn btn-icon #{local_assigns.fetch(:active, false) ? 'disabled' : ''}" do %> - - - - + -<% end %> + + + diff --git a/app/views/feedbacks/_user_feedback_row.html.erb b/app/views/feedbacks/_user_feedback_row.html.erb index adf0383f5a..3407448f1e 100644 --- a/app/views/feedbacks/_user_feedback_row.html.erb +++ b/app/views/feedbacks/_user_feedback_row.html.erb @@ -1,15 +1,18 @@ - + - - - +
  • + <%= link_to evaluation_feedback_path(feedback.evaluation, feedback), + title: feedback_title(feedback), + "data-bs-toggle": "tooltip", + class: current_feedback == feedback ? "active" : "" do %> + <%= render partial: "evaluations/feedback_status", locals: { evaluation: feedback.evaluation, feedback: feedback } %> +
    + <%= feedback.exercise.name %> +
    + <% end %> +
  • <% end %> -
    - <%= feedback.exercise.name %> - - <%= render partial: "evaluations/feedback_status", locals: { evaluation: feedback.evaluation, feedback: feedback, active: feedback == current_feedback} %> -
    +