@@ -0,0 +1,43 | |||||
|
1 | <%= error_messages_for 'member' %> | |||
|
2 | <% roles = Role.find(:all, :order => 'position') %> | |||
|
3 | <% users = User.find_active(:all) - @project.users %> | |||
|
4 | ||||
|
5 | <table class="list"> | |||
|
6 | <thead> | |||
|
7 | <th><%= l(:label_user) %></th> | |||
|
8 | <th><%= l(:label_role) %></th> | |||
|
9 | <th></th> | |||
|
10 | </thead> | |||
|
11 | <tbody> | |||
|
12 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> | |||
|
13 | <% next if member.new_record? %> | |||
|
14 | <tr class="<%= cycle 'odd', 'even' %>"> | |||
|
15 | <td><%= member.user.display_name %></td> | |||
|
16 | <td align="center"> | |||
|
17 | <% if authorize_for('members', 'edit') %> | |||
|
18 | <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %> | |||
|
19 | <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, {}, :class => "small" %> | |||
|
20 | <%= submit_tag l(:button_change), :class => "small" %> | |||
|
21 | <% end %> | |||
|
22 | <% end %> | |||
|
23 | </td> | |||
|
24 | <td align="center"> | |||
|
25 | <small><%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member}, | |||
|
26 | :method => :post | |||
|
27 | }, :title => l(:button_delete), | |||
|
28 | :class => 'icon icon-del' %></small> | |||
|
29 | </td> | |||
|
30 | </tr> | |||
|
31 | </tbody> | |||
|
32 | <% end; reset_cycle %> | |||
|
33 | </table> | |||
|
34 | | |||
|
35 | ||||
|
36 | <% if authorize_for('projects', 'add_member') && !users.empty? %> | |||
|
37 | <p><label for="member_user_id"><%=l(:label_member_new)%></label></p> | |||
|
38 | <% remote_form_for(:member, @member, :url => {:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}, :method => :post) do |f| %> | |||
|
39 | <%= f.select :user_id, users.collect{|user| [user.name, user.id]} %> | |||
|
40 | <%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %> | |||
|
41 | <%= submit_tag l(:button_add) %> | |||
|
42 | <% end %> | |||
|
43 | <% end %> |
@@ -1,42 +1,46 | |||||
1 | # redMine - project management software |
|
1 | # redMine - project management software | |
2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006 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 MembersController < ApplicationController |
|
18 | class MembersController < ApplicationController | |
19 | layout 'base' |
|
19 | layout 'base' | |
20 | before_filter :find_project, :authorize |
|
20 | before_filter :find_project, :authorize | |
21 |
|
21 | |||
22 | def edit |
|
22 | def edit | |
23 | if request.post? and @member.update_attributes(params[:member]) |
|
23 | if request.post? and @member.update_attributes(params[:member]) | |
24 | flash[:notice] = l(:notice_successful_update) |
|
24 | respond_to do |format| | |
25 | redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project |
|
25 | format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } | |
|
26 | format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/members'} } | |||
|
27 | end | |||
26 | end |
|
28 | end | |
27 | end |
|
29 | end | |
28 |
|
30 | |||
29 | def destroy |
|
31 | def destroy | |
30 | @member.destroy |
|
32 | @member.destroy | |
31 | flash[:notice] = l(:notice_successful_delete) |
|
33 | respond_to do |format| | |
32 | redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project |
|
34 | format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project } | |
|
35 | format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/members'} } | |||
|
36 | end | |||
33 | end |
|
37 | end | |
34 |
|
38 | |||
35 | private |
|
39 | private | |
36 | def find_project |
|
40 | def find_project | |
37 | @member = Member.find(params[:id]) |
|
41 | @member = Member.find(params[:id]) | |
38 | @project = @member.project |
|
42 | @project = @member.project | |
39 | rescue ActiveRecord::RecordNotFound |
|
43 | rescue ActiveRecord::RecordNotFound | |
40 | render_404 |
|
44 | render_404 | |
41 | end |
|
45 | end | |
42 | end |
|
46 | end |
@@ -1,670 +1,668 | |||||
1 | # redMine - project management software |
|
1 | # redMine - project management software | |
2 | # Copyright (C) 2006-2007 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2007 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 | require 'csv' |
|
18 | require 'csv' | |
19 |
|
19 | |||
20 | class ProjectsController < ApplicationController |
|
20 | class ProjectsController < ApplicationController | |
21 | layout 'base' |
|
21 | layout 'base' | |
22 | before_filter :find_project, :authorize, :except => [ :index, :list, :add ] |
|
22 | before_filter :find_project, :authorize, :except => [ :index, :list, :add ] | |
23 | before_filter :require_admin, :only => [ :add, :destroy ] |
|
23 | before_filter :require_admin, :only => [ :add, :destroy ] | |
24 |
|
24 | |||
25 | helper :sort |
|
25 | helper :sort | |
26 | include SortHelper |
|
26 | include SortHelper | |
27 | helper :custom_fields |
|
27 | helper :custom_fields | |
28 | include CustomFieldsHelper |
|
28 | include CustomFieldsHelper | |
29 | helper :ifpdf |
|
29 | helper :ifpdf | |
30 | include IfpdfHelper |
|
30 | include IfpdfHelper | |
31 | helper IssuesHelper |
|
31 | helper IssuesHelper | |
32 | helper :queries |
|
32 | helper :queries | |
33 | include QueriesHelper |
|
33 | include QueriesHelper | |
34 |
|
34 | |||
35 | def index |
|
35 | def index | |
36 | list |
|
36 | list | |
37 | render :action => 'list' unless request.xhr? |
|
37 | render :action => 'list' unless request.xhr? | |
38 | end |
|
38 | end | |
39 |
|
39 | |||
40 | # Lists public projects |
|
40 | # Lists public projects | |
41 | def list |
|
41 | def list | |
42 | sort_init "#{Project.table_name}.name", "asc" |
|
42 | sort_init "#{Project.table_name}.name", "asc" | |
43 | sort_update |
|
43 | sort_update | |
44 | @project_count = Project.count(:all, :conditions => Project.visible_by(logged_in_user)) |
|
44 | @project_count = Project.count(:all, :conditions => Project.visible_by(logged_in_user)) | |
45 | @project_pages = Paginator.new self, @project_count, |
|
45 | @project_pages = Paginator.new self, @project_count, | |
46 | 15, |
|
46 | 15, | |
47 | params['page'] |
|
47 | params['page'] | |
48 | @projects = Project.find :all, :order => sort_clause, |
|
48 | @projects = Project.find :all, :order => sort_clause, | |
49 | :conditions => Project.visible_by(logged_in_user), |
|
49 | :conditions => Project.visible_by(logged_in_user), | |
50 | :include => :parent, |
|
50 | :include => :parent, | |
51 | :limit => @project_pages.items_per_page, |
|
51 | :limit => @project_pages.items_per_page, | |
52 | :offset => @project_pages.current.offset |
|
52 | :offset => @project_pages.current.offset | |
53 |
|
53 | |||
54 | render :action => "list", :layout => false if request.xhr? |
|
54 | render :action => "list", :layout => false if request.xhr? | |
55 | end |
|
55 | end | |
56 |
|
56 | |||
57 | # Add a new project |
|
57 | # Add a new project | |
58 | def add |
|
58 | def add | |
59 | @custom_fields = IssueCustomField.find(:all) |
|
59 | @custom_fields = IssueCustomField.find(:all) | |
60 | @root_projects = Project.find(:all, :conditions => "parent_id is null") |
|
60 | @root_projects = Project.find(:all, :conditions => "parent_id is null") | |
61 | @project = Project.new(params[:project]) |
|
61 | @project = Project.new(params[:project]) | |
62 | if request.get? |
|
62 | if request.get? | |
63 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } |
|
63 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } | |
64 | else |
|
64 | else | |
65 | @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] |
|
65 | @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] | |
66 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } |
|
66 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } | |
67 | @project.custom_values = @custom_values |
|
67 | @project.custom_values = @custom_values | |
68 | if params[:repository_enabled] && params[:repository_enabled] == "1" |
|
68 | if params[:repository_enabled] && params[:repository_enabled] == "1" | |
69 | @project.repository = Repository.new |
|
69 | @project.repository = Repository.new | |
70 | @project.repository.attributes = params[:repository] |
|
70 | @project.repository.attributes = params[:repository] | |
71 | end |
|
71 | end | |
72 | if "1" == params[:wiki_enabled] |
|
72 | if "1" == params[:wiki_enabled] | |
73 | @project.wiki = Wiki.new |
|
73 | @project.wiki = Wiki.new | |
74 | @project.wiki.attributes = params[:wiki] |
|
74 | @project.wiki.attributes = params[:wiki] | |
75 | end |
|
75 | end | |
76 | if @project.save |
|
76 | if @project.save | |
77 | flash[:notice] = l(:notice_successful_create) |
|
77 | flash[:notice] = l(:notice_successful_create) | |
78 | redirect_to :controller => 'admin', :action => 'projects' |
|
78 | redirect_to :controller => 'admin', :action => 'projects' | |
79 | end |
|
79 | end | |
80 | end |
|
80 | end | |
81 | end |
|
81 | end | |
82 |
|
82 | |||
83 | # Show @project |
|
83 | # Show @project | |
84 | def show |
|
84 | def show | |
85 | @custom_values = @project.custom_values.find(:all, :include => :custom_field) |
|
85 | @custom_values = @project.custom_values.find(:all, :include => :custom_field) | |
86 | @members_by_role = @project.members.find(:all, :include => [:user, :role], :order => 'position').group_by {|m| m.role} |
|
86 | @members_by_role = @project.members.find(:all, :include => [:user, :role], :order => 'position').group_by {|m| m.role} | |
87 | @subprojects = @project.children if @project.children.size > 0 |
|
87 | @subprojects = @project.children if @project.children.size > 0 | |
88 | @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC") |
|
88 | @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC") | |
89 | @trackers = Tracker.find(:all, :order => 'position') |
|
89 | @trackers = Tracker.find(:all, :order => 'position') | |
90 | @open_issues_by_tracker = Issue.count(:group => :tracker, :joins => "INNER JOIN #{IssueStatus.table_name} ON #{IssueStatus.table_name}.id = #{Issue.table_name}.status_id", :conditions => ["project_id=? and #{IssueStatus.table_name}.is_closed=?", @project.id, false]) |
|
90 | @open_issues_by_tracker = Issue.count(:group => :tracker, :joins => "INNER JOIN #{IssueStatus.table_name} ON #{IssueStatus.table_name}.id = #{Issue.table_name}.status_id", :conditions => ["project_id=? and #{IssueStatus.table_name}.is_closed=?", @project.id, false]) | |
91 | @total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id]) |
|
91 | @total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id]) | |
92 | end |
|
92 | end | |
93 |
|
93 | |||
94 | def settings |
|
94 | def settings | |
95 | @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id]) |
|
95 | @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id]) | |
96 | @custom_fields = IssueCustomField.find(:all) |
|
96 | @custom_fields = IssueCustomField.find(:all) | |
97 | @issue_category ||= IssueCategory.new |
|
97 | @issue_category ||= IssueCategory.new | |
98 | @member ||= @project.members.new |
|
98 | @member ||= @project.members.new | |
99 | @roles = Role.find(:all, :order => 'position') |
|
|||
100 | @users = User.find_active(:all) - @project.users |
|
|||
101 | @custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) } |
|
99 | @custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) } | |
102 | end |
|
100 | end | |
103 |
|
101 | |||
104 | # Edit @project |
|
102 | # Edit @project | |
105 | def edit |
|
103 | def edit | |
106 | if request.post? |
|
104 | if request.post? | |
107 | @project.custom_fields = IssueCustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] |
|
105 | @project.custom_fields = IssueCustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] | |
108 | if params[:custom_fields] |
|
106 | if params[:custom_fields] | |
109 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } |
|
107 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } | |
110 | @project.custom_values = @custom_values |
|
108 | @project.custom_values = @custom_values | |
111 | end |
|
109 | end | |
112 | if params[:repository_enabled] |
|
110 | if params[:repository_enabled] | |
113 | case params[:repository_enabled] |
|
111 | case params[:repository_enabled] | |
114 | when "0" |
|
112 | when "0" | |
115 | @project.repository = nil |
|
113 | @project.repository = nil | |
116 | when "1" |
|
114 | when "1" | |
117 | @project.repository ||= Repository.new |
|
115 | @project.repository ||= Repository.new | |
118 | @project.repository.update_attributes params[:repository] |
|
116 | @project.repository.update_attributes params[:repository] | |
119 | end |
|
117 | end | |
120 | end |
|
118 | end | |
121 | if params[:wiki_enabled] |
|
119 | if params[:wiki_enabled] | |
122 | case params[:wiki_enabled] |
|
120 | case params[:wiki_enabled] | |
123 | when "0" |
|
121 | when "0" | |
124 | @project.wiki.destroy if @project.wiki |
|
122 | @project.wiki.destroy if @project.wiki | |
125 | when "1" |
|
123 | when "1" | |
126 | @project.wiki ||= Wiki.new |
|
124 | @project.wiki ||= Wiki.new | |
127 | @project.wiki.update_attributes params[:wiki] |
|
125 | @project.wiki.update_attributes params[:wiki] | |
128 | end |
|
126 | end | |
129 | end |
|
127 | end | |
130 | @project.attributes = params[:project] |
|
128 | @project.attributes = params[:project] | |
131 | if @project.save |
|
129 | if @project.save | |
132 | flash[:notice] = l(:notice_successful_update) |
|
130 | flash[:notice] = l(:notice_successful_update) | |
133 | redirect_to :action => 'settings', :id => @project |
|
131 | redirect_to :action => 'settings', :id => @project | |
134 | else |
|
132 | else | |
135 | settings |
|
133 | settings | |
136 | render :action => 'settings' |
|
134 | render :action => 'settings' | |
137 | end |
|
135 | end | |
138 | end |
|
136 | end | |
139 | end |
|
137 | end | |
140 |
|
138 | |||
141 | # Delete @project |
|
139 | # Delete @project | |
142 | def destroy |
|
140 | def destroy | |
143 | if request.post? and params[:confirm] |
|
141 | if request.post? and params[:confirm] | |
144 | @project.destroy |
|
142 | @project.destroy | |
145 | redirect_to :controller => 'admin', :action => 'projects' |
|
143 | redirect_to :controller => 'admin', :action => 'projects' | |
146 | end |
|
144 | end | |
147 | end |
|
145 | end | |
148 |
|
146 | |||
149 | # Add a new issue category to @project |
|
147 | # Add a new issue category to @project | |
150 | def add_issue_category |
|
148 | def add_issue_category | |
151 | if request.post? |
|
149 | if request.post? | |
152 | @issue_category = @project.issue_categories.build(params[:issue_category]) |
|
150 | @issue_category = @project.issue_categories.build(params[:issue_category]) | |
153 | if @issue_category.save |
|
151 | if @issue_category.save | |
154 | flash[:notice] = l(:notice_successful_create) |
|
152 | flash[:notice] = l(:notice_successful_create) | |
155 | redirect_to :action => 'settings', :tab => 'categories', :id => @project |
|
153 | redirect_to :action => 'settings', :tab => 'categories', :id => @project | |
156 | else |
|
154 | else | |
157 | settings |
|
155 | settings | |
158 | render :action => 'settings' |
|
156 | render :action => 'settings' | |
159 | end |
|
157 | end | |
160 | end |
|
158 | end | |
161 | end |
|
159 | end | |
162 |
|
160 | |||
163 | # Add a new version to @project |
|
161 | # Add a new version to @project | |
164 | def add_version |
|
162 | def add_version | |
165 | @version = @project.versions.build(params[:version]) |
|
163 | @version = @project.versions.build(params[:version]) | |
166 | if request.post? and @version.save |
|
164 | if request.post? and @version.save | |
167 | flash[:notice] = l(:notice_successful_create) |
|
165 | flash[:notice] = l(:notice_successful_create) | |
168 | redirect_to :action => 'settings', :tab => 'versions', :id => @project |
|
166 | redirect_to :action => 'settings', :tab => 'versions', :id => @project | |
169 | end |
|
167 | end | |
170 | end |
|
168 | end | |
171 |
|
169 | |||
172 | # Add a new member to @project |
|
170 | # Add a new member to @project | |
173 | def add_member |
|
171 | def add_member | |
174 | @member = @project.members.build(params[:member]) |
|
172 | @member = @project.members.build(params[:member]) | |
175 | if request.post? |
|
173 | if request.post? && @member.save | |
176 | if @member.save |
|
174 | respond_to do |format| | |
177 | flash[:notice] = l(:notice_successful_create) |
|
175 | format.html { redirect_to :action => 'settings', :tab => 'members', :id => @project } | |
178 | redirect_to :action => 'settings', :tab => 'members', :id => @project |
|
176 | format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'members'} } | |
179 | else |
|
|||
180 | settings |
|
|||
181 | render :action => 'settings' |
|
|||
182 | end |
|
177 | end | |
|
178 | else | |||
|
179 | settings | |||
|
180 | render :action => 'settings' | |||
183 | end |
|
181 | end | |
184 | end |
|
182 | end | |
185 |
|
183 | |||
186 | # Show members list of @project |
|
184 | # Show members list of @project | |
187 | def list_members |
|
185 | def list_members | |
188 | @members = @project.members.find(:all) |
|
186 | @members = @project.members.find(:all) | |
189 | end |
|
187 | end | |
190 |
|
188 | |||
191 | # Add a new document to @project |
|
189 | # Add a new document to @project | |
192 | def add_document |
|
190 | def add_document | |
193 | @categories = Enumeration::get_values('DCAT') |
|
191 | @categories = Enumeration::get_values('DCAT') | |
194 | @document = @project.documents.build(params[:document]) |
|
192 | @document = @project.documents.build(params[:document]) | |
195 | if request.post? and @document.save |
|
193 | if request.post? and @document.save | |
196 | # Save the attachments |
|
194 | # Save the attachments | |
197 | params[:attachments].each { |a| |
|
195 | params[:attachments].each { |a| | |
198 | Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0 |
|
196 | Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0 | |
199 | } if params[:attachments] and params[:attachments].is_a? Array |
|
197 | } if params[:attachments] and params[:attachments].is_a? Array | |
200 | flash[:notice] = l(:notice_successful_create) |
|
198 | flash[:notice] = l(:notice_successful_create) | |
201 | Mailer.deliver_document_add(@document) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? |
|
199 | Mailer.deliver_document_add(@document) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? | |
202 | redirect_to :action => 'list_documents', :id => @project |
|
200 | redirect_to :action => 'list_documents', :id => @project | |
203 | end |
|
201 | end | |
204 | end |
|
202 | end | |
205 |
|
203 | |||
206 | # Show documents list of @project |
|
204 | # Show documents list of @project | |
207 | def list_documents |
|
205 | def list_documents | |
208 | @documents = @project.documents.find :all, :include => :category |
|
206 | @documents = @project.documents.find :all, :include => :category | |
209 | end |
|
207 | end | |
210 |
|
208 | |||
211 | # Add a new issue to @project |
|
209 | # Add a new issue to @project | |
212 | def add_issue |
|
210 | def add_issue | |
213 | @tracker = Tracker.find(params[:tracker_id]) |
|
211 | @tracker = Tracker.find(params[:tracker_id]) | |
214 | @priorities = Enumeration::get_values('IPRI') |
|
212 | @priorities = Enumeration::get_values('IPRI') | |
215 |
|
213 | |||
216 | default_status = IssueStatus.default |
|
214 | default_status = IssueStatus.default | |
217 | @issue = Issue.new(:project => @project, :tracker => @tracker) |
|
215 | @issue = Issue.new(:project => @project, :tracker => @tracker) | |
218 | @issue.status = default_status |
|
216 | @issue.status = default_status | |
219 | @allowed_statuses = ([default_status] + default_status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker))if logged_in_user |
|
217 | @allowed_statuses = ([default_status] + default_status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker))if logged_in_user | |
220 | if request.get? |
|
218 | if request.get? | |
221 | @issue.start_date = Date.today |
|
219 | @issue.start_date = Date.today | |
222 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) } |
|
220 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) } | |
223 | else |
|
221 | else | |
224 | @issue.attributes = params[:issue] |
|
222 | @issue.attributes = params[:issue] | |
225 |
|
223 | |||
226 | requested_status = IssueStatus.find_by_id(params[:issue][:status_id]) |
|
224 | requested_status = IssueStatus.find_by_id(params[:issue][:status_id]) | |
227 | @issue.status = (@allowed_statuses.include? requested_status) ? requested_status : default_status |
|
225 | @issue.status = (@allowed_statuses.include? requested_status) ? requested_status : default_status | |
228 |
|
226 | |||
229 | @issue.author_id = self.logged_in_user.id if self.logged_in_user |
|
227 | @issue.author_id = self.logged_in_user.id if self.logged_in_user | |
230 | # Multiple file upload |
|
228 | # Multiple file upload | |
231 | @attachments = [] |
|
229 | @attachments = [] | |
232 | params[:attachments].each { |a| |
|
230 | params[:attachments].each { |a| | |
233 | @attachments << Attachment.new(:container => @issue, :file => a, :author => logged_in_user) unless a.size == 0 |
|
231 | @attachments << Attachment.new(:container => @issue, :file => a, :author => logged_in_user) unless a.size == 0 | |
234 | } if params[:attachments] and params[:attachments].is_a? Array |
|
232 | } if params[:attachments] and params[:attachments].is_a? Array | |
235 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) } |
|
233 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) } | |
236 | @issue.custom_values = @custom_values |
|
234 | @issue.custom_values = @custom_values | |
237 | if @issue.save |
|
235 | if @issue.save | |
238 | @attachments.each(&:save) |
|
236 | @attachments.each(&:save) | |
239 | flash[:notice] = l(:notice_successful_create) |
|
237 | flash[:notice] = l(:notice_successful_create) | |
240 | Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? |
|
238 | Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? | |
241 | redirect_to :action => 'list_issues', :id => @project |
|
239 | redirect_to :action => 'list_issues', :id => @project | |
242 | end |
|
240 | end | |
243 | end |
|
241 | end | |
244 | end |
|
242 | end | |
245 |
|
243 | |||
246 | # Show filtered/sorted issues list of @project |
|
244 | # Show filtered/sorted issues list of @project | |
247 | def list_issues |
|
245 | def list_issues | |
248 | sort_init "#{Issue.table_name}.id", "desc" |
|
246 | sort_init "#{Issue.table_name}.id", "desc" | |
249 | sort_update |
|
247 | sort_update | |
250 |
|
248 | |||
251 | retrieve_query |
|
249 | retrieve_query | |
252 |
|
250 | |||
253 | @results_per_page_options = [ 15, 25, 50, 100 ] |
|
251 | @results_per_page_options = [ 15, 25, 50, 100 ] | |
254 | if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i |
|
252 | if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i | |
255 | @results_per_page = params[:per_page].to_i |
|
253 | @results_per_page = params[:per_page].to_i | |
256 | session[:results_per_page] = @results_per_page |
|
254 | session[:results_per_page] = @results_per_page | |
257 | else |
|
255 | else | |
258 | @results_per_page = session[:results_per_page] || 25 |
|
256 | @results_per_page = session[:results_per_page] || 25 | |
259 | end |
|
257 | end | |
260 |
|
258 | |||
261 | if @query.valid? |
|
259 | if @query.valid? | |
262 | @issue_count = Issue.count(:include => [:status, :project, :custom_values], :conditions => @query.statement) |
|
260 | @issue_count = Issue.count(:include => [:status, :project, :custom_values], :conditions => @query.statement) | |
263 | @issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page'] |
|
261 | @issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page'] | |
264 | @issues = Issue.find :all, :order => sort_clause, |
|
262 | @issues = Issue.find :all, :order => sort_clause, | |
265 | :include => [ :assigned_to, :status, :tracker, :project, :priority, :custom_values ], |
|
263 | :include => [ :assigned_to, :status, :tracker, :project, :priority, :custom_values ], | |
266 | :conditions => @query.statement, |
|
264 | :conditions => @query.statement, | |
267 | :limit => @issue_pages.items_per_page, |
|
265 | :limit => @issue_pages.items_per_page, | |
268 | :offset => @issue_pages.current.offset |
|
266 | :offset => @issue_pages.current.offset | |
269 | end |
|
267 | end | |
270 | @trackers = Tracker.find :all, :order => 'position' |
|
268 | @trackers = Tracker.find :all, :order => 'position' | |
271 | render :layout => false if request.xhr? |
|
269 | render :layout => false if request.xhr? | |
272 | end |
|
270 | end | |
273 |
|
271 | |||
274 | # Export filtered/sorted issues list to CSV |
|
272 | # Export filtered/sorted issues list to CSV | |
275 | def export_issues_csv |
|
273 | def export_issues_csv | |
276 | sort_init "#{Issue.table_name}.id", "desc" |
|
274 | sort_init "#{Issue.table_name}.id", "desc" | |
277 | sort_update |
|
275 | sort_update | |
278 |
|
276 | |||
279 | retrieve_query |
|
277 | retrieve_query | |
280 | render :action => 'list_issues' and return unless @query.valid? |
|
278 | render :action => 'list_issues' and return unless @query.valid? | |
281 |
|
279 | |||
282 | @issues = Issue.find :all, :order => sort_clause, |
|
280 | @issues = Issue.find :all, :order => sort_clause, | |
283 | :include => [ :assigned_to, :author, :status, :tracker, :priority, :project, {:custom_values => :custom_field} ], |
|
281 | :include => [ :assigned_to, :author, :status, :tracker, :priority, :project, {:custom_values => :custom_field} ], | |
284 | :conditions => @query.statement, |
|
282 | :conditions => @query.statement, | |
285 | :limit => Setting.issues_export_limit |
|
283 | :limit => Setting.issues_export_limit | |
286 |
|
284 | |||
287 | ic = Iconv.new(l(:general_csv_encoding), 'UTF-8') |
|
285 | ic = Iconv.new(l(:general_csv_encoding), 'UTF-8') | |
288 | export = StringIO.new |
|
286 | export = StringIO.new | |
289 | CSV::Writer.generate(export, l(:general_csv_separator)) do |csv| |
|
287 | CSV::Writer.generate(export, l(:general_csv_separator)) do |csv| | |
290 | # csv header fields |
|
288 | # csv header fields | |
291 | headers = [ "#", l(:field_status), |
|
289 | headers = [ "#", l(:field_status), | |
292 | l(:field_project), |
|
290 | l(:field_project), | |
293 | l(:field_tracker), |
|
291 | l(:field_tracker), | |
294 | l(:field_priority), |
|
292 | l(:field_priority), | |
295 | l(:field_subject), |
|
293 | l(:field_subject), | |
296 | l(:field_assigned_to), |
|
294 | l(:field_assigned_to), | |
297 | l(:field_author), |
|
295 | l(:field_author), | |
298 | l(:field_start_date), |
|
296 | l(:field_start_date), | |
299 | l(:field_due_date), |
|
297 | l(:field_due_date), | |
300 | l(:field_done_ratio), |
|
298 | l(:field_done_ratio), | |
301 | l(:field_created_on), |
|
299 | l(:field_created_on), | |
302 | l(:field_updated_on) |
|
300 | l(:field_updated_on) | |
303 | ] |
|
301 | ] | |
304 | for custom_field in @project.all_custom_fields |
|
302 | for custom_field in @project.all_custom_fields | |
305 | headers << custom_field.name |
|
303 | headers << custom_field.name | |
306 | end |
|
304 | end | |
307 | csv << headers.collect {|c| ic.iconv(c) } |
|
305 | csv << headers.collect {|c| ic.iconv(c) } | |
308 | # csv lines |
|
306 | # csv lines | |
309 | @issues.each do |issue| |
|
307 | @issues.each do |issue| | |
310 | fields = [issue.id, issue.status.name, |
|
308 | fields = [issue.id, issue.status.name, | |
311 | issue.project.name, |
|
309 | issue.project.name, | |
312 | issue.tracker.name, |
|
310 | issue.tracker.name, | |
313 | issue.priority.name, |
|
311 | issue.priority.name, | |
314 | issue.subject, |
|
312 | issue.subject, | |
315 | (issue.assigned_to ? issue.assigned_to.name : ""), |
|
313 | (issue.assigned_to ? issue.assigned_to.name : ""), | |
316 | issue.author.name, |
|
314 | issue.author.name, | |
317 | issue.start_date ? l_date(issue.start_date) : nil, |
|
315 | issue.start_date ? l_date(issue.start_date) : nil, | |
318 | issue.due_date ? l_date(issue.due_date) : nil, |
|
316 | issue.due_date ? l_date(issue.due_date) : nil, | |
319 | issue.done_ratio, |
|
317 | issue.done_ratio, | |
320 | l_datetime(issue.created_on), |
|
318 | l_datetime(issue.created_on), | |
321 | l_datetime(issue.updated_on) |
|
319 | l_datetime(issue.updated_on) | |
322 | ] |
|
320 | ] | |
323 | for custom_field in @project.all_custom_fields |
|
321 | for custom_field in @project.all_custom_fields | |
324 | fields << (show_value issue.custom_value_for(custom_field)) |
|
322 | fields << (show_value issue.custom_value_for(custom_field)) | |
325 | end |
|
323 | end | |
326 | csv << fields.collect {|c| ic.iconv(c.to_s) } |
|
324 | csv << fields.collect {|c| ic.iconv(c.to_s) } | |
327 | end |
|
325 | end | |
328 | end |
|
326 | end | |
329 | export.rewind |
|
327 | export.rewind | |
330 | send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv') |
|
328 | send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv') | |
331 | end |
|
329 | end | |
332 |
|
330 | |||
333 | # Export filtered/sorted issues to PDF |
|
331 | # Export filtered/sorted issues to PDF | |
334 | def export_issues_pdf |
|
332 | def export_issues_pdf | |
335 | sort_init "#{Issue.table_name}.id", "desc" |
|
333 | sort_init "#{Issue.table_name}.id", "desc" | |
336 | sort_update |
|
334 | sort_update | |
337 |
|
335 | |||
338 | retrieve_query |
|
336 | retrieve_query | |
339 | render :action => 'list_issues' and return unless @query.valid? |
|
337 | render :action => 'list_issues' and return unless @query.valid? | |
340 |
|
338 | |||
341 | @issues = Issue.find :all, :order => sort_clause, |
|
339 | @issues = Issue.find :all, :order => sort_clause, | |
342 | :include => [ :author, :status, :tracker, :priority, :project, :custom_values ], |
|
340 | :include => [ :author, :status, :tracker, :priority, :project, :custom_values ], | |
343 | :conditions => @query.statement, |
|
341 | :conditions => @query.statement, | |
344 | :limit => Setting.issues_export_limit |
|
342 | :limit => Setting.issues_export_limit | |
345 |
|
343 | |||
346 | @options_for_rfpdf ||= {} |
|
344 | @options_for_rfpdf ||= {} | |
347 | @options_for_rfpdf[:file_name] = "export.pdf" |
|
345 | @options_for_rfpdf[:file_name] = "export.pdf" | |
348 | render :layout => false |
|
346 | render :layout => false | |
349 | end |
|
347 | end | |
350 |
|
348 | |||
351 | def move_issues |
|
349 | def move_issues | |
352 | @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids] |
|
350 | @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids] | |
353 | redirect_to :action => 'list_issues', :id => @project and return unless @issues |
|
351 | redirect_to :action => 'list_issues', :id => @project and return unless @issues | |
354 | @projects = [] |
|
352 | @projects = [] | |
355 | # find projects to which the user is allowed to move the issue |
|
353 | # find projects to which the user is allowed to move the issue | |
356 | @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role)} |
|
354 | @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role)} | |
357 | # issue can be moved to any tracker |
|
355 | # issue can be moved to any tracker | |
358 | @trackers = Tracker.find(:all) |
|
356 | @trackers = Tracker.find(:all) | |
359 | if request.post? and params[:new_project_id] and params[:new_tracker_id] |
|
357 | if request.post? and params[:new_project_id] and params[:new_tracker_id] | |
360 | new_project = Project.find(params[:new_project_id]) |
|
358 | new_project = Project.find(params[:new_project_id]) | |
361 | new_tracker = Tracker.find(params[:new_tracker_id]) |
|
359 | new_tracker = Tracker.find(params[:new_tracker_id]) | |
362 | @issues.each { |i| |
|
360 | @issues.each { |i| | |
363 | # project dependent properties |
|
361 | # project dependent properties | |
364 | unless i.project_id == new_project.id |
|
362 | unless i.project_id == new_project.id | |
365 | i.category = nil |
|
363 | i.category = nil | |
366 | i.fixed_version = nil |
|
364 | i.fixed_version = nil | |
367 | # delete issue relations |
|
365 | # delete issue relations | |
368 | i.relations_from.clear |
|
366 | i.relations_from.clear | |
369 | i.relations_to.clear |
|
367 | i.relations_to.clear | |
370 | end |
|
368 | end | |
371 | # move the issue |
|
369 | # move the issue | |
372 | i.project = new_project |
|
370 | i.project = new_project | |
373 | i.tracker = new_tracker |
|
371 | i.tracker = new_tracker | |
374 | i.save |
|
372 | i.save | |
375 | } |
|
373 | } | |
376 | flash[:notice] = l(:notice_successful_update) |
|
374 | flash[:notice] = l(:notice_successful_update) | |
377 | redirect_to :action => 'list_issues', :id => @project |
|
375 | redirect_to :action => 'list_issues', :id => @project | |
378 | end |
|
376 | end | |
379 | end |
|
377 | end | |
380 |
|
378 | |||
381 | def add_query |
|
379 | def add_query | |
382 | @query = Query.new(params[:query]) |
|
380 | @query = Query.new(params[:query]) | |
383 | @query.project = @project |
|
381 | @query.project = @project | |
384 | @query.user = logged_in_user |
|
382 | @query.user = logged_in_user | |
385 |
|
383 | |||
386 | params[:fields].each do |field| |
|
384 | params[:fields].each do |field| | |
387 | @query.add_filter(field, params[:operators][field], params[:values][field]) |
|
385 | @query.add_filter(field, params[:operators][field], params[:values][field]) | |
388 | end if params[:fields] |
|
386 | end if params[:fields] | |
389 |
|
387 | |||
390 | if request.post? and @query.save |
|
388 | if request.post? and @query.save | |
391 | flash[:notice] = l(:notice_successful_create) |
|
389 | flash[:notice] = l(:notice_successful_create) | |
392 | redirect_to :controller => 'reports', :action => 'issue_report', :id => @project |
|
390 | redirect_to :controller => 'reports', :action => 'issue_report', :id => @project | |
393 | end |
|
391 | end | |
394 | render :layout => false if request.xhr? |
|
392 | render :layout => false if request.xhr? | |
395 | end |
|
393 | end | |
396 |
|
394 | |||
397 | # Add a news to @project |
|
395 | # Add a news to @project | |
398 | def add_news |
|
396 | def add_news | |
399 | @news = News.new(:project => @project) |
|
397 | @news = News.new(:project => @project) | |
400 | if request.post? |
|
398 | if request.post? | |
401 | @news.attributes = params[:news] |
|
399 | @news.attributes = params[:news] | |
402 | @news.author_id = self.logged_in_user.id if self.logged_in_user |
|
400 | @news.author_id = self.logged_in_user.id if self.logged_in_user | |
403 | if @news.save |
|
401 | if @news.save | |
404 | flash[:notice] = l(:notice_successful_create) |
|
402 | flash[:notice] = l(:notice_successful_create) | |
405 | redirect_to :action => 'list_news', :id => @project |
|
403 | redirect_to :action => 'list_news', :id => @project | |
406 | end |
|
404 | end | |
407 | end |
|
405 | end | |
408 | end |
|
406 | end | |
409 |
|
407 | |||
410 | # Show news list of @project |
|
408 | # Show news list of @project | |
411 | def list_news |
|
409 | def list_news | |
412 | @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "#{News.table_name}.created_on DESC" |
|
410 | @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "#{News.table_name}.created_on DESC" | |
413 | render :action => "list_news", :layout => false if request.xhr? |
|
411 | render :action => "list_news", :layout => false if request.xhr? | |
414 | end |
|
412 | end | |
415 |
|
413 | |||
416 | def add_file |
|
414 | def add_file | |
417 | if request.post? |
|
415 | if request.post? | |
418 | @version = @project.versions.find_by_id(params[:version_id]) |
|
416 | @version = @project.versions.find_by_id(params[:version_id]) | |
419 | # Save the attachments |
|
417 | # Save the attachments | |
420 | @attachments = [] |
|
418 | @attachments = [] | |
421 | params[:attachments].each { |file| |
|
419 | params[:attachments].each { |file| | |
422 | next unless file.size > 0 |
|
420 | next unless file.size > 0 | |
423 | a = Attachment.create(:container => @version, :file => file, :author => logged_in_user) |
|
421 | a = Attachment.create(:container => @version, :file => file, :author => logged_in_user) | |
424 | @attachments << a unless a.new_record? |
|
422 | @attachments << a unless a.new_record? | |
425 | } if params[:attachments] and params[:attachments].is_a? Array |
|
423 | } if params[:attachments] and params[:attachments].is_a? Array | |
426 | Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? |
|
424 | Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? | |
427 | redirect_to :controller => 'projects', :action => 'list_files', :id => @project |
|
425 | redirect_to :controller => 'projects', :action => 'list_files', :id => @project | |
428 | end |
|
426 | end | |
429 | @versions = @project.versions |
|
427 | @versions = @project.versions | |
430 | end |
|
428 | end | |
431 |
|
429 | |||
432 | def list_files |
|
430 | def list_files | |
433 | @versions = @project.versions |
|
431 | @versions = @project.versions | |
434 | end |
|
432 | end | |
435 |
|
433 | |||
436 | # Show changelog for @project |
|
434 | # Show changelog for @project | |
437 | def changelog |
|
435 | def changelog | |
438 | @trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true], :order => 'position') |
|
436 | @trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true], :order => 'position') | |
439 | retrieve_selected_tracker_ids(@trackers) |
|
437 | retrieve_selected_tracker_ids(@trackers) | |
440 |
|
438 | |||
441 | @fixed_issues = @project.issues.find(:all, |
|
439 | @fixed_issues = @project.issues.find(:all, | |
442 | :include => [ :fixed_version, :status, :tracker ], |
|
440 | :include => [ :fixed_version, :status, :tracker ], | |
443 | :conditions => [ "#{IssueStatus.table_name}.is_closed=? and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')}) and #{Issue.table_name}.fixed_version_id is not null", true], |
|
441 | :conditions => [ "#{IssueStatus.table_name}.is_closed=? and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')}) and #{Issue.table_name}.fixed_version_id is not null", true], | |
444 | :order => "#{Version.table_name}.effective_date DESC, #{Issue.table_name}.id DESC" |
|
442 | :order => "#{Version.table_name}.effective_date DESC, #{Issue.table_name}.id DESC" | |
445 | ) unless @selected_tracker_ids.empty? |
|
443 | ) unless @selected_tracker_ids.empty? | |
446 | @fixed_issues ||= [] |
|
444 | @fixed_issues ||= [] | |
447 | end |
|
445 | end | |
448 |
|
446 | |||
449 | def roadmap |
|
447 | def roadmap | |
450 | @trackers = Tracker.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position') |
|
448 | @trackers = Tracker.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position') | |
451 | retrieve_selected_tracker_ids(@trackers) |
|
449 | retrieve_selected_tracker_ids(@trackers) | |
452 |
|
450 | |||
453 | @versions = @project.versions.find(:all, |
|
451 | @versions = @project.versions.find(:all, | |
454 | :conditions => [ "#{Version.table_name}.effective_date>?", Date.today], |
|
452 | :conditions => [ "#{Version.table_name}.effective_date>?", Date.today], | |
455 | :order => "#{Version.table_name}.effective_date ASC" |
|
453 | :order => "#{Version.table_name}.effective_date ASC" | |
456 | ) |
|
454 | ) | |
457 | end |
|
455 | end | |
458 |
|
456 | |||
459 | def activity |
|
457 | def activity | |
460 | if params[:year] and params[:year].to_i > 1900 |
|
458 | if params[:year] and params[:year].to_i > 1900 | |
461 | @year = params[:year].to_i |
|
459 | @year = params[:year].to_i | |
462 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 |
|
460 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 | |
463 | @month = params[:month].to_i |
|
461 | @month = params[:month].to_i | |
464 | end |
|
462 | end | |
465 | end |
|
463 | end | |
466 | @year ||= Date.today.year |
|
464 | @year ||= Date.today.year | |
467 | @month ||= Date.today.month |
|
465 | @month ||= Date.today.month | |
468 |
|
466 | |||
469 | @date_from = Date.civil(@year, @month, 1) |
|
467 | @date_from = Date.civil(@year, @month, 1) | |
470 | @date_to = @date_from >> 1 |
|
468 | @date_to = @date_from >> 1 | |
471 |
|
469 | |||
472 | @events_by_day = {} |
|
470 | @events_by_day = {} | |
473 |
|
471 | |||
474 | unless params[:show_issues] == "0" |
|
472 | unless params[:show_issues] == "0" | |
475 | @project.issues.find(:all, :include => [:author], :conditions => ["#{Issue.table_name}.created_on>=? and #{Issue.table_name}.created_on<=?", @date_from, @date_to] ).each { |i| |
|
473 | @project.issues.find(:all, :include => [:author], :conditions => ["#{Issue.table_name}.created_on>=? and #{Issue.table_name}.created_on<=?", @date_from, @date_to] ).each { |i| | |
476 | @events_by_day[i.created_on.to_date] ||= [] |
|
474 | @events_by_day[i.created_on.to_date] ||= [] | |
477 | @events_by_day[i.created_on.to_date] << i |
|
475 | @events_by_day[i.created_on.to_date] << i | |
478 | } |
|
476 | } | |
479 | @show_issues = 1 |
|
477 | @show_issues = 1 | |
480 | end |
|
478 | end | |
481 |
|
479 | |||
482 | unless params[:show_news] == "0" |
|
480 | unless params[:show_news] == "0" | |
483 | @project.news.find(:all, :conditions => ["#{News.table_name}.created_on>=? and #{News.table_name}.created_on<=?", @date_from, @date_to], :include => :author ).each { |i| |
|
481 | @project.news.find(:all, :conditions => ["#{News.table_name}.created_on>=? and #{News.table_name}.created_on<=?", @date_from, @date_to], :include => :author ).each { |i| | |
484 | @events_by_day[i.created_on.to_date] ||= [] |
|
482 | @events_by_day[i.created_on.to_date] ||= [] | |
485 | @events_by_day[i.created_on.to_date] << i |
|
483 | @events_by_day[i.created_on.to_date] << i | |
486 | } |
|
484 | } | |
487 | @show_news = 1 |
|
485 | @show_news = 1 | |
488 | end |
|
486 | end | |
489 |
|
487 | |||
490 | unless params[:show_files] == "0" |
|
488 | unless params[:show_files] == "0" | |
491 | Attachment.find(:all, :select => "#{Attachment.table_name}.*", :joins => "LEFT JOIN #{Version.table_name} ON #{Version.table_name}.id = #{Attachment.table_name}.container_id", :conditions => ["#{Attachment.table_name}.container_type='Version' and #{Version.table_name}.project_id=? and #{Attachment.table_name}.created_on>=? and #{Attachment.table_name}.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| |
|
489 | Attachment.find(:all, :select => "#{Attachment.table_name}.*", :joins => "LEFT JOIN #{Version.table_name} ON #{Version.table_name}.id = #{Attachment.table_name}.container_id", :conditions => ["#{Attachment.table_name}.container_type='Version' and #{Version.table_name}.project_id=? and #{Attachment.table_name}.created_on>=? and #{Attachment.table_name}.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| | |
492 | @events_by_day[i.created_on.to_date] ||= [] |
|
490 | @events_by_day[i.created_on.to_date] ||= [] | |
493 | @events_by_day[i.created_on.to_date] << i |
|
491 | @events_by_day[i.created_on.to_date] << i | |
494 | } |
|
492 | } | |
495 | @show_files = 1 |
|
493 | @show_files = 1 | |
496 | end |
|
494 | end | |
497 |
|
495 | |||
498 | unless params[:show_documents] == "0" |
|
496 | unless params[:show_documents] == "0" | |
499 | @project.documents.find(:all, :conditions => ["#{Document.table_name}.created_on>=? and #{Document.table_name}.created_on<=?", @date_from, @date_to] ).each { |i| |
|
497 | @project.documents.find(:all, :conditions => ["#{Document.table_name}.created_on>=? and #{Document.table_name}.created_on<=?", @date_from, @date_to] ).each { |i| | |
500 | @events_by_day[i.created_on.to_date] ||= [] |
|
498 | @events_by_day[i.created_on.to_date] ||= [] | |
501 | @events_by_day[i.created_on.to_date] << i |
|
499 | @events_by_day[i.created_on.to_date] << i | |
502 | } |
|
500 | } | |
503 | Attachment.find(:all, :select => "attachments.*", :joins => "LEFT JOIN #{Document.table_name} ON #{Document.table_name}.id = #{Attachment.table_name}.container_id", :conditions => ["#{Attachment.table_name}.container_type='Document' and #{Document.table_name}.project_id=? and #{Attachment.table_name}.created_on>=? and #{Attachment.table_name}.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| |
|
501 | Attachment.find(:all, :select => "attachments.*", :joins => "LEFT JOIN #{Document.table_name} ON #{Document.table_name}.id = #{Attachment.table_name}.container_id", :conditions => ["#{Attachment.table_name}.container_type='Document' and #{Document.table_name}.project_id=? and #{Attachment.table_name}.created_on>=? and #{Attachment.table_name}.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| | |
504 | @events_by_day[i.created_on.to_date] ||= [] |
|
502 | @events_by_day[i.created_on.to_date] ||= [] | |
505 | @events_by_day[i.created_on.to_date] << i |
|
503 | @events_by_day[i.created_on.to_date] << i | |
506 | } |
|
504 | } | |
507 | @show_documents = 1 |
|
505 | @show_documents = 1 | |
508 | end |
|
506 | end | |
509 |
|
507 | |||
510 | unless params[:show_wiki_edits] == "0" |
|
508 | unless params[:show_wiki_edits] == "0" | |
511 | select = "#{WikiContent.versioned_table_name}.updated_on, #{WikiContent.versioned_table_name}.comments, " + |
|
509 | select = "#{WikiContent.versioned_table_name}.updated_on, #{WikiContent.versioned_table_name}.comments, " + | |
512 | "#{WikiContent.versioned_table_name}.#{WikiContent.version_column}, #{WikiPage.table_name}.title" |
|
510 | "#{WikiContent.versioned_table_name}.#{WikiContent.version_column}, #{WikiPage.table_name}.title" | |
513 | joins = "LEFT JOIN #{WikiPage.table_name} ON #{WikiPage.table_name}.id = #{WikiContent.versioned_table_name}.page_id " + |
|
511 | joins = "LEFT JOIN #{WikiPage.table_name} ON #{WikiPage.table_name}.id = #{WikiContent.versioned_table_name}.page_id " + | |
514 | "LEFT JOIN #{Wiki.table_name} ON #{Wiki.table_name}.id = #{WikiPage.table_name}.wiki_id " |
|
512 | "LEFT JOIN #{Wiki.table_name} ON #{Wiki.table_name}.id = #{WikiPage.table_name}.wiki_id " | |
515 | conditions = ["#{Wiki.table_name}.project_id = ? AND #{WikiContent.versioned_table_name}.updated_on BETWEEN ? AND ?", |
|
513 | conditions = ["#{Wiki.table_name}.project_id = ? AND #{WikiContent.versioned_table_name}.updated_on BETWEEN ? AND ?", | |
516 | @project.id, @date_from, @date_to] |
|
514 | @project.id, @date_from, @date_to] | |
517 |
|
515 | |||
518 | WikiContent.versioned_class.find(:all, :select => select, :joins => joins, :conditions => conditions).each { |i| |
|
516 | WikiContent.versioned_class.find(:all, :select => select, :joins => joins, :conditions => conditions).each { |i| | |
519 | # We provide this alias so all events can be treated in the same manner |
|
517 | # We provide this alias so all events can be treated in the same manner | |
520 | def i.created_on |
|
518 | def i.created_on | |
521 | self.updated_on |
|
519 | self.updated_on | |
522 | end |
|
520 | end | |
523 |
|
521 | |||
524 | @events_by_day[i.created_on.to_date] ||= [] |
|
522 | @events_by_day[i.created_on.to_date] ||= [] | |
525 | @events_by_day[i.created_on.to_date] << i |
|
523 | @events_by_day[i.created_on.to_date] << i | |
526 | } |
|
524 | } | |
527 | @show_wiki_edits = 1 |
|
525 | @show_wiki_edits = 1 | |
528 | end |
|
526 | end | |
529 |
|
527 | |||
530 | unless @project.repository.nil? || params[:show_changesets] == "0" |
|
528 | unless @project.repository.nil? || params[:show_changesets] == "0" | |
531 | @project.repository.changesets.find(:all, :conditions => ["#{Changeset.table_name}.committed_on BETWEEN ? AND ?", @date_from, @date_to]).each { |i| |
|
529 | @project.repository.changesets.find(:all, :conditions => ["#{Changeset.table_name}.committed_on BETWEEN ? AND ?", @date_from, @date_to]).each { |i| | |
532 | def i.created_on |
|
530 | def i.created_on | |
533 | self.committed_on |
|
531 | self.committed_on | |
534 | end |
|
532 | end | |
535 | @events_by_day[i.created_on.to_date] ||= [] |
|
533 | @events_by_day[i.created_on.to_date] ||= [] | |
536 | @events_by_day[i.created_on.to_date] << i |
|
534 | @events_by_day[i.created_on.to_date] << i | |
537 | } |
|
535 | } | |
538 | @show_changesets = 1 |
|
536 | @show_changesets = 1 | |
539 | end |
|
537 | end | |
540 |
|
538 | |||
541 | render :layout => false if request.xhr? |
|
539 | render :layout => false if request.xhr? | |
542 | end |
|
540 | end | |
543 |
|
541 | |||
544 | def calendar |
|
542 | def calendar | |
545 | @trackers = Tracker.find(:all, :order => 'position') |
|
543 | @trackers = Tracker.find(:all, :order => 'position') | |
546 | retrieve_selected_tracker_ids(@trackers) |
|
544 | retrieve_selected_tracker_ids(@trackers) | |
547 |
|
545 | |||
548 | if params[:year] and params[:year].to_i > 1900 |
|
546 | if params[:year] and params[:year].to_i > 1900 | |
549 | @year = params[:year].to_i |
|
547 | @year = params[:year].to_i | |
550 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 |
|
548 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 | |
551 | @month = params[:month].to_i |
|
549 | @month = params[:month].to_i | |
552 | end |
|
550 | end | |
553 | end |
|
551 | end | |
554 | @year ||= Date.today.year |
|
552 | @year ||= Date.today.year | |
555 | @month ||= Date.today.month |
|
553 | @month ||= Date.today.month | |
556 |
|
554 | |||
557 | @date_from = Date.civil(@year, @month, 1) |
|
555 | @date_from = Date.civil(@year, @month, 1) | |
558 | @date_to = (@date_from >> 1)-1 |
|
556 | @date_to = (@date_from >> 1)-1 | |
559 | # start on monday |
|
557 | # start on monday | |
560 | @date_from = @date_from - (@date_from.cwday-1) |
|
558 | @date_from = @date_from - (@date_from.cwday-1) | |
561 | # finish on sunday |
|
559 | # finish on sunday | |
562 | @date_to = @date_to + (7-@date_to.cwday) |
|
560 | @date_to = @date_to + (7-@date_to.cwday) | |
563 |
|
561 | |||
564 | @events = [] |
|
562 | @events = [] | |
565 | @project.issues_with_subprojects(params[:with_subprojects]) do |
|
563 | @project.issues_with_subprojects(params[:with_subprojects]) do | |
566 | @events += Issue.find(:all, |
|
564 | @events += Issue.find(:all, | |
567 | :include => [:tracker, :status, :assigned_to, :priority, :project], |
|
565 | :include => [:tracker, :status, :assigned_to, :priority, :project], | |
568 | :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?)) and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", @date_from, @date_to, @date_from, @date_to] |
|
566 | :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?)) and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", @date_from, @date_to, @date_from, @date_to] | |
569 | ) unless @selected_tracker_ids.empty? |
|
567 | ) unless @selected_tracker_ids.empty? | |
570 | end |
|
568 | end | |
571 | @events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to]) |
|
569 | @events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to]) | |
572 |
|
570 | |||
573 | @ending_events_by_days = @events.group_by {|event| event.due_date} |
|
571 | @ending_events_by_days = @events.group_by {|event| event.due_date} | |
574 | @starting_events_by_days = @events.group_by {|event| event.start_date} |
|
572 | @starting_events_by_days = @events.group_by {|event| event.start_date} | |
575 |
|
573 | |||
576 | render :layout => false if request.xhr? |
|
574 | render :layout => false if request.xhr? | |
577 | end |
|
575 | end | |
578 |
|
576 | |||
579 | def gantt |
|
577 | def gantt | |
580 | @trackers = Tracker.find(:all, :order => 'position') |
|
578 | @trackers = Tracker.find(:all, :order => 'position') | |
581 | retrieve_selected_tracker_ids(@trackers) |
|
579 | retrieve_selected_tracker_ids(@trackers) | |
582 |
|
580 | |||
583 | if params[:year] and params[:year].to_i >0 |
|
581 | if params[:year] and params[:year].to_i >0 | |
584 | @year_from = params[:year].to_i |
|
582 | @year_from = params[:year].to_i | |
585 | if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12 |
|
583 | if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12 | |
586 | @month_from = params[:month].to_i |
|
584 | @month_from = params[:month].to_i | |
587 | else |
|
585 | else | |
588 | @month_from = 1 |
|
586 | @month_from = 1 | |
589 | end |
|
587 | end | |
590 | else |
|
588 | else | |
591 | @month_from ||= (Date.today << 1).month |
|
589 | @month_from ||= (Date.today << 1).month | |
592 | @year_from ||= (Date.today << 1).year |
|
590 | @year_from ||= (Date.today << 1).year | |
593 | end |
|
591 | end | |
594 |
|
592 | |||
595 | @zoom = (params[:zoom].to_i > 0 and params[:zoom].to_i < 5) ? params[:zoom].to_i : 2 |
|
593 | @zoom = (params[:zoom].to_i > 0 and params[:zoom].to_i < 5) ? params[:zoom].to_i : 2 | |
596 | @months = (params[:months].to_i > 0 and params[:months].to_i < 25) ? params[:months].to_i : 6 |
|
594 | @months = (params[:months].to_i > 0 and params[:months].to_i < 25) ? params[:months].to_i : 6 | |
597 |
|
595 | |||
598 | @date_from = Date.civil(@year_from, @month_from, 1) |
|
596 | @date_from = Date.civil(@year_from, @month_from, 1) | |
599 | @date_to = (@date_from >> @months) - 1 |
|
597 | @date_to = (@date_from >> @months) - 1 | |
600 |
|
598 | |||
601 | @events = [] |
|
599 | @events = [] | |
602 | @project.issues_with_subprojects(params[:with_subprojects]) do |
|
600 | @project.issues_with_subprojects(params[:with_subprojects]) do | |
603 | @events += Issue.find(:all, |
|
601 | @events += Issue.find(:all, | |
604 | :order => "start_date, due_date", |
|
602 | :order => "start_date, due_date", | |
605 | :include => [:tracker, :status, :assigned_to, :priority, :project], |
|
603 | :include => [:tracker, :status, :assigned_to, :priority, :project], | |
606 | :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')}))", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to] |
|
604 | :conditions => ["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null and #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')}))", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to] | |
607 | ) unless @selected_tracker_ids.empty? |
|
605 | ) unless @selected_tracker_ids.empty? | |
608 | end |
|
606 | end | |
609 | @events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to]) |
|
607 | @events += @project.versions.find(:all, :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to]) | |
610 | @events.sort! {|x,y| x.start_date <=> y.start_date } |
|
608 | @events.sort! {|x,y| x.start_date <=> y.start_date } | |
611 |
|
609 | |||
612 | if params[:output]=='pdf' |
|
610 | if params[:output]=='pdf' | |
613 | @options_for_rfpdf ||= {} |
|
611 | @options_for_rfpdf ||= {} | |
614 | @options_for_rfpdf[:file_name] = "gantt.pdf" |
|
612 | @options_for_rfpdf[:file_name] = "gantt.pdf" | |
615 | render :template => "projects/gantt.rfpdf", :layout => false |
|
613 | render :template => "projects/gantt.rfpdf", :layout => false | |
616 | else |
|
614 | else | |
617 | render :template => "projects/gantt.rhtml" |
|
615 | render :template => "projects/gantt.rhtml" | |
618 | end |
|
616 | end | |
619 | end |
|
617 | end | |
620 |
|
618 | |||
621 | def feeds |
|
619 | def feeds | |
622 | @queries = @project.queries.find :all, :conditions => ["is_public=? or user_id=?", true, (logged_in_user ? logged_in_user.id : 0)] |
|
620 | @queries = @project.queries.find :all, :conditions => ["is_public=? or user_id=?", true, (logged_in_user ? logged_in_user.id : 0)] | |
623 | @key = logged_in_user.get_or_create_rss_key.value if logged_in_user |
|
621 | @key = logged_in_user.get_or_create_rss_key.value if logged_in_user | |
624 | end |
|
622 | end | |
625 |
|
623 | |||
626 | private |
|
624 | private | |
627 | # Find project of id params[:id] |
|
625 | # Find project of id params[:id] | |
628 | # if not found, redirect to project list |
|
626 | # if not found, redirect to project list | |
629 | # Used as a before_filter |
|
627 | # Used as a before_filter | |
630 | def find_project |
|
628 | def find_project | |
631 | @project = Project.find(params[:id]) |
|
629 | @project = Project.find(params[:id]) | |
632 | @html_title = @project.name |
|
630 | @html_title = @project.name | |
633 | rescue ActiveRecord::RecordNotFound |
|
631 | rescue ActiveRecord::RecordNotFound | |
634 | render_404 |
|
632 | render_404 | |
635 | end |
|
633 | end | |
636 |
|
634 | |||
637 | def retrieve_selected_tracker_ids(selectable_trackers) |
|
635 | def retrieve_selected_tracker_ids(selectable_trackers) | |
638 | if ids = params[:tracker_ids] |
|
636 | if ids = params[:tracker_ids] | |
639 | @selected_tracker_ids = (ids.is_a? Array) ? ids.collect { |id| id.to_i.to_s } : ids.split('/').collect { |id| id.to_i.to_s } |
|
637 | @selected_tracker_ids = (ids.is_a? Array) ? ids.collect { |id| id.to_i.to_s } : ids.split('/').collect { |id| id.to_i.to_s } | |
640 | else |
|
638 | else | |
641 | @selected_tracker_ids = selectable_trackers.collect {|t| t.id.to_s } |
|
639 | @selected_tracker_ids = selectable_trackers.collect {|t| t.id.to_s } | |
642 | end |
|
640 | end | |
643 | end |
|
641 | end | |
644 |
|
642 | |||
645 | # Retrieve query from session or build a new query |
|
643 | # Retrieve query from session or build a new query | |
646 | def retrieve_query |
|
644 | def retrieve_query | |
647 | if params[:query_id] |
|
645 | if params[:query_id] | |
648 | @query = @project.queries.find(params[:query_id]) |
|
646 | @query = @project.queries.find(params[:query_id]) | |
649 | session[:query] = @query |
|
647 | session[:query] = @query | |
650 | else |
|
648 | else | |
651 | if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id |
|
649 | if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id | |
652 | # Give it a name, required to be valid |
|
650 | # Give it a name, required to be valid | |
653 | @query = Query.new(:name => "_") |
|
651 | @query = Query.new(:name => "_") | |
654 | @query.project = @project |
|
652 | @query.project = @project | |
655 | if params[:fields] and params[:fields].is_a? Array |
|
653 | if params[:fields] and params[:fields].is_a? Array | |
656 | params[:fields].each do |field| |
|
654 | params[:fields].each do |field| | |
657 | @query.add_filter(field, params[:operators][field], params[:values][field]) |
|
655 | @query.add_filter(field, params[:operators][field], params[:values][field]) | |
658 | end |
|
656 | end | |
659 | else |
|
657 | else | |
660 | @query.available_filters.keys.each do |field| |
|
658 | @query.available_filters.keys.each do |field| | |
661 | @query.add_short_filter(field, params[field]) if params[field] |
|
659 | @query.add_short_filter(field, params[field]) if params[field] | |
662 | end |
|
660 | end | |
663 | end |
|
661 | end | |
664 | session[:query] = @query |
|
662 | session[:query] = @query | |
665 | else |
|
663 | else | |
666 | @query = session[:query] |
|
664 | @query = session[:query] | |
667 | end |
|
665 | end | |
668 | end |
|
666 | end | |
669 | end |
|
667 | end | |
670 | end |
|
668 | end |
@@ -1,115 +1,78 | |||||
1 | <h2><%=l(:label_settings)%></h2> |
|
1 | <h2><%=l(:label_settings)%></h2> | |
2 |
|
2 | |||
3 | <div class="tabs"> |
|
3 | <div class="tabs"> | |
4 | <ul> |
|
4 | <ul> | |
5 | <li><%= link_to l(:label_information_plural), {}, :id=> "tab-info", :onclick => "showTab('info'); this.blur(); return false;" %></li> |
|
5 | <li><%= link_to l(:label_information_plural), {}, :id=> "tab-info", :onclick => "showTab('info'); this.blur(); return false;" %></li> | |
6 | <li><%= link_to l(:label_member_plural), {}, :id=> "tab-members", :onclick => "showTab('members'); this.blur(); return false;" %></li> |
|
6 | <li><%= link_to l(:label_member_plural), {}, :id=> "tab-members", :onclick => "showTab('members'); this.blur(); return false;" %></li> | |
7 | <li><%= link_to l(:label_version_plural), {}, :id=> "tab-versions", :onclick => "showTab('versions'); this.blur(); return false;" %></li> |
|
7 | <li><%= link_to l(:label_version_plural), {}, :id=> "tab-versions", :onclick => "showTab('versions'); this.blur(); return false;" %></li> | |
8 | <li><%= link_to l(:label_issue_category_plural), {}, :id=> "tab-categories", :onclick => "showTab('categories'); this.blur(); return false;" %></li> |
|
8 | <li><%= link_to l(:label_issue_category_plural), {}, :id=> "tab-categories", :onclick => "showTab('categories'); this.blur(); return false;" %></li> | |
9 | </ul> |
|
9 | </ul> | |
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div id="tab-content-info" class="tab-content"> |
|
12 | <div id="tab-content-info" class="tab-content"> | |
13 | <% if authorize_for('projects', 'edit') %> |
|
13 | <% if authorize_for('projects', 'edit') %> | |
14 | <% labelled_tabular_form_for :project, @project, :url => { :action => "edit", :id => @project } do |f| %> |
|
14 | <% labelled_tabular_form_for :project, @project, :url => { :action => "edit", :id => @project } do |f| %> | |
15 | <%= render :partial => 'form', :locals => { :f => f } %> |
|
15 | <%= render :partial => 'form', :locals => { :f => f } %> | |
16 | <%= submit_tag l(:button_save) %> |
|
16 | <%= submit_tag l(:button_save) %> | |
17 | <% end %> |
|
17 | <% end %> | |
18 | <% end %> |
|
18 | <% end %> | |
19 | </div> |
|
19 | </div> | |
20 |
|
20 | |||
21 | <div id="tab-content-members" class="tab-content" style="display:none;"> |
|
21 | <div id="tab-content-members" class="tab-content" style="display:none;"> | |
22 | <%= error_messages_for 'member' %> |
|
22 | <%= render :partial => 'members' %> | |
23 | <table class="list"> |
|
|||
24 | <thead><th><%= l(:label_user) %></th><th><%= l(:label_role) %></th><th></th></thead> |
|
|||
25 | <tbody> |
|
|||
26 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> |
|
|||
27 | <% unless member.new_record? %> |
|
|||
28 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
|||
29 | <td><%= member.user.display_name %></td> |
|
|||
30 | <td align="center"> |
|
|||
31 | <% if authorize_for('members', 'edit') %> |
|
|||
32 | <% form_tag({:controller => 'members', :action => 'edit', :id => member}) do %> |
|
|||
33 | <select name="member[role_id]"> |
|
|||
34 | <%= options_from_collection_for_select @roles, "id", "name", member.role_id %> |
|
|||
35 | </select> |
|
|||
36 | <%= submit_tag l(:button_change), :class => "button-small" %> |
|
|||
37 | <% end %> |
|
|||
38 | <% end %> |
|
|||
39 | </td> |
|
|||
40 | <td align="center"> |
|
|||
41 | <%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
|
|||
42 | </td> |
|
|||
43 | </tr> |
|
|||
44 | <% end %> |
|
|||
45 | </tbody> |
|
|||
46 | <% end; reset_cycle %> |
|
|||
47 | </table> |
|
|||
48 | <% if authorize_for('projects', 'add_member') %> |
|
|||
49 | <label><%=l(:label_member_new)%></label><br/> |
|
|||
50 | <% form_tag({:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}) do %> |
|
|||
51 | <select name="member[user_id]"> |
|
|||
52 | <%= options_from_collection_for_select @users, "id", "display_name", @member.user_id %> |
|
|||
53 | </select> |
|
|||
54 | <select name="member[role_id]"> |
|
|||
55 | <%= options_from_collection_for_select @roles, "id", "name", @member.role_id %> |
|
|||
56 | </select> |
|
|||
57 | <%= submit_tag l(:button_add) %> |
|
|||
58 | <% end %> |
|
|||
59 | <% end %> |
|
|||
60 | </div> |
|
23 | </div> | |
61 |
|
24 | |||
62 | <div id="tab-content-versions" class="tab-content" style="display:none;"> |
|
25 | <div id="tab-content-versions" class="tab-content" style="display:none;"> | |
63 | <table class="list"> |
|
26 | <table class="list"> | |
64 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead> |
|
27 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead> | |
65 | <tbody> |
|
28 | <tbody> | |
66 | <% for version in @project.versions %> |
|
29 | <% for version in @project.versions %> | |
67 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
30 | <tr class="<%= cycle 'odd', 'even' %>"> | |
68 | <td><%=h version.name %></td> |
|
31 | <td><%=h version.name %></td> | |
69 | <td align="center"><%= format_date(version.effective_date) %></td> |
|
32 | <td align="center"><%= format_date(version.effective_date) %></td> | |
70 | <td><%=h version.description %></td> |
|
33 | <td><%=h version.description %></td> | |
71 | <td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></td> |
|
34 | <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td> | |
72 | <td align="center"><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></td> |
|
35 | <td align="center"><small><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small></td> | |
73 | </td> |
|
36 | </td> | |
74 | </tr> |
|
37 | </tr> | |
75 | <% end; reset_cycle %> |
|
38 | <% end; reset_cycle %> | |
76 | </tbody> |
|
39 | </tbody> | |
77 | </table> |
|
40 | </table> | |
78 | <%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %> |
|
41 | <%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %> | |
79 | </div> |
|
42 | </div> | |
80 |
|
43 | |||
81 | <div id="tab-content-categories" class="tab-content" style="display:none;"> |
|
44 | <div id="tab-content-categories" class="tab-content" style="display:none;"> | |
82 | <table class="list"> |
|
45 | <table class="list"> | |
83 | <thead><th><%= l(:label_issue_category) %></th><th></th></thead> |
|
46 | <thead><th><%= l(:label_issue_category) %></th><th></th></thead> | |
84 | <tbody> |
|
47 | <tbody> | |
85 | <% for @category in @project.issue_categories %> |
|
48 | <% for @category in @project.issue_categories %> | |
86 | <% unless @category.new_record? %> |
|
49 | <% unless @category.new_record? %> | |
87 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
50 | <tr class="<%= cycle 'odd', 'even' %>"> | |
88 | <td> |
|
51 | <td> | |
89 | <% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %> |
|
52 | <% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %> | |
90 | <%= text_field 'category', 'name', :size => 25 %> |
|
53 | <%= text_field 'category', 'name', :size => 25 %> | |
91 | <% if authorize_for('issue_categories', 'edit') %> |
|
54 | <% if authorize_for('issue_categories', 'edit') %> | |
92 | <%= submit_tag l(:button_save), :class => "button-small" %> |
|
55 | <%= submit_tag l(:button_save), :class => "button-small" %> | |
93 | <% end %> |
|
56 | <% end %> | |
94 | <% end %> |
|
57 | <% end %> | |
95 | </td> |
|
58 | </td> | |
96 | <td align="center"> |
|
59 | <td align="center"> | |
97 |
|
|
60 | <small><%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small> | |
98 | </td> |
|
61 | </td> | |
99 | </tr> |
|
62 | </tr> | |
100 | <% end %> |
|
63 | <% end %> | |
101 | <% end %> |
|
64 | <% end %> | |
102 | </tbody> |
|
65 | </tbody> | |
103 | </table> |
|
66 | </table> | |
104 | <% if authorize_for('projects', 'add_issue_category') %> |
|
67 | <% if authorize_for('projects', 'add_issue_category') %> | |
105 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> |
|
68 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> | |
106 | <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> |
|
69 | <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> | |
107 | <%= error_messages_for 'issue_category' %> |
|
70 | <%= error_messages_for 'issue_category' %> | |
108 | <%= text_field 'issue_category', 'name', :size => 25 %> |
|
71 | <%= text_field 'issue_category', 'name', :size => 25 %> | |
109 | <%= submit_tag l(:button_create) %> |
|
72 | <%= submit_tag l(:button_create) %> | |
110 | <% end %> |
|
73 | <% end %> | |
111 | <% end %> |
|
74 | <% end %> | |
112 | </div> |
|
75 | </div> | |
113 |
|
76 | |||
114 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' |
|
77 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' | |
115 | javascript_tag "showTab('#{tab}');" %> No newline at end of file |
|
78 | javascript_tag "showTab('#{tab}');" %> |
@@ -1,667 +1,667 | |||||
1 | /* andreas08 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer. Version: 1.0, November 28, 2005 */ |
|
1 | /* andreas08 - an open source xhtml/css website layout by Andreas Viklund - http://andreasviklund.com . Free to use in any way and for any purpose as long as the proper credits are given to the original designer. Version: 1.0, November 28, 2005 */ | |
2 | /* Edited by Jean-Philippe Lang *> |
|
2 | /* Edited by Jean-Philippe Lang *> | |
3 | /**************** Body and tag styles ****************/ |
|
3 | /**************** Body and tag styles ****************/ | |
4 |
|
4 | |||
5 | #header * {margin:0; padding:0;} |
|
5 | #header * {margin:0; padding:0;} | |
6 | p, ul, ol, li {margin:0; padding:0;} |
|
6 | p, ul, ol, li {margin:0; padding:0;} | |
7 |
|
7 | |||
8 | body{ |
|
8 | body{ | |
9 | font:76% Verdana,Tahoma,Arial,sans-serif; |
|
9 | font:76% Verdana,Tahoma,Arial,sans-serif; | |
10 | line-height:1.4em; |
|
10 | line-height:1.4em; | |
11 | text-align:center; |
|
11 | text-align:center; | |
12 | color:#303030; |
|
12 | color:#303030; | |
13 | background:#e8eaec; |
|
13 | background:#e8eaec; | |
14 | margin:0; |
|
14 | margin:0; | |
15 | } |
|
15 | } | |
16 |
|
16 | |||
17 | a{color:#467aa7;font-weight:bold;text-decoration:none;background-color:inherit;} |
|
17 | a{color:#467aa7;font-weight:bold;text-decoration:none;background-color:inherit;} | |
18 | a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;} |
|
18 | a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;} | |
19 | a img{border:none;} |
|
19 | a img{border:none;} | |
20 |
|
20 | |||
21 | p{margin:0 0 1em 0;} |
|
21 | p{margin:0 0 1em 0;} | |
22 | p form{margin-top:0; margin-bottom:20px;} |
|
22 | p form{margin-top:0; margin-bottom:20px;} | |
23 |
|
23 | |||
24 | img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;} |
|
24 | img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;} | |
25 | img.left{float:left; margin:0 12px 5px 0;} |
|
25 | img.left{float:left; margin:0 12px 5px 0;} | |
26 | img.center{display:block; margin:0 auto 5px auto;} |
|
26 | img.center{display:block; margin:0 auto 5px auto;} | |
27 | img.right{float:right; margin:0 0 5px 12px;} |
|
27 | img.right{float:right; margin:0 0 5px 12px;} | |
28 |
|
28 | |||
29 | /**************** Header and navigation styles ****************/ |
|
29 | /**************** Header and navigation styles ****************/ | |
30 |
|
30 | |||
31 | #container{ |
|
31 | #container{ | |
32 | width:100%; |
|
32 | width:100%; | |
33 | min-width: 800px; |
|
33 | min-width: 800px; | |
34 | margin:0; |
|
34 | margin:0; | |
35 | padding:0; |
|
35 | padding:0; | |
36 | text-align:left; |
|
36 | text-align:left; | |
37 | background:#ffffff; |
|
37 | background:#ffffff; | |
38 | color:#303030; |
|
38 | color:#303030; | |
39 | } |
|
39 | } | |
40 |
|
40 | |||
41 | #header{ |
|
41 | #header{ | |
42 | height:4.5em; |
|
42 | height:4.5em; | |
43 | margin:0; |
|
43 | margin:0; | |
44 | background:#467aa7; |
|
44 | background:#467aa7; | |
45 | color:#ffffff; |
|
45 | color:#ffffff; | |
46 | margin-bottom:1px; |
|
46 | margin-bottom:1px; | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | #header h1{ |
|
49 | #header h1{ | |
50 | padding:10px 0 0 20px; |
|
50 | padding:10px 0 0 20px; | |
51 | font-size:2em; |
|
51 | font-size:2em; | |
52 | background-color:inherit; |
|
52 | background-color:inherit; | |
53 | color:#fff; |
|
53 | color:#fff; | |
54 | letter-spacing:-1px; |
|
54 | letter-spacing:-1px; | |
55 | font-weight:bold; |
|
55 | font-weight:bold; | |
56 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
56 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
57 | } |
|
57 | } | |
58 |
|
58 | |||
59 | #header h2{ |
|
59 | #header h2{ | |
60 | margin:3px 0 0 40px; |
|
60 | margin:3px 0 0 40px; | |
61 | font-size:1.5em; |
|
61 | font-size:1.5em; | |
62 | background-color:inherit; |
|
62 | background-color:inherit; | |
63 | color:#f0f2f4; |
|
63 | color:#f0f2f4; | |
64 | letter-spacing:-1px; |
|
64 | letter-spacing:-1px; | |
65 | font-weight:normal; |
|
65 | font-weight:normal; | |
66 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
66 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
67 | } |
|
67 | } | |
68 |
|
68 | |||
69 | #header a {color:#fff;} |
|
69 | #header a {color:#fff;} | |
70 |
|
70 | |||
71 | #navigation{ |
|
71 | #navigation{ | |
72 | height:2.2em; |
|
72 | height:2.2em; | |
73 | line-height:2.2em; |
|
73 | line-height:2.2em; | |
74 | margin:0; |
|
74 | margin:0; | |
75 | background:#578bb8; |
|
75 | background:#578bb8; | |
76 | color:#ffffff; |
|
76 | color:#ffffff; | |
77 | } |
|
77 | } | |
78 |
|
78 | |||
79 | #navigation li{ |
|
79 | #navigation li{ | |
80 | float:left; |
|
80 | float:left; | |
81 | list-style-type:none; |
|
81 | list-style-type:none; | |
82 | border-right:1px solid #ffffff; |
|
82 | border-right:1px solid #ffffff; | |
83 | white-space:nowrap; |
|
83 | white-space:nowrap; | |
84 | } |
|
84 | } | |
85 |
|
85 | |||
86 | #navigation li.right { |
|
86 | #navigation li.right { | |
87 | float:right; |
|
87 | float:right; | |
88 | list-style-type:none; |
|
88 | list-style-type:none; | |
89 | border-right:0; |
|
89 | border-right:0; | |
90 | border-left:1px solid #ffffff; |
|
90 | border-left:1px solid #ffffff; | |
91 | white-space:nowrap; |
|
91 | white-space:nowrap; | |
92 | } |
|
92 | } | |
93 |
|
93 | |||
94 | #navigation li a{ |
|
94 | #navigation li a{ | |
95 | display:block; |
|
95 | display:block; | |
96 | padding:0px 10px 0px 22px; |
|
96 | padding:0px 10px 0px 22px; | |
97 | font-size:0.8em; |
|
97 | font-size:0.8em; | |
98 | font-weight:normal; |
|
98 | font-weight:normal; | |
99 | text-decoration:none; |
|
99 | text-decoration:none; | |
100 | background-color:inherit; |
|
100 | background-color:inherit; | |
101 | color: #ffffff; |
|
101 | color: #ffffff; | |
102 | } |
|
102 | } | |
103 |
|
103 | |||
104 | #navigation li.submenu {background:url(../images/arrow_down.png) 96% 80% no-repeat;} |
|
104 | #navigation li.submenu {background:url(../images/arrow_down.png) 96% 80% no-repeat;} | |
105 | #navigation li.submenu a {padding:0px 16px 0px 22px;} |
|
105 | #navigation li.submenu a {padding:0px 16px 0px 22px;} | |
106 | * html #navigation a {width:1%;} |
|
106 | * html #navigation a {width:1%;} | |
107 |
|
107 | |||
108 | #navigation .selected,#navigation a:hover{ |
|
108 | #navigation .selected,#navigation a:hover{ | |
109 | color:#ffffff; |
|
109 | color:#ffffff; | |
110 | text-decoration:none; |
|
110 | text-decoration:none; | |
111 | background-color: #80b0da; |
|
111 | background-color: #80b0da; | |
112 | } |
|
112 | } | |
113 |
|
113 | |||
114 | /**************** Icons *******************/ |
|
114 | /**************** Icons *******************/ | |
115 | .icon { |
|
115 | .icon { | |
116 | background-position: 0% 40%; |
|
116 | background-position: 0% 40%; | |
117 | background-repeat: no-repeat; |
|
117 | background-repeat: no-repeat; | |
118 | padding-left: 20px; |
|
118 | padding-left: 20px; | |
119 | padding-top: 2px; |
|
119 | padding-top: 2px; | |
120 | padding-bottom: 3px; |
|
120 | padding-bottom: 3px; | |
121 | vertical-align: middle; |
|
121 | vertical-align: middle; | |
122 | } |
|
122 | } | |
123 |
|
123 | |||
124 | #navigation .icon { |
|
124 | #navigation .icon { | |
125 | background-position: 4px 50%; |
|
125 | background-position: 4px 50%; | |
126 | } |
|
126 | } | |
127 |
|
127 | |||
128 | .icon22 { |
|
128 | .icon22 { | |
129 | background-position: 0% 40%; |
|
129 | background-position: 0% 40%; | |
130 | background-repeat: no-repeat; |
|
130 | background-repeat: no-repeat; | |
131 | padding-left: 26px; |
|
131 | padding-left: 26px; | |
132 | line-height: 22px; |
|
132 | line-height: 22px; | |
133 | vertical-align: middle; |
|
133 | vertical-align: middle; | |
134 | } |
|
134 | } | |
135 |
|
135 | |||
136 | .icon-add { background-image: url(../images/add.png); } |
|
136 | .icon-add { background-image: url(../images/add.png); } | |
137 | .icon-edit { background-image: url(../images/edit.png); } |
|
137 | .icon-edit { background-image: url(../images/edit.png); } | |
138 | .icon-del { background-image: url(../images/delete.png); } |
|
138 | .icon-del { background-image: url(../images/delete.png); } | |
139 | .icon-move { background-image: url(../images/move.png); } |
|
139 | .icon-move { background-image: url(../images/move.png); } | |
140 | .icon-save { background-image: url(../images/save.png); } |
|
140 | .icon-save { background-image: url(../images/save.png); } | |
141 | .icon-cancel { background-image: url(../images/cancel.png); } |
|
141 | .icon-cancel { background-image: url(../images/cancel.png); } | |
142 | .icon-pdf { background-image: url(../images/pdf.png); } |
|
142 | .icon-pdf { background-image: url(../images/pdf.png); } | |
143 | .icon-csv { background-image: url(../images/csv.png); } |
|
143 | .icon-csv { background-image: url(../images/csv.png); } | |
144 | .icon-html { background-image: url(../images/html.png); } |
|
144 | .icon-html { background-image: url(../images/html.png); } | |
145 | .icon-txt { background-image: url(../images/txt.png); } |
|
145 | .icon-txt { background-image: url(../images/txt.png); } | |
146 | .icon-file { background-image: url(../images/file.png); } |
|
146 | .icon-file { background-image: url(../images/file.png); } | |
147 | .icon-folder { background-image: url(../images/folder.png); } |
|
147 | .icon-folder { background-image: url(../images/folder.png); } | |
148 | .icon-package { background-image: url(../images/package.png); } |
|
148 | .icon-package { background-image: url(../images/package.png); } | |
149 | .icon-home { background-image: url(../images/home.png); } |
|
149 | .icon-home { background-image: url(../images/home.png); } | |
150 | .icon-user { background-image: url(../images/user.png); } |
|
150 | .icon-user { background-image: url(../images/user.png); } | |
151 | .icon-mypage { background-image: url(../images/user_page.png); } |
|
151 | .icon-mypage { background-image: url(../images/user_page.png); } | |
152 | .icon-admin { background-image: url(../images/admin.png); } |
|
152 | .icon-admin { background-image: url(../images/admin.png); } | |
153 | .icon-projects { background-image: url(../images/projects.png); } |
|
153 | .icon-projects { background-image: url(../images/projects.png); } | |
154 | .icon-logout { background-image: url(../images/logout.png); } |
|
154 | .icon-logout { background-image: url(../images/logout.png); } | |
155 | .icon-help { background-image: url(../images/help.png); } |
|
155 | .icon-help { background-image: url(../images/help.png); } | |
156 | .icon-attachment { background-image: url(../images/attachment.png); } |
|
156 | .icon-attachment { background-image: url(../images/attachment.png); } | |
157 | .icon-index { background-image: url(../images/index.png); } |
|
157 | .icon-index { background-image: url(../images/index.png); } | |
158 | .icon-history { background-image: url(../images/history.png); } |
|
158 | .icon-history { background-image: url(../images/history.png); } | |
159 | .icon-feed { background-image: url(../images/feed.png); } |
|
159 | .icon-feed { background-image: url(../images/feed.png); } | |
160 | .icon-time { background-image: url(../images/time.png); } |
|
160 | .icon-time { background-image: url(../images/time.png); } | |
161 | .icon-stats { background-image: url(../images/stats.png); } |
|
161 | .icon-stats { background-image: url(../images/stats.png); } | |
162 | .icon-warning { background-image: url(../images/warning.png); } |
|
162 | .icon-warning { background-image: url(../images/warning.png); } | |
163 | .icon-fav { background-image: url(../images/fav.png); } |
|
163 | .icon-fav { background-image: url(../images/fav.png); } | |
164 | .icon-fav-off { background-image: url(../images/fav_off.png); } |
|
164 | .icon-fav-off { background-image: url(../images/fav_off.png); } | |
165 |
|
165 | |||
166 | .icon22-projects { background-image: url(../images/22x22/projects.png); } |
|
166 | .icon22-projects { background-image: url(../images/22x22/projects.png); } | |
167 | .icon22-users { background-image: url(../images/22x22/users.png); } |
|
167 | .icon22-users { background-image: url(../images/22x22/users.png); } | |
168 | .icon22-tracker { background-image: url(../images/22x22/tracker.png); } |
|
168 | .icon22-tracker { background-image: url(../images/22x22/tracker.png); } | |
169 | .icon22-role { background-image: url(../images/22x22/role.png); } |
|
169 | .icon22-role { background-image: url(../images/22x22/role.png); } | |
170 | .icon22-workflow { background-image: url(../images/22x22/workflow.png); } |
|
170 | .icon22-workflow { background-image: url(../images/22x22/workflow.png); } | |
171 | .icon22-options { background-image: url(../images/22x22/options.png); } |
|
171 | .icon22-options { background-image: url(../images/22x22/options.png); } | |
172 | .icon22-notifications { background-image: url(../images/22x22/notifications.png); } |
|
172 | .icon22-notifications { background-image: url(../images/22x22/notifications.png); } | |
173 | .icon22-authent { background-image: url(../images/22x22/authent.png); } |
|
173 | .icon22-authent { background-image: url(../images/22x22/authent.png); } | |
174 | .icon22-info { background-image: url(../images/22x22/info.png); } |
|
174 | .icon22-info { background-image: url(../images/22x22/info.png); } | |
175 | .icon22-comment { background-image: url(../images/22x22/comment.png); } |
|
175 | .icon22-comment { background-image: url(../images/22x22/comment.png); } | |
176 | .icon22-package { background-image: url(../images/22x22/package.png); } |
|
176 | .icon22-package { background-image: url(../images/22x22/package.png); } | |
177 | .icon22-settings { background-image: url(../images/22x22/settings.png); } |
|
177 | .icon22-settings { background-image: url(../images/22x22/settings.png); } | |
178 |
|
178 | |||
179 | /**************** Content styles ****************/ |
|
179 | /**************** Content styles ****************/ | |
180 |
|
180 | |||
181 | html>body #content { |
|
181 | html>body #content { | |
182 | height: auto; |
|
182 | height: auto; | |
183 | min-height: 500px; |
|
183 | min-height: 500px; | |
184 | } |
|
184 | } | |
185 |
|
185 | |||
186 | #content{ |
|
186 | #content{ | |
187 | width: auto; |
|
187 | width: auto; | |
188 | height:500px; |
|
188 | height:500px; | |
189 | font-size:0.9em; |
|
189 | font-size:0.9em; | |
190 | padding:20px 10px 10px 20px; |
|
190 | padding:20px 10px 10px 20px; | |
191 | margin-left: 120px; |
|
191 | margin-left: 120px; | |
192 | border-left: 1px dashed #c0c0c0; |
|
192 | border-left: 1px dashed #c0c0c0; | |
193 |
|
193 | |||
194 | } |
|
194 | } | |
195 |
|
195 | |||
196 | #content h2, #content div.wiki h1 { |
|
196 | #content h2, #content div.wiki h1 { | |
197 | display:block; |
|
197 | display:block; | |
198 | margin:0 0 16px 0; |
|
198 | margin:0 0 16px 0; | |
199 | font-size:1.7em; |
|
199 | font-size:1.7em; | |
200 | font-weight:normal; |
|
200 | font-weight:normal; | |
201 | letter-spacing:-1px; |
|
201 | letter-spacing:-1px; | |
202 | color:#606060; |
|
202 | color:#606060; | |
203 | background-color:inherit; |
|
203 | background-color:inherit; | |
204 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
204 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | #content h2 a{font-weight:normal;} |
|
207 | #content h2 a{font-weight:normal;} | |
208 | #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;} |
|
208 | #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;} | |
209 | #content h4{font-size: 1em; margin-bottom: 12px; margin-top: 20px; font-weight: normal; border-bottom: dotted 1px #c0c0c0;} |
|
209 | #content h4{font-size: 1em; margin-bottom: 12px; margin-top: 20px; font-weight: normal; border-bottom: dotted 1px #c0c0c0;} | |
210 | #content a:hover,#subcontent a:hover{text-decoration:underline;} |
|
210 | #content a:hover,#subcontent a:hover{text-decoration:underline;} | |
211 | #content ul,#content ol{margin:0 5px 16px 35px;} |
|
211 | #content ul,#content ol{margin:0 5px 16px 35px;} | |
212 | #content dl{margin:0 5px 10px 25px;} |
|
212 | #content dl{margin:0 5px 10px 25px;} | |
213 | #content dt{font-weight:bold; margin-bottom:5px;} |
|
213 | #content dt{font-weight:bold; margin-bottom:5px;} | |
214 | #content dd{margin:0 0 10px 15px;} |
|
214 | #content dd{margin:0 0 10px 15px;} | |
215 |
|
215 | |||
216 | #content .tabs{height: 2.6em;} |
|
216 | #content .tabs{height: 2.6em;} | |
217 | #content .tabs ul{margin:0;} |
|
217 | #content .tabs ul{margin:0;} | |
218 | #content .tabs ul li{ |
|
218 | #content .tabs ul li{ | |
219 | float:left; |
|
219 | float:left; | |
220 | list-style-type:none; |
|
220 | list-style-type:none; | |
221 | white-space:nowrap; |
|
221 | white-space:nowrap; | |
222 | margin-right:8px; |
|
222 | margin-right:8px; | |
223 | background:#fff; |
|
223 | background:#fff; | |
224 | } |
|
224 | } | |
225 | #content .tabs ul li a{ |
|
225 | #content .tabs ul li a{ | |
226 | display:block; |
|
226 | display:block; | |
227 | font-size: 0.9em; |
|
227 | font-size: 0.9em; | |
228 | text-decoration:none; |
|
228 | text-decoration:none; | |
229 | line-height:1em; |
|
229 | line-height:1em; | |
230 | padding:4px; |
|
230 | padding:4px; | |
231 | border: 1px solid #c0c0c0; |
|
231 | border: 1px solid #c0c0c0; | |
232 | } |
|
232 | } | |
233 |
|
233 | |||
234 | #content .tabs ul li a.selected, #content .tabs ul li a:hover{ |
|
234 | #content .tabs ul li a.selected, #content .tabs ul li a:hover{ | |
235 | background-color: #80b0da; |
|
235 | background-color: #80b0da; | |
236 | border: 1px solid #80b0da; |
|
236 | border: 1px solid #80b0da; | |
237 | color: #fff; |
|
237 | color: #fff; | |
238 | text-decoration:none; |
|
238 | text-decoration:none; | |
239 | } |
|
239 | } | |
240 |
|
240 | |||
241 | /***********************************************/ |
|
241 | /***********************************************/ | |
242 |
|
242 | |||
243 | form {display: inline;} |
|
243 | form {display: inline;} | |
244 | blockquote {padding-left: 6px; border-left: 2px solid #ccc;} |
|
244 | blockquote {padding-left: 6px; border-left: 2px solid #ccc;} | |
245 |
input, select {vertical-align: middle; margin-bottom: |
|
245 | input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;} | |
246 |
|
246 | |||
247 | input.button-small {font-size: 0.8em;} |
|
247 | input.button-small {font-size: 0.8em;} | |
248 | textarea.wiki-edit { width: 99.5%; } |
|
248 | textarea.wiki-edit { width: 99.5%; } | |
249 | .select-small {font-size: 0.8em;} |
|
249 | .select-small {font-size: 0.8em;} | |
250 | label {font-weight: bold; font-size: 1em; color: #505050;} |
|
250 | label {font-weight: bold; font-size: 1em; color: #505050;} | |
251 | fieldset {border:1px solid #c0c0c0; padding: 6px;} |
|
251 | fieldset {border:1px solid #c0c0c0; padding: 6px;} | |
252 | legend {color: #505050;} |
|
252 | legend {color: #505050;} | |
253 | .required {color: #bb0000;} |
|
253 | .required {color: #bb0000;} | |
254 | .odd {background-color:#f6f7f8;} |
|
254 | .odd {background-color:#f6f7f8;} | |
255 | .even {background-color: #fff;} |
|
255 | .even {background-color: #fff;} | |
256 | hr { border:0; border-top: dotted 1px #fff; border-bottom: dotted 1px #c0c0c0; } |
|
256 | hr { border:0; border-top: dotted 1px #fff; border-bottom: dotted 1px #c0c0c0; } | |
257 | table p {margin:0; padding:0;} |
|
257 | table p {margin:0; padding:0;} | |
258 |
|
258 | |||
259 | .highlight { background-color: #FCFD8D;} |
|
259 | .highlight { background-color: #FCFD8D;} | |
260 |
|
260 | |||
261 | div.square { |
|
261 | div.square { | |
262 | border: 1px solid #999; |
|
262 | border: 1px solid #999; | |
263 | float: left; |
|
263 | float: left; | |
264 | margin: .4em .5em 0 0; |
|
264 | margin: .4em .5em 0 0; | |
265 | overflow: hidden; |
|
265 | overflow: hidden; | |
266 | width: .6em; height: .6em; |
|
266 | width: .6em; height: .6em; | |
267 | } |
|
267 | } | |
268 |
|
268 | |||
269 | ul.documents { |
|
269 | ul.documents { | |
270 | list-style-type: none; |
|
270 | list-style-type: none; | |
271 | padding: 0; |
|
271 | padding: 0; | |
272 | margin: 0; |
|
272 | margin: 0; | |
273 | } |
|
273 | } | |
274 |
|
274 | |||
275 | ul.documents li { |
|
275 | ul.documents li { | |
276 | background-image: url(../images/32x32/file.png); |
|
276 | background-image: url(../images/32x32/file.png); | |
277 | background-repeat: no-repeat; |
|
277 | background-repeat: no-repeat; | |
278 | background-position: 0 1px; |
|
278 | background-position: 0 1px; | |
279 | padding-left: 36px; |
|
279 | padding-left: 36px; | |
280 | margin-bottom: 10px; |
|
280 | margin-bottom: 10px; | |
281 | margin-left: -37px; |
|
281 | margin-left: -37px; | |
282 | } |
|
282 | } | |
283 |
|
283 | |||
284 | /********** Table used to display lists of things ***********/ |
|
284 | /********** Table used to display lists of things ***********/ | |
285 |
|
285 | |||
286 | table.list { |
|
286 | table.list { | |
287 | width:100%; |
|
287 | width:100%; | |
288 | border-collapse: collapse; |
|
288 | border-collapse: collapse; | |
289 | border: 1px dotted #d0d0d0; |
|
289 | border: 1px dotted #d0d0d0; | |
290 | margin-bottom: 6px; |
|
290 | margin-bottom: 6px; | |
291 | } |
|
291 | } | |
292 |
|
292 | |||
293 | table.with-cells td { |
|
293 | table.with-cells td { | |
294 | border: 1px solid #d7d7d7; |
|
294 | border: 1px solid #d7d7d7; | |
295 | } |
|
295 | } | |
296 |
|
296 | |||
297 | table.list td { |
|
297 | table.list td { | |
298 | padding:2px; |
|
298 | padding:2px; | |
299 | } |
|
299 | } | |
300 |
|
300 | |||
301 | table.list thead th { |
|
301 | table.list thead th { | |
302 | text-align: center; |
|
302 | text-align: center; | |
303 | background: #eee; |
|
303 | background: #eee; | |
304 | border: 1px solid #d7d7d7; |
|
304 | border: 1px solid #d7d7d7; | |
305 | color: #777; |
|
305 | color: #777; | |
306 | } |
|
306 | } | |
307 |
|
307 | |||
308 | table.list tbody th { |
|
308 | table.list tbody th { | |
309 | font-weight: bold; |
|
309 | font-weight: bold; | |
310 | background: #eed; |
|
310 | background: #eed; | |
311 | border: 1px solid #d7d7d7; |
|
311 | border: 1px solid #d7d7d7; | |
312 | color: #777; |
|
312 | color: #777; | |
313 | } |
|
313 | } | |
314 |
|
314 | |||
315 | /********** Validation error messages *************/ |
|
315 | /********** Validation error messages *************/ | |
316 | #errorExplanation { |
|
316 | #errorExplanation { | |
317 | width: 400px; |
|
317 | width: 400px; | |
318 | border: 0; |
|
318 | border: 0; | |
319 | padding: 7px; |
|
319 | padding: 7px; | |
320 | padding-bottom: 3px; |
|
320 | padding-bottom: 3px; | |
321 | margin-bottom: 0px; |
|
321 | margin-bottom: 0px; | |
322 | } |
|
322 | } | |
323 |
|
323 | |||
324 | #errorExplanation h2 { |
|
324 | #errorExplanation h2 { | |
325 | text-align: left; |
|
325 | text-align: left; | |
326 | font-weight: bold; |
|
326 | font-weight: bold; | |
327 | padding: 5px 5px 10px 26px; |
|
327 | padding: 5px 5px 10px 26px; | |
328 | font-size: 1em; |
|
328 | font-size: 1em; | |
329 | margin: -7px; |
|
329 | margin: -7px; | |
330 | background: url(../images/alert.png) no-repeat 6px 6px; |
|
330 | background: url(../images/alert.png) no-repeat 6px 6px; | |
331 | } |
|
331 | } | |
332 |
|
332 | |||
333 | #errorExplanation p { |
|
333 | #errorExplanation p { | |
334 | color: #333; |
|
334 | color: #333; | |
335 | margin-bottom: 0; |
|
335 | margin-bottom: 0; | |
336 | padding: 5px; |
|
336 | padding: 5px; | |
337 | } |
|
337 | } | |
338 |
|
338 | |||
339 | #errorExplanation ul li { |
|
339 | #errorExplanation ul li { | |
340 | font-size: 1em; |
|
340 | font-size: 1em; | |
341 | list-style: none; |
|
341 | list-style: none; | |
342 | margin-left: -16px; |
|
342 | margin-left: -16px; | |
343 | } |
|
343 | } | |
344 |
|
344 | |||
345 | /*========== Drop down menu ==============*/ |
|
345 | /*========== Drop down menu ==============*/ | |
346 | div.menu { |
|
346 | div.menu { | |
347 | background-color: #FFFFFF; |
|
347 | background-color: #FFFFFF; | |
348 | border-style: solid; |
|
348 | border-style: solid; | |
349 | border-width: 1px; |
|
349 | border-width: 1px; | |
350 | border-color: #7F9DB9; |
|
350 | border-color: #7F9DB9; | |
351 | position: absolute; |
|
351 | position: absolute; | |
352 | top: 0px; |
|
352 | top: 0px; | |
353 | left: 0px; |
|
353 | left: 0px; | |
354 | padding: 0; |
|
354 | padding: 0; | |
355 | visibility: hidden; |
|
355 | visibility: hidden; | |
356 | z-index: 101; |
|
356 | z-index: 101; | |
357 | } |
|
357 | } | |
358 |
|
358 | |||
359 | div.menu a.menuItem { |
|
359 | div.menu a.menuItem { | |
360 | font-size: 10px; |
|
360 | font-size: 10px; | |
361 | font-weight: normal; |
|
361 | font-weight: normal; | |
362 | line-height: 2em; |
|
362 | line-height: 2em; | |
363 | color: #000000; |
|
363 | color: #000000; | |
364 | background-color: #FFFFFF; |
|
364 | background-color: #FFFFFF; | |
365 | cursor: default; |
|
365 | cursor: default; | |
366 | display: block; |
|
366 | display: block; | |
367 | padding: 0 1em; |
|
367 | padding: 0 1em; | |
368 | margin: 0; |
|
368 | margin: 0; | |
369 | border: 0; |
|
369 | border: 0; | |
370 | text-decoration: none; |
|
370 | text-decoration: none; | |
371 | white-space: nowrap; |
|
371 | white-space: nowrap; | |
372 | } |
|
372 | } | |
373 |
|
373 | |||
374 | div.menu a.menuItem:hover, div.menu a.menuItemHighlight { |
|
374 | div.menu a.menuItem:hover, div.menu a.menuItemHighlight { | |
375 | background-color: #80b0da; |
|
375 | background-color: #80b0da; | |
376 | color: #ffffff; |
|
376 | color: #ffffff; | |
377 | } |
|
377 | } | |
378 |
|
378 | |||
379 | div.menu a.menuItem span.menuItemText {} |
|
379 | div.menu a.menuItem span.menuItemText {} | |
380 |
|
380 | |||
381 | div.menu a.menuItem span.menuItemArrow { |
|
381 | div.menu a.menuItem span.menuItemArrow { | |
382 | margin-right: -.75em; |
|
382 | margin-right: -.75em; | |
383 | } |
|
383 | } | |
384 |
|
384 | |||
385 | /**************** Sidebar styles ****************/ |
|
385 | /**************** Sidebar styles ****************/ | |
386 |
|
386 | |||
387 | #subcontent{ |
|
387 | #subcontent{ | |
388 | position: absolute; |
|
388 | position: absolute; | |
389 | left: 0px; |
|
389 | left: 0px; | |
390 | width:95px; |
|
390 | width:95px; | |
391 | padding:20px 20px 10px 5px; |
|
391 | padding:20px 20px 10px 5px; | |
392 | overflow: hidden; |
|
392 | overflow: hidden; | |
393 | } |
|
393 | } | |
394 |
|
394 | |||
395 | #subcontent h2{ |
|
395 | #subcontent h2{ | |
396 | display:block; |
|
396 | display:block; | |
397 | margin:0 0 5px 0; |
|
397 | margin:0 0 5px 0; | |
398 | font-size:1.0em; |
|
398 | font-size:1.0em; | |
399 | font-weight:bold; |
|
399 | font-weight:bold; | |
400 | text-align:left; |
|
400 | text-align:left; | |
401 | color:#606060; |
|
401 | color:#606060; | |
402 | background-color:inherit; |
|
402 | background-color:inherit; | |
403 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
403 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
404 | } |
|
404 | } | |
405 |
|
405 | |||
406 | #subcontent p{margin:0 0 16px 0; font-size:0.9em;} |
|
406 | #subcontent p{margin:0 0 16px 0; font-size:0.9em;} | |
407 |
|
407 | |||
408 | /**************** Menublock styles ****************/ |
|
408 | /**************** Menublock styles ****************/ | |
409 |
|
409 | |||
410 | .menublock{margin:0 0 20px 8px; font-size:0.8em;} |
|
410 | .menublock{margin:0 0 20px 8px; font-size:0.8em;} | |
411 | .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;} |
|
411 | .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;} | |
412 | .menublock li a{font-weight:bold; text-decoration:none;} |
|
412 | .menublock li a{font-weight:bold; text-decoration:none;} | |
413 | .menublock li a:hover{text-decoration:none;} |
|
413 | .menublock li a:hover{text-decoration:none;} | |
414 | .menublock li ul{margin:0; font-size:1em; font-weight:normal;} |
|
414 | .menublock li ul{margin:0; font-size:1em; font-weight:normal;} | |
415 | .menublock li ul li{margin-bottom:0;} |
|
415 | .menublock li ul li{margin-bottom:0;} | |
416 | .menublock li ul a{font-weight:normal;} |
|
416 | .menublock li ul a{font-weight:normal;} | |
417 |
|
417 | |||
418 | /**************** Footer styles ****************/ |
|
418 | /**************** Footer styles ****************/ | |
419 |
|
419 | |||
420 | #footer{ |
|
420 | #footer{ | |
421 | clear:both; |
|
421 | clear:both; | |
422 | padding:5px 0; |
|
422 | padding:5px 0; | |
423 | margin:0; |
|
423 | margin:0; | |
424 | font-size:0.9em; |
|
424 | font-size:0.9em; | |
425 | color:#f0f0f0; |
|
425 | color:#f0f0f0; | |
426 | background:#467aa7; |
|
426 | background:#467aa7; | |
427 | } |
|
427 | } | |
428 |
|
428 | |||
429 | #footer p{padding:0; margin:0; text-align:center;} |
|
429 | #footer p{padding:0; margin:0; text-align:center;} | |
430 | #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;} |
|
430 | #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;} | |
431 | #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;} |
|
431 | #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;} | |
432 |
|
432 | |||
433 | /**************** Misc classes and styles ****************/ |
|
433 | /**************** Misc classes and styles ****************/ | |
434 |
|
434 | |||
435 | .splitcontentleft{float:left; width:49%;} |
|
435 | .splitcontentleft{float:left; width:49%;} | |
436 | .splitcontentright{float:right; width:49%;} |
|
436 | .splitcontentright{float:right; width:49%;} | |
437 | .clear{clear:both;} |
|
437 | .clear{clear:both;} | |
438 | .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;} |
|
438 | .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;} | |
439 | .hide{display:none;} |
|
439 | .hide{display:none;} | |
440 | .textcenter{text-align:center;} |
|
440 | .textcenter{text-align:center;} | |
441 | .textright{text-align:right;} |
|
441 | .textright{text-align:right;} | |
442 | .important{color:#f02025; background-color:inherit; font-weight:bold;} |
|
442 | .important{color:#f02025; background-color:inherit; font-weight:bold;} | |
443 |
|
443 | |||
444 | .box{ |
|
444 | .box{ | |
445 | margin:0 0 20px 0; |
|
445 | margin:0 0 20px 0; | |
446 | padding:10px; |
|
446 | padding:10px; | |
447 | border:1px solid #c0c0c0; |
|
447 | border:1px solid #c0c0c0; | |
448 | background-color:#fafbfc; |
|
448 | background-color:#fafbfc; | |
449 | color:#505050; |
|
449 | color:#505050; | |
450 | line-height:1.5em; |
|
450 | line-height:1.5em; | |
451 | } |
|
451 | } | |
452 |
|
452 | |||
453 | a.close-icon { |
|
453 | a.close-icon { | |
454 | display:block; |
|
454 | display:block; | |
455 | margin-top:3px; |
|
455 | margin-top:3px; | |
456 | overflow:hidden; |
|
456 | overflow:hidden; | |
457 | width:12px; |
|
457 | width:12px; | |
458 | height:12px; |
|
458 | height:12px; | |
459 | background-repeat: no-repeat; |
|
459 | background-repeat: no-repeat; | |
460 | cursor:pointer; |
|
460 | cursor:pointer; | |
461 | background-image:url('../images/close.png'); |
|
461 | background-image:url('../images/close.png'); | |
462 | } |
|
462 | } | |
463 |
|
463 | |||
464 | a.close-icon:hover { |
|
464 | a.close-icon:hover { | |
465 | background-image:url('../images/close_hl.png'); |
|
465 | background-image:url('../images/close_hl.png'); | |
466 | } |
|
466 | } | |
467 |
|
467 | |||
468 | .rightbox{ |
|
468 | .rightbox{ | |
469 | background: #fafbfc; |
|
469 | background: #fafbfc; | |
470 | border: 1px solid #c0c0c0; |
|
470 | border: 1px solid #c0c0c0; | |
471 | float: right; |
|
471 | float: right; | |
472 | padding: 8px; |
|
472 | padding: 8px; | |
473 | position: relative; |
|
473 | position: relative; | |
474 | margin: 0 5px 5px; |
|
474 | margin: 0 5px 5px; | |
475 | } |
|
475 | } | |
476 |
|
476 | |||
477 | .overlay{ |
|
477 | .overlay{ | |
478 | position: absolute; |
|
478 | position: absolute; | |
479 | margin-left:0; |
|
479 | margin-left:0; | |
480 | z-index: 50; |
|
480 | z-index: 50; | |
481 | } |
|
481 | } | |
482 |
|
482 | |||
483 | .layout-active { |
|
483 | .layout-active { | |
484 | background: #ECF3E1; |
|
484 | background: #ECF3E1; | |
485 | } |
|
485 | } | |
486 |
|
486 | |||
487 | .block-receiver { |
|
487 | .block-receiver { | |
488 | border:1px dashed #c0c0c0; |
|
488 | border:1px dashed #c0c0c0; | |
489 | margin-bottom: 20px; |
|
489 | margin-bottom: 20px; | |
490 | padding: 15px 0 15px 0; |
|
490 | padding: 15px 0 15px 0; | |
491 | } |
|
491 | } | |
492 |
|
492 | |||
493 | .mypage-box { |
|
493 | .mypage-box { | |
494 | margin:0 0 20px 0; |
|
494 | margin:0 0 20px 0; | |
495 | color:#505050; |
|
495 | color:#505050; | |
496 | line-height:1.5em; |
|
496 | line-height:1.5em; | |
497 | } |
|
497 | } | |
498 |
|
498 | |||
499 | .handle { |
|
499 | .handle { | |
500 | cursor: move; |
|
500 | cursor: move; | |
501 | } |
|
501 | } | |
502 |
|
502 | |||
503 | .login { |
|
503 | .login { | |
504 | width: 50%; |
|
504 | width: 50%; | |
505 | text-align: left; |
|
505 | text-align: left; | |
506 | } |
|
506 | } | |
507 |
|
507 | |||
508 | img.calendar-trigger { |
|
508 | img.calendar-trigger { | |
509 | cursor: pointer; |
|
509 | cursor: pointer; | |
510 | vertical-align: middle; |
|
510 | vertical-align: middle; | |
511 | margin-left: 4px; |
|
511 | margin-left: 4px; | |
512 | } |
|
512 | } | |
513 |
|
513 | |||
514 | #history p { |
|
514 | #history p { | |
515 | margin-left: 34px; |
|
515 | margin-left: 34px; | |
516 | } |
|
516 | } | |
517 |
|
517 | |||
518 | .progress { |
|
518 | .progress { | |
519 | border: 1px solid #D7D7D7; |
|
519 | border: 1px solid #D7D7D7; | |
520 | border-collapse: collapse; |
|
520 | border-collapse: collapse; | |
521 | border-spacing: 0pt; |
|
521 | border-spacing: 0pt; | |
522 | empty-cells: show; |
|
522 | empty-cells: show; | |
523 | padding: 3px; |
|
523 | padding: 3px; | |
524 | width: 40em; |
|
524 | width: 40em; | |
525 | text-align: center; |
|
525 | text-align: center; | |
526 | } |
|
526 | } | |
527 |
|
527 | |||
528 | .progress td { height: 1em; } |
|
528 | .progress td { height: 1em; } | |
529 | .progress .closed { background: #BAE0BA none repeat scroll 0%; } |
|
529 | .progress .closed { background: #BAE0BA none repeat scroll 0%; } | |
530 | .progress .open { background: #FFF none repeat scroll 0%; } |
|
530 | .progress .open { background: #FFF none repeat scroll 0%; } | |
531 |
|
531 | |||
532 | /***** Contextual links div *****/ |
|
532 | /***** Contextual links div *****/ | |
533 | .contextual { |
|
533 | .contextual { | |
534 | float: right; |
|
534 | float: right; | |
535 | font-size: 0.8em; |
|
535 | font-size: 0.8em; | |
536 | line-height: 16px; |
|
536 | line-height: 16px; | |
537 | padding: 2px; |
|
537 | padding: 2px; | |
538 | } |
|
538 | } | |
539 |
|
539 | |||
540 | .contextual select, .contextual input { |
|
540 | .contextual select, .contextual input { | |
541 | font-size: 1em; |
|
541 | font-size: 1em; | |
542 | } |
|
542 | } | |
543 |
|
543 | |||
544 | /***** Gantt chart *****/ |
|
544 | /***** Gantt chart *****/ | |
545 | .gantt_hdr { |
|
545 | .gantt_hdr { | |
546 | position:absolute; |
|
546 | position:absolute; | |
547 | top:0; |
|
547 | top:0; | |
548 | height:16px; |
|
548 | height:16px; | |
549 | border-top: 1px solid #c0c0c0; |
|
549 | border-top: 1px solid #c0c0c0; | |
550 | border-bottom: 1px solid #c0c0c0; |
|
550 | border-bottom: 1px solid #c0c0c0; | |
551 | border-right: 1px solid #c0c0c0; |
|
551 | border-right: 1px solid #c0c0c0; | |
552 | text-align: center; |
|
552 | text-align: center; | |
553 | overflow: hidden; |
|
553 | overflow: hidden; | |
554 | } |
|
554 | } | |
555 |
|
555 | |||
556 | .task { |
|
556 | .task { | |
557 | position: absolute; |
|
557 | position: absolute; | |
558 | height:8px; |
|
558 | height:8px; | |
559 | font-size:0.8em; |
|
559 | font-size:0.8em; | |
560 | color:#888; |
|
560 | color:#888; | |
561 | padding:0; |
|
561 | padding:0; | |
562 | margin:0; |
|
562 | margin:0; | |
563 | line-height:0.8em; |
|
563 | line-height:0.8em; | |
564 | } |
|
564 | } | |
565 |
|
565 | |||
566 | .task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; } |
|
566 | .task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; } | |
567 | .task_done { background:#66f url(../images/task_done.png); border: 1px solid #66f; } |
|
567 | .task_done { background:#66f url(../images/task_done.png); border: 1px solid #66f; } | |
568 | .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; } |
|
568 | .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; } | |
569 | .milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; } |
|
569 | .milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; } | |
570 |
|
570 | |||
571 | /***** Tooltips ******/ |
|
571 | /***** Tooltips ******/ | |
572 | .tooltip{position:relative;z-index:24;} |
|
572 | .tooltip{position:relative;z-index:24;} | |
573 | .tooltip:hover{z-index:25;color:#000;} |
|
573 | .tooltip:hover{z-index:25;color:#000;} | |
574 | .tooltip span.tip{display: none; text-align:left;} |
|
574 | .tooltip span.tip{display: none; text-align:left;} | |
575 |
|
575 | |||
576 | div.tooltip:hover span.tip{ |
|
576 | div.tooltip:hover span.tip{ | |
577 | display:block; |
|
577 | display:block; | |
578 | position:absolute; |
|
578 | position:absolute; | |
579 | top:12px; left:24px; width:270px; |
|
579 | top:12px; left:24px; width:270px; | |
580 | border:1px solid #555; |
|
580 | border:1px solid #555; | |
581 | background-color:#fff; |
|
581 | background-color:#fff; | |
582 | padding: 4px; |
|
582 | padding: 4px; | |
583 | font-size: 0.8em; |
|
583 | font-size: 0.8em; | |
584 | color:#505050; |
|
584 | color:#505050; | |
585 | } |
|
585 | } | |
586 |
|
586 | |||
587 | /***** CSS FORM ******/ |
|
587 | /***** CSS FORM ******/ | |
588 | .tabular p{ |
|
588 | .tabular p{ | |
589 | margin: 0; |
|
589 | margin: 0; | |
590 | padding: 5px 0 8px 0; |
|
590 | padding: 5px 0 8px 0; | |
591 | padding-left: 180px; /*width of left column containing the label elements*/ |
|
591 | padding-left: 180px; /*width of left column containing the label elements*/ | |
592 | height: 1%; |
|
592 | height: 1%; | |
593 | } |
|
593 | } | |
594 |
|
594 | |||
595 | .tabular label{ |
|
595 | .tabular label{ | |
596 | font-weight: bold; |
|
596 | font-weight: bold; | |
597 | float: left; |
|
597 | float: left; | |
598 | margin-left: -180px; /*width of left column*/ |
|
598 | margin-left: -180px; /*width of left column*/ | |
599 | width: 175px; /*width of labels. Should be smaller than left column to create some right |
|
599 | width: 175px; /*width of labels. Should be smaller than left column to create some right | |
600 | margin*/ |
|
600 | margin*/ | |
601 | } |
|
601 | } | |
602 |
|
602 | |||
603 | .error { |
|
603 | .error { | |
604 | color: #cc0000; |
|
604 | color: #cc0000; | |
605 | } |
|
605 | } | |
606 |
|
606 | |||
607 | #settings .tabular p{ padding-left: 300px; } |
|
607 | #settings .tabular p{ padding-left: 300px; } | |
608 | #settings .tabular label{ margin-left: -300px; width: 295px; } |
|
608 | #settings .tabular label{ margin-left: -300px; width: 295px; } | |
609 |
|
609 | |||
610 | /*.threepxfix class below: |
|
610 | /*.threepxfix class below: | |
611 | Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents. |
|
611 | Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents. | |
612 | to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html |
|
612 | to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html | |
613 | */ |
|
613 | */ | |
614 |
|
614 | |||
615 | * html .threepxfix{ |
|
615 | * html .threepxfix{ | |
616 | margin-left: 3px; |
|
616 | margin-left: 3px; | |
617 | } |
|
617 | } | |
618 |
|
618 | |||
619 | /***** Wiki sections ****/ |
|
619 | /***** Wiki sections ****/ | |
620 | #content div.wiki { font-size: 110%} |
|
620 | #content div.wiki { font-size: 110%} | |
621 |
|
621 | |||
622 | #content div.wiki h2, div.wiki h3 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; color:#606060; } |
|
622 | #content div.wiki h2, div.wiki h3 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; color:#606060; } | |
623 | #content div.wiki h2 { font-size: 1.4em;} |
|
623 | #content div.wiki h2 { font-size: 1.4em;} | |
624 | #content div.wiki h3 { font-size: 1.2em;} |
|
624 | #content div.wiki h3 { font-size: 1.2em;} | |
625 |
|
625 | |||
626 | div.wiki table { |
|
626 | div.wiki table { | |
627 | border: 1px solid #505050; |
|
627 | border: 1px solid #505050; | |
628 | border-collapse: collapse; |
|
628 | border-collapse: collapse; | |
629 | } |
|
629 | } | |
630 |
|
630 | |||
631 | div.wiki table, div.wiki td { |
|
631 | div.wiki table, div.wiki td { | |
632 | border: 1px solid #bbb; |
|
632 | border: 1px solid #bbb; | |
633 | padding: 4px; |
|
633 | padding: 4px; | |
634 | } |
|
634 | } | |
635 |
|
635 | |||
636 | div.wiki code { |
|
636 | div.wiki code { | |
637 | font-size: 1.2em; |
|
637 | font-size: 1.2em; | |
638 | } |
|
638 | } | |
639 |
|
639 | |||
640 | #preview .preview { background: #fafbfc url(../images/draft.png); } |
|
640 | #preview .preview { background: #fafbfc url(../images/draft.png); } | |
641 |
|
641 | |||
642 | #ajax-indicator { |
|
642 | #ajax-indicator { | |
643 | position: absolute; /* fixed not supported by IE */ |
|
643 | position: absolute; /* fixed not supported by IE */ | |
644 | background-color:#eee; |
|
644 | background-color:#eee; | |
645 | border: 1px solid #bbb; |
|
645 | border: 1px solid #bbb; | |
646 | top:35%; |
|
646 | top:35%; | |
647 | left:40%; |
|
647 | left:40%; | |
648 | width:20%; |
|
648 | width:20%; | |
649 | font-weight:bold; |
|
649 | font-weight:bold; | |
650 | text-align:center; |
|
650 | text-align:center; | |
651 | padding:0.6em; |
|
651 | padding:0.6em; | |
652 | z-index:100; |
|
652 | z-index:100; | |
653 | filter:alpha(opacity=50); |
|
653 | filter:alpha(opacity=50); | |
654 | -moz-opacity:0.5; |
|
654 | -moz-opacity:0.5; | |
655 | opacity: 0.5; |
|
655 | opacity: 0.5; | |
656 | -khtml-opacity: 0.5; |
|
656 | -khtml-opacity: 0.5; | |
657 | } |
|
657 | } | |
658 |
|
658 | |||
659 | html>body #ajax-indicator { position: fixed; } |
|
659 | html>body #ajax-indicator { position: fixed; } | |
660 |
|
660 | |||
661 | #ajax-indicator span { |
|
661 | #ajax-indicator span { | |
662 | background-position: 0% 40%; |
|
662 | background-position: 0% 40%; | |
663 | background-repeat: no-repeat; |
|
663 | background-repeat: no-repeat; | |
664 | background-image: url(../images/loading.gif); |
|
664 | background-image: url(../images/loading.gif); | |
665 | padding-left: 26px; |
|
665 | padding-left: 26px; | |
666 | vertical-align: bottom; |
|
666 | vertical-align: bottom; | |
667 | } |
|
667 | } |
General Comments 0
You need to be logged in to leave comments.
Login now