|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -1,56 +1,58 | |||
|
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 | @project_count = Project.count |
|
32 | 32 | @project_pages = Paginator.new self, @project_count, |
|
33 | 33 | 15, |
|
34 | 34 | params['page'] |
|
35 | 35 | @projects = Project.find :all, :order => sort_clause, |
|
36 | 36 | :limit => @project_pages.items_per_page, |
|
37 | 37 | :offset => @project_pages.current.offset |
|
38 | 38 | |
|
39 | 39 | render :action => "projects", :layout => false if request.xhr? |
|
40 | 40 | end |
|
41 | 41 | |
|
42 | 42 | def mail_options |
|
43 | 43 | @actions = Permission.find(:all, :conditions => ["mail_option=?", true]) || [] |
|
44 | 44 | if request.post? |
|
45 | 45 | @actions.each { |a| |
|
46 | 46 | a.mail_enabled = (params[:action_ids] || []).include? a.id.to_s |
|
47 | 47 | a.save |
|
48 | 48 | } |
|
49 | 49 | flash.now[:notice] = l(:notice_successful_update) |
|
50 | 50 | end |
|
51 | 51 | end |
|
52 | 52 | |
|
53 | 53 | def info |
|
54 | 54 | @db_adapter_name = ActiveRecord::Base.connection.adapter_name |
|
55 | @default_admin_changed = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil? | |
|
56 | @file_repository_writable = File.writable?(Attachment.storage_path) | |
|
55 | 57 | end |
|
56 | 58 | end |
@@ -1,3 +1,8 | |||
|
1 | 1 | <h2><%=l(:label_information_plural)%></h2> |
|
2 | 2 | |
|
3 | 3 | <p><%=l(:field_version)%>: <strong>redMine <%= Redmine::VERSION %></strong> (<%= @db_adapter_name %>)</p> |
|
4 | ||
|
5 | <table class="list"> | |
|
6 | <tr class="odd"><td>File repository writable</td><td><%= image_tag (@file_repository_writable ? 'true' : 'false'), :style => "vertical-align:bottom;" %></td></tr> | |
|
7 | <tr class="even"><td>Default administrator account changed</td><td><%= image_tag (@default_admin_changed ? 'true' : 'false'), :style => "vertical-align:bottom;" %></td></tr> | |
|
8 | </table> |
General Comments 0
You need to be logged in to leave comments.
Login now