diff --git a/app/controllers/my_module_tags_controller.rb b/app/controllers/my_module_tags_controller.rb
index 308cf1f6d..87e5eac9a 100644
--- a/app/controllers/my_module_tags_controller.rb
+++ b/app/controllers/my_module_tags_controller.rb
@@ -1,7 +1,7 @@
class MyModuleTagsController < ApplicationController
before_action :load_vars
before_action :check_view_permissions, only: [:index_edit]
- before_action :check_create_permissions, only: [:new, :create]
+ before_action :check_create_permissions, only: [:create]
before_action :check_destroy_permissions, only: [:destroy]
def index_edit
@@ -22,12 +22,6 @@ class MyModuleTagsController < ApplicationController
end
end
- def new
- session[:return_to] ||= request.referer
- @mt = MyModuleTag.new(my_module: @my_module)
- init_gui
- end
-
def create
@mt = MyModuleTag.new(mt_params.merge(my_module: @my_module))
@mt.created_by = current_user
diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb
index 4707c8f46..a222066b4 100644
--- a/app/controllers/my_modules_controller.rb
+++ b/app/controllers/my_modules_controller.rb
@@ -3,7 +3,7 @@ class MyModulesController < ApplicationController
include OrganizationsHelper
before_action :load_vars, only: [
- :show, :edit, :update, :destroy,
+ :show, :update, :destroy,
:description, :due_date, :protocols, :results,
:samples, :activities, :activities_tab,
:assign_samples, :unassign_samples,
@@ -11,7 +11,7 @@ class MyModulesController < ApplicationController
:samples_index, :archive]
before_action :load_vars_nested, only: [:new, :create]
before_action :check_edit_permissions, only: [
- :edit, :update, :description, :due_date
+ :update, :description, :due_date
]
before_action :check_destroy_permissions, only: [:destroy]
before_action :check_view_info_permissions, only: [:show]
@@ -34,7 +34,6 @@ class MyModulesController < ApplicationController
def show
respond_to do |format|
- format.html
format.json {
render :json => {
:html => render_to_string({
@@ -131,10 +130,6 @@ class MyModulesController < ApplicationController
end
end
- def edit
- session[:return_to] ||= request.referer
- end
-
def update
@my_module.assign_attributes(my_module_params)
@my_module.last_modified_by = current_user
@@ -192,11 +187,6 @@ class MyModulesController < ApplicationController
respond_to do |format|
if saved
- format.html {
- flash[:success] = t("my_modules.update.success_flash",
- module: @my_module.name)
- redirect_to(:back)
- }
format.json {
alerts = []
alerts << "alert-red" if @my_module.is_overdue?
@@ -219,9 +209,6 @@ class MyModulesController < ApplicationController
}
}
else
- format.html {
- render :edit
- }
format.json {
render json: @my_module.errors,
status: :unprocessable_entity
diff --git a/app/controllers/project_comments_controller.rb b/app/controllers/project_comments_controller.rb
index bca0ff747..ca9c9b1e0 100644
--- a/app/controllers/project_comments_controller.rb
+++ b/app/controllers/project_comments_controller.rb
@@ -57,12 +57,6 @@ class ProjectCommentsController < ApplicationController
)
)
- format.html {
- flash[:success] = t(
- "project_comments.create.success_flash",
- project: @project.name)
- redirect_to projects_path
- }
format.json {
render json: {
html: render_to_string(
@@ -76,7 +70,6 @@ class ProjectCommentsController < ApplicationController
}
else
response.status = 400
- format.html { render :new }
format.json {
render json: {
errors: @comment.errors.to_hash(true)
diff --git a/app/controllers/result_comments_controller.rb b/app/controllers/result_comments_controller.rb
index 784fd2b13..09f3c6533 100644
--- a/app/controllers/result_comments_controller.rb
+++ b/app/controllers/result_comments_controller.rb
@@ -56,11 +56,6 @@ class ResultCommentsController < ApplicationController
)
)
- format.html {
- flash[:success] = t(
- "result_comments.create.success_flash")
- redirect_to session.delete(:return_to)
- }
format.json {
render json: {
html: render_to_string(
@@ -75,7 +70,6 @@ class ResultCommentsController < ApplicationController
}
else
response.status = 400
- format.html { render :new }
format.json {
render json: {
errors: @comment.errors.to_hash(true)
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 1f1fdff38..bbf4981ef 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -235,8 +235,6 @@ en:
page_title: "Project's experiments"
samples:
head_title: "%{project} | Sample library"
- activities:
- head_title: "%{project} | Activity"
reports:
print_title: "%{project} | Report"
index:
@@ -443,27 +441,12 @@ en:
error_flash: "User %{user} not removed from project %{project}."
my_modules:
- show:
- head_title: "%{project} | %{module}"
- archive_action: "Archive"
- archive_confirm_text: "All samples will be unassigned from the
- task when archiving. Are you sure to archive task?"
- edit:
- head_title: "%{project} | %{module} | Edit"
- title: "Edit task %{module}"
- name: "Task name"
- due_date: "Due date"
- save: "Save task"
description:
title: "Edit task %{module} description"
label: "Description"
due_date:
title: "Edit task %{module} due date"
label: "Due date"
- update:
- success_flash: "Successfully modified task %{module}."
- destroy:
- success_flash: "Successfully removed task %{module} from project %{project}."
samples:
head_title: "%{project} | %{module} | Sample library"
module_archive:
@@ -775,14 +758,6 @@ en:
success_flash: "Successfully removed tag %{tag}."
error_flash: "Could not remove tag %{tag}."
- project_comments:
- new:
- head_title: "%{project} | Add comment"
- title: "Add comment to project %{project}"
- create: "Add comment"
- create:
- success_flash: "Successfully added comment to project %{project}."
-
result_texts:
new:
head_title: "%{project} | %{module} | Add text result"
@@ -1064,14 +1039,6 @@ en:
create:
success_flash: "Successfully added comment to step %{step}."
- result_comments:
- new:
- head_title: "%{project} | %{module} | Add comment to result"
- title: "Add comment to result"
- create: "Add comment"
- create:
- success_flash: "Successfully added comment to result."
-
users:
enums:
status:
diff --git a/config/routes.rb b/config/routes.rb
index 517884abf..129526ec3 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -171,8 +171,8 @@ Rails.application.routes.draw do
# Show action is a popup (JSON) for individual module in full-zoom canvas,
# 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 :my_modules, path: '/modules', only: [:show, :update] do
+ resources :my_module_tags, path: "/tags", only: [:index, :create, :destroy]
resources :user_my_modules, path: '/users',
only: [:index, :create, :destroy]
resources :my_module_comments,