Commit fe89e84dd6c0c84e84d66e7ab62bd5c6b5b84855
- Date: Sun May 25 16:07:31 +0000 2008
- Committer: mtkd (mtkd@prj2.com)
- Author: mtkd (mtkd@prj2.com)
- Commit SHA1: fe89e84dd6c0c84e84d66e7ab62bd5c6b5b84855
- Tree SHA1: 3913dac990e4ef64815ad30c8941f33b44912352
- app/helpers/tickets_helper.rb 2 -+
- app/helpers/milestones_helper.rb 2 ++
- app/controllers/milestones_controller.rb 2 ++
- test/functional/components_controller_test.rb 8 ++++++++
- test/functional/milestones_controller_test.rb 8 ++++++++
- app/views/tickets/_ac_right_ticket_filter.html.erb 30 ---------------+++++++++++++++
- config/routes.rb 27 ----------------+++++++++++
- app/helpers/projects_helper.rb 7 ----+++
- app/controllers/tickets_controller.rb 2 -+
- app/helpers/components_helper.rb 2 ++
- app/helpers/application_helper.rb 8 ----++++
- app/controllers/components_controller.rb 2 ++
Commit diff
- Diff rendering mode:
- inline
- side by side
app/controllers/components_controller.rb
|   | ||
| 1 | class ComponentsController < ApplicationController | |
| 2 | end | |
| toggle raw diff | ||
app/controllers/milestones_controller.rb
|   | ||
| 1 | class MilestonesController < ApplicationController | |
| 2 | end | |
| toggle raw diff | ||
app/controllers/tickets_controller.rb
|   | ||
| 4 | 4 | |
| 5 | 5 | def index |
| 6 | 6 | @title, @url_suffix = Project.tab_settings(PRJ_TAB_TICKETS) |
| 7 | ||
| 7 | @tickets = Ticket.filtered(params[:ticketfilter] ? params[:ticketfilter] : "") | |
| 8 | 8 | @current_milestone = Milestone.find_current_milestone(@project.id) |
| 9 | 9 | #@assignees = @project.tickets.assignees |
| 10 | 10 | render :action => "ac_project_index" |
| toggle raw diff | ||
app/helpers/application_helper.rb
|   | ||
| 339 | 339 | acts << %Q{<li>#{link_to("Close Ticket", root_path)}</li>} if flags[:close_ticket] |
| 340 | 340 | acts << %Q{<li>#{link_to("List Tickets", project_tickets_path(@project.slug))}</li>} if flags[:list_tickets] |
| 341 | 341 | acts << %Q{<li>#{link_to("New Milestone", new_project_milestone_path(@project.slug))}</li>} if flags[:new_milestone] && @is_member |
| 342 | ||
| 343 | ||
| 344 | ||
| 345 | ||
| 342 | # acts << %Q{<li>#{link_to("List Active Milestones", root_path)}</li>} if flags[:list_active_milestones] | |
| 343 | # acts << %Q{<li>#{link_to("List Completed Milestones", root_path)}</li>} if flags[:list_completed_milestones] | |
| 344 | acts << %Q{<li>#{link_to("Manage Milestones", project_milestones_path)}</li>} if flags[:manage_milestones] && @is_member | |
| 345 | acts << %Q{<li>#{link_to("Manage Components", project_components_path)}</li>} if flags[:manage_components] && @is_member | |
| 346 | 346 | acts << %Q{<li>#{link_to("New Member", root_path)}</li>} if flags[:new_member] && @is_member |
| 347 | 347 | acts << %Q{<li>#{link_to("List Members", root_path)}</li>} if flags[:list_members] |
| 348 | 348 | acts << %Q{<li>#{link_to("Clone Mainline", new_project_repository_path(@project.slug, @repository))}</li>} if flags[:clone_mainline] && logged_in? |
| toggle raw diff | ||
app/helpers/components_helper.rb
|   | ||
| 1 | module ComponentsHelper | |
| 2 | end | |
| toggle raw diff | ||
app/helpers/milestones_helper.rb
|   | ||
| 1 | module MilestonesHelper | |
| 2 | end | |
| toggle raw diff | ||
app/helpers/projects_helper.rb
|   | ||
| 132 | 132 | when PRJ_TAB_TICKETS |
| 133 | 133 | case subtab |
| 134 | 134 | when PRJ_TAB_SUBTAB_NONE |
| 135 | ||
| 136 | ||
| 137 | ||
| 135 | out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true, :manage_milestones => true, :manage_components => true) | |
| 138 | 136 | out << render(:partial => "ac_right_ticket_filter") |
| 139 | 137 | when PRJ_TAB_TICKETS_SHOW |
| 140 | 138 | out << actionbox_complex(:allow_shortcuts => true, :list_tickets => true, :edit_ticket => true, :close_ticket => true) |
| … | … | |
| 146 | 146 | when PRJ_TAB_WIKI_LIST |
| 147 | 147 | out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true) |
| 148 | 148 | else |
| 149 | ||
| 149 | out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, | |
| 150 | :list_project_wikis => true) | |
| 150 | 151 | end |
| 151 | 152 | when PRJ_TAB_ARTICLES |
| 152 | 153 | case subtab |
| toggle raw diff | ||
app/helpers/tickets_helper.rb
|   | ||
| 3 | 3 | include ProjectsHelper |
| 4 | 4 | |
| 5 | 5 | def ticket_value_checked? (v) |
| 6 | ||
| 6 | params[:ticketfilter][v] == "1" ? "checked" : "" if params[:ticketfilter] | |
| 7 | 7 | end |
| 8 | 8 | |
| 9 | 9 | |
| toggle raw diff | ||
app/views/tickets/_ac_right_ticket_filter.html.erb
|   | ||
| 1 | 1 | |
| 2 | 2 | <table class='right_default_table' cellspacing=0px> |
| 3 | 3 | |
| 4 | ||
| 5 | ||
| 4 | <% form_for :ticketfilter, :url => project_tickets_path(@project.slug), :html => {:method => :get, :name => 'ticketfilter', :id => 'input'} do |f| %> | |
| 5 | ||
| 6 | 6 | <tr><th colspan=2>Ticket Filter</th></tr> |
| 7 | 7 | |
| 8 | 8 | <tr> |
| 9 | 9 | |
| 10 | 10 | <td><small> |
| 11 | 11 | <br /> |
| 12 | ||
| 13 | ||
| 14 | ||
| 12 | <%= check_box(:ticketfilter, :ttype_defect, {:checked => ticket_value_checked?(:ttype_defect)}, "1", "0") %>Defect<br /> | |
| 13 | <%= check_box(:ticketfilter, :ttype_enhancement, {:checked => ticket_value_checked?(:ttype_enhancement)}, "1", "0") %>Enhancement<br /> | |
| 14 | <%= check_box(:ticketfilter, :ttype_task, {:checked => ticket_value_checked?(:ttype_task)}, "1", "0") %>Task<br /> | |
| 15 | 15 | <br /> |
| 16 | ||
| 17 | ||
| 18 | ||
| 16 | <%= check_box(:ticketfilter, :status_proposed, {:checked => ticket_value_checked?(:status_proposed)}, "1", "0") %>Proposed<br /> | |
| 17 | <%= check_box(:ticketfilter, :status_open, {:checked => ticket_value_checked?(:status_open)}, "1", "0") %>Open<br /> | |
| 18 | <%= check_box(:ticketfilter, :status_closed, {:checked => ticket_value_checked?(:status_closed)}, "1", "0") %>Closed<br /> | |
| 19 | 19 | <br /> |
| 20 | 20 | </small></td> |
| 21 | 21 | |
| 22 | 22 | <td><small> |
| 23 | 23 | <br /> |
| 24 | ||
| 25 | ||
| 26 | ||
| 24 | <%= check_box(:ticketfilter, :impact_low, {:checked => ticket_value_checked?(:impact_low)}, "1", "0") %>Low Impact<br /> | |
| 25 | <%= check_box(:ticketfilter, :impact_high, {:checked => ticket_value_checked?(:impact_high)}, "1", "0") %>High Impact<br /> | |
| 26 | <%= check_box(:ticketfilter, :impact_security, {:checked => ticket_value_checked?(:impact_security)}, "1", "0") %>Security Impact<br /> | |
| 27 | 27 | <br /> |
| 28 | ||
| 29 | ||
| 30 | ||
| 31 | ||
| 28 | <%= check_box(:ticketfilter, :priority_none, {:checked => ticket_value_checked?(:priority_none)}, "1", "0") %>No Priority<br /> | |
| 29 | <%= check_box(:ticketfilter, :priority_low, {:checked => ticket_value_checked?(:priority_low)}, "1", "0") %>Low Priority<br /> | |
| 30 | <%= check_box(:ticketfilter, :priority_high, {:checked => ticket_value_checked?(:priority_high)}, "1", "0") %>High Priority<br /> | |
| 31 | <%= check_box(:ticketfilter, :priority_critical, {:checked => ticket_value_checked?(:priority_critical)}, "1", "0") %>Critical<br /> | |
| 32 | 32 | <br /> |
| 33 | 33 | </small></td> |
| 34 | 34 | |
| toggle raw diff | ||
config/routes.rb
|   | ||
| 22 | 22 | :team => :get, |
| 23 | 23 | :log => :get, |
| 24 | 24 | :config => :get |
| 25 | ||
| 25 | } do |projects| | |
| 26 | 26 | projects.resources(:repositories, :member => { |
| 27 | 27 | :new => :get, :create => :post, |
| 28 | 28 | :writable_by => :get, |
| … | … | |
| 31 | 31 | repo.resources :committers, :name_prefix => nil, :collection => {:auto_complete_for_user_login => :post, :list => :get, :create => :post} |
| 32 | 32 | repo.resources :comments, :member => { :commmit => :get } |
| 33 | 33 | repo.resources :merge_requests, :member => { :resolve => :put }, :collection => { :create => :post } |
| 34 | ||
| 35 | ||
| 36 | ||
| 34 | repo.commit_comment "comments/commit/:sha", :controller => "comments", :action => "commit", :conditions => { :method => :get } | |
| 37 | 35 | repo.resources :logs, :requirements => { :id => VALID_SHA }#, :member => { :feed => :get } |
| 38 | ||
| 39 | ||
| 36 | repo.formatted_log_feed "logs/:id/feed.:format", :controller => "logs", :action => "feed", :conditions => {:feed => :get}, :requirements => {:id => VALID_SHA} | |
| 40 | 37 | repo.resources :commits |
| 41 | ||
| 38 | repo.trees "trees/", :controller => "trees", :action => "index" | |
| 42 | 39 | repo.with_options(:requirements => { :id => VALID_SHA }) do |r| |
| 43 | 40 | r.tree "trees/:id/*path", :controller => "trees", :action => "show" |
| 44 | 41 | r.formatted_tree "trees/:id/*path.:format", :controller => "trees", :action => "show" |
| … | … | |
| 43 | 43 | r.raw_blob "blobs/raw/:id/*path", :controller => "blobs", :action => "raw" |
| 44 | 44 | r.blob "blobs/:id/*path", :controller => "blobs", :action => "show" |
| 45 | 45 | end |
| 46 | ||
| 47 | ||
| 48 | ||
| 49 | ||
| 50 | ||
| 51 | ||
| 52 | ||
| 53 | ||
| 54 | 46 | end |
| 55 | ||
| 47 | projects.resources(:articles) | |
| 48 | projects.resources(:members) | |
| 49 | projects.resources(:messages) | |
| 50 | projects.resources(:wikis) | |
| 51 | projects.resources(:milestones) | |
| 52 | projects.resources(:tickets, :member => {:close => :get}) | |
| 53 | projects.resources(:components) | |
| 56 | 54 | end |
| 57 | 55 | |
| 58 | 56 | map.resource :search |
| toggle raw diff | ||
test/functional/components_controller_test.rb
|   | ||
| 1 | require File.dirname(__FILE__) + '/../test_helper' | |
| 2 | ||
| 3 | class ComponentsControllerTest < ActionController::TestCase | |
| 4 | # Replace this with your real tests. | |
| 5 | def test_truth | |
| 6 | assert true | |
| 7 | end | |
| 8 | end | |
| toggle raw diff | ||
test/functional/milestones_controller_test.rb
|   | ||
| 1 | require File.dirname(__FILE__) + '/../test_helper' | |
| 2 | ||
| 3 | class MilestonesControllerTest < ActionController::TestCase | |
| 4 | # Replace this with your real tests. | |
| 5 | def test_truth | |
| 6 | assert true | |
| 7 | end | |
| 8 | end | |
| toggle raw diff | ||
