fluentd-ui/app/views/plugins/installed.html.haml
Kenji Okimoto 08277cdbda
Use bootstrap4 style
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-05-18 17:16:52 +09:00

68 lines
2.3 KiB
Plaintext

- page_title t('.page_title')
%table{class: "table table-striped table-hover", id: "plugins-table"}
%thead
%tr
%th{scope: "col"}
%th{scope: "col"}= t('plugins.common.name')
%th{scope: "col"}= t('plugins.common.authors')
%th{scope: "col"}= t('plugins.common.summary')
%th{scope: "col"}= t('plugins.common.installed_version')
%th{scope: "col"}= t('plugins.common.latest_version')
%th{scope: "col"}
%tbody
- @plugins.each do |plugin|
%tr
%td
%button{class: "btn btn-danger", data: {toggle: "modal", target:" #plugin-modal-#{plugin.gem_name}"}}
= t "terms.uninstall"
.modal.fade{id: "plugin-modal-#{plugin.gem_name}"}
.modal-dialog
.modal-content
.modal-header
%button.close{"data-dismiss" => "modal"}
= raw "&times;"
%h4.modal-title
= plugin.gem_name
.modal-body
= t('terms.confirm_body', action: t('terms.uninstall'))
.modal-footer
= form_tag(uninstall_plugins_path, method: :patch) do
%button.btn.btn-secondary{"data-dismiss" => "modal"}
Close
= hidden_field_tag("plugins[]", plugin.gem_name)
= submit_tag t('terms.uninstall'), class: "btn btn-danger"
%td
%label{for: "plugin_#{plugin.gem_name}"}
= plugin.gem_name
%td
= plugin.authors
%td
= plugin.summary
%td
= plugin.installed_version
%td
= plugin.latest_version
%td
- if plugin.latest_version?
= t('plugins.common.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)
= submit_tag t('plugins.common.install_latest_version'), class: "btn btn-primary"
:javascript
$(document).ready(function() {
$('#plugins-table').dataTable({
"autoWidth": false,
"ordering": true,
"paging": false,
"info": false,
"searching": true,
"language": {
"search": "#{t("terms.search")} "
}
});
});