Rename Redmine::Info to OpenProject::Info

pull/548/head
Philipp Tessenow 11 years ago
parent e46d93c133
commit a44c700e14
  1. 4
      app/helpers/application_helper.rb
  2. 4
      app/models/work_package/pdf_exporter.rb
  3. 2
      app/views/admin/info.html.erb
  4. 2
      app/views/common/feed.atom.builder
  5. 2
      app/views/layouts/base.html.erb
  6. 2
      lib/redmine.rb
  7. 2
      lib/redmine/info.rb
  8. 2
      script/about
  9. 4
      spec/helpers/application_helper_spec.rb
  10. 4
      test/unit/lib/redmine/menu_manager/mapper_test.rb

@ -1076,8 +1076,8 @@ module ApplicationHelper
# #
def footer_content def footer_content
elements = [] elements = []
elements << I18n.t(:text_powered_by, :link => link_to(Redmine::Info.app_name, elements << I18n.t(:text_powered_by, :link => link_to(OpenProject::Info.app_name,
Redmine::Info.url)) OpenProject::Info.url))
unless OpenProject::Footer.content.nil? unless OpenProject::Footer.content.nil?
OpenProject::Footer.content.each do |name, value| OpenProject::Footer.content.each do |name, value|
content = value.respond_to?(:call) ? value.call : value content = value.respond_to?(:call) ? value.call : value

@ -340,7 +340,7 @@ module WorkPackage::PdfExporter
set_language_if_valid lang set_language_if_valid lang
@font_for_content = 'FreeSans' @font_for_content = 'FreeSans'
@font_for_footer = 'FreeSans' @font_for_footer = 'FreeSans'
SetCreator(Redmine::Info.app_name) SetCreator(OpenProject::Info.app_name)
SetFont(@font_for_content) SetFont(@font_for_content)
end end
@ -394,7 +394,7 @@ module WorkPackage::PdfExporter
@font_for_content = 'Arial' @font_for_content = 'Arial'
@font_for_footer = 'Helvetica' @font_for_footer = 'Helvetica'
SetCreator(Redmine::Info.app_name) SetCreator(OpenProject::Info.app_name)
SetFont(@font_for_content) SetFont(@font_for_content)
end end

@ -31,7 +31,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= call_hook(:view_admin_info_top) %> <%= call_hook(:view_admin_info_top) %>
<%= content_tag :h3, I18n.t('label_core_version') %> <%= content_tag :h3, I18n.t('label_core_version') %>
<p><strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p> <p><strong><%= OpenProject::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p>
<%= content_tag :h3, I18n.t('label_system') %> <%= content_tag :h3, I18n.t('label_system') %>
<table class="list"> <table class="list">

@ -38,7 +38,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.id url_for(:controller => '/welcome', :only_path => false) xml.id url_for(:controller => '/welcome', :only_path => false)
xml.updated(updated_time.xmlschema) xml.updated(updated_time.xmlschema)
xml.author { xml.name "#{Setting.app_title}" } xml.author { xml.name "#{Setting.app_title}" }
xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; } xml.generator(:uri => OpenProject::Info.url) { xml.text! OpenProject::Info.app_name; }
@items.each do |item| @items.each do |item|
item_event = (not first_item.nil? and first_item.respond_to?(:data)) ? item.data : item item_event = (not first_item.nil? and first_item.respond_to?(:data)) ? item.data : item

@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details.
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= html_title %></title> <title><%= html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" /> <meta name="description" content="<%= OpenProject::Info.app_name %>" />
<meta name="keywords" content="issue,bug,type" /> <meta name="keywords" content="issue,bug,type" />
<meta name="current_menu_item" content="<%= current_menu_item %>" /> <meta name="current_menu_item" content="<%= current_menu_item %>" />
<%= csrf_meta_tags %> <%= csrf_meta_tags %>

@ -227,7 +227,7 @@ Redmine::MenuManager.map :top_menu do |menu|
menu.push :my_page, { :controller => '/my', :action => 'page' }, :if => Proc.new { User.current.logged? } menu.push :my_page, { :controller => '/my', :action => 'page' }, :if => Proc.new { User.current.logged? }
# projects menu will be added by Redmine::MenuManager::TopMenuHelper#render_projects_top_menu_node # projects menu will be added by Redmine::MenuManager::TopMenuHelper#render_projects_top_menu_node
menu.push :administration, { :controller => '/admin', :action => 'projects' }, :if => Proc.new { User.current.admin? }, :last => true menu.push :administration, { :controller => '/admin', :action => 'projects' }, :if => Proc.new { User.current.admin? }, :last => true
menu.push :help, Redmine::Info.help_url, :last => true, :caption => "?", :html => { :accesskey => Redmine::AccessKeys.key_for(:help) } menu.push :help, OpenProject::Info.help_url, :last => true, :caption => "?", :html => { :accesskey => Redmine::AccessKeys.key_for(:help) }
end end
Redmine::MenuManager.map :account_menu do |menu| Redmine::MenuManager.map :account_menu do |menu|

@ -27,7 +27,7 @@
# See doc/COPYRIGHT.rdoc for more details. # See doc/COPYRIGHT.rdoc for more details.
#++ #++
module Redmine module OpenProject
module Info module Info
class << self class << self
def app_name; Setting.software_name end def app_name; Setting.software_name end

@ -3,4 +3,4 @@
ENV["RAILS_ENV"] ||= "production" ENV["RAILS_ENV"] ||= "production"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
puts puts
puts Redmine::Info.environment puts OpenProject::Info.environment

@ -57,7 +57,7 @@ describe ApplicationHelper do
OpenProject::Footer.content = nil OpenProject::Footer.content = nil
end end
it { footer_content.should == I18n.t(:text_powered_by, :link => link_to(Redmine::Info.app_name, Redmine::Info.url)) } it { footer_content.should == I18n.t(:text_powered_by, :link => link_to(OpenProject::Info.app_name, OpenProject::Info.url)) }
end end
context "string as additional footer content" do context "string as additional footer content" do
@ -66,7 +66,7 @@ describe ApplicationHelper do
OpenProject::Footer.add_content("openproject","footer") OpenProject::Footer.add_content("openproject","footer")
end end
it { footer_content.include?(I18n.t(:text_powered_by, :link => link_to(Redmine::Info.app_name, Redmine::Info.url))).should be_true } it { footer_content.include?(I18n.t(:text_powered_by, :link => link_to(OpenProject::Info.app_name, OpenProject::Info.url))).should be_true }
it { footer_content.include?("<span class=\"footer_openproject\">footer</span>").should be_true } it { footer_content.include?("<span class=\"footer_openproject\">footer</span>").should be_true }
end end

@ -178,9 +178,9 @@ class Redmine::MenuManager::MapperTest < ActiveSupport::TestCase
test 'deleting all items' do test 'deleting all items' do
# Exposed by deleting :last items # Exposed by deleting :last items
Redmine::MenuManager.map :test_menu do |menu| Redmine::MenuManager.map :test_menu do |menu|
menu.push :not_last, Redmine::Info.help_url menu.push :not_last, OpenProject::Info.help_url
menu.push :administration, { :controller => 'projects', :action => 'show'}, {:last => true} menu.push :administration, { :controller => 'projects', :action => 'show'}, {:last => true}
menu.push :help, Redmine::Info.help_url, :last => true menu.push :help, OpenProject::Info.help_url, :last => true
end end
assert_nothing_raised do assert_nothing_raised do

Loading…
Cancel
Save