##// END OF EJS Templates
Added RMagick availability on admin/info....
Jean-Philippe Lang -
r727:fc64fc3e9c10
parent child
Show More
@@ -1,77 +1,79
1 1 # redMine - project management software
2 2 # Copyright (C) 2006 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 class AdminController < ApplicationController
19 19 layout 'base'
20 20 before_filter :require_admin
21 21
22 22 helper :sort
23 23 include SortHelper
24 24
25 25 def index
26 26 end
27 27
28 28 def projects
29 29 sort_init 'name', 'asc'
30 30 sort_update
31 31
32 32 @status = params[:status] ? params[:status].to_i : 0
33 33 conditions = nil
34 34 conditions = ["status=?", @status] unless @status == 0
35 35
36 36 @project_count = Project.count(:conditions => conditions)
37 37 @project_pages = Paginator.new self, @project_count,
38 38 25,
39 39 params['page']
40 40 @projects = Project.find :all, :order => sort_clause,
41 41 :conditions => conditions,
42 42 :limit => @project_pages.items_per_page,
43 43 :offset => @project_pages.current.offset
44 44
45 45 render :action => "projects", :layout => false if request.xhr?
46 46 end
47 47
48 48 def mail_options
49 49 @notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted)
50 50 if request.post?
51 51 Setting.notified_events = (params[:notified_events] || [])
52 52 flash[:notice] = l(:notice_successful_update)
53 53 redirect_to :controller => 'admin', :action => 'mail_options'
54 54 end
55 55 end
56 56
57 57 def test_email
58 58 raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
59 59 # Force ActionMailer to raise delivery errors so we can catch it
60 60 ActionMailer::Base.raise_delivery_errors = true
61 61 begin
62 62 @test = Mailer.deliver_test(User.current)
63 63 flash[:notice] = l(:notice_email_sent, User.current.mail)
64 64 rescue Exception => e
65 65 flash[:error] = l(:notice_email_error, e.message)
66 66 end
67 67 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
68 68 redirect_to :action => 'mail_options'
69 69 end
70 70
71 71 def info
72 72 @db_adapter_name = ActiveRecord::Base.connection.adapter_name
73 @flags = Hash.new
74 @flags[:default_admin_changed] = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?
75 @flags[:file_repository_writable] = File.writable?(Attachment.storage_path)
73 @flags = {
74 :default_admin_changed => User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?,
75 :file_repository_writable => File.writable?(Attachment.storage_path),
76 :rmagick_available => Object.const_defined?(:Magick)
77 }
76 78 end
77 79 end
@@ -1,8 +1,9
1 1 <h2><%=l(:label_information_plural)%></h2>
2 2
3 3 <p><%=l(:field_version)%>: <strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p>
4 4
5 5 <table class="list">
6 <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>
7 <tr class="even"><td>Default administrator account changed</td><td><%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
6 <tr class="odd"><td>Default administrator account changed</td><td><%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
7 <tr class="even"><td>File repository writable</td><td><%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
8 <tr class="odd"><td>RMagick available</td><td><%= image_tag (@flags[:rmagick_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr>
8 9 </table>
@@ -1,68 +1,69
1 1 == redMine installation
2 2
3 3 redMine - project management software
4 4 Copyright (C) 2006-2007 Jean-Philippe Lang
5 5 http://redmine.rubyforge.org/
6 6
7 7
8 8 == Requirements
9 9
10 10 * Ruby on Rails 1.2.2
11 11 * A database (see compatibility below)
12 12
13 13 Optional:
14 14 * SVN binaries >= 1.3 (needed for repository browsing, must be available in PATH)
15 * RMagick (gantt export to png)
15 16
16 17 Supported databases:
17 18 * MySQL (tested with MySQL 5)
18 19 * PostgreSQL (tested with PostgreSQL 8.1)
19 20 * SQLite (tested with SQLite 3)
20 21
21 22
22 23 == Installation
23 24
24 25 1. Uncompress program archive:
25 26 tar zxvf <filename>
26 27
27 28 2. Create an empty database: "redmine" for example
28 29
29 30 3. Configure database parameters in config/database.yml
30 31 for "production" environment (default database is MySQL)
31 32
32 33 4. Create the database structure. Under the application main directory:
33 34 rake db:migrate RAILS_ENV="production"
34 35 It will create tables and an administrator account.
35 36
36 37 5. Insert default configuration data in database:
37 38 rake redmine:load_default_data RAILS_ENV="production"
38 39 It will load default roles, trackers, statuses, workflows and enumerations.
39 40 This step is optional (but recommended), as you can define your
40 41 own configuration from sratch.
41 42
42 43 6. Test the installation by running WEBrick web server:
43 44 ruby script/server -e production
44 45
45 46 Once WEBrick has started, point your browser to http://localhost:3000/
46 47 You should now see the application welcome page
47 48
48 49 7. Use default administrator account to log in:
49 50 login: admin
50 51 password: admin
51 52
52 53 8. You can go to "Admin -> Settings" to modify application settings.
53 54
54 55 9. Setup Apache or Lighttpd with fastcgi for best performance.
55 56
56 57
57 58 == SMTP server Configuration
58 59
59 60 In config/environment.rb, you can set parameters for your SMTP server:
60 61 config.action_mailer.smtp_settings: SMTP server configuration
61 62 config.action_mailer.perform_deliveries: set to false to disable mail delivering
62 63
63 64 Don't forget to restart the application after any change.
64 65
65 66
66 67 == Upgrading
67 68
68 69 See UPGRADING
General Comments 0
You need to be logged in to leave comments. Login now