Slowly getting there. Display the CAF. This is a littel harder than I thought. Maybe I'm tired.

This commit is contained in:
2023-02-23 19:32:40 +00:00
parent a35b656cf3
commit 59c678aa62
4 changed files with 60 additions and 46 deletions

View File

@@ -1,17 +1,32 @@
<div id="<%= dom_id caf %>">
<p>
<strong>Company:</strong>
<%= caf.company_id %>
</p>
<h1><%= @caf.company.name %></h1>
<h2><%= @caf.name %></h2>
<p><%= @caf.description %></p>
<p>
<strong>Name:</strong>
<%= caf.name %>
</p>
<% @caf.objectives.each do |objective| %>
<h3><%= objective.name %></h3>
<p><%= objective.description %></p>
<p>
<strong>Description:</strong>
<%= caf.description %>
</p>
<% objective.principles.each do |principle| %>
<h4><%= principle.name %></h4>
<p><%= principle.description %></p>
</div>
<% principle.subprinciples.each do |subprinciple| %>
<h5><%= subprinciple.name %></h5>
<p><%= subprinciple.description %></p>
<table>
<tr>
<% subprinciple.subprincipleitemgroups.each do |subprincipleitemgroup| %>
<td><%= subprincipleitemgroup.kind%></td>
<% end %>
</tr>
<% subprinciple.subprincipleitemgroups.each do |subprincipleitemgroup| %>
<td><%= subprincipleitemgroup.condition%></td>
<% end %>
</tr>
</table>
<% end %>
<% end %>
<% end %>