diff --git a/app/controllers/user_projects_controller.rb b/app/controllers/user_projects_controller.rb index 9097c2bf1..abc24b923 100644 --- a/app/controllers/user_projects_controller.rb +++ b/app/controllers/user_projects_controller.rb @@ -4,7 +4,7 @@ class UserProjectsController < ApplicationController before_action :load_vars before_action :check_view_tab_permissions, only: [ :index ] before_action :check_view_permissions, only: [ :index_edit ] - before_action :check_create_permissions, only: [:new, :create] + before_action :check_create_permissions, only: [:create] # TODO check update permissions before_action :check_update_permisisons, only: [:update] before_action :check_delete_permisisons, only: [:destroy] @@ -44,13 +44,6 @@ class UserProjectsController < ApplicationController end end - def new - @up = UserProject.new( - project: @project - ) - init_gui - end - def create @up = UserProject.new(up_params.merge(project: @project)) @up.assigned_by = current_user @@ -109,10 +102,6 @@ class UserProjectsController < ApplicationController end end - def edit - @up = UserProject.find(params[:id]) - end - def update @up = UserProject.find(params[:id]) diff --git a/app/views/user_projects/edit.html.erb b/app/views/user_projects/edit.html.erb deleted file mode 100644 index 33e91e398..000000000 --- a/app/views/user_projects/edit.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<% provide(:head_title, raw(t("user_projects.edit.head_title", project: @project.name))) %> -

<%=t "user_projects.edit.title", user: @up.user.full_name, project: @project.name %>

- -<%= bootstrap_form_for [@project, @up] do |f| %> - <%= f.label t("user_projects.new.role"), style: "margin-top: 10px;" %>
-
- - - - -
-
- <%= f.submit t("user_projects.edit.update"), style: "margin-top: 10px;" %> -<% end %> \ No newline at end of file diff --git a/app/views/user_projects/new.html.erb b/app/views/user_projects/new.html.erb deleted file mode 100644 index 7a5edf0ff..000000000 --- a/app/views/user_projects/new.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -<% provide(:head_title, raw(t("user_projects.new.head_title", project: @project.name))) %> -

<%=t "user_projects.new.title", project: @project.name %>

- -<%= bootstrap_form_for [@project, @up] do |f| %> - <%= collection_select(:user_project, :user_id, @users, :id, :full_name ) %> -
- <%= f.label t("user_projects.new.role"), style: "margin-top: 10px;" %>
-
- - - - -
-
- <%= f.submit t("user_projects.new.create"), style: "margin-top: 10px;" %> -<% end %> diff --git a/config/routes.rb b/config/routes.rb index 5e55ab36d..be458eae7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -74,7 +74,7 @@ Rails.application.routes.draw do get 'projects/archive', to: 'projects#archive', as: 'projects_archive' resources :projects, except: [:new, :destroy] do - resources :user_projects, path: "/users", only: [:new, :create, :index, :edit, :update, :destroy] + resources :user_projects, path: "/users", only: [:create, :index, :update, :destroy] resources :project_comments, path: '/comments', only: [:create, :index, :edit, :update, :destroy]