Added stub for add_collaborators action.

This commit is contained in:
George Vinogradov 2011-10-29 19:56:44 +04:00
parent 6f256a40eb
commit 411e40267a
4 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,6 @@
class ProjectsController < ApplicationController
before_filter :authenticate_user!, :except => :auto_build
before_filter :find_project, :only => [:show, :edit, :update, :destroy, :build, :process_build]
before_filter :find_project, :only => [:show, :edit, :update, :destroy, :build, :process_build, :add_collaborators]
before_filter :get_paths, :only => [:new, :create, :edit, :update]
before_filter :check_global_access, :except => :auto_build
@ -102,6 +102,15 @@ class ProjectsController < ApplicationController
end
end
def add_collaborators
if request.post?
# some stuff
redirect_to project_path(@project)
else
# display template
end
end
protected
def get_paths

View File

@ -7,6 +7,7 @@
.content
%h2.title= t("layout.projects.edit_header")
= link_to '(' + t("layout.projects.add_collaborators") + ')', add_collaborators_project_path(@project)
.inner
= form_for @project, :html => { :class => :form } do |f|
= render :partial => "form", :locals => {:f => f}

View File

@ -181,6 +181,7 @@ ru:
current_project_header: Текущий проект
current_build_lists: Текущие сборки
build_button: Начать сборку
add_collaborators: Добавить коллабораторов
groups:
list: Список

View File

@ -80,6 +80,9 @@ Rosa::Application.routes.draw do
member do
get :build
post :process_build
get :add_collaborators
post :add_collaborators
end
collection do
get :auto_build