use a more DRY way to build project view
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<div id="<%= dom_id project %>">
|
||||
<p>
|
||||
<strong>Name:</strong>
|
||||
<%= project.email %> <%= project.name %>
|
||||
</p>
|
||||
<% project_view_fields.each do |attrib| %>
|
||||
<p>
|
||||
<strong><%= attrib.to_s.humanize %>:</strong>
|
||||
<%= value = project.send(attrib) %>
|
||||
<%= value.is_a?(Date) ? l(value) : value %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if project.subprojects.any? %>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user