Revision 1297:0a574315af3e .svn/pristine/87
| .svn/pristine/87/87302c164870deca416ccc176d640a68faf97687.svn-base | ||
|---|---|---|
| 1 |
module Redmine |
|
| 2 |
module Info |
|
| 3 |
class << self |
|
| 4 |
def app_name; 'Redmine' end |
|
| 5 |
def url; 'http://www.redmine.org/' end |
|
| 6 |
def help_url; 'http://www.redmine.org/guide' end |
|
| 7 |
def versioned_name; "#{app_name} #{Redmine::VERSION}" end
|
|
| 8 |
|
|
| 9 |
def environment |
|
| 10 |
s = "Environment:\n" |
|
| 11 |
s << [ |
|
| 12 |
["Redmine version", Redmine::VERSION], |
|
| 13 |
["Ruby version", "#{RUBY_VERSION} (#{RUBY_PLATFORM})"],
|
|
| 14 |
["Rails version", Rails::VERSION::STRING], |
|
| 15 |
["Environment", Rails.env], |
|
| 16 |
["Database adapter", ActiveRecord::Base.connection.adapter_name] |
|
| 17 |
].map {|info| " %-40s %s" % info}.join("\n")
|
|
| 18 |
s << "\nRedmine plugins:\n" |
|
| 19 |
|
|
| 20 |
plugins = Redmine::Plugin.all |
|
| 21 |
if plugins.any? |
|
| 22 |
s << plugins.map {|plugin| " %-40s %s" % [plugin.id.to_s, plugin.version.to_s]}.join("\n")
|
|
| 23 |
else |
|
| 24 |
s << " no plugin installed" |
|
| 25 |
end |
|
| 26 |
end |
|
| 27 |
end |
|
| 28 |
end |
|
| 29 |
end |
|
| .svn/pristine/87/8755b7cb985a4f9d801e46a233fcd3dca9bd6653.svn-base | ||
|---|---|---|
| 1 |
<h2><%=l(:label_confirmation)%></h2> |
|
| 2 |
<div class="warning"> |
|
| 3 |
<p><strong><%=h @project_to_destroy %></strong><br /> |
|
| 4 |
<%=l(:text_project_destroy_confirmation)%> |
|
| 5 |
|
|
| 6 |
<% if @project_to_destroy.descendants.any? %> |
|
| 7 |
<br /><%= l(:text_subprojects_destroy_warning, |
|
| 8 |
content_tag('strong', h(@project_to_destroy.descendants.collect{|p| p.to_s}.join(', ')))).html_safe %>
|
|
| 9 |
<% end %> |
|
| 10 |
</p> |
|
| 11 |
<p> |
|
| 12 |
<%= form_tag(project_path(@project_to_destroy), :method => :delete) do %> |
|
| 13 |
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label> |
|
| 14 |
<%= submit_tag l(:button_delete) %> |
|
| 15 |
<% end %> |
|
| 16 |
</p> |
|
| 17 |
</div> |
|
| .svn/pristine/87/877bc446d0201ff7c315a761ef29ed83e7bc67d8.svn-base | ||
|---|---|---|
| 1 |
# encoding: utf-8 |
|
| 2 |
# |
|
| 3 |
# Redmine - project management software |
|
| 4 |
# Copyright (C) 2006-2012 Jean-Philippe Lang |
|
| 5 |
# |
|
| 6 |
# This program is free software; you can redistribute it and/or |
|
| 7 |
# modify it under the terms of the GNU General Public License |
|
| 8 |
# as published by the Free Software Foundation; either version 2 |
|
| 9 |
# of the License, or (at your option) any later version. |
|
| 10 |
# |
|
| 11 |
# This program is distributed in the hope that it will be useful, |
|
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 14 |
# GNU General Public License for more details. |
|
| 15 |
# |
|
| 16 |
# You should have received a copy of the GNU General Public License |
|
| 17 |
# along with this program; if not, write to the Free Software |
|
| 18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
| 19 |
|
|
| 20 |
module MessagesHelper |
|
| 21 |
end |
|
| .svn/pristine/87/87a01faa16db9719fa9af9f610ef19a85f7c0bc6.svn-base | ||
|---|---|---|
| 1 |
# Redmine - project management software |
|
| 2 |
# Copyright (C) 2006-2012 Jean-Philippe Lang |
|
| 3 |
# |
|
| 4 |
# This program is free software; you can redistribute it and/or |
|
| 5 |
# modify it under the terms of the GNU General Public License |
|
| 6 |
# as published by the Free Software Foundation; either version 2 |
|
| 7 |
# of the License, or (at your option) any later version. |
|
| 8 |
# |
|
| 9 |
# This program is distributed in the hope that it will be useful, |
|
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
# GNU General Public License for more details. |
|
| 13 |
# |
|
| 14 |
# You should have received a copy of the GNU General Public License |
|
| 15 |
# along with this program; if not, write to the Free Software |
|
| 16 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
| 17 |
|
|
| 18 |
require File.expand_path('../../test_helper', __FILE__)
|
|
| 19 |
|
|
| 20 |
class RepositoryFilesystemTest < ActiveSupport::TestCase |
|
| 21 |
fixtures :projects |
|
| 22 |
|
|
| 23 |
include Redmine::I18n |
|
| 24 |
|
|
| 25 |
REPOSITORY_PATH = Rails.root.join('tmp/test/filesystem_repository').to_s
|
|
| 26 |
|
|
| 27 |
def setup |
|
| 28 |
@project = Project.find(3) |
|
| 29 |
Setting.enabled_scm << 'Filesystem' unless Setting.enabled_scm.include?('Filesystem')
|
|
| 30 |
@repository = Repository::Filesystem.create( |
|
| 31 |
:project => @project, |
|
| 32 |
:url => REPOSITORY_PATH |
|
| 33 |
) |
|
| 34 |
assert @repository |
|
| 35 |
end |
|
| 36 |
|
|
| 37 |
def test_blank_root_directory_error_message |
|
| 38 |
set_language_if_valid 'en' |
|
| 39 |
repo = Repository::Filesystem.new( |
|
| 40 |
:project => @project, |
|
| 41 |
:identifier => 'test' |
|
| 42 |
) |
|
| 43 |
assert !repo.save |
|
| 44 |
assert_include "Root directory can't be blank", |
|
| 45 |
repo.errors.full_messages |
|
| 46 |
end |
|
| 47 |
|
|
| 48 |
def test_blank_root_directory_error_message_fr |
|
| 49 |
set_language_if_valid 'fr' |
|
| 50 |
str = "R\xc3\xa9pertoire racine doit \xc3\xaatre renseign\xc3\xa9(e)" |
|
| 51 |
str.force_encoding('UTF-8') if str.respond_to?(:force_encoding)
|
|
| 52 |
repo = Repository::Filesystem.new( |
|
| 53 |
:project => @project, |
|
| 54 |
:url => "", |
|
| 55 |
:identifier => 'test', |
|
| 56 |
:path_encoding => '' |
|
| 57 |
) |
|
| 58 |
assert !repo.save |
|
| 59 |
assert_include str, repo.errors.full_messages |
|
| 60 |
end |
|
| 61 |
|
|
| 62 |
if File.directory?(REPOSITORY_PATH) |
|
| 63 |
def test_fetch_changesets |
|
| 64 |
assert_equal 0, @repository.changesets.count |
|
| 65 |
assert_equal 0, @repository.filechanges.count |
|
| 66 |
@repository.fetch_changesets |
|
| 67 |
@project.reload |
|
| 68 |
assert_equal 0, @repository.changesets.count |
|
| 69 |
assert_equal 0, @repository.filechanges.count |
|
| 70 |
end |
|
| 71 |
|
|
| 72 |
def test_entries |
|
| 73 |
entries = @repository.entries("", 2)
|
|
| 74 |
assert_kind_of Redmine::Scm::Adapters::Entries, entries |
|
| 75 |
assert_equal 3, entries.size |
|
| 76 |
end |
|
| 77 |
|
|
| 78 |
def test_entries_in_directory |
|
| 79 |
assert_equal 2, @repository.entries("dir", 3).size
|
|
| 80 |
end |
|
| 81 |
|
|
| 82 |
def test_cat |
|
| 83 |
assert_equal "TEST CAT\n", @repository.scm.cat("test")
|
|
| 84 |
end |
|
| 85 |
else |
|
| 86 |
puts "Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS." |
|
| 87 |
def test_fake; assert true end |
|
| 88 |
end |
|
| 89 |
end |
|
| .svn/pristine/87/87bccc8b0237c60b603b0c9aecb4fc7a1b48b6d1.svn-base | ||
|---|---|---|
| 1 |
<h3 class="title"><%= l(:permission_add_issue_watchers) %></h3> |
|
| 2 |
|
|
| 3 |
<%= form_tag({:controller => 'watchers',
|
|
| 4 |
:action => (watched ? 'create' : 'append'), |
|
| 5 |
:object_type => watched.class.name.underscore, |
|
| 6 |
:object_id => watched}, |
|
| 7 |
:remote => true, |
|
| 8 |
:method => :post, |
|
| 9 |
:id => 'new-watcher-form') do %> |
|
| 10 |
|
|
| 11 |
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
|
| 12 |
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
|
|
| 13 |
:action => 'autocomplete_for_user', |
|
| 14 |
:object_type => watched.class.name.underscore, |
|
| 15 |
:object_id => watched) }')" %> |
|
| 16 |
|
|
| 17 |
<div id="users_for_watcher"> |
|
| 18 |
<%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %> |
|
| 19 |
</div> |
|
| 20 |
|
|
| 21 |
<p class="buttons"> |
|
| 22 |
<%= submit_tag l(:button_add), :name => nil, :onclick => "hideModal(this);" %> |
|
| 23 |
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %> |
|
| 24 |
</p> |
|
| 25 |
<% end %> |
|
Also available in: Unified diff