render a table in projects view

This commit is contained in:
Stefan Tollkühn
2025-07-23 14:19:06 +02:00
parent 7603ccd22d
commit 440750881b
2 changed files with 42 additions and 26 deletions

View File

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