Skip to content

Commit

Permalink
Merge pull request #6156 from rvsia/timelines-title
Browse files Browse the repository at this point in the history
Timelines title
  • Loading branch information
martinpovolny committed Sep 9, 2019
2 parents 66379ac + 17b8b19 commit 2c4554a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/mixins/more_show_actions.rb
Expand Up @@ -7,7 +7,7 @@ def show_timeline
@lastaction = "show_timeline"
@timeline = @timeline_filter = true
tl_build_timeline # Create the timeline report
drop_breadcrumb(:name => _("Timelines"),
drop_breadcrumb(:name => _("Timelines for %{table} \"%{name}\"") % {:table => ui_lookup(:table => controller_name), :name => @record.name},
:url => "/#{controller_name}/show/#{@record.id}" \
"?refresh=n&display=timeline")
end
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/_tl_show.html.haml
Expand Up @@ -3,6 +3,8 @@
ManageIQ.calendar.calDateFrom = new Date(#{@tl_options.date.start});
ManageIQ.calendar.calDateTo = new Date(#{@tl_options.date.end});

%h1
= @title
= render :partial => "layouts/flash_msg"
= render :partial => "layouts/tl_options"
= render :partial => 'layouts/tl_detail'
Expand Down
5 changes: 5 additions & 0 deletions spec/controllers/ems_infra_controller_spec.rb
Expand Up @@ -325,6 +325,11 @@
expect(ApplicationHelper::Toolbar::TimelineCenter).to receive(:definition).and_call_original
subject
end

it "contains timelines title" do
subject
expect(response.body).to include("Timelines for #{ui_lookup(:table => controller.controller_name)} "#{@ems.name}"")
end
end

context "render listnav partial" do
Expand Down

0 comments on commit 2c4554a

Please sign in to comment.