diff --git a/app/controllers/admin/weeks_controller.rb b/app/controllers/admin/weeks_controller.rb index 59eda1a..19425ec 100644 --- a/app/controllers/admin/weeks_controller.rb +++ b/app/controllers/admin/weeks_controller.rb @@ -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 diff --git a/app/views/admin/courses/show.html.erb b/app/views/admin/courses/show.html.erb index 99f6705..2ae807b 100644 --- a/app/views/admin/courses/show.html.erb +++ b/app/views/admin/courses/show.html.erb @@ -1,4 +1,3 @@ -

Kurs: <%= @course.name %> (<%= link_to raw(t('back')), admin_courses_path %>)

+

<%= t('course.title_show') %>: <%= @course.name %> (<%= link_to raw(t('back')), admin_courses_path %>)

<%= @course.description %>

- <%= render partial: '/admin/weeks/partials/index' %> diff --git a/app/views/admin/weeks/show.html.erb b/app/views/admin/weeks/show.html.erb index ec64221..9a5b723 100644 --- a/app/views/admin/weeks/show.html.erb +++ b/app/views/admin/weeks/show.html.erb @@ -1,6 +1,3 @@ -

week: <%= @week.name %>

+

<%= t('course.title_show') %>: <%= @course.name %>

+

<%= t('week.title_show') %>: <%= @week.name %> (<%= link_to raw(t('back')), admin_course_path(@course) %>)

<%= @week.description %>

- - - -<%= link_to 'Back', admin_weeks_path %> diff --git a/config/locales/pl/courses.yml b/config/locales/pl/courses.yml index 84bcee0..db25e8d 100644 --- a/config/locales/pl/courses.yml +++ b/config/locales/pl/courses.yml @@ -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' diff --git a/config/locales/pl/weeks.yml b/config/locales/pl/weeks.yml index 26e7bdd..a4b6928 100644 --- a/config/locales/pl/weeks.yml +++ b/config/locales/pl/weeks.yml @@ -1,6 +1,7 @@ pl: week: title: 'Tygodnie' + title_show: 'Tydzień' title_desc: 'Tworzenie tygodni dla kursu' list: 'Lista tygodni' add_one: 'Dodaj pojedynczo'