commit: d91d7be69ed627d7c5c9e733da0aad5732407967 Author: Alex Legler <alex <AT> a3li <DOT> li> AuthorDate: Thu Apr 17 14:05:31 2014 +0000 Commit: Alex Legler <a3li <AT> gentoo <DOT> org> CommitDate: Thu Apr 17 14:05:31 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=d91d7be6
Set <title> when displaying a notice --- infra-status.rb | 1 + views/layout.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/infra-status.rb b/infra-status.rb index 2bff57c..b332df6 100644 --- a/infra-status.rb +++ b/infra-status.rb @@ -35,6 +35,7 @@ get '/notice/:id' do '<h1>No such notice</h1><p>The notice you have requested does not exist or has been removed as it was resolved long ago.</p>' end else + @title = notice['title'] erb :notice, :locals => { :notice => notice } end end diff --git a/views/layout.erb b/views/layout.erb index be50e02..d43b914 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> - <title>Gentoo Infrastructure Status</title> + <title><%= "#{h @title} - " if @title %>Gentoo Infrastructure Status</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="">