Mercurial > hg > soundsoftware-site
comparison app/controllers/projects_controller.rb @ 1007:3e52bc15dd67 browsing
Add browse page stub
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 09 Nov 2012 20:04:29 +0000 |
parents | ec1c49528f36 |
children | 066b55d7c053 |
comparison
equal
deleted
inserted
replaced
1006:4ffe9098c16c | 1007:3e52bc15dd67 |
---|---|
18 class ProjectsController < ApplicationController | 18 class ProjectsController < ApplicationController |
19 menu_item :overview | 19 menu_item :overview |
20 menu_item :roadmap, :only => :roadmap | 20 menu_item :roadmap, :only => :roadmap |
21 menu_item :settings, :only => :settings | 21 menu_item :settings, :only => :settings |
22 | 22 |
23 before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ] | 23 before_filter :find_project, :except => [ :index, :list, :browse, :new, :create, :copy ] |
24 before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy] | 24 before_filter :authorize, :except => [ :index, :list, :browse, :new, :create, :copy, :archive, :unarchive, :destroy] |
25 before_filter :authorize_global, :only => [:new, :create] | 25 before_filter :authorize_global, :only => [:new, :create] |
26 before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] | 26 before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] |
27 accept_rss_auth :index | 27 accept_rss_auth :index |
28 accept_api_auth :index, :show, :create, :update, :destroy | 28 accept_api_auth :index, :show, :create, :update, :destroy |
29 | 29 |
74 render_feed(projects, :title => "#{Setting.app_title}: #{l(:label_project_latest)}") | 74 render_feed(projects, :title => "#{Setting.app_title}: #{l(:label_project_latest)}") |
75 } | 75 } |
76 end | 76 end |
77 end | 77 end |
78 | 78 |
79 # A different view of projects using browse boxes | |
80 def browse | |
81 respond_to do |format| | |
82 format.html { | |
83 @projects = Project.visible | |
84 render :template => 'projects/browse.html.erb', :layout => !request.xhr? | |
85 } | |
86 end | |
87 end | |
88 | |
79 def new | 89 def new |
80 @issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position") | 90 @issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position") |
81 @trackers = Tracker.all | 91 @trackers = Tracker.all |
82 @project = Project.new | 92 @project = Project.new |
83 @project.safe_attributes = params[:project] | 93 @project.safe_attributes = params[:project] |