Add rubygems.org link on recommended plugins page

This commit is contained in:
uu59 2014-06-10 15:02:44 +09:00
parent 6e87fc1b64
commit 889955cf6a
4 changed files with 9 additions and 0 deletions

View File

@ -96,6 +96,10 @@ class Plugin
JSON.parse(gem_versions).find {|ver| ver["number"] == target_version }.try(:[], "authors")
end
def rubygems_org_page
"https://rubygems.org/gems/#{gem_name}"
end
def self.gemfile_changed?
# if true, rails server needs to restart. new installed/removed gems are.
@initial_gemfile_content != File.read(gemfile_path)

View File

@ -7,6 +7,7 @@
%th= t('.name')
%th= t('.category')
%th= t('.status')
%th
%tbody
- @plugins.each do |plugin|
%tr
@ -23,6 +24,8 @@
= t(".installed")
- else
= t(".not_installed")
%td
= link_to t('plugins.view_on_rubygems_org'), plugin.rubygems_org_page, target: "_blank"
:javascript

View File

@ -35,6 +35,7 @@ en:
plugins:
notice_restart_for_config_edit: "NOTICE: fluentd will restart after update config"
view_on_rubygems_org: View on rubygems.org
common: &plugin_common
<<: *terms
name: Plugin Name

View File

@ -35,6 +35,7 @@ ja:
plugins:
notice_restart_for_config_edit: ※更新するとfluentdが再起動されます
view_on_rubygems_org: rubygems.orgで見る
common: &plugin_common
<<: *terms
name: プラグイン名