Skip to content

Commit

Permalink
Set page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Aug 16, 2023
1 parent 30e183c commit cc21394
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/saved_annotations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class SavedAnnotationsController < ApplicationController

def index
authorize SavedAnnotation
@title = I18n.t('saved_annotations.index.title')
@crumbs = [[I18n.t('saved_annotations.index.title'), saved_annotations_path]]
@saved_annotations = apply_scopes(policy_scope(SavedAnnotation.all))
.includes(:course).includes(:user).includes(:exercise)
Expand All @@ -18,6 +19,7 @@ def index
def show
respond_to do |format|
format.html do
@title = @saved_annotation.title
@crumbs = [[I18n.t('saved_annotations.index.title'), saved_annotations_path], [@saved_annotation.title, saved_annotation_path(@saved_annotation)]]
@submissions = @saved_annotation.submissions.paginate(page: parse_pagination_param(params[:page]))
end
Expand All @@ -26,6 +28,7 @@ def show
end

def edit
@title = I18n.t('saved_annotations.edit.title')
@crumbs = [[I18n.t('saved_annotations.index.title'), saved_annotations_path], [@saved_annotation.title, saved_annotation_path(@saved_annotation)], [I18n.t('saved_annotations.edit.title'), '#']]
end

Expand Down

0 comments on commit cc21394

Please sign in to comment.