diff --git a/app/controllers/user_my_modules_controller.rb b/app/controllers/user_my_modules_controller.rb index 3b1ce6f34..17d2264db 100644 --- a/app/controllers/user_my_modules_controller.rb +++ b/app/controllers/user_my_modules_controller.rb @@ -2,7 +2,7 @@ class UserMyModulesController < ApplicationController before_action :load_vars before_action :check_view_permissions, only: [ :index ] before_action :check_edit_permissions, only: [ :index_edit ] - before_action :check_create_permissions, only: [:new, :create] + before_action :check_create_permissions, only: [:create] before_action :check_delete_permisisons, only: [:destroy] def index @@ -36,14 +36,6 @@ class UserMyModulesController < ApplicationController end end - def new - @um = UserMyModule.new( - my_module: @my_module - ) - init_gui - session[:return_to] ||= request.referer - end - def create @um = UserMyModule.new(um_params.merge(my_module: @my_module)) @um.assigned_by = current_user diff --git a/app/views/user_my_modules/new.html.erb b/app/views/user_my_modules/new.html.erb deleted file mode 100644 index a65df6405..000000000 --- a/app/views/user_my_modules/new.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<% provide(:head_title, raw(t("user_my_modules.new.head_title", project: @my_module.project.name, module: @my_module.name))) %> -

<%=t "user_my_modules.new.title", module: @my_module.name %>

- -<%= bootstrap_form_for [@my_module, @um] do |f| %> - <% if @users.empty? then %> -

<%= t("user_my_modules.new.no_users_available") %>

- <%= link_to t("user_my_modules.new.back_button"), :back %> - <% else %> - <%= collection_select(:user_my_module, :user_id, @users, :id, :full_name ) %> -
- <%= f.submit t("user_my_modules.new.assign_user"), style: "margin-top: 10px;" %> - <% end %> -<% end %> diff --git a/config/routes.rb b/config/routes.rb index a15f48668..5e55ab36d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -172,7 +172,7 @@ Rails.application.routes.draw do # as well as "module info" page for single module (HTML) resources :my_modules, path: "/modules", only: [:show, :update, :destroy] do resources :my_module_tags, path: "/tags", only: [:index, :create, :update, :destroy] - resources :user_my_modules, path: "/users", only: [:index, :new, :create, :destroy] + resources :user_my_modules, path: "/users", only: [:index, :create, :destroy] resources :my_module_comments, path: '/comments', only: [:index, :create, :edit, :update, :destroy]