Added Redmine::Info to store various information about the application.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@682 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-29 22:27:43 +00:00
parent 088563db3e
commit 840f18b1c7
6 changed files with 13 additions and 12 deletions

View File

@ -1,6 +1,6 @@
<h2><%=l(:label_information_plural)%></h2>
<p><%=l(:field_version)%>: <strong>redMine <%= Redmine::VERSION %></strong> (<%= @db_adapter_name %>)</p>
<p><%=l(:field_version)%>: <strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p>
<table class="list">
<tr class="odd"><td>File repository writable</td><td><%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>

View File

@ -6,7 +6,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.id url_for(:controller => 'welcome', :only_path => false)
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! "#{Redmine::Info.name} #{Redmine::VERSION}" }
xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! Redmine::Info.versioned_name; }
@items.each do |item|
xml.entry do
xml.title truncate(item.event_title, 100)

View File

@ -3,7 +3,7 @@
<head>
<title><%= Setting.app_title + (@html_title ? ": #{@html_title}" : "") %></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="redMine" />
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<!--[if IE]>
<style type="text/css">
@ -103,7 +103,7 @@
</div>
<div id="footer">
<p><a href="http://www.redmine.org/">redMine</a> <small><%= Redmine::VERSION %> &copy 2006-2007 Jean-Philippe Lang</small></p>
<p><%= link_to Redmine::Info.app_name, Redmine::Info.url %> <small><%= Redmine::VERSION %> &copy 2006-2007 Jean-Philippe Lang</small></p>
</div>
</div>

View File

@ -1,4 +1,3 @@
require 'redmine/version'
require 'redmine/access_control'
require 'redmine/menu_manager'
require 'redmine/mime_type'

9
lib/redmine/info.rb Normal file
View File

@ -0,0 +1,9 @@
module Redmine
module Info
class << self
def app_name; 'Redmine' end
def url; 'http://www.redmine.org/' end
def versioned_name; "#{app_name} #{Redmine::VERSION}" end
end
end
end

View File

@ -8,11 +8,4 @@ module Redmine
def self.to_s; STRING end
end
module Info
class << self
def name; 'Redmine' end
def url; 'http://www.redmine.org/' end
end
end
end