##// END OF EJS Templates
Merged r13486 to r13489 and r13492 (#8817)....
Jean-Philippe Lang -
r13253:ebde5a5f90b7
parent child
Show More
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
@@ -1,42 +1,42
1 /.project
1 /.project
2 /.loadpath
2 /.loadpath
3 /.powrc
3 /.powrc
4 /.rvmrc
4 /.rvmrc
5 /config/additional_environment.rb
5 /config/additional_environment.rb
6 /config/configuration.yml
6 /config/configuration.yml
7 /config/database.yml
7 /config/database.yml
8 /config/email.yml
8 /config/email.yml
9 /config/initializers/session_store.rb
9 /config/initializers/session_store.rb
10 /config/initializers/secret_token.rb
10 /config/initializers/secret_token.rb
11 /coverage
11 /coverage
12 /db/*.db
12 /db/*.db
13 /db/*.sqlite3
13 /db/*.sqlite3
14 /db/schema.rb
14 /db/schema.rb
15 /files/*
15 /files/*
16 /lib/redmine/scm/adapters/mercurial/redminehelper.pyc
16 /lib/redmine/scm/adapters/mercurial/redminehelper.pyc
17 /lib/redmine/scm/adapters/mercurial/redminehelper.pyo
17 /lib/redmine/scm/adapters/mercurial/redminehelper.pyo
18 /log/*.log*
18 /log/*.log*
19 /log/mongrel_debug
19 /log/mongrel_debug
20 /plugins/*
20 /plugins/*
21 !/plugins/README
21 !/plugins/README
22 /public/dispatch.*
22 /public/dispatch.*
23 /public/plugin_assets
23 /public/plugin_assets/*
24 /public/themes/*
24 /public/themes/*
25 !/public/themes/alternate
25 !/public/themes/alternate
26 !/public/themes/classic
26 !/public/themes/classic
27 !/public/themes/README
27 !/public/themes/README
28 /tmp/*
28 /tmp/*
29 /tmp/cache/*
29 /tmp/cache/*
30 /tmp/pdf/*
30 /tmp/pdf/*
31 /tmp/sessions/*
31 /tmp/sessions/*
32 /tmp/sockets/*
32 /tmp/sockets/*
33 /tmp/test/*
33 /tmp/test/*
34 /tmp/thumbnails/*
34 /tmp/thumbnails/*
35 /vendor/cache
35 /vendor/cache
36 /vendor/rails
36 /vendor/rails
37 *.rbc
37 *.rbc
38
38
39 /.bundle
39 /.bundle
40 /Gemfile.lock
40 /Gemfile.lock
41 /Gemfile.local
41 /Gemfile.local
42
42
@@ -1,41 +1,41
1 syntax: glob
1 syntax: glob
2
2
3 .project
3 .project
4 .loadpath
4 .loadpath
5 .powrc
5 .powrc
6 .rvmrc
6 .rvmrc
7 config/additional_environment.rb
7 config/additional_environment.rb
8 config/configuration.yml
8 config/configuration.yml
9 config/database.yml
9 config/database.yml
10 config/email.yml
10 config/email.yml
11 config/initializers/session_store.rb
11 config/initializers/session_store.rb
12 config/initializers/secret_token.rb
12 config/initializers/secret_token.rb
13 coverage
13 coverage
14 db/*.db
14 db/*.db
15 db/*.sqlite3
15 db/*.sqlite3
16 db/schema.rb
16 db/schema.rb
17 files/*
17 files/*
18 lib/redmine/scm/adapters/mercurial/redminehelper.pyc
18 lib/redmine/scm/adapters/mercurial/redminehelper.pyc
19 lib/redmine/scm/adapters/mercurial/redminehelper.pyo
19 lib/redmine/scm/adapters/mercurial/redminehelper.pyo
20 log/*.log*
20 log/*.log*
21 log/mongrel_debug
21 log/mongrel_debug
22 public/dispatch.*
22 public/dispatch.*
23 public/plugin_assets
23 public/plugin_assets/*
24 tmp/*
24 tmp/*
25 tmp/cache/*
25 tmp/cache/*
26 tmp/pdf/*
26 tmp/pdf/*
27 tmp/sessions/*
27 tmp/sessions/*
28 tmp/sockets/*
28 tmp/sockets/*
29 tmp/test/*
29 tmp/test/*
30 tmp/thumbnails/*
30 tmp/thumbnails/*
31 vendor/cache
31 vendor/cache
32 vendor/rails
32 vendor/rails
33 *.rbc
33 *.rbc
34
34
35 .svn/
35 .svn/
36 .git/
36 .git/
37
37
38 .bundle
38 .bundle
39 Gemfile.lock
39 Gemfile.lock
40 Gemfile.local
40 Gemfile.local
41
41
@@ -1,84 +1,84
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2014 Jean-Philippe Lang
2 # Copyright (C) 2006-2014 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
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
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.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class AdminController < ApplicationController
18 class AdminController < ApplicationController
19 layout 'admin'
19 layout 'admin'
20 menu_item :projects, :only => :projects
20 menu_item :projects, :only => :projects
21 menu_item :plugins, :only => :plugins
21 menu_item :plugins, :only => :plugins
22 menu_item :info, :only => :info
22 menu_item :info, :only => :info
23
23
24 before_filter :require_admin
24 before_filter :require_admin
25 helper :sort
25 helper :sort
26 include SortHelper
26 include SortHelper
27
27
28 def index
28 def index
29 @no_configuration_data = Redmine::DefaultData::Loader::no_data?
29 @no_configuration_data = Redmine::DefaultData::Loader::no_data?
30 end
30 end
31
31
32 def projects
32 def projects
33 @status = params[:status] || 1
33 @status = params[:status] || 1
34
34
35 scope = Project.status(@status).order('lft')
35 scope = Project.status(@status).order('lft')
36 scope = scope.like(params[:name]) if params[:name].present?
36 scope = scope.like(params[:name]) if params[:name].present?
37 @projects = scope.all
37 @projects = scope.all
38
38
39 render :action => "projects", :layout => false if request.xhr?
39 render :action => "projects", :layout => false if request.xhr?
40 end
40 end
41
41
42 def plugins
42 def plugins
43 @plugins = Redmine::Plugin.all
43 @plugins = Redmine::Plugin.all
44 end
44 end
45
45
46 # Loads the default configuration
46 # Loads the default configuration
47 # (roles, trackers, statuses, workflow, enumerations)
47 # (roles, trackers, statuses, workflow, enumerations)
48 def default_configuration
48 def default_configuration
49 if request.post?
49 if request.post?
50 begin
50 begin
51 Redmine::DefaultData::Loader::load(params[:lang])
51 Redmine::DefaultData::Loader::load(params[:lang])
52 flash[:notice] = l(:notice_default_data_loaded)
52 flash[:notice] = l(:notice_default_data_loaded)
53 rescue Exception => e
53 rescue Exception => e
54 flash[:error] = l(:error_can_t_load_default_data, e.message)
54 flash[:error] = l(:error_can_t_load_default_data, e.message)
55 end
55 end
56 end
56 end
57 redirect_to admin_path
57 redirect_to admin_path
58 end
58 end
59
59
60 def test_email
60 def test_email
61 raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
61 raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
62 # Force ActionMailer to raise delivery errors so we can catch it
62 # Force ActionMailer to raise delivery errors so we can catch it
63 ActionMailer::Base.raise_delivery_errors = true
63 ActionMailer::Base.raise_delivery_errors = true
64 begin
64 begin
65 @test = Mailer.test_email(User.current).deliver
65 @test = Mailer.test_email(User.current).deliver
66 flash[:notice] = l(:notice_email_sent, User.current.mail)
66 flash[:notice] = l(:notice_email_sent, User.current.mail)
67 rescue Exception => e
67 rescue Exception => e
68 flash[:error] = l(:notice_email_error, Redmine::CodesetUtil.replace_invalid_utf8(e.message.dup))
68 flash[:error] = l(:notice_email_error, Redmine::CodesetUtil.replace_invalid_utf8(e.message.dup))
69 end
69 end
70 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
70 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
71 redirect_to settings_path(:tab => 'notifications')
71 redirect_to settings_path(:tab => 'notifications')
72 end
72 end
73
73
74 def info
74 def info
75 @db_adapter_name = ActiveRecord::Base.connection.adapter_name
75 @db_adapter_name = ActiveRecord::Base.connection.adapter_name
76 @checklist = [
76 @checklist = [
77 [:text_default_administrator_account_changed, User.default_admin_account_changed?],
77 [:text_default_administrator_account_changed, User.default_admin_account_changed?],
78 [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
78 [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
79 [:text_plugin_assets_writable, File.writable?(Redmine::Plugin.public_directory)],
79 ["#{l :text_plugin_assets_writable} (./public/plugin_assets)", File.writable?(Redmine::Plugin.public_directory)],
80 [:text_rmagick_available, Object.const_defined?(:Magick)],
80 [:text_rmagick_available, Object.const_defined?(:Magick)],
81 [:text_convert_available, Redmine::Thumbnail.convert_available?]
81 [:text_convert_available, Redmine::Thumbnail.convert_available?]
82 ]
82 ]
83 end
83 end
84 end
84 end
@@ -1,19 +1,19
1 <h2><%=l(:label_information_plural)%></h2>
1 <h2><%=l(:label_information_plural)%></h2>
2
2
3 <p><strong><%= Redmine::Info.versioned_name %></strong></p>
3 <p><strong><%= Redmine::Info.versioned_name %></strong></p>
4
4
5 <table class="list">
5 <table class="list">
6 <% @checklist.each do |label, result| %>
6 <% @checklist.each do |label, result| %>
7 <tr class="<%= cycle 'odd', 'even' %>">
7 <tr class="<%= cycle 'odd', 'even' %>">
8 <td class="name"><%= l(label) %></td>
8 <td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td>
9 <td class="tick"><%= image_tag((result ? 'true.png' : 'exclamation.png'),
9 <td class="tick"><%= image_tag((result ? 'true.png' : 'exclamation.png'),
10 :style => "vertical-align:bottom;") %></td>
10 :style => "vertical-align:bottom;") %></td>
11 </tr>
11 </tr>
12 <% end %>
12 <% end %>
13 </table>
13 </table>
14 <br />
14 <br />
15 <div class="box">
15 <div class="box">
16 <pre><%= Redmine::Info.environment %></pre>
16 <pre><%= Redmine::Info.environment %></pre>
17 </div>
17 </div>
18
18
19 <% html_title(l(:label_information_plural)) -%>
19 <% html_title(l(:label_information_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now