diff --git a/app/assets/javascripts/label_templates/label_templates_datatable.js b/app/assets/javascripts/label_templates/label_templates_datatable.js
index ab13402cc..4ae3cba47 100644
--- a/app/assets/javascripts/label_templates/label_templates_datatable.js
+++ b/app/assets/javascripts/label_templates/label_templates_datatable.js
@@ -23,10 +23,10 @@
return uniqueFormats[0];
}
- function renderCheckboxHTML(data, type, row) {
+ function renderCheckboxHTML(data) {
return `
+ data-label-template-id="${data}">
`;
}
diff --git a/app/controllers/label_templates_controller.rb b/app/controllers/label_templates_controller.rb
index ee585ba28..b19a67400 100644
--- a/app/controllers/label_templates_controller.rb
+++ b/app/controllers/label_templates_controller.rb
@@ -31,7 +31,6 @@ class LabelTemplatesController < ApplicationController
format.json do
render json: ::LabelTemplateDatatable.new(
view_context,
- can_manage_label_templates?(current_team),
@label_templates
)
end
diff --git a/app/datatables/label_template_datatable.rb b/app/datatables/label_template_datatable.rb
index 882623b5d..d050ff686 100644
--- a/app/datatables/label_template_datatable.rb
+++ b/app/datatables/label_template_datatable.rb
@@ -15,9 +15,8 @@ class LabelTemplateDatatable < CustomDatatable
label_templates.created_at
).freeze
- def initialize(view, can_manage_templates, label_templates)
+ def initialize(view, label_templates)
super(view)
- @manage_template = can_manage_templates
@label_templates = label_templates
end
@@ -49,8 +48,7 @@ class LabelTemplateDatatable < CustomDatatable
'data-set-default-url': set_default_label_template_path(record),
'data-default': record.default,
'data-format': record.label_format
- },
- 'manage_permission' => @manage_template
+ }
}
end
end
diff --git a/app/views/label_templates/index.html.erb b/app/views/label_templates/index.html.erb
index a2ab133e1..30620d983 100644
--- a/app/views/label_templates/index.html.erb
+++ b/app/views/label_templates/index.html.erb
@@ -30,8 +30,7 @@
- >
+
|