mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
Make sortable installed plugins table
This commit is contained in:
parent
3b3a9d096d
commit
81e9ca3d85
@ -2,16 +2,16 @@
|
||||
|
||||
-# TODO: should more blush up this page
|
||||
|
||||
%table{class: "table table-striped table-hover"}
|
||||
%table{class: "table table-striped table-hover", id: "plugins-table"}
|
||||
%thead
|
||||
%tr
|
||||
%th= t('.name')
|
||||
%th= t('.authors')
|
||||
%th= t('.summary')
|
||||
%th= t('.installed_version')
|
||||
%th= t('.latest_version')
|
||||
%th
|
||||
%th{width: "32"}
|
||||
%th.col-lg-1= t('.name')
|
||||
%th{width: 160}= t('.authors')
|
||||
%th{width: 320}= t('.summary')
|
||||
%th.col-lg-1= t('.installed_version')
|
||||
%th.col-lg-1= t('.latest_version')
|
||||
%th.col-lg-1
|
||||
%th.col-lg-1
|
||||
%tbody
|
||||
- @plugins.each do |plugin|
|
||||
%tr
|
||||
@ -27,7 +27,9 @@
|
||||
%td
|
||||
= plugin.latest_version
|
||||
%td
|
||||
- unless plugin.latest_version?
|
||||
- if plugin.latest_version?
|
||||
= t('.latest_version')
|
||||
- else
|
||||
= form_tag(upgrade_plugins_path, method: :patch) do
|
||||
= hidden_field_tag("plugins[name]", plugin.gem_name)
|
||||
= hidden_field_tag("plugins[version]", plugin.latest_version)
|
||||
@ -36,3 +38,16 @@
|
||||
= form_tag(uninstall_plugins_path, method: :patch) do
|
||||
= hidden_field_tag("plugins[]", plugin.gem_name)
|
||||
= submit_tag t('.uninstall'), class: "btn btn-danger"
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
$('#plugins-table').dataTable({
|
||||
"ordering": true,
|
||||
"paging": false,
|
||||
"info": false,
|
||||
"searching": true,
|
||||
"language": {
|
||||
"search": "#{t("terms.search")} "
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user