@@ -1,14 +1,16 | |||||
1 | <h2><%= l(:label_plugins) %></h2> |
|
1 | <h2><%= l(:label_plugins) %></h2> | |
2 |
|
2 | |||
3 | <% if @plugins.any? %> |
|
3 | <% if @plugins.any? %> | |
4 | <table class="list"> |
|
4 | <table class="list plugins"> | |
5 | <% @plugins.each do |plugin| %> |
|
5 | <% @plugins.each do |plugin| %> | |
6 | <tr class="<%= cycle('odd', 'even') %>"> |
|
6 | <tr class="<%= cycle('odd', 'even') %>"> | |
7 |
<td><%=h plugin.name %></ |
|
7 | <td><span class="name"><%=h plugin.name %></span> | |
8 | <td><%=h plugin.description %></td> |
|
8 | <%= content_tag('span', h(plugin.description), :class => 'description') unless plugin.description.blank? %> | |
9 | <td><%=h plugin.author %></td> |
|
9 | <%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %> | |
10 | <td><%=h plugin.version %></td> |
|
10 | </td> | |
11 | <td><%= link_to(l(:button_configure), :controller => 'settings', :action => 'plugin', :id => plugin.id) if plugin.configurable? %></td> |
|
11 | <td class="author"><%= plugin.author_url.blank? ? h(plugin.author) : link_to(h(plugin.author), plugin.author_url) %></td> | |
|
12 | <td class="version"><%=h plugin.version %></td> | |||
|
13 | <td class="configure"><%= link_to(l(:button_configure), :controller => 'settings', :action => 'plugin', :id => plugin.id) if plugin.configurable? %></td> | |||
12 | </tr> |
|
14 | </tr> | |
13 | <% end %> |
|
15 | <% end %> | |
14 | </table> |
|
16 | </table> |
@@ -57,7 +57,7 module Redmine #:nodoc: | |||||
57 | end |
|
57 | end | |
58 | end |
|
58 | end | |
59 | end |
|
59 | end | |
60 | def_field :name, :description, :author, :version, :settings |
|
60 | def_field :name, :description, :url, :author, :author_url, :version, :settings | |
61 | attr_reader :id |
|
61 | attr_reader :id | |
62 |
|
62 | |||
63 | # Plugin constructor |
|
63 | # Plugin constructor |
@@ -119,6 +119,12 tr.time-entry td.subject, tr.time-entry td.comments { text-align: left; white-sp | |||||
119 | td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; } |
|
119 | td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; } | |
120 | td.hours .hours-dec { font-size: 0.9em; } |
|
120 | td.hours .hours-dec { font-size: 0.9em; } | |
121 |
|
121 | |||
|
122 | table.plugins td { vertical-align: middle; } | |||
|
123 | table.plugins td.configure { text-align: right; padding-right: 1em; } | |||
|
124 | table.plugins span.name { font-weight: bold; display: block; margin-bottom: 6px; } | |||
|
125 | table.plugins span.description { display: block; font-size: 0.9em; } | |||
|
126 | table.plugins span.url { display: block; font-size: 0.9em; } | |||
|
127 | ||||
122 | table.list tbody tr:hover { background-color:#ffffdd; } |
|
128 | table.list tbody tr:hover { background-color:#ffffdd; } | |
123 | table td {padding:2px;} |
|
129 | table td {padding:2px;} | |
124 | table p {margin:0;} |
|
130 | table p {margin:0;} |
@@ -103,8 +103,8 class AdminControllerTest < Test::Unit::TestCase | |||||
103 | assert_response :success |
|
103 | assert_response :success | |
104 | assert_template 'plugins' |
|
104 | assert_template 'plugins' | |
105 |
|
105 | |||
106 | assert_tag :td, :content => 'Foo plugin' |
|
106 | assert_tag :td, :child => { :tag => 'span', :content => 'Foo plugin' } | |
107 | assert_tag :td, :content => 'Bar' |
|
107 | assert_tag :td, :child => { :tag => 'span', :content => 'Bar' } | |
108 | end |
|
108 | end | |
109 |
|
109 | |||
110 | def test_info |
|
110 | def test_info |
@@ -32,7 +32,9 class Redmine::PluginTest < Test::Unit::TestCase | |||||
32 | def test_register |
|
32 | def test_register | |
33 | @klass.register :foo do |
|
33 | @klass.register :foo do | |
34 | name 'Foo plugin' |
|
34 | name 'Foo plugin' | |
|
35 | url 'http://example.net/plugins/foo' | |||
35 | author 'John Smith' |
|
36 | author 'John Smith' | |
|
37 | author_url 'http://example.net/jsmith' | |||
36 | description 'This is a test plugin' |
|
38 | description 'This is a test plugin' | |
37 | version '0.0.1' |
|
39 | version '0.0.1' | |
38 | settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'foo/settings' |
|
40 | settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'foo/settings' | |
@@ -44,7 +46,9 class Redmine::PluginTest < Test::Unit::TestCase | |||||
44 | assert plugin.is_a?(Redmine::Plugin) |
|
46 | assert plugin.is_a?(Redmine::Plugin) | |
45 | assert_equal :foo, plugin.id |
|
47 | assert_equal :foo, plugin.id | |
46 | assert_equal 'Foo plugin', plugin.name |
|
48 | assert_equal 'Foo plugin', plugin.name | |
|
49 | assert_equal 'http://example.net/plugins/foo', plugin.url | |||
47 | assert_equal 'John Smith', plugin.author |
|
50 | assert_equal 'John Smith', plugin.author | |
|
51 | assert_equal 'http://example.net/jsmith', plugin.author_url | |||
48 | assert_equal 'This is a test plugin', plugin.description |
|
52 | assert_equal 'This is a test plugin', plugin.description | |
49 | assert_equal '0.0.1', plugin.version |
|
53 | assert_equal '0.0.1', plugin.version | |
50 | end |
|
54 | end |
General Comments 0
You need to be logged in to leave comments.
Login now