From 6005648644b7f17e22286de8d75ba9511fdcfbe9 Mon Sep 17 00:00:00 2001 From: Akzhan Abdulin Date: Thu, 29 Jul 2010 18:11:08 +0400 Subject: Show version of Chef Server WebUI in its layout --- chef-server-webui/app/helpers/application_helper.rb | 6 ++++++ chef-server-webui/app/views/layout/application.html.haml | 2 +- chef-server-webui/app/views/layout/login.html.haml | 2 +- chef-server-webui/lib/chef-server-webui.rb | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'chef-server-webui') diff --git a/chef-server-webui/app/helpers/application_helper.rb b/chef-server-webui/app/helpers/application_helper.rb index 91d3ea1bd2..1aaf4f6b9d 100644 --- a/chef-server-webui/app/helpers/application_helper.rb +++ b/chef-server-webui/app/helpers/application_helper.rb @@ -1,6 +1,12 @@ require 'chef/mixin/deep_merge' +require 'chef-server-webui/version' module Merb module ApplicationHelper + + def chef_version + ::ChefServerWebui::VERSION + end + end end diff --git a/chef-server-webui/app/views/layout/application.html.haml b/chef-server-webui/app/views/layout/application.html.haml index 82f80bd58e..639f338352 100644 --- a/chef-server-webui/app/views/layout/application.html.haml +++ b/chef-server-webui/app/views/layout/application.html.haml @@ -50,7 +50,7 @@ = catch_content :for_layout #footer .block - %p Copyright © 2010 Opscode + %p= "Version #{chef_version} — Copyright © 2009-#{Time.now.year} Opscode" #sidebar .block.notice#sidebar_block_notice= catch_content :sidebar_block_notice .block#sidebar_block= catch_content :sidebar_block diff --git a/chef-server-webui/app/views/layout/login.html.haml b/chef-server-webui/app/views/layout/login.html.haml index 1f1b9689eb..a4f67994bc 100644 --- a/chef-server-webui/app/views/layout/login.html.haml +++ b/chef-server-webui/app/views/layout/login.html.haml @@ -29,7 +29,7 @@ = catch_content :for_layout #footer .block - %p Copyright © 2010 Opscode + %p= "Version #{chef_version} — Copyright © 2009-#{Time.now.year} Opscode" #sidebar .block.notice#sidebar_block_notice= catch_content :sidebar_block_notice .block#sidebar_block= catch_content :sidebar_block diff --git a/chef-server-webui/lib/chef-server-webui.rb b/chef-server-webui/lib/chef-server-webui.rb index 9432f30717..6ccf807ec6 100644 --- a/chef-server-webui/lib/chef-server-webui.rb +++ b/chef-server-webui/lib/chef-server-webui.rb @@ -1,2 +1,4 @@ -CHEF_SERVER_WEBUI_VERSION = "0.8.11" +require 'chef-server-webui/version' + +CHEF_SERVER_WEBUI_VERSION = ::ChefServerWebui::VERSION CHEF_SERVER_WEBUI_ROOT = File.expand_path(File.dirname(__FILE__) + '/../') -- cgit v1.2.1