build tables for project and subproject/s views

This commit is contained in:
Stefan Tollkühn
2025-07-23 15:19:59 +02:00
parent 440750881b
commit 53e2dba32d
5 changed files with 76 additions and 35 deletions

View File

@@ -5,12 +5,23 @@
<h1>Subprojects</h1>
<div id="subprojects">
<% @subprojects.each do |subproject| %>
<%= render subproject %>
<p>
<%= link_to "Show this subproject", subproject %>
</p>
<% end %>
<table>
<thead>
<tr>
<% subproject_view_fields.each do |attrib| %>
<th><%= attrib.to_s.humanize %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @subprojects.each do |subproject| %>
<tr id="<%= dom_id subproject %>">
<%= render subproject %>
</tr>
<% end %>
</tbody>
</table>
</div>
<%= link_to "New subproject", new_subproject_path %>