OSDN Git Service

Added Redmine::Info to store various information about the application.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 29 Aug 2007 22:27:43 +0000 (22:27 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 29 Aug 2007 22:27:43 +0000 (22:27 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@682 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/admin/info.rhtml
app/views/common/feed.atom.rxml
app/views/layouts/base.rhtml
lib/redmine.rb
lib/redmine/info.rb [new file with mode: 0644]
lib/redmine/version.rb

index dd11aeb..a4b4496 100644 (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>
index fa00d75..b5f7334 100644 (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)
index 9c81a31..1beb51c 100644 (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">
        </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>
index df4d0a8..1d27dd4 100644 (file)
@@ -1,4 +1,3 @@
-require 'redmine/version'
 require 'redmine/access_control'
 require 'redmine/menu_manager'
 require 'redmine/mime_type'
diff --git a/lib/redmine/info.rb b/lib/redmine/info.rb
new file mode 100644 (file)
index 0000000..1541e14
--- /dev/null
@@ -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
index 494bb2d..5934af0 100644 (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