Skip to content

Commit

Permalink
improve review card on /reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
liz4chernyshova committed Apr 27, 2023
1 parent 4e60f49 commit 922fcf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/reviews_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

class Web::ReviewsController < Web::ApplicationController
def index
@reviews = Review.published.with_locale.page(params[:page])
@reviews = Review.published.with_locale.page(params[:page]).order(created_at: :desc)
end
end
5 changes: 3 additions & 2 deletions app/views/web/reviews/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
.card.border-0.mb-4
.card-body
.h4.card-title = review
- let link_to review.language, language_path(review.language.slug), class: 'text-body' do |link|
.small.mb-2 = t('.course_html', link: link)
.small.mb-2
= link_to t('.course', language: review.language), language_path(review.language.slug), class: 'text-body'
p.card-text.lead = review.body
.small.text-end = l review.created_at, format: :long
- else
p = t('.empty')
2 changes: 1 addition & 1 deletion config/locales/ru.views.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ru:
header: Отзывы
empty: Похоже, что тут пока ничего нет
read_more: Читать далее
course_html: Курс %{link}
course: 'Курс %{language}'
admin:
title: Админка Code-Basics
languages:
Expand Down

0 comments on commit 922fcf1

Please sign in to comment.