week show

This commit is contained in:
Adrian Hinz 2019-05-15 18:17:30 +02:00
parent 866fb98550
commit b2ce16fb69
5 changed files with 6 additions and 7 deletions

View File

@ -74,6 +74,7 @@ module Admin
# Use callbacks to share common setup or constraints between actions.
def set_object
@week = Week.find(params[:id])
@course = @week.course
end
def collection

View File

@ -1,4 +1,3 @@
<h1 class="h3 mb-1 text-gray-800">Kurs: <strong><%= @course.name %></strong> (<%= link_to raw(t('back')), admin_courses_path %>)</h1>
<h1 class="h3 mb-1 text-gray-800"><%= t('course.title_show') %>: <strong><%= @course.name %></strong> (<%= link_to raw(t('back')), admin_courses_path %>)</h1>
<p class="mb-4"><%= @course.description %></p>
<!-- Weeks -->
<%= render partial: '/admin/weeks/partials/index' %>

View File

@ -1,6 +1,3 @@
<h1 class="h3 mb-1 text-gray-800">week: <strong><%= @week.name %></strong></h1>
<h1 class="h3 mb-1 text-gray-800"><%= t('course.title_show') %>: <strong><%= @course.name %></strong></h1>
<h1 class="h3 mb-1 text-gray-800"><%= t('week.title_show') %>: <strong><%= @week.name %></strong> (<%= link_to raw(t('back')), admin_course_path(@course) %>)</h1>
<p class="mb-4"><%= @week.description %></p>
<!-- Weeks -->
<%= link_to 'Back', admin_weeks_path %>

View File

@ -1,6 +1,7 @@
pl:
course:
title: 'Kursy'
title_show: 'Kurs'
title_desc: 'Tworzenie kursów'
list: 'Lista kursów'
add_new: 'Dodaj nowy kurs'

View File

@ -1,6 +1,7 @@
pl:
week:
title: 'Tygodnie'
title_show: 'Tydzień'
title_desc: 'Tworzenie tygodni dla kursu'
list: 'Lista tygodni'
add_one: 'Dodaj pojedynczo'