@@ -1,68 +1,66 | |||||
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 DocumentsController < ApplicationController |
|
18 | class DocumentsController < ApplicationController | |
19 | layout 'base' |
|
19 | layout 'base' | |
20 | before_filter :find_project, :authorize |
|
20 | before_filter :find_project, :authorize | |
21 |
|
21 | |||
22 | def show |
|
22 | def show | |
23 | @attachments = @document.attachments.find(:all, :order => "created_on DESC") |
|
23 | @attachments = @document.attachments.find(:all, :order => "created_on DESC") | |
24 | end |
|
24 | end | |
25 |
|
25 | |||
26 | def edit |
|
26 | def edit | |
27 | @categories = Enumeration::get_values('DCAT') |
|
27 | @categories = Enumeration::get_values('DCAT') | |
28 | if request.post? and @document.update_attributes(params[:document]) |
|
28 | if request.post? and @document.update_attributes(params[:document]) | |
29 | flash[:notice] = l(:notice_successful_update) |
|
29 | flash[:notice] = l(:notice_successful_update) | |
30 | redirect_to :action => 'show', :id => @document |
|
30 | redirect_to :action => 'show', :id => @document | |
31 | end |
|
31 | end | |
32 | end |
|
32 | end | |
33 |
|
33 | |||
34 | def destroy |
|
34 | def destroy | |
35 | @document.destroy |
|
35 | @document.destroy | |
36 | redirect_to :controller => 'projects', :action => 'list_documents', :id => @project |
|
36 | redirect_to :controller => 'projects', :action => 'list_documents', :id => @project | |
37 | end |
|
37 | end | |
38 |
|
38 | |||
39 | def download |
|
39 | def download | |
40 | @attachment = @document.attachments.find(params[:attachment_id]) |
|
40 | @attachment = @document.attachments.find(params[:attachment_id]) | |
41 | @attachment.increment_download |
|
41 | @attachment.increment_download | |
42 | send_file @attachment.diskfile, :filename => @attachment.filename |
|
42 | send_file @attachment.diskfile, :filename => @attachment.filename | |
43 | rescue |
|
43 | rescue | |
44 | flash.now[:notice] = l(:notice_file_not_found) |
|
44 | flash.now[:notice] = l(:notice_file_not_found) | |
45 | render :text => "", :layout => true, :status => 404 |
|
45 | render :text => "", :layout => true, :status => 404 | |
46 | end |
|
46 | end | |
47 |
|
47 | |||
48 | def add_attachment |
|
48 | def add_attachment | |
49 | # Save the attachment |
|
49 | # Save the attachments | |
50 |
|
|
50 | params[:attachments].each { |a| | |
51 | @attachment = @document.attachments.build(params[:attachment]) |
|
51 | Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0 | |
52 | @attachment.author_id = self.logged_in_user.id if self.logged_in_user |
|
52 | } if params[:attachments] and params[:attachments].is_a? Array | |
53 | @attachment.save |
|
|||
54 | end |
|
|||
55 | redirect_to :action => 'show', :id => @document |
|
53 | redirect_to :action => 'show', :id => @document | |
56 | end |
|
54 | end | |
57 |
|
55 | |||
58 | def destroy_attachment |
|
56 | def destroy_attachment | |
59 | @document.attachments.find(params[:attachment_id]).destroy |
|
57 | @document.attachments.find(params[:attachment_id]).destroy | |
60 | redirect_to :action => 'show', :id => @document |
|
58 | redirect_to :action => 'show', :id => @document | |
61 | end |
|
59 | end | |
62 |
|
60 | |||
63 | private |
|
61 | private | |
64 | def find_project |
|
62 | def find_project | |
65 | @document = Document.find(params[:id]) |
|
63 | @document = Document.find(params[:id]) | |
66 | @project = @document.project |
|
64 | @project = @document.project | |
67 | end |
|
65 | end | |
68 | end |
|
66 | end |
@@ -1,535 +1,531 | |||||
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 ProjectsController < ApplicationController |
|
18 | class ProjectsController < ApplicationController | |
19 | layout 'base' |
|
19 | layout 'base' | |
20 | before_filter :find_project, :authorize, :except => [ :index, :list, :add ] |
|
20 | before_filter :find_project, :authorize, :except => [ :index, :list, :add ] | |
21 | before_filter :require_admin, :only => [ :add, :destroy ] |
|
21 | before_filter :require_admin, :only => [ :add, :destroy ] | |
22 |
|
22 | |||
23 | helper :sort |
|
23 | helper :sort | |
24 | include SortHelper |
|
24 | include SortHelper | |
25 | helper :custom_fields |
|
25 | helper :custom_fields | |
26 | include CustomFieldsHelper |
|
26 | include CustomFieldsHelper | |
27 | helper :ifpdf |
|
27 | helper :ifpdf | |
28 | include IfpdfHelper |
|
28 | include IfpdfHelper | |
29 | helper IssuesHelper |
|
29 | helper IssuesHelper | |
30 | helper :queries |
|
30 | helper :queries | |
31 | include QueriesHelper |
|
31 | include QueriesHelper | |
32 |
|
32 | |||
33 | def index |
|
33 | def index | |
34 | list |
|
34 | list | |
35 | render :action => 'list' unless request.xhr? |
|
35 | render :action => 'list' unless request.xhr? | |
36 | end |
|
36 | end | |
37 |
|
37 | |||
38 | # Lists public projects |
|
38 | # Lists public projects | |
39 | def list |
|
39 | def list | |
40 | sort_init 'name', 'asc' |
|
40 | sort_init 'name', 'asc' | |
41 | sort_update |
|
41 | sort_update | |
42 | @project_count = Project.count(["is_public=?", true]) |
|
42 | @project_count = Project.count(["is_public=?", true]) | |
43 | @project_pages = Paginator.new self, @project_count, |
|
43 | @project_pages = Paginator.new self, @project_count, | |
44 | 15, |
|
44 | 15, | |
45 | params['page'] |
|
45 | params['page'] | |
46 | @projects = Project.find :all, :order => sort_clause, |
|
46 | @projects = Project.find :all, :order => sort_clause, | |
47 | :conditions => ["is_public=?", true], |
|
47 | :conditions => ["is_public=?", true], | |
48 | :limit => @project_pages.items_per_page, |
|
48 | :limit => @project_pages.items_per_page, | |
49 | :offset => @project_pages.current.offset |
|
49 | :offset => @project_pages.current.offset | |
50 |
|
50 | |||
51 | render :action => "list", :layout => false if request.xhr? |
|
51 | render :action => "list", :layout => false if request.xhr? | |
52 | end |
|
52 | end | |
53 |
|
53 | |||
54 | # Add a new project |
|
54 | # Add a new project | |
55 | def add |
|
55 | def add | |
56 | @custom_fields = IssueCustomField.find(:all) |
|
56 | @custom_fields = IssueCustomField.find(:all) | |
57 | @root_projects = Project.find(:all, :conditions => "parent_id is null") |
|
57 | @root_projects = Project.find(:all, :conditions => "parent_id is null") | |
58 | @project = Project.new(params[:project]) |
|
58 | @project = Project.new(params[:project]) | |
59 | if request.get? |
|
59 | if request.get? | |
60 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } |
|
60 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project) } | |
61 | else |
|
61 | else | |
62 | @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] |
|
62 | @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] | |
63 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } |
|
63 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } | |
64 | @project.custom_values = @custom_values |
|
64 | @project.custom_values = @custom_values | |
65 | if params[:repository_enabled] && params[:repository_enabled] == "1" |
|
65 | if params[:repository_enabled] && params[:repository_enabled] == "1" | |
66 | @project.repository = Repository.new |
|
66 | @project.repository = Repository.new | |
67 | @project.repository.attributes = params[:repository] |
|
67 | @project.repository.attributes = params[:repository] | |
68 | end |
|
68 | end | |
69 | if @project.save |
|
69 | if @project.save | |
70 | flash[:notice] = l(:notice_successful_create) |
|
70 | flash[:notice] = l(:notice_successful_create) | |
71 | redirect_to :controller => 'admin', :action => 'projects' |
|
71 | redirect_to :controller => 'admin', :action => 'projects' | |
72 | end |
|
72 | end | |
73 | end |
|
73 | end | |
74 | end |
|
74 | end | |
75 |
|
75 | |||
76 | # Show @project |
|
76 | # Show @project | |
77 | def show |
|
77 | def show | |
78 | @custom_values = @project.custom_values.find(:all, :include => :custom_field) |
|
78 | @custom_values = @project.custom_values.find(:all, :include => :custom_field) | |
79 | @members = @project.members.find(:all, :include => [:user, :role]) |
|
79 | @members = @project.members.find(:all, :include => [:user, :role]) | |
80 | @subprojects = @project.children if @project.children_count > 0 |
|
80 | @subprojects = @project.children if @project.children_count > 0 | |
81 | @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC") |
|
81 | @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "news.created_on DESC") | |
82 | @trackers = Tracker.find(:all) |
|
82 | @trackers = Tracker.find(:all) | |
83 | end |
|
83 | end | |
84 |
|
84 | |||
85 | def settings |
|
85 | def settings | |
86 | @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id]) |
|
86 | @root_projects = Project::find(:all, :conditions => ["parent_id is null and id <> ?", @project.id]) | |
87 | @custom_fields = IssueCustomField.find(:all) |
|
87 | @custom_fields = IssueCustomField.find(:all) | |
88 | @issue_category ||= IssueCategory.new |
|
88 | @issue_category ||= IssueCategory.new | |
89 | @member ||= @project.members.new |
|
89 | @member ||= @project.members.new | |
90 | @roles = Role.find(:all) |
|
90 | @roles = Role.find(:all) | |
91 | @users = User.find(:all) - @project.members.find(:all, :include => :user).collect{|m| m.user } |
|
91 | @users = User.find(:all) - @project.members.find(:all, :include => :user).collect{|m| m.user } | |
92 | @custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) } |
|
92 | @custom_values ||= ProjectCustomField.find(:all).collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) } | |
93 | end |
|
93 | end | |
94 |
|
94 | |||
95 | # Edit @project |
|
95 | # Edit @project | |
96 | def edit |
|
96 | def edit | |
97 | if request.post? |
|
97 | if request.post? | |
98 | @project.custom_fields = IssueCustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] |
|
98 | @project.custom_fields = IssueCustomField.find(params[:custom_field_ids]) if params[:custom_field_ids] | |
99 | if params[:custom_fields] |
|
99 | if params[:custom_fields] | |
100 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } |
|
100 | @custom_values = ProjectCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) } | |
101 | @project.custom_values = @custom_values |
|
101 | @project.custom_values = @custom_values | |
102 | end |
|
102 | end | |
103 | if params[:repository_enabled] |
|
103 | if params[:repository_enabled] | |
104 | case params[:repository_enabled] |
|
104 | case params[:repository_enabled] | |
105 | when "0" |
|
105 | when "0" | |
106 | @project.repository = nil |
|
106 | @project.repository = nil | |
107 | when "1" |
|
107 | when "1" | |
108 | @project.repository ||= Repository.new |
|
108 | @project.repository ||= Repository.new | |
109 | @project.repository.attributes = params[:repository] |
|
109 | @project.repository.attributes = params[:repository] | |
110 | end |
|
110 | end | |
111 | end |
|
111 | end | |
112 | @project.attributes = params[:project] |
|
112 | @project.attributes = params[:project] | |
113 | if @project.save |
|
113 | if @project.save | |
114 | flash[:notice] = l(:notice_successful_update) |
|
114 | flash[:notice] = l(:notice_successful_update) | |
115 | redirect_to :action => 'settings', :id => @project |
|
115 | redirect_to :action => 'settings', :id => @project | |
116 | else |
|
116 | else | |
117 | settings |
|
117 | settings | |
118 | render :action => 'settings' |
|
118 | render :action => 'settings' | |
119 | end |
|
119 | end | |
120 | end |
|
120 | end | |
121 | end |
|
121 | end | |
122 |
|
122 | |||
123 | # Delete @project |
|
123 | # Delete @project | |
124 | def destroy |
|
124 | def destroy | |
125 | if request.post? and params[:confirm] |
|
125 | if request.post? and params[:confirm] | |
126 | @project.destroy |
|
126 | @project.destroy | |
127 | redirect_to :controller => 'admin', :action => 'projects' |
|
127 | redirect_to :controller => 'admin', :action => 'projects' | |
128 | end |
|
128 | end | |
129 | end |
|
129 | end | |
130 |
|
130 | |||
131 | # Add a new issue category to @project |
|
131 | # Add a new issue category to @project | |
132 | def add_issue_category |
|
132 | def add_issue_category | |
133 | if request.post? |
|
133 | if request.post? | |
134 | @issue_category = @project.issue_categories.build(params[:issue_category]) |
|
134 | @issue_category = @project.issue_categories.build(params[:issue_category]) | |
135 | if @issue_category.save |
|
135 | if @issue_category.save | |
136 | flash[:notice] = l(:notice_successful_create) |
|
136 | flash[:notice] = l(:notice_successful_create) | |
137 | redirect_to :action => 'settings', :id => @project |
|
137 | redirect_to :action => 'settings', :id => @project | |
138 | else |
|
138 | else | |
139 | settings |
|
139 | settings | |
140 | render :action => 'settings' |
|
140 | render :action => 'settings' | |
141 | end |
|
141 | end | |
142 | end |
|
142 | end | |
143 | end |
|
143 | end | |
144 |
|
144 | |||
145 | # Add a new version to @project |
|
145 | # Add a new version to @project | |
146 | def add_version |
|
146 | def add_version | |
147 | @version = @project.versions.build(params[:version]) |
|
147 | @version = @project.versions.build(params[:version]) | |
148 | if request.post? and @version.save |
|
148 | if request.post? and @version.save | |
149 | flash[:notice] = l(:notice_successful_create) |
|
149 | flash[:notice] = l(:notice_successful_create) | |
150 | redirect_to :action => 'settings', :id => @project |
|
150 | redirect_to :action => 'settings', :id => @project | |
151 | end |
|
151 | end | |
152 | end |
|
152 | end | |
153 |
|
153 | |||
154 | # Add a new member to @project |
|
154 | # Add a new member to @project | |
155 | def add_member |
|
155 | def add_member | |
156 | @member = @project.members.build(params[:member]) |
|
156 | @member = @project.members.build(params[:member]) | |
157 | if request.post? |
|
157 | if request.post? | |
158 | if @member.save |
|
158 | if @member.save | |
159 | flash[:notice] = l(:notice_successful_create) |
|
159 | flash[:notice] = l(:notice_successful_create) | |
160 | redirect_to :action => 'settings', :id => @project |
|
160 | redirect_to :action => 'settings', :id => @project | |
161 | else |
|
161 | else | |
162 | settings |
|
162 | settings | |
163 | render :action => 'settings' |
|
163 | render :action => 'settings' | |
164 | end |
|
164 | end | |
165 | end |
|
165 | end | |
166 | end |
|
166 | end | |
167 |
|
167 | |||
168 | # Show members list of @project |
|
168 | # Show members list of @project | |
169 | def list_members |
|
169 | def list_members | |
170 | @members = @project.members |
|
170 | @members = @project.members | |
171 | end |
|
171 | end | |
172 |
|
172 | |||
173 | # Add a new document to @project |
|
173 | # Add a new document to @project | |
174 | def add_document |
|
174 | def add_document | |
175 | @categories = Enumeration::get_values('DCAT') |
|
175 | @categories = Enumeration::get_values('DCAT') | |
176 | @document = @project.documents.build(params[:document]) |
|
176 | @document = @project.documents.build(params[:document]) | |
177 |
if request.post? |
|
177 | if request.post? and @document.save | |
178 | # Save the attachment |
|
178 | # Save the attachments | |
179 |
|
|
179 | params[:attachments].each { |a| | |
180 | @attachment = @document.attachments.build(params[:attachment]) |
|
180 | Attachment.create(:container => @document, :file => a, :author => logged_in_user) unless a.size == 0 | |
181 | @attachment.author_id = self.logged_in_user.id if self.logged_in_user |
|
181 | } if params[:attachments] and params[:attachments].is_a? Array | |
182 | end |
|
182 | flash[:notice] = l(:notice_successful_create) | |
183 | if @document.save |
|
183 | redirect_to :action => 'list_documents', :id => @project | |
184 | flash[:notice] = l(:notice_successful_create) |
|
|||
185 | redirect_to :action => 'list_documents', :id => @project |
|
|||
186 | end |
|
|||
187 | end |
|
184 | end | |
188 | end |
|
185 | end | |
189 |
|
186 | |||
190 | # Show documents list of @project |
|
187 | # Show documents list of @project | |
191 | def list_documents |
|
188 | def list_documents | |
192 | @documents = @project.documents.find :all, :include => :category |
|
189 | @documents = @project.documents.find :all, :include => :category | |
193 | end |
|
190 | end | |
194 |
|
191 | |||
195 | # Add a new issue to @project |
|
192 | # Add a new issue to @project | |
196 | def add_issue |
|
193 | def add_issue | |
197 | @tracker = Tracker.find(params[:tracker_id]) |
|
194 | @tracker = Tracker.find(params[:tracker_id]) | |
198 | @priorities = Enumeration::get_values('IPRI') |
|
195 | @priorities = Enumeration::get_values('IPRI') | |
199 | @issue = Issue.new(:project => @project, :tracker => @tracker) |
|
196 | @issue = Issue.new(:project => @project, :tracker => @tracker) | |
200 | if request.get? |
|
197 | if request.get? | |
201 | @issue.start_date = Date.today |
|
198 | @issue.start_date = Date.today | |
202 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) } |
|
199 | @custom_values = @project.custom_fields_for_issues(@tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue) } | |
203 | else |
|
200 | else | |
204 | @issue.attributes = params[:issue] |
|
201 | @issue.attributes = params[:issue] | |
205 | @issue.author_id = self.logged_in_user.id if self.logged_in_user |
|
202 | @issue.author_id = self.logged_in_user.id if self.logged_in_user | |
206 | # Multiple file upload |
|
203 | # Multiple file upload | |
207 | @attachments = [] |
|
204 | @attachments = [] | |
208 | params[:attachments].each { |a| |
|
205 | params[:attachments].each { |a| | |
209 | @attachments << Attachment.new(:container => @issue, :file => a, :author => logged_in_user) unless a.size == 0 |
|
206 | @attachments << Attachment.new(:container => @issue, :file => a, :author => logged_in_user) unless a.size == 0 | |
210 | } if params[:attachments] and params[:attachments].is_a? Array |
|
207 | } if params[:attachments] and params[:attachments].is_a? Array | |
211 | @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]) } |
|
208 | @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]) } | |
212 | @issue.custom_values = @custom_values |
|
209 | @issue.custom_values = @custom_values | |
213 | if @issue.save |
|
210 | if @issue.save | |
214 | @attachments.each(&:save) |
|
211 | @attachments.each(&:save) | |
215 | flash[:notice] = l(:notice_successful_create) |
|
212 | flash[:notice] = l(:notice_successful_create) | |
216 | Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? |
|
213 | Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled? | |
217 | redirect_to :action => 'list_issues', :id => @project |
|
214 | redirect_to :action => 'list_issues', :id => @project | |
218 | end |
|
215 | end | |
219 | end |
|
216 | end | |
220 | end |
|
217 | end | |
221 |
|
218 | |||
222 | # Show filtered/sorted issues list of @project |
|
219 | # Show filtered/sorted issues list of @project | |
223 | def list_issues |
|
220 | def list_issues | |
224 | sort_init 'issues.id', 'desc' |
|
221 | sort_init 'issues.id', 'desc' | |
225 | sort_update |
|
222 | sort_update | |
226 |
|
223 | |||
227 | retrieve_query |
|
224 | retrieve_query | |
228 |
|
225 | |||
229 | @results_per_page_options = [ 15, 25, 50, 100 ] |
|
226 | @results_per_page_options = [ 15, 25, 50, 100 ] | |
230 | if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i |
|
227 | if params[:per_page] and @results_per_page_options.include? params[:per_page].to_i | |
231 | @results_per_page = params[:per_page].to_i |
|
228 | @results_per_page = params[:per_page].to_i | |
232 | session[:results_per_page] = @results_per_page |
|
229 | session[:results_per_page] = @results_per_page | |
233 | else |
|
230 | else | |
234 | @results_per_page = session[:results_per_page] || 25 |
|
231 | @results_per_page = session[:results_per_page] || 25 | |
235 | end |
|
232 | end | |
236 |
|
233 | |||
237 | if @query.valid? |
|
234 | if @query.valid? | |
238 | @issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement) |
|
235 | @issue_count = Issue.count(:include => [:status, :project], :conditions => @query.statement) | |
239 | @issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page'] |
|
236 | @issue_pages = Paginator.new self, @issue_count, @results_per_page, params['page'] | |
240 | @issues = Issue.find :all, :order => sort_clause, |
|
237 | @issues = Issue.find :all, :order => sort_clause, | |
241 | :include => [ :author, :status, :tracker, :project ], |
|
238 | :include => [ :author, :status, :tracker, :project ], | |
242 | :conditions => @query.statement, |
|
239 | :conditions => @query.statement, | |
243 | :limit => @issue_pages.items_per_page, |
|
240 | :limit => @issue_pages.items_per_page, | |
244 | :offset => @issue_pages.current.offset |
|
241 | :offset => @issue_pages.current.offset | |
245 | end |
|
242 | end | |
246 | render :layout => false if request.xhr? |
|
243 | render :layout => false if request.xhr? | |
247 | end |
|
244 | end | |
248 |
|
245 | |||
249 | # Export filtered/sorted issues list to CSV |
|
246 | # Export filtered/sorted issues list to CSV | |
250 | def export_issues_csv |
|
247 | def export_issues_csv | |
251 | sort_init 'issues.id', 'desc' |
|
248 | sort_init 'issues.id', 'desc' | |
252 | sort_update |
|
249 | sort_update | |
253 |
|
250 | |||
254 | retrieve_query |
|
251 | retrieve_query | |
255 | render :action => 'list_issues' and return unless @query.valid? |
|
252 | render :action => 'list_issues' and return unless @query.valid? | |
256 |
|
253 | |||
257 | @issues = Issue.find :all, :order => sort_clause, |
|
254 | @issues = Issue.find :all, :order => sort_clause, | |
258 | :include => [ :author, :status, :tracker, :project, :custom_values ], |
|
255 | :include => [ :author, :status, :tracker, :project, :custom_values ], | |
259 | :conditions => @query.statement |
|
256 | :conditions => @query.statement | |
260 |
|
257 | |||
261 | ic = Iconv.new('ISO-8859-1', 'UTF-8') |
|
258 | ic = Iconv.new('ISO-8859-1', 'UTF-8') | |
262 | export = StringIO.new |
|
259 | export = StringIO.new | |
263 | CSV::Writer.generate(export, l(:general_csv_separator)) do |csv| |
|
260 | CSV::Writer.generate(export, l(:general_csv_separator)) do |csv| | |
264 | # csv header fields |
|
261 | # csv header fields | |
265 | headers = [ "#", l(:field_status), l(:field_tracker), l(:field_subject), l(:field_author), l(:field_created_on), l(:field_updated_on) ] |
|
262 | headers = [ "#", l(:field_status), l(:field_tracker), l(:field_subject), l(:field_author), l(:field_created_on), l(:field_updated_on) ] | |
266 | for custom_field in @project.all_custom_fields |
|
263 | for custom_field in @project.all_custom_fields | |
267 | headers << custom_field.name |
|
264 | headers << custom_field.name | |
268 | end |
|
265 | end | |
269 | csv << headers.collect {|c| ic.iconv(c) } |
|
266 | csv << headers.collect {|c| ic.iconv(c) } | |
270 | # csv lines |
|
267 | # csv lines | |
271 | @issues.each do |issue| |
|
268 | @issues.each do |issue| | |
272 | fields = [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)] |
|
269 | fields = [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, l_datetime(issue.created_on), l_datetime(issue.updated_on)] | |
273 | for custom_field in @project.all_custom_fields |
|
270 | for custom_field in @project.all_custom_fields | |
274 | fields << (show_value issue.custom_value_for(custom_field)) |
|
271 | fields << (show_value issue.custom_value_for(custom_field)) | |
275 | end |
|
272 | end | |
276 | csv << fields.collect {|c| ic.iconv(c.to_s) } |
|
273 | csv << fields.collect {|c| ic.iconv(c.to_s) } | |
277 | end |
|
274 | end | |
278 | end |
|
275 | end | |
279 | export.rewind |
|
276 | export.rewind | |
280 | send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv') |
|
277 | send_data(export.read, :type => 'text/csv; header=present', :filename => 'export.csv') | |
281 | end |
|
278 | end | |
282 |
|
279 | |||
283 | # Export filtered/sorted issues to PDF |
|
280 | # Export filtered/sorted issues to PDF | |
284 | def export_issues_pdf |
|
281 | def export_issues_pdf | |
285 | sort_init 'issues.id', 'desc' |
|
282 | sort_init 'issues.id', 'desc' | |
286 | sort_update |
|
283 | sort_update | |
287 |
|
284 | |||
288 | retrieve_query |
|
285 | retrieve_query | |
289 | render :action => 'list_issues' and return unless @query.valid? |
|
286 | render :action => 'list_issues' and return unless @query.valid? | |
290 |
|
287 | |||
291 | @issues = Issue.find :all, :order => sort_clause, |
|
288 | @issues = Issue.find :all, :order => sort_clause, | |
292 | :include => [ :author, :status, :tracker, :project, :custom_values ], |
|
289 | :include => [ :author, :status, :tracker, :project, :custom_values ], | |
293 | :conditions => @query.statement |
|
290 | :conditions => @query.statement | |
294 |
|
291 | |||
295 | @options_for_rfpdf ||= {} |
|
292 | @options_for_rfpdf ||= {} | |
296 | @options_for_rfpdf[:file_name] = "export.pdf" |
|
293 | @options_for_rfpdf[:file_name] = "export.pdf" | |
297 | render :layout => false |
|
294 | render :layout => false | |
298 | end |
|
295 | end | |
299 |
|
296 | |||
300 | def move_issues |
|
297 | def move_issues | |
301 | @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids] |
|
298 | @issues = @project.issues.find(params[:issue_ids]) if params[:issue_ids] | |
302 | redirect_to :action => 'list_issues', :id => @project and return unless @issues |
|
299 | redirect_to :action => 'list_issues', :id => @project and return unless @issues | |
303 | @projects = [] |
|
300 | @projects = [] | |
304 | # find projects to which the user is allowed to move the issue |
|
301 | # find projects to which the user is allowed to move the issue | |
305 | @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role_id)} |
|
302 | @logged_in_user.memberships.each {|m| @projects << m.project if Permission.allowed_to_role("projects/move_issues", m.role_id)} | |
306 | # issue can be moved to any tracker |
|
303 | # issue can be moved to any tracker | |
307 | @trackers = Tracker.find(:all) |
|
304 | @trackers = Tracker.find(:all) | |
308 | if request.post? and params[:new_project_id] and params[:new_tracker_id] |
|
305 | if request.post? and params[:new_project_id] and params[:new_tracker_id] | |
309 | new_project = Project.find(params[:new_project_id]) |
|
306 | new_project = Project.find(params[:new_project_id]) | |
310 | new_tracker = Tracker.find(params[:new_tracker_id]) |
|
307 | new_tracker = Tracker.find(params[:new_tracker_id]) | |
311 | @issues.each { |i| |
|
308 | @issues.each { |i| | |
312 | # project dependent properties |
|
309 | # project dependent properties | |
313 | unless i.project_id == new_project.id |
|
310 | unless i.project_id == new_project.id | |
314 | i.category = nil |
|
311 | i.category = nil | |
315 | i.fixed_version = nil |
|
312 | i.fixed_version = nil | |
316 | end |
|
313 | end | |
317 | # move the issue |
|
314 | # move the issue | |
318 | i.project = new_project |
|
315 | i.project = new_project | |
319 | i.tracker = new_tracker |
|
316 | i.tracker = new_tracker | |
320 | i.save |
|
317 | i.save | |
321 | } |
|
318 | } | |
322 | flash[:notice] = l(:notice_successful_update) |
|
319 | flash[:notice] = l(:notice_successful_update) | |
323 | redirect_to :action => 'list_issues', :id => @project |
|
320 | redirect_to :action => 'list_issues', :id => @project | |
324 | end |
|
321 | end | |
325 | end |
|
322 | end | |
326 |
|
323 | |||
327 | def add_query |
|
324 | def add_query | |
328 | @query = Query.new(params[:query]) |
|
325 | @query = Query.new(params[:query]) | |
329 | @query.project = @project |
|
326 | @query.project = @project | |
330 | @query.user = logged_in_user |
|
327 | @query.user = logged_in_user | |
331 |
|
328 | |||
332 | params[:fields].each do |field| |
|
329 | params[:fields].each do |field| | |
333 | @query.add_filter(field, params[:operators][field], params[:values][field]) |
|
330 | @query.add_filter(field, params[:operators][field], params[:values][field]) | |
334 | end if params[:fields] |
|
331 | end if params[:fields] | |
335 |
|
332 | |||
336 | if request.post? and @query.save |
|
333 | if request.post? and @query.save | |
337 | flash[:notice] = l(:notice_successful_create) |
|
334 | flash[:notice] = l(:notice_successful_create) | |
338 | redirect_to :controller => 'reports', :action => 'issue_report', :id => @project |
|
335 | redirect_to :controller => 'reports', :action => 'issue_report', :id => @project | |
339 | end |
|
336 | end | |
340 | render :layout => false if request.xhr? |
|
337 | render :layout => false if request.xhr? | |
341 | end |
|
338 | end | |
342 |
|
339 | |||
343 | # Add a news to @project |
|
340 | # Add a news to @project | |
344 | def add_news |
|
341 | def add_news | |
345 | @news = News.new(:project => @project) |
|
342 | @news = News.new(:project => @project) | |
346 | if request.post? |
|
343 | if request.post? | |
347 | @news.attributes = params[:news] |
|
344 | @news.attributes = params[:news] | |
348 | @news.author_id = self.logged_in_user.id if self.logged_in_user |
|
345 | @news.author_id = self.logged_in_user.id if self.logged_in_user | |
349 | if @news.save |
|
346 | if @news.save | |
350 | flash[:notice] = l(:notice_successful_create) |
|
347 | flash[:notice] = l(:notice_successful_create) | |
351 | redirect_to :action => 'list_news', :id => @project |
|
348 | redirect_to :action => 'list_news', :id => @project | |
352 | end |
|
349 | end | |
353 | end |
|
350 | end | |
354 | end |
|
351 | end | |
355 |
|
352 | |||
356 | # Show news list of @project |
|
353 | # Show news list of @project | |
357 | def list_news |
|
354 | def list_news | |
358 | @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC" |
|
355 | @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC" | |
359 | render :action => "list_news", :layout => false if request.xhr? |
|
356 | render :action => "list_news", :layout => false if request.xhr? | |
360 | end |
|
357 | end | |
361 |
|
358 | |||
362 | def add_file |
|
359 | def add_file | |
363 | @attachment = Attachment.new(params[:attachment]) |
|
360 | if request.post? | |
364 | if request.post? and params[:attachment][:file].size > 0 |
|
361 | @version = @project.versions.find_by_id(params[:version_id]) | |
365 | @attachment.container = @project.versions.find_by_id(params[:version_id]) |
|
362 | # Save the attachments | |
366 | @attachment.author = logged_in_user |
|
363 | params[:attachments].each { |a| | |
367 | if @attachment.save |
|
364 | Attachment.create(:container => @version, :file => a, :author => logged_in_user) unless a.size == 0 | |
368 | flash[:notice] = l(:notice_successful_create) |
|
365 | } if params[:attachments] and params[:attachments].is_a? Array | |
369 |
|
|
366 | redirect_to :controller => 'projects', :action => 'list_files', :id => @project | |
370 | end |
|
|||
371 | end |
|
367 | end | |
372 | @versions = @project.versions |
|
368 | @versions = @project.versions | |
373 | end |
|
369 | end | |
374 |
|
370 | |||
375 | def list_files |
|
371 | def list_files | |
376 | @versions = @project.versions |
|
372 | @versions = @project.versions | |
377 | end |
|
373 | end | |
378 |
|
374 | |||
379 | # Show changelog for @project |
|
375 | # Show changelog for @project | |
380 | def changelog |
|
376 | def changelog | |
381 | @trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true]) |
|
377 | @trackers = Tracker.find(:all, :conditions => ["is_in_chlog=?", true]) | |
382 | if request.get? |
|
378 | if request.get? | |
383 | @selected_tracker_ids = @trackers.collect {|t| t.id.to_s } |
|
379 | @selected_tracker_ids = @trackers.collect {|t| t.id.to_s } | |
384 | else |
|
380 | else | |
385 | @selected_tracker_ids = params[:tracker_ids].collect { |id| id.to_i.to_s } if params[:tracker_ids] and params[:tracker_ids].is_a? Array |
|
381 | @selected_tracker_ids = params[:tracker_ids].collect { |id| id.to_i.to_s } if params[:tracker_ids] and params[:tracker_ids].is_a? Array | |
386 | end |
|
382 | end | |
387 | @selected_tracker_ids ||= [] |
|
383 | @selected_tracker_ids ||= [] | |
388 | @fixed_issues = @project.issues.find(:all, |
|
384 | @fixed_issues = @project.issues.find(:all, | |
389 | :include => [ :fixed_version, :status, :tracker ], |
|
385 | :include => [ :fixed_version, :status, :tracker ], | |
390 | :conditions => [ "issue_statuses.is_closed=? and issues.tracker_id in (#{@selected_tracker_ids.join(',')}) and issues.fixed_version_id is not null", true], |
|
386 | :conditions => [ "issue_statuses.is_closed=? and issues.tracker_id in (#{@selected_tracker_ids.join(',')}) and issues.fixed_version_id is not null", true], | |
391 | :order => "versions.effective_date DESC, issues.id DESC" |
|
387 | :order => "versions.effective_date DESC, issues.id DESC" | |
392 | ) unless @selected_tracker_ids.empty? |
|
388 | ) unless @selected_tracker_ids.empty? | |
393 | @fixed_issues ||= [] |
|
389 | @fixed_issues ||= [] | |
394 | end |
|
390 | end | |
395 |
|
391 | |||
396 | def activity |
|
392 | def activity | |
397 | if params[:year] and params[:year].to_i > 1900 |
|
393 | if params[:year] and params[:year].to_i > 1900 | |
398 | @year = params[:year].to_i |
|
394 | @year = params[:year].to_i | |
399 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 |
|
395 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 | |
400 | @month = params[:month].to_i |
|
396 | @month = params[:month].to_i | |
401 | end |
|
397 | end | |
402 | end |
|
398 | end | |
403 | @year ||= Date.today.year |
|
399 | @year ||= Date.today.year | |
404 | @month ||= Date.today.month |
|
400 | @month ||= Date.today.month | |
405 |
|
401 | |||
406 | @date_from = Date.civil(@year, @month, 1) |
|
402 | @date_from = Date.civil(@year, @month, 1) | |
407 | @date_to = (@date_from >> 1)-1 |
|
403 | @date_to = (@date_from >> 1)-1 | |
408 |
|
404 | |||
409 | @events_by_day = {} |
|
405 | @events_by_day = {} | |
410 |
|
406 | |||
411 | unless params[:show_issues] == "0" |
|
407 | unless params[:show_issues] == "0" | |
412 | @project.issues.find(:all, :include => [:author, :status], :conditions => ["issues.created_on>=? and issues.created_on<=?", @date_from, @date_to] ).each { |i| |
|
408 | @project.issues.find(:all, :include => [:author, :status], :conditions => ["issues.created_on>=? and issues.created_on<=?", @date_from, @date_to] ).each { |i| | |
413 | @events_by_day[i.created_on.to_date] ||= [] |
|
409 | @events_by_day[i.created_on.to_date] ||= [] | |
414 | @events_by_day[i.created_on.to_date] << i |
|
410 | @events_by_day[i.created_on.to_date] << i | |
415 | } |
|
411 | } | |
416 | @show_issues = 1 |
|
412 | @show_issues = 1 | |
417 | end |
|
413 | end | |
418 |
|
414 | |||
419 | unless params[:show_news] == "0" |
|
415 | unless params[:show_news] == "0" | |
420 | @project.news.find(:all, :conditions => ["news.created_on>=? and news.created_on<=?", @date_from, @date_to], :include => :author ).each { |i| |
|
416 | @project.news.find(:all, :conditions => ["news.created_on>=? and news.created_on<=?", @date_from, @date_to], :include => :author ).each { |i| | |
421 | @events_by_day[i.created_on.to_date] ||= [] |
|
417 | @events_by_day[i.created_on.to_date] ||= [] | |
422 | @events_by_day[i.created_on.to_date] << i |
|
418 | @events_by_day[i.created_on.to_date] << i | |
423 | } |
|
419 | } | |
424 | @show_news = 1 |
|
420 | @show_news = 1 | |
425 | end |
|
421 | end | |
426 |
|
422 | |||
427 | unless params[:show_files] == "0" |
|
423 | unless params[:show_files] == "0" | |
428 | Attachment.find(:all, :select => "attachments.*", :joins => "LEFT JOIN versions ON versions.id = attachments.container_id", :conditions => ["attachments.container_type='Version' and versions.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| |
|
424 | Attachment.find(:all, :select => "attachments.*", :joins => "LEFT JOIN versions ON versions.id = attachments.container_id", :conditions => ["attachments.container_type='Version' and versions.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| | |
429 | @events_by_day[i.created_on.to_date] ||= [] |
|
425 | @events_by_day[i.created_on.to_date] ||= [] | |
430 | @events_by_day[i.created_on.to_date] << i |
|
426 | @events_by_day[i.created_on.to_date] << i | |
431 | } |
|
427 | } | |
432 | @show_files = 1 |
|
428 | @show_files = 1 | |
433 | end |
|
429 | end | |
434 |
|
430 | |||
435 | unless params[:show_documents] == "0" |
|
431 | unless params[:show_documents] == "0" | |
436 | @project.documents.find(:all, :conditions => ["documents.created_on>=? and documents.created_on<=?", @date_from, @date_to] ).each { |i| |
|
432 | @project.documents.find(:all, :conditions => ["documents.created_on>=? and documents.created_on<=?", @date_from, @date_to] ).each { |i| | |
437 | @events_by_day[i.created_on.to_date] ||= [] |
|
433 | @events_by_day[i.created_on.to_date] ||= [] | |
438 | @events_by_day[i.created_on.to_date] << i |
|
434 | @events_by_day[i.created_on.to_date] << i | |
439 | } |
|
435 | } | |
440 | Attachment.find(:all, :select => "attachments.*", :joins => "LEFT JOIN documents ON documents.id = attachments.container_id", :conditions => ["attachments.container_type='Document' and documents.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| |
|
436 | Attachment.find(:all, :select => "attachments.*", :joins => "LEFT JOIN documents ON documents.id = attachments.container_id", :conditions => ["attachments.container_type='Document' and documents.project_id=? and attachments.created_on>=? and attachments.created_on<=?", @project.id, @date_from, @date_to], :include => :author ).each { |i| | |
441 | @events_by_day[i.created_on.to_date] ||= [] |
|
437 | @events_by_day[i.created_on.to_date] ||= [] | |
442 | @events_by_day[i.created_on.to_date] << i |
|
438 | @events_by_day[i.created_on.to_date] << i | |
443 | } |
|
439 | } | |
444 | @show_documents = 1 |
|
440 | @show_documents = 1 | |
445 | end |
|
441 | end | |
446 |
|
442 | |||
447 | render :layout => false if request.xhr? |
|
443 | render :layout => false if request.xhr? | |
448 | end |
|
444 | end | |
449 |
|
445 | |||
450 | def calendar |
|
446 | def calendar | |
451 | if params[:year] and params[:year].to_i > 1900 |
|
447 | if params[:year] and params[:year].to_i > 1900 | |
452 | @year = params[:year].to_i |
|
448 | @year = params[:year].to_i | |
453 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 |
|
449 | if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13 | |
454 | @month = params[:month].to_i |
|
450 | @month = params[:month].to_i | |
455 | end |
|
451 | end | |
456 | end |
|
452 | end | |
457 | @year ||= Date.today.year |
|
453 | @year ||= Date.today.year | |
458 | @month ||= Date.today.month |
|
454 | @month ||= Date.today.month | |
459 |
|
455 | |||
460 | @date_from = Date.civil(@year, @month, 1) |
|
456 | @date_from = Date.civil(@year, @month, 1) | |
461 | @date_to = (@date_from >> 1)-1 |
|
457 | @date_to = (@date_from >> 1)-1 | |
462 | # start on monday |
|
458 | # start on monday | |
463 | @date_from = @date_from - (@date_from.cwday-1) |
|
459 | @date_from = @date_from - (@date_from.cwday-1) | |
464 | # finish on sunday |
|
460 | # finish on sunday | |
465 | @date_to = @date_to + (7-@date_to.cwday) |
|
461 | @date_to = @date_to + (7-@date_to.cwday) | |
466 |
|
462 | |||
467 | @issues = @project.issues.find(:all, :include => :tracker, :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to]) |
|
463 | @issues = @project.issues.find(:all, :include => :tracker, :conditions => ["((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to]) | |
468 | render :layout => false if request.xhr? |
|
464 | render :layout => false if request.xhr? | |
469 | end |
|
465 | end | |
470 |
|
466 | |||
471 | def gantt |
|
467 | def gantt | |
472 | if params[:year] and params[:year].to_i >0 |
|
468 | if params[:year] and params[:year].to_i >0 | |
473 | @year_from = params[:year].to_i |
|
469 | @year_from = params[:year].to_i | |
474 | if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12 |
|
470 | if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12 | |
475 | @month_from = params[:month].to_i |
|
471 | @month_from = params[:month].to_i | |
476 | else |
|
472 | else | |
477 | @month_from = 1 |
|
473 | @month_from = 1 | |
478 | end |
|
474 | end | |
479 | else |
|
475 | else | |
480 | @month_from ||= (Date.today << 1).month |
|
476 | @month_from ||= (Date.today << 1).month | |
481 | @year_from ||= (Date.today << 1).year |
|
477 | @year_from ||= (Date.today << 1).year | |
482 | end |
|
478 | end | |
483 |
|
479 | |||
484 | @zoom = (params[:zoom].to_i > 0 and params[:zoom].to_i < 5) ? params[:zoom].to_i : 2 |
|
480 | @zoom = (params[:zoom].to_i > 0 and params[:zoom].to_i < 5) ? params[:zoom].to_i : 2 | |
485 | @months = (params[:months].to_i > 0 and params[:months].to_i < 25) ? params[:months].to_i : 6 |
|
481 | @months = (params[:months].to_i > 0 and params[:months].to_i < 25) ? params[:months].to_i : 6 | |
486 |
|
482 | |||
487 | @date_from = Date.civil(@year_from, @month_from, 1) |
|
483 | @date_from = Date.civil(@year_from, @month_from, 1) | |
488 | @date_to = (@date_from >> @months) - 1 |
|
484 | @date_to = (@date_from >> @months) - 1 | |
489 | @issues = @project.issues.find(:all, :order => "start_date, due_date", :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)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to]) |
|
485 | @issues = @project.issues.find(:all, :order => "start_date, due_date", :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)", @date_from, @date_to, @date_from, @date_to, @date_from, @date_to]) | |
490 |
|
486 | |||
491 | if params[:output]=='pdf' |
|
487 | if params[:output]=='pdf' | |
492 | @options_for_rfpdf ||= {} |
|
488 | @options_for_rfpdf ||= {} | |
493 | @options_for_rfpdf[:file_name] = "gantt.pdf" |
|
489 | @options_for_rfpdf[:file_name] = "gantt.pdf" | |
494 | render :template => "projects/gantt.rfpdf", :layout => false |
|
490 | render :template => "projects/gantt.rfpdf", :layout => false | |
495 | else |
|
491 | else | |
496 | render :template => "projects/gantt.rhtml" |
|
492 | render :template => "projects/gantt.rhtml" | |
497 | end |
|
493 | end | |
498 | end |
|
494 | end | |
499 |
|
495 | |||
500 | private |
|
496 | private | |
501 | # Find project of id params[:id] |
|
497 | # Find project of id params[:id] | |
502 | # if not found, redirect to project list |
|
498 | # if not found, redirect to project list | |
503 | # Used as a before_filter |
|
499 | # Used as a before_filter | |
504 | def find_project |
|
500 | def find_project | |
505 | @project = Project.find(params[:id]) |
|
501 | @project = Project.find(params[:id]) | |
506 | @html_title = @project.name |
|
502 | @html_title = @project.name | |
507 | rescue |
|
503 | rescue | |
508 | redirect_to :action => 'list' |
|
504 | redirect_to :action => 'list' | |
509 | end |
|
505 | end | |
510 |
|
506 | |||
511 | # Retrieve query from session or build a new query |
|
507 | # Retrieve query from session or build a new query | |
512 | def retrieve_query |
|
508 | def retrieve_query | |
513 | if params[:query_id] |
|
509 | if params[:query_id] | |
514 | @query = @project.queries.find(params[:query_id]) |
|
510 | @query = @project.queries.find(params[:query_id]) | |
515 | else |
|
511 | else | |
516 | if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id |
|
512 | if params[:set_filter] or !session[:query] or session[:query].project_id != @project.id | |
517 | # Give it a name, required to be valid |
|
513 | # Give it a name, required to be valid | |
518 | @query = Query.new(:name => "_") |
|
514 | @query = Query.new(:name => "_") | |
519 | @query.project = @project |
|
515 | @query.project = @project | |
520 | if params[:fields] and params[:fields].is_a? Array |
|
516 | if params[:fields] and params[:fields].is_a? Array | |
521 | params[:fields].each do |field| |
|
517 | params[:fields].each do |field| | |
522 | @query.add_filter(field, params[:operators][field], params[:values][field]) |
|
518 | @query.add_filter(field, params[:operators][field], params[:values][field]) | |
523 | end |
|
519 | end | |
524 | else |
|
520 | else | |
525 | @query.available_filters.keys.each do |field| |
|
521 | @query.available_filters.keys.each do |field| | |
526 | @query.add_short_filter(field, params[field]) if params[field] |
|
522 | @query.add_short_filter(field, params[field]) if params[field] | |
527 | end |
|
523 | end | |
528 | end |
|
524 | end | |
529 | session[:query] = @query |
|
525 | session[:query] = @query | |
530 | else |
|
526 | else | |
531 | @query = session[:query] |
|
527 | @query = session[:query] | |
532 | end |
|
528 | end | |
533 | end |
|
529 | end | |
534 | end |
|
530 | end | |
535 | end |
|
531 | end |
@@ -1,36 +1,37 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'pic picEdit' %> |
|
2 | <%= link_to_if_authorized l(:button_edit), {:controller => 'documents', :action => 'edit', :id => @document}, :class => 'pic picEdit' %> | |
3 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> |
|
3 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy', :id => @document}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> | |
4 | </div> |
|
4 | </div> | |
5 |
|
5 | |||
6 | <h2><%= @document.title %></h2> |
|
6 | <h2><%= @document.title %></h2> | |
7 |
|
7 | |||
8 | <p><em><%= @document.category.name %><br /> |
|
8 | <p><em><%= @document.category.name %><br /> | |
9 | <%= format_date @document.created_on %></em></p> |
|
9 | <%= format_date @document.created_on %></em></p> | |
10 | <%= textilizable @document.description %> |
|
10 | <%= textilizable @document.description %> | |
11 | <br /> |
|
11 | <br /> | |
12 |
|
12 | |||
13 | <h3><%= l(:label_attachment_plural) %></h3> |
|
13 | <h3><%= l(:label_attachment_plural) %></h3> | |
14 | <ul class="documents"> |
|
14 | <ul class="documents"> | |
15 | <% for attachment in @attachments %> |
|
15 | <% for attachment in @attachments %> | |
16 | <li> |
|
16 | <li> | |
17 | <div class="contextual"> |
|
17 | <div class="contextual"> | |
18 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> |
|
18 | <%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %> | |
19 | </div> |
|
19 | </div> | |
20 | <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> |
|
20 | <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> | |
21 | (<%= human_size attachment.filesize %>)<br /> |
|
21 | (<%= human_size attachment.filesize %>)<br /> | |
22 | <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br /> |
|
22 | <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br /> | |
23 | <%= lwr(:label_download, attachment.downloads) %> |
|
23 | <%= lwr(:label_download, attachment.downloads) %> | |
24 | </li> |
|
24 | </li> | |
25 | <% end %> |
|
25 | <% end %> | |
26 | </ul> |
|
26 | </ul> | |
27 | <br /> |
|
27 | <br /> | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | <% if authorize_for('documents', 'add_attachment') %> |
|
30 | <% if authorize_for('documents', 'add_attachment') %> | |
31 | <%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true) %> |
|
31 | <%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") %> | |
32 | <label><%=l(:label_attachment_new)%></label> |
|
32 | <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> | |
33 | <%= file_field 'attachment', 'file' %> |
|
33 | <%= link_to_function image_tag('add'), "addFileField()" %></label> | |
|
34 | <%= file_field_tag 'attachments[]', :size => 30 %></p> | |||
34 | <%= submit_tag l(:button_add) %> |
|
35 | <%= submit_tag l(:button_add) %> | |
35 | <%= end_form_tag %> |
|
36 | <%= end_form_tag %> | |
36 | <% end %> |
|
37 | <% end %> |
@@ -1,14 +1,15 | |||||
1 | <h2><%=l(:label_document_new)%></h2> |
|
1 | <h2><%=l(:label_document_new)%></h2> | |
2 |
|
2 | |||
3 | <%= start_form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) %> |
|
3 | <%= start_form_tag( { :action => 'add_document', :id => @project }, :class => "tabular", :multipart => true) %> | |
4 | <%= render :partial => 'documents/form' %> |
|
4 | <%= render :partial => 'documents/form' %> | |
5 |
|
5 | |||
6 | <div class="box"> |
|
6 | <div class="box"> | |
7 |
<p><label for="attachment_file"><%=l(:label_attachment)%> |
|
7 | <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> | |
8 | <%= file_field 'attachment', 'file' %></p> |
|
8 | <%= link_to_function image_tag('add'), "addFileField()" %></label> | |
|
9 | <%= file_field_tag 'attachments[]', :size => 30 %></p> | |||
9 | </div> |
|
10 | </div> | |
10 |
|
11 | |||
11 | <%= submit_tag l(:button_create) %> |
|
12 | <%= submit_tag l(:button_create) %> | |
12 | <%= end_form_tag %> |
|
13 | <%= end_form_tag %> | |
13 |
|
14 | |||
14 |
|
15 |
@@ -1,14 +1,15 | |||||
1 | <h2><%=l(:label_attachment_new)%></h2> |
|
1 | <h2><%=l(:label_attachment_new)%></h2> | |
2 |
|
2 | |||
3 | <%= error_messages_for 'attachment' %> |
|
3 | <%= error_messages_for 'attachment' %> | |
4 | <div class="box"> |
|
4 | <div class="box"> | |
5 | <%= start_form_tag ({ :action => 'add_file', :id => @project }, :multipart => true, :class => "tabular") %> |
|
5 | <%= start_form_tag ({ :action => 'add_file', :id => @project }, :multipart => true, :class => "tabular") %> | |
6 |
|
6 | |||
7 | <p><label for="version_id"><%=l(:field_version)%> <span class="required">*</span></label> |
|
7 | <p><label for="version_id"><%=l(:field_version)%> <span class="required">*</span></label> | |
8 | <%= select_tag "version_id", options_from_collection_for_select(@versions, "id", "name") %></p> |
|
8 | <%= select_tag "version_id", options_from_collection_for_select(@versions, "id", "name") %></p> | |
9 |
|
9 | |||
10 |
<p><label for="attachment_file"><%=l(:label_attachment)%> |
|
10 | <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> | |
11 | <%= file_field 'attachment', 'file' %></p> |
|
11 | <%= link_to_function image_tag('add'), "addFileField()" %></label> | |
|
12 | <%= file_field_tag 'attachments[]', :size => 30 %></p> | |||
12 | </div> |
|
13 | </div> | |
13 | <%= submit_tag l(:button_add) %> |
|
14 | <%= submit_tag l(:button_add) %> | |
14 | <%= end_form_tag %> No newline at end of file |
|
15 | <%= end_form_tag %> |
@@ -1,20 +1,19 | |||||
1 | function checkAll (id, checked) { |
|
1 | function checkAll (id, checked) { | |
2 | var el = document.getElementById(id); |
|
2 | var el = document.getElementById(id); | |
3 | for (var i = 0; i < el.elements.length; i++) { |
|
3 | for (var i = 0; i < el.elements.length; i++) { | |
4 | if (el.elements[i].disabled==false) { |
|
4 | if (el.elements[i].disabled==false) { | |
5 | el.elements[i].checked = checked; |
|
5 | el.elements[i].checked = checked; | |
6 | } |
|
6 | } | |
7 | } |
|
7 | } | |
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | function addFileField() { |
|
10 | function addFileField() { | |
11 | var f = document.createElement("input"); |
|
11 | var f = document.createElement("input"); | |
12 | f.type = "file"; |
|
12 | f.type = "file"; | |
13 | f.name = "attachments[]"; |
|
13 | f.name = "attachments[]"; | |
14 | f.size = 30; |
|
14 | f.size = 30; | |
15 |
|
15 | |||
16 | p = document.getElementById("attachments_p"); |
|
16 | p = document.getElementById("attachments_p"); | |
17 | p.appendChild(document.createElement("br")); |
|
17 | p.appendChild(document.createElement("br")); | |
18 | p.appendChild(document.createElement("br")); |
|
|||
19 | p.appendChild(f); |
|
18 | p.appendChild(f); | |
20 | } No newline at end of file |
|
19 | } |
@@ -1,536 +1,537 | |||||
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 |
|
5 | |||
6 | #header * {margin:0; padding:0;} |
|
6 | #header * {margin:0; padding:0;} | |
7 | p, ul, ol, li {margin:0; padding:0;} |
|
7 | p, ul, ol, li {margin:0; padding:0;} | |
8 |
|
8 | |||
9 |
|
9 | |||
10 | body{ |
|
10 | body{ | |
11 | font:76% Verdana,Tahoma,Arial,sans-serif; |
|
11 | font:76% Verdana,Tahoma,Arial,sans-serif; | |
12 | line-height:1.4em; |
|
12 | line-height:1.4em; | |
13 | text-align:center; |
|
13 | text-align:center; | |
14 | color:#303030; |
|
14 | color:#303030; | |
15 | background:#e8eaec; |
|
15 | background:#e8eaec; | |
16 | margin:0; |
|
16 | margin:0; | |
17 | } |
|
17 | } | |
18 |
|
18 | |||
19 |
|
19 | |||
20 | a{ |
|
20 | a{ | |
21 | color:#467aa7; |
|
21 | color:#467aa7; | |
22 | font-weight:bold; |
|
22 | font-weight:bold; | |
23 | text-decoration:none; |
|
23 | text-decoration:none; | |
24 | background-color:inherit; |
|
24 | background-color:inherit; | |
25 | } |
|
25 | } | |
26 |
|
26 | |||
27 | a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;} |
|
27 | a:hover{color:#2a5a8a; text-decoration:none; background-color:inherit;} | |
28 | a img{border:none;} |
|
28 | a img{border:none;} | |
29 |
|
29 | |||
30 | p{padding:0 0 1em 0;} |
|
30 | p{padding:0 0 1em 0;} | |
31 | p form{margin-top:0; margin-bottom:20px;} |
|
31 | p form{margin-top:0; margin-bottom:20px;} | |
32 |
|
32 | |||
33 | img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;} |
|
33 | img.left,img.center,img.right{padding:4px; border:1px solid #a0a0a0;} | |
34 | img.left{float:left; margin:0 12px 5px 0;} |
|
34 | img.left{float:left; margin:0 12px 5px 0;} | |
35 | img.center{display:block; margin:0 auto 5px auto;} |
|
35 | img.center{display:block; margin:0 auto 5px auto;} | |
36 | img.right{float:right; margin:0 0 5px 12px;} |
|
36 | img.right{float:right; margin:0 0 5px 12px;} | |
37 |
|
37 | |||
38 | /**************** Header and navigation styles ****************/ |
|
38 | /**************** Header and navigation styles ****************/ | |
39 |
|
39 | |||
40 | #container{ |
|
40 | #container{ | |
41 | width:100%; |
|
41 | width:100%; | |
42 | min-width: 800px; |
|
42 | min-width: 800px; | |
43 | margin:0; |
|
43 | margin:0; | |
44 | padding:0; |
|
44 | padding:0; | |
45 | text-align:left; |
|
45 | text-align:left; | |
46 | background:#ffffff; |
|
46 | background:#ffffff; | |
47 | color:#303030; |
|
47 | color:#303030; | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | #header{ |
|
50 | #header{ | |
51 | height:4.5em; |
|
51 | height:4.5em; | |
52 | margin:0; |
|
52 | margin:0; | |
53 | background:#467aa7; |
|
53 | background:#467aa7; | |
54 | color:#ffffff; |
|
54 | color:#ffffff; | |
55 | margin-bottom:1px; |
|
55 | margin-bottom:1px; | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | #header h1{ |
|
58 | #header h1{ | |
59 | padding:10px 0 0 20px; |
|
59 | padding:10px 0 0 20px; | |
60 | font-size:2em; |
|
60 | font-size:2em; | |
61 | background-color:inherit; |
|
61 | background-color:inherit; | |
62 | color:#fff; |
|
62 | color:#fff; | |
63 | letter-spacing:-1px; |
|
63 | letter-spacing:-1px; | |
64 | font-weight:bold; |
|
64 | font-weight:bold; | |
65 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
65 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | #header h2{ |
|
68 | #header h2{ | |
69 | margin:3px 0 0 40px; |
|
69 | margin:3px 0 0 40px; | |
70 | font-size:1.5em; |
|
70 | font-size:1.5em; | |
71 | background-color:inherit; |
|
71 | background-color:inherit; | |
72 | color:#f0f2f4; |
|
72 | color:#f0f2f4; | |
73 | letter-spacing:-1px; |
|
73 | letter-spacing:-1px; | |
74 | font-weight:normal; |
|
74 | font-weight:normal; | |
75 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
75 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
76 | } |
|
76 | } | |
77 |
|
77 | |||
78 | #navigation{ |
|
78 | #navigation{ | |
79 | height:2.2em; |
|
79 | height:2.2em; | |
80 | line-height:2.2em; |
|
80 | line-height:2.2em; | |
81 | margin:0; |
|
81 | margin:0; | |
82 | background:#578bb8; |
|
82 | background:#578bb8; | |
83 | color:#ffffff; |
|
83 | color:#ffffff; | |
84 | } |
|
84 | } | |
85 |
|
85 | |||
86 | #navigation li{ |
|
86 | #navigation li{ | |
87 | float:left; |
|
87 | float:left; | |
88 | list-style-type:none; |
|
88 | list-style-type:none; | |
89 | border-right:1px solid #ffffff; |
|
89 | border-right:1px solid #ffffff; | |
90 | white-space:nowrap; |
|
90 | white-space:nowrap; | |
91 | } |
|
91 | } | |
92 |
|
92 | |||
93 | #navigation li.right { |
|
93 | #navigation li.right { | |
94 | float:right; |
|
94 | float:right; | |
95 | list-style-type:none; |
|
95 | list-style-type:none; | |
96 | border-right:0; |
|
96 | border-right:0; | |
97 | border-left:1px solid #ffffff; |
|
97 | border-left:1px solid #ffffff; | |
98 | white-space:nowrap; |
|
98 | white-space:nowrap; | |
99 | } |
|
99 | } | |
100 |
|
100 | |||
101 | #navigation li a{ |
|
101 | #navigation li a{ | |
102 | display:block; |
|
102 | display:block; | |
103 | padding:0px 10px 0px 22px; |
|
103 | padding:0px 10px 0px 22px; | |
104 | font-size:0.8em; |
|
104 | font-size:0.8em; | |
105 | font-weight:normal; |
|
105 | font-weight:normal; | |
106 | text-decoration:none; |
|
106 | text-decoration:none; | |
107 | background-color:inherit; |
|
107 | background-color:inherit; | |
108 | color: #ffffff; |
|
108 | color: #ffffff; | |
109 | } |
|
109 | } | |
110 |
|
110 | |||
111 | #navigation li.submenu { |
|
111 | #navigation li.submenu { | |
112 | background:url(../images/arrow_down.png) 96% 80% no-repeat; |
|
112 | background:url(../images/arrow_down.png) 96% 80% no-repeat; | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | #navigation li.submenu a { |
|
115 | #navigation li.submenu a { | |
116 | padding:0px 16px 0px 22px; |
|
116 | padding:0px 16px 0px 22px; | |
117 | } |
|
117 | } | |
118 |
|
118 | |||
119 | * html #navigation a {width:1%;} |
|
119 | * html #navigation a {width:1%;} | |
120 |
|
120 | |||
121 | #navigation .selected,#navigation a:hover{ |
|
121 | #navigation .selected,#navigation a:hover{ | |
122 | color:#ffffff; |
|
122 | color:#ffffff; | |
123 | text-decoration:none; |
|
123 | text-decoration:none; | |
124 | background-color: #80b0da; |
|
124 | background-color: #80b0da; | |
125 | } |
|
125 | } | |
126 |
|
126 | |||
127 | /**************** Icons links *******************/ |
|
127 | /**************** Icons links *******************/ | |
128 | .picHome { background: url(../images/home.png) no-repeat 4px 50%; } |
|
128 | .picHome { background: url(../images/home.png) no-repeat 4px 50%; } | |
129 | .picUser { background: url(../images/user.png) no-repeat 4px 50%; } |
|
129 | .picUser { background: url(../images/user.png) no-repeat 4px 50%; } | |
130 | .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; } |
|
130 | .picUserPage { background: url(../images/user_page.png) no-repeat 4px 50%; } | |
131 | .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; } |
|
131 | .picAdmin { background: url(../images/admin.png) no-repeat 4px 50%; } | |
132 | .picProject { background: url(../images/projects.png) no-repeat 4px 50%; } |
|
132 | .picProject { background: url(../images/projects.png) no-repeat 4px 50%; } | |
133 | .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; } |
|
133 | .picLogout { background: url(../images/logout.png) no-repeat 4px 50%; } | |
134 | .picHelp { background: url(../images/help.png) no-repeat 4px 50%; } |
|
134 | .picHelp { background: url(../images/help.png) no-repeat 4px 50%; } | |
135 |
|
135 | |||
136 | .picEdit { background: url(../images/edit.png) no-repeat 4px 50%; } |
|
136 | .picEdit { background: url(../images/edit.png) no-repeat 4px 50%; } | |
137 | .picDelete { background: url(../images/delete.png) no-repeat 4px 50%; } |
|
137 | .picDelete { background: url(../images/delete.png) no-repeat 4px 50%; } | |
138 | .picAdd { background: url(../images/add.png) no-repeat 4px 50%; } |
|
138 | .picAdd { background: url(../images/add.png) no-repeat 4px 50%; } | |
139 | .picMove { background: url(../images/move.png) no-repeat 4px 50%; } |
|
139 | .picMove { background: url(../images/move.png) no-repeat 4px 50%; } | |
140 | .picCheck { background: url(../images/check.png) no-repeat 4px 70%; } |
|
140 | .picCheck { background: url(../images/check.png) no-repeat 4px 70%; } | |
141 | .picPdf { background: url(../images/pdf.png) no-repeat 4px 50%;} |
|
141 | .picPdf { background: url(../images/pdf.png) no-repeat 4px 50%;} | |
142 | .picCsv { background: url(../images/csv.png) no-repeat 4px 50%;} |
|
142 | .picCsv { background: url(../images/csv.png) no-repeat 4px 50%;} | |
143 |
|
143 | |||
144 | .pic { padding-left: 18px; margin-left: 3px; } |
|
144 | .pic { padding-left: 18px; margin-left: 3px; } | |
145 |
|
145 | |||
146 | .icon { |
|
146 | .icon { | |
147 | background-position: 0% 40%; |
|
147 | background-position: 0% 40%; | |
148 | background-repeat: no-repeat; |
|
148 | background-repeat: no-repeat; | |
149 | padding-left: 20px; |
|
149 | padding-left: 20px; | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | .folder { background-image: url(../images/folder.png); } |
|
152 | .folder { background-image: url(../images/folder.png); } | |
153 | .file { background-image: url(../images/file.png); } |
|
153 | .file { background-image: url(../images/file.png); } | |
154 | .attachment { background-image: url(../images/attachment.png); } |
|
154 | .attachment { background-image: url(../images/attachment.png); } | |
155 |
|
155 | |||
156 | /**************** Content styles ****************/ |
|
156 | /**************** Content styles ****************/ | |
157 |
|
157 | |||
158 | html>body #content { |
|
158 | html>body #content { | |
159 | height: auto; |
|
159 | height: auto; | |
160 | min-height: 500px; |
|
160 | min-height: 500px; | |
161 | } |
|
161 | } | |
162 |
|
162 | |||
163 | #content{ |
|
163 | #content{ | |
164 | width: auto; |
|
164 | width: auto; | |
165 | height:500px; |
|
165 | height:500px; | |
166 | font-size:0.9em; |
|
166 | font-size:0.9em; | |
167 | padding:20px 10px 10px 20px; |
|
167 | padding:20px 10px 10px 20px; | |
168 | margin-left: 120px; |
|
168 | margin-left: 120px; | |
169 | border-left: 1px dashed #c0c0c0; |
|
169 | border-left: 1px dashed #c0c0c0; | |
170 |
|
170 | |||
171 | } |
|
171 | } | |
172 |
|
172 | |||
173 | #content h2{ |
|
173 | #content h2{ | |
174 | display:block; |
|
174 | display:block; | |
175 | margin:0 0 16px 0; |
|
175 | margin:0 0 16px 0; | |
176 | font-size:1.7em; |
|
176 | font-size:1.7em; | |
177 | font-weight:normal; |
|
177 | font-weight:normal; | |
178 | letter-spacing:-1px; |
|
178 | letter-spacing:-1px; | |
179 | color:#606060; |
|
179 | color:#606060; | |
180 | background-color:inherit; |
|
180 | background-color:inherit; | |
181 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
181 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
182 | } |
|
182 | } | |
183 |
|
183 | |||
184 | #content h2 a{font-weight:normal;} |
|
184 | #content h2 a{font-weight:normal;} | |
185 | #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;} |
|
185 | #content h3{margin:0 0 12px 0; font-size:1.4em;color:#707070;font-family: Trebuchet MS,Georgia,"Times New Roman",serif;} | |
186 | #content h4{font-size: 1em; margin-bottom: 12px; margin-top: 20px; font-weight: normal; border-bottom: dotted 1px #c0c0c0;} |
|
186 | #content h4{font-size: 1em; margin-bottom: 12px; margin-top: 20px; font-weight: normal; border-bottom: dotted 1px #c0c0c0;} | |
187 | #content a:hover,#subcontent a:hover{text-decoration:underline;} |
|
187 | #content a:hover,#subcontent a:hover{text-decoration:underline;} | |
188 | #content ul,#content ol{margin:0 5px 16px 35px;} |
|
188 | #content ul,#content ol{margin:0 5px 16px 35px;} | |
189 | #content dl{margin:0 5px 10px 25px;} |
|
189 | #content dl{margin:0 5px 10px 25px;} | |
190 | #content dt{font-weight:bold; margin-bottom:5px;} |
|
190 | #content dt{font-weight:bold; margin-bottom:5px;} | |
191 | #content dd{margin:0 0 10px 15px;} |
|
191 | #content dd{margin:0 0 10px 15px;} | |
192 |
|
192 | |||
193 |
|
193 | |||
194 | /***********************************************/ |
|
194 | /***********************************************/ | |
195 |
|
195 | |||
196 | form { |
|
196 | form { | |
197 | display: inline; |
|
197 | display: inline; | |
198 | } |
|
198 | } | |
199 |
|
199 | |||
200 | blockquote { |
|
200 | blockquote { | |
201 | padding-left: 6px; |
|
201 | padding-left: 6px; | |
202 | border-left: 2px solid #ccc; |
|
202 | border-left: 2px solid #ccc; | |
203 | } |
|
203 | } | |
204 |
|
204 | |||
205 | input, select { |
|
205 | input, select { | |
206 | vertical-align: middle; |
|
206 | vertical-align: middle; | |
|
207 | margin-bottom: 4px; | |||
207 | } |
|
208 | } | |
208 |
|
209 | |||
209 | input.button-small |
|
210 | input.button-small | |
210 | { |
|
211 | { | |
211 | font-size: 0.8em; |
|
212 | font-size: 0.8em; | |
212 | } |
|
213 | } | |
213 |
|
214 | |||
214 | .select-small |
|
215 | .select-small | |
215 | { |
|
216 | { | |
216 | font-size: 0.8em; |
|
217 | font-size: 0.8em; | |
217 | } |
|
218 | } | |
218 |
|
219 | |||
219 | label { |
|
220 | label { | |
220 | font-weight: bold; |
|
221 | font-weight: bold; | |
221 | font-size: 1em; |
|
222 | font-size: 1em; | |
222 | } |
|
223 | } | |
223 |
|
224 | |||
224 | fieldset { |
|
225 | fieldset { | |
225 | border:1px solid #c0c0c0; |
|
226 | border:1px solid #c0c0c0; | |
226 | padding: 6px; |
|
227 | padding: 6px; | |
227 | } |
|
228 | } | |
228 |
|
229 | |||
229 | legend { |
|
230 | legend { | |
230 | color: #505050; |
|
231 | color: #505050; | |
231 |
|
232 | |||
232 | } |
|
233 | } | |
233 |
|
234 | |||
234 | .required { |
|
235 | .required { | |
235 | color: #bb0000; |
|
236 | color: #bb0000; | |
236 | } |
|
237 | } | |
237 |
|
238 | |||
238 | .odd { |
|
239 | .odd { | |
239 | background-color:#f6f7f8; |
|
240 | background-color:#f6f7f8; | |
240 | } |
|
241 | } | |
241 | .even { |
|
242 | .even { | |
242 | background-color: #fff; |
|
243 | background-color: #fff; | |
243 | } |
|
244 | } | |
244 |
|
245 | |||
245 | hr { border:none; border-bottom: dotted 1px #c0c0c0; } |
|
246 | hr { border:none; border-bottom: dotted 1px #c0c0c0; } | |
246 |
|
247 | |||
247 | div.square { |
|
248 | div.square { | |
248 | border: 1px solid #999; |
|
249 | border: 1px solid #999; | |
249 | float: left; |
|
250 | float: left; | |
250 | margin: .4em .5em 0 0; |
|
251 | margin: .4em .5em 0 0; | |
251 | overflow: hidden; |
|
252 | overflow: hidden; | |
252 | width: .6em; height: .6em; |
|
253 | width: .6em; height: .6em; | |
253 | } |
|
254 | } | |
254 |
|
255 | |||
255 | table p { |
|
256 | table p { | |
256 | margin:0; |
|
257 | margin:0; | |
257 | padding:0; |
|
258 | padding:0; | |
258 | } |
|
259 | } | |
259 |
|
260 | |||
260 | ul.documents { |
|
261 | ul.documents { | |
261 | list-style-type: none; |
|
262 | list-style-type: none; | |
262 | padding: 0; |
|
263 | padding: 0; | |
263 | margin: 0; |
|
264 | margin: 0; | |
264 | } |
|
265 | } | |
265 |
|
266 | |||
266 | ul.documents li { |
|
267 | ul.documents li { | |
267 | background-image: url(../images/file.png); |
|
268 | background-image: url(../images/file.png); | |
268 | background-repeat: no-repeat; |
|
269 | background-repeat: no-repeat; | |
269 | background-position: 0 .4em; |
|
270 | background-position: 0 .4em; | |
270 | padding-left: 20px; |
|
271 | padding-left: 20px; | |
271 | margin-bottom: 10px; |
|
272 | margin-bottom: 10px; | |
272 | margin-left: -37px; |
|
273 | margin-left: -37px; | |
273 | } |
|
274 | } | |
274 |
|
275 | |||
275 | /********** Table used to display lists of things ***********/ |
|
276 | /********** Table used to display lists of things ***********/ | |
276 |
|
277 | |||
277 | table.list { |
|
278 | table.list { | |
278 | width:100%; |
|
279 | width:100%; | |
279 | border-collapse: collapse; |
|
280 | border-collapse: collapse; | |
280 | border: 1px dotted #d0d0d0; |
|
281 | border: 1px dotted #d0d0d0; | |
281 | margin-bottom: 6px; |
|
282 | margin-bottom: 6px; | |
282 | } |
|
283 | } | |
283 |
|
284 | |||
284 | table.with-cells td { |
|
285 | table.with-cells td { | |
285 | border: 1px solid #d7d7d7; |
|
286 | border: 1px solid #d7d7d7; | |
286 | } |
|
287 | } | |
287 |
|
288 | |||
288 | table.list thead th { |
|
289 | table.list thead th { | |
289 | text-align: center; |
|
290 | text-align: center; | |
290 | background: #eee; |
|
291 | background: #eee; | |
291 | border: 1px solid #d7d7d7; |
|
292 | border: 1px solid #d7d7d7; | |
292 | color: #777; |
|
293 | color: #777; | |
293 | } |
|
294 | } | |
294 |
|
295 | |||
295 | table.list tbody th { |
|
296 | table.list tbody th { | |
296 | font-weight: normal; |
|
297 | font-weight: normal; | |
297 | background: #eed; |
|
298 | background: #eed; | |
298 | border: 1px solid #d7d7d7; |
|
299 | border: 1px solid #d7d7d7; | |
299 | } |
|
300 | } | |
300 |
|
301 | |||
301 | /********** Validation error messages *************/ |
|
302 | /********** Validation error messages *************/ | |
302 | #errorExplanation { |
|
303 | #errorExplanation { | |
303 | width: 400px; |
|
304 | width: 400px; | |
304 | border: 0; |
|
305 | border: 0; | |
305 | padding: 7px; |
|
306 | padding: 7px; | |
306 | padding-bottom: 3px; |
|
307 | padding-bottom: 3px; | |
307 | margin-bottom: 0px; |
|
308 | margin-bottom: 0px; | |
308 | } |
|
309 | } | |
309 |
|
310 | |||
310 | #errorExplanation h2 { |
|
311 | #errorExplanation h2 { | |
311 | text-align: left; |
|
312 | text-align: left; | |
312 | font-weight: bold; |
|
313 | font-weight: bold; | |
313 | padding: 5px 5px 10px 26px; |
|
314 | padding: 5px 5px 10px 26px; | |
314 | font-size: 1em; |
|
315 | font-size: 1em; | |
315 | margin: -7px; |
|
316 | margin: -7px; | |
316 | background: url(../images/alert.png) no-repeat 6px 6px; |
|
317 | background: url(../images/alert.png) no-repeat 6px 6px; | |
317 | } |
|
318 | } | |
318 |
|
319 | |||
319 | #errorExplanation p { |
|
320 | #errorExplanation p { | |
320 | color: #333; |
|
321 | color: #333; | |
321 | margin-bottom: 0; |
|
322 | margin-bottom: 0; | |
322 | padding: 5px; |
|
323 | padding: 5px; | |
323 | } |
|
324 | } | |
324 |
|
325 | |||
325 | #errorExplanation ul li { |
|
326 | #errorExplanation ul li { | |
326 | font-size: 1em; |
|
327 | font-size: 1em; | |
327 | list-style: none; |
|
328 | list-style: none; | |
328 | margin-left: -16px; |
|
329 | margin-left: -16px; | |
329 | } |
|
330 | } | |
330 |
|
331 | |||
331 | /*========== Drop down menu ==============*/ |
|
332 | /*========== Drop down menu ==============*/ | |
332 | div.menu { |
|
333 | div.menu { | |
333 | background-color: #FFFFFF; |
|
334 | background-color: #FFFFFF; | |
334 | border-style: solid; |
|
335 | border-style: solid; | |
335 | border-width: 1px; |
|
336 | border-width: 1px; | |
336 | border-color: #7F9DB9; |
|
337 | border-color: #7F9DB9; | |
337 | position: absolute; |
|
338 | position: absolute; | |
338 | top: 0px; |
|
339 | top: 0px; | |
339 | left: 0px; |
|
340 | left: 0px; | |
340 | padding: 0; |
|
341 | padding: 0; | |
341 | visibility: hidden; |
|
342 | visibility: hidden; | |
342 | z-index: 101; |
|
343 | z-index: 101; | |
343 | } |
|
344 | } | |
344 |
|
345 | |||
345 | div.menu a.menuItem { |
|
346 | div.menu a.menuItem { | |
346 | font-size: 10px; |
|
347 | font-size: 10px; | |
347 | font-weight: normal; |
|
348 | font-weight: normal; | |
348 | line-height: 2em; |
|
349 | line-height: 2em; | |
349 | color: #000000; |
|
350 | color: #000000; | |
350 | background-color: #FFFFFF; |
|
351 | background-color: #FFFFFF; | |
351 | cursor: default; |
|
352 | cursor: default; | |
352 | display: block; |
|
353 | display: block; | |
353 | padding: 0 1em; |
|
354 | padding: 0 1em; | |
354 | margin: 0; |
|
355 | margin: 0; | |
355 | border: 0; |
|
356 | border: 0; | |
356 | text-decoration: none; |
|
357 | text-decoration: none; | |
357 | white-space: nowrap; |
|
358 | white-space: nowrap; | |
358 | } |
|
359 | } | |
359 |
|
360 | |||
360 | div.menu a.menuItem:hover, div.menu a.menuItemHighlight { |
|
361 | div.menu a.menuItem:hover, div.menu a.menuItemHighlight { | |
361 | background-color: #80b0da; |
|
362 | background-color: #80b0da; | |
362 | color: #ffffff; |
|
363 | color: #ffffff; | |
363 | } |
|
364 | } | |
364 |
|
365 | |||
365 | div.menu a.menuItem span.menuItemText {} |
|
366 | div.menu a.menuItem span.menuItemText {} | |
366 |
|
367 | |||
367 | div.menu a.menuItem span.menuItemArrow { |
|
368 | div.menu a.menuItem span.menuItemArrow { | |
368 | margin-right: -.75em; |
|
369 | margin-right: -.75em; | |
369 | } |
|
370 | } | |
370 |
|
371 | |||
371 | /**************** Sidebar styles ****************/ |
|
372 | /**************** Sidebar styles ****************/ | |
372 |
|
373 | |||
373 | #subcontent{ |
|
374 | #subcontent{ | |
374 | position: absolute; |
|
375 | position: absolute; | |
375 | left: 0px; |
|
376 | left: 0px; | |
376 | width:110px; |
|
377 | width:110px; | |
377 | padding:20px 20px 10px 5px; |
|
378 | padding:20px 20px 10px 5px; | |
378 | } |
|
379 | } | |
379 |
|
380 | |||
380 | #subcontent h2{ |
|
381 | #subcontent h2{ | |
381 | display:block; |
|
382 | display:block; | |
382 | margin:0 0 5px 0; |
|
383 | margin:0 0 5px 0; | |
383 | font-size:1.0em; |
|
384 | font-size:1.0em; | |
384 | font-weight:bold; |
|
385 | font-weight:bold; | |
385 | text-align:left; |
|
386 | text-align:left; | |
386 | color:#606060; |
|
387 | color:#606060; | |
387 | background-color:inherit; |
|
388 | background-color:inherit; | |
388 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; |
|
389 | font-family: Trebuchet MS,Georgia,"Times New Roman",serif; | |
389 | } |
|
390 | } | |
390 |
|
391 | |||
391 | #subcontent p{margin:0 0 16px 0; font-size:0.9em;} |
|
392 | #subcontent p{margin:0 0 16px 0; font-size:0.9em;} | |
392 |
|
393 | |||
393 | /**************** Menublock styles ****************/ |
|
394 | /**************** Menublock styles ****************/ | |
394 |
|
395 | |||
395 | .menublock{margin:0 0 20px 8px; font-size:0.8em;} |
|
396 | .menublock{margin:0 0 20px 8px; font-size:0.8em;} | |
396 | .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;} |
|
397 | .menublock li{list-style:none; display:block; padding:1px; margin-bottom:0px;} | |
397 | .menublock li a{font-weight:bold; text-decoration:none;} |
|
398 | .menublock li a{font-weight:bold; text-decoration:none;} | |
398 | .menublock li a:hover{text-decoration:none;} |
|
399 | .menublock li a:hover{text-decoration:none;} | |
399 | .menublock li ul{margin:0; font-size:1em; font-weight:normal;} |
|
400 | .menublock li ul{margin:0; font-size:1em; font-weight:normal;} | |
400 | .menublock li ul li{margin-bottom:0;} |
|
401 | .menublock li ul li{margin-bottom:0;} | |
401 | .menublock li ul a{font-weight:normal;} |
|
402 | .menublock li ul a{font-weight:normal;} | |
402 |
|
403 | |||
403 | /**************** Footer styles ****************/ |
|
404 | /**************** Footer styles ****************/ | |
404 |
|
405 | |||
405 | #footer{ |
|
406 | #footer{ | |
406 | clear:both; |
|
407 | clear:both; | |
407 | padding:5px 0; |
|
408 | padding:5px 0; | |
408 | margin:0; |
|
409 | margin:0; | |
409 | font-size:0.9em; |
|
410 | font-size:0.9em; | |
410 | color:#f0f0f0; |
|
411 | color:#f0f0f0; | |
411 | background:#467aa7; |
|
412 | background:#467aa7; | |
412 | } |
|
413 | } | |
413 |
|
414 | |||
414 | #footer p{padding:0; margin:0; text-align:center;} |
|
415 | #footer p{padding:0; margin:0; text-align:center;} | |
415 | #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;} |
|
416 | #footer a{color:#f0f0f0; background-color:inherit; font-weight:bold;} | |
416 | #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;} |
|
417 | #footer a:hover{color:#ffffff; background-color:inherit; text-decoration: underline;} | |
417 |
|
418 | |||
418 | /**************** Misc classes and styles ****************/ |
|
419 | /**************** Misc classes and styles ****************/ | |
419 |
|
420 | |||
420 | .splitcontentleft{float:left; width:49%;} |
|
421 | .splitcontentleft{float:left; width:49%;} | |
421 | .splitcontentright{float:right; width:49%;} |
|
422 | .splitcontentright{float:right; width:49%;} | |
422 | .clear{clear:both;} |
|
423 | .clear{clear:both;} | |
423 | .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;} |
|
424 | .small{font-size:0.8em;line-height:1.4em;padding:0 0 0 0;} | |
424 | .hide{display:none;} |
|
425 | .hide{display:none;} | |
425 | .textcenter{text-align:center;} |
|
426 | .textcenter{text-align:center;} | |
426 | .textright{text-align:right;} |
|
427 | .textright{text-align:right;} | |
427 | .important{color:#f02025; background-color:inherit; font-weight:bold;} |
|
428 | .important{color:#f02025; background-color:inherit; font-weight:bold;} | |
428 |
|
429 | |||
429 | .box{ |
|
430 | .box{ | |
430 | margin:0 0 20px 0; |
|
431 | margin:0 0 20px 0; | |
431 | padding:10px; |
|
432 | padding:10px; | |
432 | border:1px solid #c0c0c0; |
|
433 | border:1px solid #c0c0c0; | |
433 | background-color:#fafbfc; |
|
434 | background-color:#fafbfc; | |
434 | color:#505050; |
|
435 | color:#505050; | |
435 | line-height:1.5em; |
|
436 | line-height:1.5em; | |
436 | } |
|
437 | } | |
437 |
|
438 | |||
438 | a.close-icon { |
|
439 | a.close-icon { | |
439 | display:block; |
|
440 | display:block; | |
440 | margin-top:3px; |
|
441 | margin-top:3px; | |
441 | overflow:hidden; |
|
442 | overflow:hidden; | |
442 | width:12px; |
|
443 | width:12px; | |
443 | height:12px; |
|
444 | height:12px; | |
444 | background-repeat: no-repeat; |
|
445 | background-repeat: no-repeat; | |
445 | cursor:pointer; |
|
446 | cursor:pointer; | |
446 | background-image:url('../images/close.png'); |
|
447 | background-image:url('../images/close.png'); | |
447 | } |
|
448 | } | |
448 |
|
449 | |||
449 | a.close-icon:hover { |
|
450 | a.close-icon:hover { | |
450 | background-image:url('../images/close_hl.png'); |
|
451 | background-image:url('../images/close_hl.png'); | |
451 | } |
|
452 | } | |
452 |
|
453 | |||
453 | .rightbox{ |
|
454 | .rightbox{ | |
454 | background: #fafbfc; |
|
455 | background: #fafbfc; | |
455 | border: 1px solid #c0c0c0; |
|
456 | border: 1px solid #c0c0c0; | |
456 | float: right; |
|
457 | float: right; | |
457 | padding: 8px; |
|
458 | padding: 8px; | |
458 | position: relative; |
|
459 | position: relative; | |
459 | margin: 0 5px 5px; |
|
460 | margin: 0 5px 5px; | |
460 | } |
|
461 | } | |
461 |
|
462 | |||
462 | .layout-active { |
|
463 | .layout-active { | |
463 | background: #ECF3E1; |
|
464 | background: #ECF3E1; | |
464 | } |
|
465 | } | |
465 |
|
466 | |||
466 | .block-receiver { |
|
467 | .block-receiver { | |
467 | border:1px dashed #c0c0c0; |
|
468 | border:1px dashed #c0c0c0; | |
468 | margin-bottom: 20px; |
|
469 | margin-bottom: 20px; | |
469 | padding: 15px 0 15px 0; |
|
470 | padding: 15px 0 15px 0; | |
470 | } |
|
471 | } | |
471 |
|
472 | |||
472 | .mypage-box { |
|
473 | .mypage-box { | |
473 | margin:0 0 20px 0; |
|
474 | margin:0 0 20px 0; | |
474 | color:#505050; |
|
475 | color:#505050; | |
475 | line-height:1.5em; |
|
476 | line-height:1.5em; | |
476 | } |
|
477 | } | |
477 |
|
478 | |||
478 | .handle { |
|
479 | .handle { | |
479 | cursor: move; |
|
480 | cursor: move; | |
480 | } |
|
481 | } | |
481 |
|
482 | |||
482 | .login { |
|
483 | .login { | |
483 | width: 50%; |
|
484 | width: 50%; | |
484 | text-align: left; |
|
485 | text-align: left; | |
485 | } |
|
486 | } | |
486 |
|
487 | |||
487 | img.calendar-trigger { |
|
488 | img.calendar-trigger { | |
488 | cursor: pointer; |
|
489 | cursor: pointer; | |
489 | vertical-align: middle; |
|
490 | vertical-align: middle; | |
490 | margin-left: 4px; |
|
491 | margin-left: 4px; | |
491 | } |
|
492 | } | |
492 |
|
493 | |||
493 | #history p { |
|
494 | #history p { | |
494 | margin-left: 34px; |
|
495 | margin-left: 34px; | |
495 | } |
|
496 | } | |
496 |
|
497 | |||
497 | /***** Contextual links div *****/ |
|
498 | /***** Contextual links div *****/ | |
498 | .contextual { |
|
499 | .contextual { | |
499 | float: right; |
|
500 | float: right; | |
500 | font-size: 0.8em; |
|
501 | font-size: 0.8em; | |
501 | } |
|
502 | } | |
502 |
|
503 | |||
503 | .contextual select, .contextual input { |
|
504 | .contextual select, .contextual input { | |
504 | font-size: 1em; |
|
505 | font-size: 1em; | |
505 | } |
|
506 | } | |
506 |
|
507 | |||
507 |
|
508 | |||
508 | /***** CSS FORM ******/ |
|
509 | /***** CSS FORM ******/ | |
509 | .tabular p{ |
|
510 | .tabular p{ | |
510 | margin: 0; |
|
511 | margin: 0; | |
511 | padding: 5px 0 8px 0; |
|
512 | padding: 5px 0 8px 0; | |
512 | padding-left: 180px; /*width of left column containing the label elements*/ |
|
513 | padding-left: 180px; /*width of left column containing the label elements*/ | |
513 | height: 1%; |
|
514 | height: 1%; | |
514 | } |
|
515 | } | |
515 |
|
516 | |||
516 | .tabular label{ |
|
517 | .tabular label{ | |
517 | font-weight: bold; |
|
518 | font-weight: bold; | |
518 | float: left; |
|
519 | float: left; | |
519 | margin-left: -180px; /*width of left column*/ |
|
520 | margin-left: -180px; /*width of left column*/ | |
520 | width: 175px; /*width of labels. Should be smaller than left column to create some right |
|
521 | width: 175px; /*width of labels. Should be smaller than left column to create some right | |
521 | margin*/ |
|
522 | margin*/ | |
522 | } |
|
523 | } | |
523 |
|
524 | |||
524 | .error { |
|
525 | .error { | |
525 | color: #cc0000; |
|
526 | color: #cc0000; | |
526 | } |
|
527 | } | |
527 |
|
528 | |||
528 |
|
529 | |||
529 | /*.threepxfix class below: |
|
530 | /*.threepxfix class below: | |
530 | Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents. |
|
531 | Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents. | |
531 | to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html |
|
532 | to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html | |
532 | */ |
|
533 | */ | |
533 |
|
534 | |||
534 | * html .threepxfix{ |
|
535 | * html .threepxfix{ | |
535 | margin-left: 3px; |
|
536 | margin-left: 3px; | |
536 | } No newline at end of file |
|
537 | } |
General Comments 0
You need to be logged in to leave comments.
Login now