##// END OF EJS Templates
Display issue notes in the activity view (#1509)....
Jean-Philippe Lang -
r1553:bb1edda6e803
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
@@ -1,443 +1,444
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 class ProjectsController < ApplicationController
19 19 layout 'base'
20 20 menu_item :overview
21 21 menu_item :activity, :only => :activity
22 22 menu_item :roadmap, :only => :roadmap
23 23 menu_item :files, :only => [:list_files, :add_file]
24 24 menu_item :settings, :only => :settings
25 25 menu_item :issues, :only => [:changelog]
26 26
27 27 before_filter :find_project, :except => [ :index, :list, :add, :activity ]
28 28 before_filter :find_optional_project, :only => :activity
29 29 before_filter :authorize, :except => [ :index, :list, :add, :archive, :unarchive, :destroy, :activity ]
30 30 before_filter :require_admin, :only => [ :add, :archive, :unarchive, :destroy ]
31 31 accept_key_auth :activity, :calendar
32 32
33 33 helper :sort
34 34 include SortHelper
35 35 helper :custom_fields
36 36 include CustomFieldsHelper
37 37 helper :ifpdf
38 38 include IfpdfHelper
39 39 helper :issues
40 40 helper IssuesHelper
41 41 helper :queries
42 42 include QueriesHelper
43 43 helper :repositories
44 44 include RepositoriesHelper
45 45 include ProjectsHelper
46 46
47 47 # Lists visible projects
48 48 def index
49 49 projects = Project.find :all,
50 50 :conditions => Project.visible_by(User.current),
51 51 :include => :parent
52 52 respond_to do |format|
53 53 format.html {
54 54 @project_tree = projects.group_by {|p| p.parent || p}
55 55 @project_tree.each_key {|p| @project_tree[p] -= [p]}
56 56 }
57 57 format.atom {
58 58 render_feed(projects.sort_by(&:created_on).reverse.slice(0, Setting.feeds_limit.to_i),
59 59 :title => "#{Setting.app_title}: #{l(:label_project_latest)}")
60 60 }
61 61 end
62 62 end
63 63
64 64 # Add a new project
65 65 def add
66 66 @custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
67 67 @trackers = Tracker.all
68 68 @root_projects = Project.find(:all,
69 69 :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}",
70 70 :order => 'name')
71 71 @project = Project.new(params[:project])
72 72 if request.get?
73 73 @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project) }
74 74 @project.trackers = Tracker.all
75 75 @project.is_public = Setting.default_projects_public?
76 76 @project.enabled_module_names = Redmine::AccessControl.available_project_modules
77 77 else
78 78 @project.custom_fields = CustomField.find(params[:custom_field_ids]) if params[:custom_field_ids]
79 79 @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => (params[:custom_fields] ? params["custom_fields"][x.id.to_s] : nil)) }
80 80 @project.custom_values = @custom_values
81 81 @project.enabled_module_names = params[:enabled_modules]
82 82 if @project.save
83 83 flash[:notice] = l(:notice_successful_create)
84 84 redirect_to :controller => 'admin', :action => 'projects'
85 85 end
86 86 end
87 87 end
88 88
89 89 # Show @project
90 90 def show
91 91 @custom_values = @project.custom_values.find(:all, :include => :custom_field, :order => "#{CustomField.table_name}.position")
92 92 @members_by_role = @project.members.find(:all, :include => [:user, :role], :order => 'position').group_by {|m| m.role}
93 93 @subprojects = @project.children.find(:all, :conditions => Project.visible_by(User.current))
94 94 @news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")
95 95 @trackers = @project.rolled_up_trackers
96 96
97 97 cond = @project.project_condition(Setting.display_subprojects_issues?)
98 98 Issue.visible_by(User.current) do
99 99 @open_issues_by_tracker = Issue.count(:group => :tracker,
100 100 :include => [:project, :status, :tracker],
101 101 :conditions => ["(#{cond}) AND #{IssueStatus.table_name}.is_closed=?", false])
102 102 @total_issues_by_tracker = Issue.count(:group => :tracker,
103 103 :include => [:project, :status, :tracker],
104 104 :conditions => cond)
105 105 end
106 106 TimeEntry.visible_by(User.current) do
107 107 @total_hours = TimeEntry.sum(:hours,
108 108 :include => :project,
109 109 :conditions => cond).to_f
110 110 end
111 111 @key = User.current.rss_key
112 112 end
113 113
114 114 def settings
115 115 @root_projects = Project.find(:all,
116 116 :conditions => ["parent_id IS NULL AND status = #{Project::STATUS_ACTIVE} AND id <> ?", @project.id],
117 117 :order => 'name')
118 118 @custom_fields = IssueCustomField.find(:all)
119 119 @issue_category ||= IssueCategory.new
120 120 @member ||= @project.members.new
121 121 @trackers = Tracker.all
122 122 @custom_values ||= ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| @project.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x) }
123 123 @repository ||= @project.repository
124 124 @wiki ||= @project.wiki
125 125 end
126 126
127 127 # Edit @project
128 128 def edit
129 129 if request.post?
130 130 if params[:custom_fields]
131 131 @custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
132 132 @project.custom_values = @custom_values
133 133 end
134 134 @project.attributes = params[:project]
135 135 if @project.save
136 136 flash[:notice] = l(:notice_successful_update)
137 137 redirect_to :action => 'settings', :id => @project
138 138 else
139 139 settings
140 140 render :action => 'settings'
141 141 end
142 142 end
143 143 end
144 144
145 145 def modules
146 146 @project.enabled_module_names = params[:enabled_modules]
147 147 redirect_to :action => 'settings', :id => @project, :tab => 'modules'
148 148 end
149 149
150 150 def archive
151 151 @project.archive if request.post? && @project.active?
152 152 redirect_to :controller => 'admin', :action => 'projects'
153 153 end
154 154
155 155 def unarchive
156 156 @project.unarchive if request.post? && !@project.active?
157 157 redirect_to :controller => 'admin', :action => 'projects'
158 158 end
159 159
160 160 # Delete @project
161 161 def destroy
162 162 @project_to_destroy = @project
163 163 if request.post? and params[:confirm]
164 164 @project_to_destroy.destroy
165 165 redirect_to :controller => 'admin', :action => 'projects'
166 166 end
167 167 # hide project in layout
168 168 @project = nil
169 169 end
170 170
171 171 # Add a new issue category to @project
172 172 def add_issue_category
173 173 @category = @project.issue_categories.build(params[:category])
174 174 if request.post? and @category.save
175 175 respond_to do |format|
176 176 format.html do
177 177 flash[:notice] = l(:notice_successful_create)
178 178 redirect_to :action => 'settings', :tab => 'categories', :id => @project
179 179 end
180 180 format.js do
181 181 # IE doesn't support the replace_html rjs method for select box options
182 182 render(:update) {|page| page.replace "issue_category_id",
183 183 content_tag('select', '<option></option>' + options_from_collection_for_select(@project.issue_categories, 'id', 'name', @category.id), :id => 'issue_category_id', :name => 'issue[category_id]')
184 184 }
185 185 end
186 186 end
187 187 end
188 188 end
189 189
190 190 # Add a new version to @project
191 191 def add_version
192 192 @version = @project.versions.build(params[:version])
193 193 if request.post? and @version.save
194 194 flash[:notice] = l(:notice_successful_create)
195 195 redirect_to :action => 'settings', :tab => 'versions', :id => @project
196 196 end
197 197 end
198 198
199 199 def add_file
200 200 if request.post?
201 201 @version = @project.versions.find_by_id(params[:version_id])
202 202 attachments = attach_files(@version, params[:attachments])
203 203 Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added')
204 204 redirect_to :controller => 'projects', :action => 'list_files', :id => @project
205 205 end
206 206 @versions = @project.versions.sort
207 207 end
208 208
209 209 def list_files
210 210 sort_init "#{Attachment.table_name}.filename", "asc"
211 211 sort_update
212 212 @versions = @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
213 213 render :layout => !request.xhr?
214 214 end
215 215
216 216 # Show changelog for @project
217 217 def changelog
218 218 @trackers = @project.trackers.find(:all, :conditions => ["is_in_chlog=?", true], :order => 'position')
219 219 retrieve_selected_tracker_ids(@trackers)
220 220 @versions = @project.versions.sort
221 221 end
222 222
223 223 def roadmap
224 224 @trackers = @project.trackers.find(:all, :conditions => ["is_in_roadmap=?", true])
225 225 retrieve_selected_tracker_ids(@trackers)
226 226 @versions = @project.versions.sort
227 227 @versions = @versions.select {|v| !v.completed? } unless params[:completed]
228 228 end
229 229
230 230 def activity
231 231 @days = Setting.activity_days_default.to_i
232 232
233 233 if params[:from]
234 234 begin; @date_to = params[:from].to_date; rescue; end
235 235 end
236 236
237 237 @date_to ||= Date.today + 1
238 238 @date_from = @date_to - @days
239 239
240 240 @event_types = %w(issues news files documents changesets wiki_pages messages)
241 241 if @project
242 242 @event_types.delete('wiki_pages') unless @project.wiki
243 243 @event_types.delete('changesets') unless @project.repository
244 244 @event_types.delete('messages') unless @project.boards.any?
245 245 # only show what the user is allowed to view
246 246 @event_types = @event_types.select {|o| User.current.allowed_to?("view_#{o}".to_sym, @project)}
247 247 @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
248 248 end
249 249 @scope = @event_types.select {|t| params["show_#{t}"]}
250 250 # default events if none is specified in parameters
251 251 @scope = (@event_types - %w(wiki_pages messages))if @scope.empty?
252 252
253 253 @events = []
254 254
255 255 if @scope.include?('issues')
256 256 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_issues, :project => @project, :with_subprojects => @with_subprojects))
257 257 cond.add(["#{Issue.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
258 258 @events += Issue.find(:all, :include => [:project, :author, :tracker], :conditions => cond.conditions)
259 259
260 260 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_issues, :project => @project, :with_subprojects => @with_subprojects))
261 cond.add(["#{Journal.table_name}.journalized_type = 'Issue' AND #{JournalDetail.table_name}.prop_key = 'status_id' AND #{Journal.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
261 cond.add(["#{Journal.table_name}.journalized_type = 'Issue' AND #{Journal.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
262 cond.add("#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> ''")
262 263 @events += Journal.find(:all, :include => [{:issue => :project}, :details, :user], :conditions => cond.conditions)
263 264 end
264 265
265 266 if @scope.include?('news')
266 267 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_news, :project => @project, :with_subprojects => @with_subprojects))
267 268 cond.add(["#{News.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
268 269 @events += News.find(:all, :include => [:project, :author], :conditions => cond.conditions)
269 270 end
270 271
271 272 if @scope.include?('files')
272 273 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_files, :project => @project, :with_subprojects => @with_subprojects))
273 274 cond.add(["#{Attachment.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
274 275 @events += Attachment.find(:all, :select => "#{Attachment.table_name}.*",
275 276 :joins => "LEFT JOIN #{Version.table_name} ON #{Attachment.table_name}.container_type='Version' AND #{Version.table_name}.id = #{Attachment.table_name}.container_id " +
276 277 "LEFT JOIN #{Project.table_name} ON #{Version.table_name}.project_id = #{Project.table_name}.id",
277 278 :conditions => cond.conditions)
278 279 end
279 280
280 281 if @scope.include?('documents')
281 282 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_documents, :project => @project, :with_subprojects => @with_subprojects))
282 283 cond.add(["#{Document.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
283 284 @events += Document.find(:all, :include => :project, :conditions => cond.conditions)
284 285
285 286 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_documents, :project => @project, :with_subprojects => @with_subprojects))
286 287 cond.add(["#{Attachment.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
287 288 @events += Attachment.find(:all, :select => "#{Attachment.table_name}.*",
288 289 :joins => "LEFT JOIN #{Document.table_name} ON #{Attachment.table_name}.container_type='Document' AND #{Document.table_name}.id = #{Attachment.table_name}.container_id " +
289 290 "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id",
290 291 :conditions => cond.conditions)
291 292 end
292 293
293 294 if @scope.include?('wiki_pages')
294 295 select = "#{WikiContent.versioned_table_name}.updated_on, #{WikiContent.versioned_table_name}.comments, " +
295 296 "#{WikiContent.versioned_table_name}.#{WikiContent.version_column}, #{WikiPage.table_name}.title, " +
296 297 "#{WikiContent.versioned_table_name}.page_id, #{WikiContent.versioned_table_name}.author_id, " +
297 298 "#{WikiContent.versioned_table_name}.id"
298 299 joins = "LEFT JOIN #{WikiPage.table_name} ON #{WikiPage.table_name}.id = #{WikiContent.versioned_table_name}.page_id " +
299 300 "LEFT JOIN #{Wiki.table_name} ON #{Wiki.table_name}.id = #{WikiPage.table_name}.wiki_id " +
300 301 "LEFT JOIN #{Project.table_name} ON #{Project.table_name}.id = #{Wiki.table_name}.project_id"
301 302
302 303 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_wiki_pages, :project => @project, :with_subprojects => @with_subprojects))
303 304 cond.add(["#{WikiContent.versioned_table_name}.updated_on BETWEEN ? AND ?", @date_from, @date_to])
304 305 @events += WikiContent.versioned_class.find(:all, :select => select, :joins => joins, :conditions => cond.conditions)
305 306 end
306 307
307 308 if @scope.include?('changesets')
308 309 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_changesets, :project => @project, :with_subprojects => @with_subprojects))
309 310 cond.add(["#{Changeset.table_name}.committed_on BETWEEN ? AND ?", @date_from, @date_to])
310 311 @events += Changeset.find(:all, :include => {:repository => :project}, :conditions => cond.conditions)
311 312 end
312 313
313 314 if @scope.include?('messages')
314 315 cond = ARCondition.new(Project.allowed_to_condition(User.current, :view_messages, :project => @project, :with_subprojects => @with_subprojects))
315 316 cond.add(["#{Message.table_name}.created_on BETWEEN ? AND ?", @date_from, @date_to])
316 317 @events += Message.find(:all, :include => [{:board => :project}, :author], :conditions => cond.conditions)
317 318 end
318 319
319 320 @events_by_day = @events.group_by(&:event_date)
320 321
321 322 respond_to do |format|
322 323 format.html { render :layout => false if request.xhr? }
323 324 format.atom { render_feed(@events, :title => "#{@project || Setting.app_title}: #{l(:label_activity)}") }
324 325 end
325 326 end
326 327
327 328 def calendar
328 329 @trackers = @project.rolled_up_trackers
329 330 retrieve_selected_tracker_ids(@trackers)
330 331
331 332 if params[:year] and params[:year].to_i > 1900
332 333 @year = params[:year].to_i
333 334 if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13
334 335 @month = params[:month].to_i
335 336 end
336 337 end
337 338 @year ||= Date.today.year
338 339 @month ||= Date.today.month
339 340 @calendar = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :month)
340 341 @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
341 342 events = []
342 343 @project.issues_with_subprojects(@with_subprojects) do
343 344 events += Issue.find(:all,
344 345 :include => [:tracker, :status, :assigned_to, :priority, :project],
345 346 :conditions => ["((start_date BETWEEN ? AND ?) OR (due_date BETWEEN ? AND ?)) AND #{Issue.table_name}.tracker_id IN (#{@selected_tracker_ids.join(',')})", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt]
346 347 ) unless @selected_tracker_ids.empty?
347 348 events += Version.find(:all, :include => :project,
348 349 :conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt])
349 350 end
350 351 @calendar.events = events
351 352
352 353 render :layout => false if request.xhr?
353 354 end
354 355
355 356 def gantt
356 357 @trackers = @project.rolled_up_trackers
357 358 retrieve_selected_tracker_ids(@trackers)
358 359
359 360 if params[:year] and params[:year].to_i >0
360 361 @year_from = params[:year].to_i
361 362 if params[:month] and params[:month].to_i >=1 and params[:month].to_i <= 12
362 363 @month_from = params[:month].to_i
363 364 else
364 365 @month_from = 1
365 366 end
366 367 else
367 368 @month_from ||= Date.today.month
368 369 @year_from ||= Date.today.year
369 370 end
370 371
371 372 zoom = (params[:zoom] || User.current.pref[:gantt_zoom]).to_i
372 373 @zoom = (zoom > 0 && zoom < 5) ? zoom : 2
373 374 months = (params[:months] || User.current.pref[:gantt_months]).to_i
374 375 @months = (months > 0 && months < 25) ? months : 6
375 376
376 377 # Save gantt paramters as user preference (zoom and months count)
377 378 if (User.current.logged? && (@zoom != User.current.pref[:gantt_zoom] || @months != User.current.pref[:gantt_months]))
378 379 User.current.pref[:gantt_zoom], User.current.pref[:gantt_months] = @zoom, @months
379 380 User.current.preference.save
380 381 end
381 382
382 383 @date_from = Date.civil(@year_from, @month_from, 1)
383 384 @date_to = (@date_from >> @months) - 1
384 385 @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
385 386
386 387 @events = []
387 388 @project.issues_with_subprojects(@with_subprojects) do
388 389 # Issues that have start and due dates
389 390 @events += Issue.find(:all,
390 391 :order => "start_date, due_date",
391 392 :include => [:tracker, :status, :assigned_to, :priority, :project],
392 393 :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]
393 394 ) unless @selected_tracker_ids.empty?
394 395 # Issues that don't have a due date but that are assigned to a version with a date
395 396 @events += Issue.find(:all,
396 397 :order => "start_date, effective_date",
397 398 :include => [:tracker, :status, :assigned_to, :priority, :project, :fixed_version],
398 399 :conditions => ["(((start_date>=? and start_date<=?) or (effective_date>=? and effective_date<=?) or (start_date<? and effective_date>?)) and start_date is not null and due_date is null and effective_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]
399 400 ) unless @selected_tracker_ids.empty?
400 401 @events += Version.find(:all, :include => :project,
401 402 :conditions => ["effective_date BETWEEN ? AND ?", @date_from, @date_to])
402 403 end
403 404 @events.sort! {|x,y| x.start_date <=> y.start_date }
404 405
405 406 if params[:format]=='pdf'
406 407 @options_for_rfpdf ||= {}
407 408 @options_for_rfpdf[:file_name] = "#{@project.identifier}-gantt.pdf"
408 409 render :template => "projects/gantt.rfpdf", :layout => false
409 410 elsif params[:format]=='png' && respond_to?('gantt_image')
410 411 image = gantt_image(@events, @date_from, @months, @zoom)
411 412 image.format = 'PNG'
412 413 send_data(image.to_blob, :disposition => 'inline', :type => 'image/png', :filename => "#{@project.identifier}-gantt.png")
413 414 else
414 415 render :template => "projects/gantt.rhtml"
415 416 end
416 417 end
417 418
418 419 private
419 420 # Find project of id params[:id]
420 421 # if not found, redirect to project list
421 422 # Used as a before_filter
422 423 def find_project
423 424 @project = Project.find(params[:id])
424 425 rescue ActiveRecord::RecordNotFound
425 426 render_404
426 427 end
427 428
428 429 def find_optional_project
429 430 return true unless params[:id]
430 431 @project = Project.find(params[:id])
431 432 authorize
432 433 rescue ActiveRecord::RecordNotFound
433 434 render_404
434 435 end
435 436
436 437 def retrieve_selected_tracker_ids(selectable_trackers)
437 438 if ids = params[:tracker_ids]
438 439 @selected_tracker_ids = (ids.is_a? Array) ? ids.collect { |id| id.to_i.to_s } : ids.split('/').collect { |id| id.to_i.to_s }
439 440 else
440 441 @selected_tracker_ids = selectable_trackers.collect {|t| t.id.to_s }
441 442 end
442 443 end
443 444 end
@@ -1,66 +1,66
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 Journal < ActiveRecord::Base
19 19 belongs_to :journalized, :polymorphic => true
20 20 # added as a quick fix to allow eager loading of the polymorphic association
21 21 # since always associated to an issue, for now
22 22 belongs_to :issue, :foreign_key => :journalized_id
23 23
24 24 belongs_to :user
25 25 has_many :details, :class_name => "JournalDetail", :dependent => :delete_all
26 26 attr_accessor :indice
27 27
28 28 acts_as_searchable :columns => 'notes',
29 29 :include => {:issue => :project},
30 30 :project_key => "#{Issue.table_name}.project_id",
31 31 :date_column => "#{Issue.table_name}.created_on"
32 32
33 33 acts_as_event :title => Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.id}#{status}: #{o.issue.subject}" },
34 34 :description => :notes,
35 35 :author => :user,
36 :type => Proc.new {|o| (s = o.new_status) && s.is_closed? ? 'issue-closed' : 'issue-edit' },
36 :type => Proc.new {|o| (s = o.new_status) ? (s.is_closed? ? 'issue-closed' : 'issue-edit') : 'issue-note' },
37 37 :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.issue.id, :anchor => "change-#{o.id}"}}
38 38
39 39 def save
40 40 # Do not save an empty journal
41 41 (details.empty? && notes.blank?) ? false : super
42 42 end
43 43
44 44 # Returns the new status if the journal contains a status change, otherwise nil
45 45 def new_status
46 46 c = details.detect {|detail| detail.prop_key == 'status_id'}
47 47 (c && c.value) ? IssueStatus.find_by_id(c.value.to_i) : nil
48 48 end
49 49
50 50 def new_value_for(prop)
51 51 c = details.detect {|detail| detail.prop_key == prop}
52 52 c ? c.value : nil
53 53 end
54 54
55 55 def editable_by?(usr)
56 56 usr && usr.logged? && (usr.allowed_to?(:edit_issue_notes, project) || (self.user == usr && usr.allowed_to?(:edit_own_issue_notes, project)))
57 57 end
58 58
59 59 def project
60 60 journalized.respond_to?(:project) ? journalized.project : nil
61 61 end
62 62
63 63 def attachments
64 64 journalized.respond_to?(:attachments) ? journalized.attachments : nil
65 65 end
66 66 end
@@ -1,608 +1,609
1 1 body { font-family: Verdana, sans-serif; font-size: 12px; color:#484848; margin: 0; padding: 0; min-width: 900px; }
2 2
3 3 h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif;}
4 4 h1 {margin:0; padding:0; font-size: 24px;}
5 5 h2, .wiki h1 {font-size: 20px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
6 6 h3, .wiki h2 {font-size: 16px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
7 7 h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
8 8
9 9 /***** Layout *****/
10 10 #wrapper {background: white;}
11 11
12 12 #top-menu {background: #2C4056; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 2px 0px 6px;}
13 13 #top-menu ul {margin: 0; padding: 0;}
14 14 #top-menu li {
15 15 float:left;
16 16 list-style-type:none;
17 17 margin: 0px 0px 0px 0px;
18 18 padding: 0px 0px 0px 0px;
19 19 white-space:nowrap;
20 20 }
21 21 #top-menu a {color: #fff; padding-right: 8px; font-weight: bold;}
22 22 #top-menu #loggedas { float: right; margin-right: 0.5em; color: #fff; }
23 23
24 24 #account {float:right;}
25 25
26 26 #header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
27 27 #header a {color:#f8f8f8;}
28 28 #quick-search {float:right;}
29 29
30 30 #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;}
31 31 #main-menu ul {margin: 0; padding: 0;}
32 32 #main-menu li {
33 33 float:left;
34 34 list-style-type:none;
35 35 margin: 0px 2px 0px 0px;
36 36 padding: 0px 0px 0px 0px;
37 37 white-space:nowrap;
38 38 }
39 39 #main-menu li a {
40 40 display: block;
41 41 color: #fff;
42 42 text-decoration: none;
43 43 font-weight: bold;
44 44 margin: 0;
45 45 padding: 4px 10px 4px 10px;
46 46 }
47 47 #main-menu li a:hover {background:#759FCF; color:#fff;}
48 48 #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
49 49
50 50 #main {background-color:#EEEEEE;}
51 51
52 52 #sidebar{ float: right; width: 17%; position: relative; z-index: 9; min-height: 600px; padding: 0; margin: 0;}
53 53 * html #sidebar{ width: 17%; }
54 54 #sidebar h3{ font-size: 14px; margin-top:14px; color: #666; }
55 55 #sidebar hr{ width: 100%; margin: 0 auto; height: 1px; background: #ccc; border: 0; }
56 56 * html #sidebar hr{ width: 95%; position: relative; left: -6px; color: #ccc; }
57 57
58 58 #content { width: 80%; background-color: #fff; margin: 0px; border-right: 1px solid #ddd; padding: 6px 10px 10px 10px; z-index: 10; height:600px; min-height: 600px;}
59 59 * html #content{ width: 80%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
60 60 html>body #content { height: auto; min-height: 600px; overflow: auto; }
61 61
62 62 #main.nosidebar #sidebar{ display: none; }
63 63 #main.nosidebar #content{ width: auto; border-right: 0; }
64 64
65 65 #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;}
66 66
67 67 #login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }
68 68 #login-form table td {padding: 6px;}
69 69 #login-form label {font-weight: bold;}
70 70
71 71 .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
72 72
73 73 /***** Links *****/
74 74 a, a:link, a:visited{ color: #2A5685; text-decoration: none; }
75 75 a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
76 76 a img{ border: 0; }
77 77
78 78 a.issue.closed, .issue.closed a { text-decoration: line-through; }
79 79
80 80 /***** Tables *****/
81 81 table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; }
82 82 table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
83 83 table.list td { vertical-align: top; }
84 84 table.list td.id { width: 2%; text-align: center;}
85 85 table.list td.checkbox { width: 15px; padding: 0px;}
86 86
87 87 table.list.issues { margin-top: 10px; }
88 88 tr.issue { text-align: center; white-space: nowrap; }
89 89 tr.issue td.subject, tr.issue td.category { white-space: normal; }
90 90 tr.issue td.subject { text-align: left; }
91 91 tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;}
92 92
93 93 tr.entry { border: 1px solid #f8f8f8; }
94 94 tr.entry td { white-space: nowrap; }
95 95 tr.entry td.filename { width: 30%; }
96 96 tr.entry td.size { text-align: right; font-size: 90%; }
97 97 tr.entry td.revision, tr.entry td.author { text-align: center; }
98 98 tr.entry td.age { text-align: right; }
99 99
100 100 tr.entry span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
101 101 tr.entry.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}
102 102 tr.entry.file td.filename a { margin-left: 16px; }
103 103
104 104 tr.changeset td.author { text-align: center; width: 15%; }
105 105 tr.changeset td.committed_on { text-align: center; width: 15%; }
106 106
107 107 tr.message { height: 2.6em; }
108 108 tr.message td.last_message { font-size: 80%; }
109 109 tr.message.locked td.subject a { background-image: url(../images/locked.png); }
110 110 tr.message.sticky td.subject a { background-image: url(../images/sticky.png); font-weight: bold; }
111 111
112 112 tr.user td { width:13%; }
113 113 tr.user td.email { width:18%; }
114 114 tr.user td { white-space: nowrap; }
115 115 tr.user.locked, tr.user.registered { color: #aaa; }
116 116 tr.user.locked a, tr.user.registered a { color: #aaa; }
117 117
118 118 tr.time-entry { text-align: center; white-space: nowrap; }
119 119 tr.time-entry td.subject, tr.time-entry td.comments { text-align: left; white-space: normal; }
120 120 td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
121 121 td.hours .hours-dec { font-size: 0.9em; }
122 122
123 123 table.list tbody tr:hover { background-color:#ffffdd; }
124 124 table td {padding:2px;}
125 125 table p {margin:0;}
126 126 .odd {background-color:#f6f7f8;}
127 127 .even {background-color: #fff;}
128 128
129 129 .highlight { background-color: #FCFD8D;}
130 130 .highlight.token-1 { background-color: #faa;}
131 131 .highlight.token-2 { background-color: #afa;}
132 132 .highlight.token-3 { background-color: #aaf;}
133 133
134 134 .box{
135 135 padding:6px;
136 136 margin-bottom: 10px;
137 137 background-color:#f6f6f6;
138 138 color:#505050;
139 139 line-height:1.5em;
140 140 border: 1px solid #e4e4e4;
141 141 }
142 142
143 143 div.square {
144 144 border: 1px solid #999;
145 145 float: left;
146 146 margin: .3em .4em 0 .4em;
147 147 overflow: hidden;
148 148 width: .6em; height: .6em;
149 149 }
150 150 .contextual {float:right; white-space: nowrap; line-height:1.4em;margin-top:5px; padding-left: 10px; font-size:0.9em;}
151 151 .contextual input {font-size:0.9em;}
152 152
153 153 .splitcontentleft{float:left; width:49%;}
154 154 .splitcontentright{float:right; width:49%;}
155 155 form {display: inline;}
156 156 input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;}
157 157 fieldset {border: 1px solid #e4e4e4; margin:0;}
158 158 legend {color: #484848;}
159 159 hr { width: 100%; height: 1px; background: #ccc; border: 0;}
160 160 blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
161 161 blockquote blockquote { margin-left: 0;}
162 162 textarea.wiki-edit { width: 99%; }
163 163 li p {margin-top: 0;}
164 164 div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
165 165 p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;}
166 166 p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; }
167 167
168 168 fieldset#filters { padding: 0.7em; }
169 169 fieldset#filters p { margin: 1.2em 0 0.8em 2px; }
170 170 fieldset#filters .buttons { font-size: 0.9em; }
171 171 fieldset#filters table { border-collapse: collapse; }
172 172 fieldset#filters table td { padding: 0; vertical-align: middle; }
173 173 fieldset#filters tr.filter { height: 2em; }
174 174 fieldset#filters td.add-filter { text-align: right; vertical-align: top; }
175 175
176 176 div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
177 177 div#issue-changesets .changeset { padding: 4px;}
178 178 div#issue-changesets .changeset { border-bottom: 1px solid #ddd; }
179 179 div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
180 180
181 181 div#activity dl, #search-results { margin-left: 2em; }
182 182 div#activity dd { margin-bottom: 1em; padding-left: 18px; }
183 183 div#activity dt, #search-results dt { margin-bottom: 1px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
184 184 div#activity dt .time { color: #777; font-size: 80%; }
185 185 div#activity dd .description, #search-results dd .description { font-style: italic; }
186 186 div#activity span.project:after, #search-results span.project:after { content: " -"; }
187 187 #search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px;}
188 188 div#activity dd span.description, #search-results dd span.description { display:block; }
189 189
190 190 dt.issue { background-image: url(../images/ticket.png); }
191 191 dt.issue-edit { background-image: url(../images/ticket_edit.png); }
192 192 dt.issue-closed { background-image: url(../images/ticket_checked.png); }
193 dt.issue-note { background-image: url(../images/ticket_note.png); }
193 194 dt.changeset { background-image: url(../images/changeset.png); }
194 195 dt.news { background-image: url(../images/news.png); }
195 196 dt.message { background-image: url(../images/message.png); }
196 197 dt.reply { background-image: url(../images/comments.png); }
197 198 dt.wiki-page { background-image: url(../images/wiki_edit.png); }
198 199 dt.attachment { background-image: url(../images/attachment.png); }
199 200 dt.document { background-image: url(../images/document.png); }
200 201 dt.project { background-image: url(../images/projects.png); }
201 202
202 203 div#roadmap fieldset.related-issues { margin-bottom: 1em; }
203 204 div#roadmap fieldset.related-issues ul { margin-top: 0.3em; margin-bottom: 0.3em; }
204 205 div#roadmap .wiki h1:first-child { display: none; }
205 206 div#roadmap .wiki h1 { font-size: 120%; }
206 207 div#roadmap .wiki h2 { font-size: 110%; }
207 208
208 209 div#version-summary { float:right; width:380px; margin-left: 16px; margin-bottom: 16px; background-color: #fff; }
209 210 div#version-summary fieldset { margin-bottom: 1em; }
210 211 div#version-summary .total-hours { text-align: right; }
211 212
212 213 table#time-report td.hours, table#time-report th.period, table#time-report th.total { text-align: right; padding-right: 0.5em; }
213 214 table#time-report tbody tr { font-style: italic; color: #777; }
214 215 table#time-report tbody tr.last-level { font-style: normal; color: #555; }
215 216 table#time-report tbody tr.total { font-style: normal; font-weight: bold; color: #555; background-color:#EEEEEE; }
216 217 table#time-report .hours-dec { font-size: 0.9em; }
217 218
218 219 .total-hours { font-size: 110%; font-weight: bold; }
219 220 .total-hours span.hours-int { font-size: 120%; }
220 221
221 222 .autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
222 223 #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
223 224
224 225 .pagination {font-size: 90%}
225 226 p.pagination {margin-top:8px;}
226 227
227 228 /***** Tabular forms ******/
228 229 .tabular p{
229 230 margin: 0;
230 231 padding: 5px 0 8px 0;
231 232 padding-left: 180px; /*width of left column containing the label elements*/
232 233 height: 1%;
233 234 clear:left;
234 235 }
235 236
236 237 html>body .tabular p {overflow:hidden;}
237 238
238 239 .tabular label{
239 240 font-weight: bold;
240 241 float: left;
241 242 text-align: right;
242 243 margin-left: -180px; /*width of left column*/
243 244 width: 175px; /*width of labels. Should be smaller than left column to create some right
244 245 margin*/
245 246 }
246 247
247 248 .tabular label.floating{
248 249 font-weight: normal;
249 250 margin-left: 0px;
250 251 text-align: left;
251 252 width: 200px;
252 253 }
253 254
254 255 input#time_entry_comments { width: 90%;}
255 256
256 257 #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
257 258
258 259 .tabular.settings p{ padding-left: 300px; }
259 260 .tabular.settings label{ margin-left: -300px; width: 295px; }
260 261
261 262 .required {color: #bb0000;}
262 263 .summary {font-style: italic;}
263 264
264 265 #attachments_fields input[type=text] {margin-left: 8px; }
265 266
266 267 div.attachments p { margin:4px 0 2px 0; }
267 268 div.attachments img { vertical-align: middle; }
268 269 div.attachments span.author { font-size: 0.9em; color: #888; }
269 270
270 271 p.other-formats { text-align: right; font-size:0.9em; color: #666; }
271 272 .other-formats span + span:before { content: "| "; }
272 273
273 274 a.feed { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
274 275
275 276 /***** Flash & error messages ****/
276 277 #errorExplanation, div.flash, .nodata, .warning {
277 278 padding: 4px 4px 4px 30px;
278 279 margin-bottom: 12px;
279 280 font-size: 1.1em;
280 281 border: 2px solid;
281 282 }
282 283
283 284 div.flash {margin-top: 8px;}
284 285
285 286 div.flash.error, #errorExplanation {
286 287 background: url(../images/false.png) 8px 5px no-repeat;
287 288 background-color: #ffe3e3;
288 289 border-color: #dd0000;
289 290 color: #550000;
290 291 }
291 292
292 293 div.flash.notice {
293 294 background: url(../images/true.png) 8px 5px no-repeat;
294 295 background-color: #dfffdf;
295 296 border-color: #9fcf9f;
296 297 color: #005f00;
297 298 }
298 299
299 300 .nodata, .warning {
300 301 text-align: center;
301 302 background-color: #FFEBC1;
302 303 border-color: #FDBF3B;
303 304 color: #A6750C;
304 305 }
305 306
306 307 #errorExplanation ul { font-size: 0.9em;}
307 308
308 309 /***** Ajax indicator ******/
309 310 #ajax-indicator {
310 311 position: absolute; /* fixed not supported by IE */
311 312 background-color:#eee;
312 313 border: 1px solid #bbb;
313 314 top:35%;
314 315 left:40%;
315 316 width:20%;
316 317 font-weight:bold;
317 318 text-align:center;
318 319 padding:0.6em;
319 320 z-index:100;
320 321 filter:alpha(opacity=50);
321 322 opacity: 0.5;
322 323 }
323 324
324 325 html>body #ajax-indicator { position: fixed; }
325 326
326 327 #ajax-indicator span {
327 328 background-position: 0% 40%;
328 329 background-repeat: no-repeat;
329 330 background-image: url(../images/loading.gif);
330 331 padding-left: 26px;
331 332 vertical-align: bottom;
332 333 }
333 334
334 335 /***** Calendar *****/
335 336 table.cal {border-collapse: collapse; width: 100%; margin: 8px 0 6px 0;border: 1px solid #d7d7d7;}
336 337 table.cal thead th {width: 14%;}
337 338 table.cal tbody tr {height: 100px;}
338 339 table.cal th { background-color:#EEEEEE; padding: 4px; }
339 340 table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
340 341 table.cal td p.day-num {font-size: 1.1em; text-align:right;}
341 342 table.cal td.odd p.day-num {color: #bbb;}
342 343 table.cal td.today {background:#ffffdd;}
343 344 table.cal td.today p.day-num {font-weight: bold;}
344 345
345 346 /***** Tooltips ******/
346 347 .tooltip{position:relative;z-index:24;}
347 348 .tooltip:hover{z-index:25;color:#000;}
348 349 .tooltip span.tip{display: none; text-align:left;}
349 350
350 351 div.tooltip:hover span.tip{
351 352 display:block;
352 353 position:absolute;
353 354 top:12px; left:24px; width:270px;
354 355 border:1px solid #555;
355 356 background-color:#fff;
356 357 padding: 4px;
357 358 font-size: 0.8em;
358 359 color:#505050;
359 360 }
360 361
361 362 /***** Progress bar *****/
362 363 table.progress {
363 364 border: 1px solid #D7D7D7;
364 365 border-collapse: collapse;
365 366 border-spacing: 0pt;
366 367 empty-cells: show;
367 368 text-align: center;
368 369 float:left;
369 370 margin: 1px 6px 1px 0px;
370 371 }
371 372
372 373 table.progress td { height: 0.9em; }
373 374 table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
374 375 table.progress td.done { background: #DEF0DE none repeat scroll 0%; }
375 376 table.progress td.open { background: #FFF none repeat scroll 0%; }
376 377 p.pourcent {font-size: 80%;}
377 378 p.progress-info {clear: left; font-style: italic; font-size: 80%;}
378 379
379 380 /***** Tabs *****/
380 381 #content .tabs {height: 2.6em; border-bottom: 1px solid #bbbbbb; margin-bottom:1.2em; position:relative;}
381 382 #content .tabs ul {margin:0; position:absolute; bottom:-2px; padding-left:1em;}
382 383 #content .tabs>ul { bottom:-1px; } /* others */
383 384 #content .tabs ul li {
384 385 float:left;
385 386 list-style-type:none;
386 387 white-space:nowrap;
387 388 margin-right:8px;
388 389 background:#fff;
389 390 }
390 391 #content .tabs ul li a{
391 392 display:block;
392 393 font-size: 0.9em;
393 394 text-decoration:none;
394 395 line-height:1.3em;
395 396 padding:4px 6px 4px 6px;
396 397 border: 1px solid #ccc;
397 398 border-bottom: 1px solid #bbbbbb;
398 399 background-color: #eeeeee;
399 400 color:#777;
400 401 font-weight:bold;
401 402 }
402 403
403 404 #content .tabs ul li a:hover {
404 405 background-color: #ffffdd;
405 406 text-decoration:none;
406 407 }
407 408
408 409 #content .tabs ul li a.selected {
409 410 background-color: #fff;
410 411 border: 1px solid #bbbbbb;
411 412 border-bottom: 1px solid #fff;
412 413 }
413 414
414 415 #content .tabs ul li a.selected:hover {
415 416 background-color: #fff;
416 417 }
417 418
418 419 /***** Diff *****/
419 420 .diff_out { background: #fcc; }
420 421 .diff_in { background: #cfc; }
421 422
422 423 /***** Wiki *****/
423 424 div.wiki table {
424 425 border: 1px solid #505050;
425 426 border-collapse: collapse;
426 427 margin-bottom: 1em;
427 428 }
428 429
429 430 div.wiki table, div.wiki td, div.wiki th {
430 431 border: 1px solid #bbb;
431 432 padding: 4px;
432 433 }
433 434
434 435 div.wiki .external {
435 436 background-position: 0% 60%;
436 437 background-repeat: no-repeat;
437 438 padding-left: 12px;
438 439 background-image: url(../images/external.png);
439 440 }
440 441
441 442 div.wiki a.new {
442 443 color: #b73535;
443 444 }
444 445
445 446 div.wiki pre {
446 447 margin: 1em 1em 1em 1.6em;
447 448 padding: 2px;
448 449 background-color: #fafafa;
449 450 border: 1px solid #dadada;
450 451 width:95%;
451 452 overflow-x: auto;
452 453 }
453 454
454 455 div.wiki div.toc {
455 456 background-color: #ffffdd;
456 457 border: 1px solid #e4e4e4;
457 458 padding: 4px;
458 459 line-height: 1.2em;
459 460 margin-bottom: 12px;
460 461 margin-right: 12px;
461 462 display: table
462 463 }
463 464 * html div.wiki div.toc { width: 50%; } /* IE6 doesn't autosize div */
464 465
465 466 div.wiki div.toc.right { float: right; margin-left: 12px; margin-right: 0; width: auto; }
466 467 div.wiki div.toc.left { float: left; margin-right: 12px; margin-left: 0; width: auto; }
467 468
468 469 div.wiki div.toc a {
469 470 display: block;
470 471 font-size: 0.9em;
471 472 font-weight: normal;
472 473 text-decoration: none;
473 474 color: #606060;
474 475 }
475 476 div.wiki div.toc a:hover { color: #c61a1a; text-decoration: underline;}
476 477
477 478 div.wiki div.toc a.heading2 { margin-left: 6px; }
478 479 div.wiki div.toc a.heading3 { margin-left: 12px; font-size: 0.8em; }
479 480
480 481 /***** My page layout *****/
481 482 .block-receiver {
482 483 border:1px dashed #c0c0c0;
483 484 margin-bottom: 20px;
484 485 padding: 15px 0 15px 0;
485 486 }
486 487
487 488 .mypage-box {
488 489 margin:0 0 20px 0;
489 490 color:#505050;
490 491 line-height:1.5em;
491 492 }
492 493
493 494 .handle {
494 495 cursor: move;
495 496 }
496 497
497 498 a.close-icon {
498 499 display:block;
499 500 margin-top:3px;
500 501 overflow:hidden;
501 502 width:12px;
502 503 height:12px;
503 504 background-repeat: no-repeat;
504 505 cursor:pointer;
505 506 background-image:url('../images/close.png');
506 507 }
507 508
508 509 a.close-icon:hover {
509 510 background-image:url('../images/close_hl.png');
510 511 }
511 512
512 513 /***** Gantt chart *****/
513 514 .gantt_hdr {
514 515 position:absolute;
515 516 top:0;
516 517 height:16px;
517 518 border-top: 1px solid #c0c0c0;
518 519 border-bottom: 1px solid #c0c0c0;
519 520 border-right: 1px solid #c0c0c0;
520 521 text-align: center;
521 522 overflow: hidden;
522 523 }
523 524
524 525 .task {
525 526 position: absolute;
526 527 height:8px;
527 528 font-size:0.8em;
528 529 color:#888;
529 530 padding:0;
530 531 margin:0;
531 532 line-height:0.8em;
532 533 }
533 534
534 535 .task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }
535 536 .task_done { background:#66f url(../images/task_done.png); border: 1px solid #66f; }
536 537 .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }
537 538 .milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; }
538 539
539 540 /***** Icons *****/
540 541 .icon {
541 542 background-position: 0% 40%;
542 543 background-repeat: no-repeat;
543 544 padding-left: 20px;
544 545 padding-top: 2px;
545 546 padding-bottom: 3px;
546 547 }
547 548
548 549 .icon22 {
549 550 background-position: 0% 40%;
550 551 background-repeat: no-repeat;
551 552 padding-left: 26px;
552 553 line-height: 22px;
553 554 vertical-align: middle;
554 555 }
555 556
556 557 .icon-add { background-image: url(../images/add.png); }
557 558 .icon-edit { background-image: url(../images/edit.png); }
558 559 .icon-copy { background-image: url(../images/copy.png); }
559 560 .icon-del { background-image: url(../images/delete.png); }
560 561 .icon-move { background-image: url(../images/move.png); }
561 562 .icon-save { background-image: url(../images/save.png); }
562 563 .icon-cancel { background-image: url(../images/cancel.png); }
563 564 .icon-file { background-image: url(../images/file.png); }
564 565 .icon-folder { background-image: url(../images/folder.png); }
565 566 .open .icon-folder { background-image: url(../images/folder_open.png); }
566 567 .icon-package { background-image: url(../images/package.png); }
567 568 .icon-home { background-image: url(../images/home.png); }
568 569 .icon-user { background-image: url(../images/user.png); }
569 570 .icon-mypage { background-image: url(../images/user_page.png); }
570 571 .icon-admin { background-image: url(../images/admin.png); }
571 572 .icon-projects { background-image: url(../images/projects.png); }
572 573 .icon-logout { background-image: url(../images/logout.png); }
573 574 .icon-help { background-image: url(../images/help.png); }
574 575 .icon-attachment { background-image: url(../images/attachment.png); }
575 576 .icon-index { background-image: url(../images/index.png); }
576 577 .icon-history { background-image: url(../images/history.png); }
577 578 .icon-time { background-image: url(../images/time.png); }
578 579 .icon-stats { background-image: url(../images/stats.png); }
579 580 .icon-warning { background-image: url(../images/warning.png); }
580 581 .icon-fav { background-image: url(../images/fav.png); }
581 582 .icon-fav-off { background-image: url(../images/fav_off.png); }
582 583 .icon-reload { background-image: url(../images/reload.png); }
583 584 .icon-lock { background-image: url(../images/locked.png); }
584 585 .icon-unlock { background-image: url(../images/unlock.png); }
585 586 .icon-checked { background-image: url(../images/true.png); }
586 587 .icon-details { background-image: url(../images/zoom_in.png); }
587 588 .icon-report { background-image: url(../images/report.png); }
588 589
589 590 .icon22-projects { background-image: url(../images/22x22/projects.png); }
590 591 .icon22-users { background-image: url(../images/22x22/users.png); }
591 592 .icon22-tracker { background-image: url(../images/22x22/tracker.png); }
592 593 .icon22-role { background-image: url(../images/22x22/role.png); }
593 594 .icon22-workflow { background-image: url(../images/22x22/workflow.png); }
594 595 .icon22-options { background-image: url(../images/22x22/options.png); }
595 596 .icon22-notifications { background-image: url(../images/22x22/notifications.png); }
596 597 .icon22-authent { background-image: url(../images/22x22/authent.png); }
597 598 .icon22-info { background-image: url(../images/22x22/info.png); }
598 599 .icon22-comment { background-image: url(../images/22x22/comment.png); }
599 600 .icon22-package { background-image: url(../images/22x22/package.png); }
600 601 .icon22-settings { background-image: url(../images/22x22/settings.png); }
601 602 .icon22-plugin { background-image: url(../images/22x22/plugin.png); }
602 603
603 604 /***** Media print specific styles *****/
604 605 @media print {
605 606 #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; }
606 607 #main { background: #fff; }
607 608 #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; }
608 609 }
General Comments 0
You need to be logged in to leave comments. Login now