Mercurial > hg > soundsoftware-site
comparison app/controllers/.svn/text-base/context_menus_controller.rb.svn-base @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 8661b858af72 |
children |
comparison
equal
deleted
inserted
replaced
245:051f544170fe | 441:cbce1fd3b1b7 |
---|---|
1 class ContextMenusController < ApplicationController | 1 class ContextMenusController < ApplicationController |
2 helper :watchers | 2 helper :watchers |
3 helper :issues | |
3 | 4 |
4 def issues | 5 def issues |
5 @issues = Issue.visible.all(:conditions => {:id => params[:ids]}, :include => :project) | 6 @issues = Issue.visible.all(:conditions => {:id => params[:ids]}, :include => :project) |
6 | 7 |
7 if (@issues.size == 1) | 8 if (@issues.size == 1) |
38 @statuses = IssueStatus.find(:all, :order => 'position') | 39 @statuses = IssueStatus.find(:all, :order => 'position') |
39 @back = back_url | 40 @back = back_url |
40 | 41 |
41 render :layout => false | 42 render :layout => false |
42 end | 43 end |
43 | 44 |
45 def time_entries | |
46 @time_entries = TimeEntry.all( | |
47 :conditions => {:id => params[:ids]}, :include => :project) | |
48 @projects = @time_entries.collect(&:project).compact.uniq | |
49 @project = @projects.first if @projects.size == 1 | |
50 @activities = TimeEntryActivity.shared.active | |
51 @can = {:edit => User.current.allowed_to?(:log_time, @projects), | |
52 :update => User.current.allowed_to?(:log_time, @projects), | |
53 :delete => User.current.allowed_to?(:log_time, @projects) | |
54 } | |
55 @back = back_url | |
56 render :layout => false | |
57 end | |
44 end | 58 end |