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