mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Remove unused new user_my_module view
This commit is contained in:
parent
6999105e51
commit
911b7ba72f
3 changed files with 2 additions and 23 deletions
|
@ -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
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<% provide(:head_title, raw(t("user_my_modules.new.head_title", project: @my_module.project.name, module: @my_module.name))) %>
|
||||
<h2><%=t "user_my_modules.new.title", module: @my_module.name %></h2>
|
||||
|
||||
<%= bootstrap_form_for [@my_module, @um] do |f| %>
|
||||
<% if @users.empty? then %>
|
||||
<h4><%= t("user_my_modules.new.no_users_available") %></h4>
|
||||
<%= link_to t("user_my_modules.new.back_button"), :back %>
|
||||
<% else %>
|
||||
<%= collection_select(:user_my_module, :user_id, @users, :id, :full_name ) %>
|
||||
<br />
|
||||
<%= f.submit t("user_my_modules.new.assign_user"), style: "margin-top: 10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue