Project

General

Profile

Defect #33458 » 33458.patch

Yuichi HARADA, 2020-05-18 07:19

View differences:

app/helpers/projects_helper.rb
123 123
    selection.each do |board|
124 124
      node = capture(board, level, &block)
125 125
      node << render_boards_tree(boards, board, level+1, &block)
126
      s << content_tag('div', node)
126
      s << node
127 127
    end
128
    content_tag('div', s, :class => 'sort-level')
128
    s
129 129
  end
130 130

  
131 131
  def render_api_includes(project, api)
app/views/projects/settings/_boards.html.erb
3 3
<% end %>
4 4

  
5 5
<% if @project.boards.any? %>
6
<div class="table-list boards">
7
  <div class="table-list-header">
8
    <div class="table-list-cell"><%= l(:label_board) %></div>
9
  </div>
10
  <%= render_boards_tree(@project.boards) do |board, level| %>
11
  <div class="table-list-row">
12
    <div class="table-list-cell name" style="padding-left: <%= 2 + level * 16 %>px">
13
      <%= link_to board.name, project_board_path(@project, board) %>
14
    </div>
15
    <div class="table-list-cell description"><%= board.description %></div>
16
    <div class="table-list-cell buttons">
17
    <% if User.current.allowed_to?(:manage_boards, @project) %>
18
      <%= reorder_handle(board) %>
19
      <%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
20
      <%= delete_link project_board_path(@project, board) %>
21
    <% end %>
22
    </div>
23
  </div>
24
  <% end %>
25
</div>
26

  
27
<%= javascript_tag do %>
28
  $(function() { $("div.sort-level").positionedItems(); });
6
<table class="list boards">
7
<thead><tr>
8
  <th><%= l(:field_name) %></th>
9
  <th><%= l(:field_description) %></th>
10
  <th></th>
11
</tr></thead>
12
<tbody>
13
<%= render_boards_tree(@project.boards) do |board, level| %>
14
<tr>
15
  <td class="name" style="padding-left: <%= 2 + level * 16 %>px">
16
    <%= link_to board.name, project_board_path(@project, board) %>
17
  </td>
18
  <td class="description"><%= board.description %></td>
19
  <td class="buttons">
20
<% if User.current.allowed_to?(:manage_boards, @project) %>
21
    <%= reorder_handle(board) %>
22
    <%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
23
    <%= delete_link project_board_path(@project, board) %>
29 24
<% end %>
30

  
25
  </td>
26
</tr>
27
<% end %>
28
</tbody>
29
</table>
31 30
<% else %>
32 31
<p class="nodata"><%= l(:label_no_data) %></p>
33 32
<% end %>
33

  
34
<%= javascript_tag do %>
35
  $(function() { $("table.boards tbody").positionedItems(); });
36
<% end %>
public/stylesheets/application.css
236 236
#project-jump .drdn-items>a:hover {background-color:#759FCF; color:#fff !important;}
237 237

  
238 238
/***** Tables *****/
239
table.list, .table-list { border: 1px solid #e4e4e4; width: 100%; margin-bottom: 4px; border-radius: 3px; border-spacing: 0; overflow: hidden;}
240
table.list th, .table-list-header { background-color:#EEEEEE; padding: 4px; white-space:nowrap; font-weight:bold; }
239
table.list { border: 1px solid #e4e4e4; width: 100%; margin-bottom: 4px; border-radius: 3px; border-spacing: 0; overflow: hidden;}
240
table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; font-weight:bold; }
241 241
table.list td {text-align:center; vertical-align:middle; padding-right:10px;}
242 242
table.list td.id { width: 2%; text-align: center;}
243 243
table.list td.name, table.list td.description, table.list td.subject, table.list td.parent-subject, table.list td.comments, table.list td.roles, table.list td.attachments, table.list td.text,  table.list td.short_description {text-align: left;}
......
258 258
table.list tr.overdue td.due_date  { color: #c22; }
259 259
#role-permissions-trackers table.list th {white-space:normal;}
260 260

  
261
.table-list-cell {display: table-cell; vertical-align: top; padding:2px; }
262
.table-list div.buttons {width: 15%;}
263

  
264 261
tr.project td.name a { white-space:nowrap; }
265 262
tr.project.closed, tr.project.archived { color: #aaa; }
266 263
tr.project.closed a, tr.project.archived a { color: #aaa; }
......
381 378
table.boards a.board { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
382 379
table.boards td.last-message {text-align:left;font-size:80%;}
383 380

  
384
div.table-list.boards .table-list-cell.name {width: 30%;}
381
table.list.boards td {vertical-align: top;}
382
table.list.boards td.name {width: 30%;}
383
table.list.boards td.buttons {width: 15%;}
385 384

  
386 385
#query_form_content {font-size:90%;}
387 386
#query_form_with_buttons > p.contextual {font-size:12px; margin:12px 0px;}
(3-3/3)