plugins-table-header.patch

Go MAEDA, 2022-09-20 10:53

Download (1.64 KB)

View differences:

app/views/admin/plugins.html.erb
3 3
<% if @plugins.any? %>
4 4
<div class="autoscroll">
5 5
  <table class="list plugins">
6
      <thead><tr>
7
        <th><%= l(:field_name) %> / <%= l(:field_description) %></th>
8
        <th><%= l(:field_author) %></th>
9
        <th><%= l(:label_version) %></th>
10
        <th></th>
11
      </tr></thead>
12
      <tbody>
6 13
      <% @plugins.each do |plugin| %>
7 14
          <tr id="plugin-<%= plugin.id %>">
8 15
          <td class="name"><span class="name"><%= plugin.name %></span>
......
14 21
          <td class="configure"><%= link_to(l(:button_configure), plugin_settings_path(plugin)) if plugin.configurable? %></td>
15 22
          </tr>
16 23
      <% end %>
24
      </tbody>
17 25
  </table>
18 26
</div>
19 27
<p><a href="#" id="check-for-updates"><%= l(:label_check_for_updates) %></a></p>
test/functional/admin_controller_test.rb
156 156
    get :plugins
157 157
    assert_response :success
158 158

  
159
    assert_select 'th:nth-of-type(1)', :text => 'Name / Description'
160
    assert_select 'th:nth-of-type(2)', :text => 'Author'
161
    assert_select 'th:nth-of-type(3)', :text => 'Version'
162

  
159 163
    assert_select 'tr#plugin-foo' do
160 164
      assert_select 'td span.name', :text => 'Foo plugin'
161 165
      assert_select 'td.configure a[href="/settings/plugin/foo"]'