I neglected to attach the patch in my first email, and discovered a bug in it so have modified my approach for adding more information to the title.
-- Brian Murray @ubuntu.com
From bde269dcd539e6c330e280e06af716569a1ea9bc Mon Sep 17 00:00:00 2001 From: Brian Murray <br...@murraytwins.com> Date: Tue, 19 Jan 2016 13:21:00 -0800 Subject: [PATCH] modify html page titles to contain package name, arch, suite to make browser history better. --- lib/debci/html.rb | 3 +++ lib/debci/html/layout.erb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/debci/html.rb b/lib/debci/html.rb index ee1b769..8e14754 100644 --- a/lib/debci/html.rb +++ b/lib/debci/html.rb @@ -43,11 +43,13 @@ module Debci def package(package, filename) @package = package + @moretitle = package.name expand_template(:package, filename) end def prefix(prefix, filename) @prefix = prefix + @moretitle = prefix expand_template(:packagelist, filename) end @@ -65,6 +67,7 @@ module Debci @autopkgtest_dir = 'data/autopkgtest' @site_url = expand_url(Debci.config.url_base, @suite) @artifacts_url_base = expand_url(Debci.config.artifacts_url_base, @suite) + @moretitle = "#{package.name}/#{suite}/#{architecture}" expand_template(:history, filename) end diff --git a/lib/debci/html/layout.erb b/lib/debci/html/layout.erb index b798766..6c17f45 100644 --- a/lib/debci/html/layout.erb +++ b/lib/debci/html/layout.erb @@ -5,7 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="<%= Debci.config.distro_name %> Continuous Integration Results"> <meta name="author" content="The Debian Project"> - <title><%= Debci.config.distro_name %> Continuous Integration</title> + <title><%= Debci.config.distro_name %> Continuous Integration<% if @moretitle %> - <%= @moretitle %><% end %></title> <link rel="icon" type="image/png" href="/debian.png"/> <link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.css"/> <link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap-theme.css"/> -- 2.7.0.rc3
signature.asc
Description: Digital signature