Changesets can be listed by changeset number.
The Git repository is here.
Changeset 321
Sort Parts by name whenever Parts are listed in views.
- Comitted by: rool
- Date: Friday March 18 14:39:24 2011 (over 13 years ago)
Affected files:
- rool/rails/collaboa/trunk/app/controllers/admin/parts_controller.rb (diff)
- rool/rails/collaboa/trunk/app/controllers/tickets_controller.rb (diff)
rool/rails/collaboa/trunk/app/controllers/admin/parts_controller.rb:
prev. | current | |
class Admin::PartsController < AdminAreaController | ||
def index | ||
4 | | |
4 | @parts = Part.find(:all, :order => 'name ASC') | |
@part = Part.new(params[:part]) | ||
6 | | |
6 | ||
if request.post? && @part.save | ||
redirect_to :action => 'index' | ||
end | ||
end | ||
11 | | |
11 | ||
def edit | ||
@part = Part.find(params[:id]) | ||
@part.attributes = params[:part] | ||
... | ... | |
redirect_to :action => 'index' | ||
end | ||
end | ||
19 | | |
19 | ||
def delete | ||
#if request.post? | ||
part = Part.find(params[:id]) rescue nil | ||
23 | | |
23 | redirect_to :action => 'index' unless part | |
part.destroy | ||
redirect_to :action => 'index' | ||
#end |
rool/rails/collaboa/trunk/app/controllers/tickets_controller.rb:
prev. | current | |
sort_update | ||
@milestones = Milestone.find(:all) | ||
29 | | |
29 | @parts = Part.find(:all, :order => 'name ASC') | |
@severities = Severity.find(:all, :order => 'position DESC') | ||
@status = Status.find(:all) | ||
logger.info "sort_clause: #{sort_clause}" | ||
... | ... | |
def show | ||
@milestones = Milestone.find(:all) | ||
39 | | |
39 | @parts = Part.find(:all, :order => 'name ASC') | |
@severities = Severity.find(:all, :order => 'position DESC') | ||
@releases = Release.find(:all) | ||
@status = Status.find(:all) | ||
... | ... | |
def comment | ||
@milestones = Milestone.find(:all) | ||
53 | | |
53 | @parts = Part.find(:all, :order => 'name ASC') | |
@severities = Severity.find(:all, :order => 'position DESC') | ||
@releases = Release.find(:all) | ||
@status = Status.find(:all) | ||
... | ... | |
def new | ||
@milestones = Milestone.find(:all, :conditions => "completed = 0") | ||
94 | | |
94 | @parts = Part.find(:all, :order => 'name ASC') | |
@severities = Severity.find(:all, :order => 'position DESC') | ||
@releases = Release.find(:all) | ||