diff --git a/app/controllers/plugins_controller.rb b/app/controllers/plugins_controller.rb index 5fd2351..a78ecc9 100644 --- a/app/controllers/plugins_controller.rb +++ b/app/controllers/plugins_controller.rb @@ -1,6 +1,6 @@ class PluginsController < ApplicationController def index - redirect_to updated_plugins_path + redirect_to installed_plugins_path end def installed diff --git a/app/views/plugins/installed.html.haml b/app/views/plugins/installed.html.haml index 9880ebf..b0956d9 100644 --- a/app/views/plugins/installed.html.haml +++ b/app/views/plugins/installed.html.haml @@ -3,19 +3,14 @@ %table{class: "table table-striped table-hover"} %thead %tr - %th{width: "32"} %th= t('.name') %th= t('.status') %th= t('.installed_version') - %th= t('.latest_version') %th + %th{width: "32"} %tbody - @plugins.each do |plugin| %tr - %td - = form_tag(uninstall_plugins_path, method: :patch) do - = hidden_field_tag("plugins[]", plugin.gem_name) - = submit_tag t('.uninstall'), class: "btn btn-default" %td %label{for: "plugin_#{plugin.gem_name}"} = plugin.gem_name @@ -29,12 +24,14 @@ = t(".not_installed") %td = plugin.installed_version - %td - = plugin.latest_version %td = form_tag(upgrade_plugins_path, method: :patch) do = hidden_field_tag("plugins[name]", plugin.gem_name) %select{name: "plugins[version]"} - plugin.released_versions.each do |ver| %option{value: ver, disabled: (ver == plugin.installed_version)}= ver - = submit_tag "version fix", class: "btn btn-sm btn-info" + = submit_tag t('.install_specific_version'), class: "btn btn-info" + %td + = form_tag(uninstall_plugins_path, method: :patch) do + = hidden_field_tag("plugins[]", plugin.gem_name) + = submit_tag t('.uninstall'), class: "btn btn-danger" diff --git a/app/views/plugins/updated.html.haml b/app/views/plugins/updated.html.haml index 675d240..26c65e5 100644 --- a/app/views/plugins/updated.html.haml +++ b/app/views/plugins/updated.html.haml @@ -30,5 +30,5 @@ = plugin.installed_version %td = plugin.latest_version - = submit_tag t(".install"), class: "btn btn-primary" + = submit_tag t(".install_latest"), class: "btn btn-primary" diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index 02c701a..a61fbfd 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -4,6 +4,7 @@ ja: sign_out: ログアウト uninstall: アンインストール install: インストール + install_latest: 最新版をインストール upgrade: アップグレード installed: インストール済み not_installed: 未インストール @@ -20,10 +21,11 @@ ja: version: バージョン installed_version: インストール済みバージョン latest_version: 最新バージョン - no_updates: 更新はありません - installed: &installed インストール済み + install_specific_version: このバージョンをインストール + no_updates: 更新されたプラグインはありません + installed: &installed インストール済みプラグイン recommended: &recommended おすすめプラグイン - updated: &updated 更新あり + updated: &updated 更新のあったプラグイン installed: <<: *common page_title: *installed