mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 06:44:55 +08:00
Check what's up with user_my_modules_controller#index_old action, and remove/rename it [SCI-7848]
This commit is contained in:
parent
00d99ee296
commit
b06b5c4d1f
4 changed files with 6 additions and 6 deletions
|
@ -7,14 +7,14 @@ class UserMyModulesController < ApplicationController
|
|||
before_action :check_view_permissions, except: %i(create destroy)
|
||||
before_action :check_manage_permissions, only: %i(create destroy)
|
||||
|
||||
def index_old
|
||||
def assignees
|
||||
@user_my_modules = @my_module.user_my_modules
|
||||
|
||||
respond_to do |format|
|
||||
format.json do
|
||||
render json: {
|
||||
html: render_to_string(
|
||||
partial: 'index_old.html.erb'
|
||||
partial: 'assignees.html.erb'
|
||||
),
|
||||
my_module_id: @my_module.id,
|
||||
counter: @my_module.designated_users.count # Used for counter badge
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
data-module-x="<%= my_module.x %>"
|
||||
data-module-y="<%= my_module.y %>"
|
||||
data-module-conns="<%= construct_module_connections(my_module) %>"
|
||||
data-module-users-tab-url="<%= index_old_my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>"
|
||||
data-module-users-tab-url="<%= assignees_my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>"
|
||||
data-module-tags-url="<%= my_module_tags_experiment_path(my_module.experiment, format: :json) %>">
|
||||
|
||||
<div data-view-mode="active">
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div class="panel-footer panel-footer-scinote buttons-container">
|
||||
<ul class="nav nav-tabs nav-tabs-less" role="tablist">
|
||||
<li role="presentation">
|
||||
<a class="btn btn-link task-card-view-users" href="<%= index_old_my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>" aria-controls="<%= my_module.id %>_users" role="tab" data-remote="true">
|
||||
<a class="btn btn-link task-card-view-users" href="<%= assignees_my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>" aria-controls="<%= my_module.id %>_users" role="tab" data-remote="true">
|
||||
<span class="fas fa-users" aria-hidden="true"></span>
|
||||
<span class="badge badge-indicator users-badge-indicator <%= 'hidden' unless my_module.designated_users_count.positive? %>"
|
||||
data-linked-id="<%= my_module.id %>">
|
||||
|
|
|
@ -6,7 +6,7 @@ describe UserMyModulesController, type: :controller do
|
|||
include PermissionExtends
|
||||
|
||||
it_behaves_like "a controller with authentication", {
|
||||
index_old: { my_module_id: 1 },
|
||||
assignees: { my_module_id: 1 },
|
||||
index: { my_module_id: 1 },
|
||||
index_edit: { my_module_id: 1 },
|
||||
search: { my_module_id: 1, id: 1 },
|
||||
|
@ -21,7 +21,7 @@ describe UserMyModulesController, type: :controller do
|
|||
team_role: :normal_user
|
||||
}
|
||||
|
||||
it_behaves_like "a controller action with permissions checking", :get, :index_old do
|
||||
it_behaves_like "a controller action with permissions checking", :get, :assignees do
|
||||
let(:testable) { my_module }
|
||||
let(:permissions) { [MyModulePermissions::READ] }
|
||||
let(:action_params) { { my_module_id: my_module.id } }
|
||||
|
|
Loading…
Reference in a new issue