diff --git a/app/views/allocations/_header.html.erb b/app/views/allocations/_header.html.erb new file mode 100644 index 0000000..e12bfc9 --- /dev/null +++ b/app/views/allocations/_header.html.erb @@ -0,0 +1,32 @@ +
+

+ <%= @allocation.created_at.strftime('%B %d, %Y') %> + <% if @allocation.completed? %> + Completed + <% elsif @allocation.latest? %> + Latest + <% end %> +

+ + +
\ No newline at end of file diff --git a/app/views/allocations/show.html.erb b/app/views/allocations/show.html.erb index 1ff1c05..b132ea4 100644 --- a/app/views/allocations/show.html.erb +++ b/app/views/allocations/show.html.erb @@ -6,16 +6,7 @@
<% if @allocation %> -
-

- <%= @allocation.created_at.strftime('%B %d, %Y') %> - <% if @allocation.completed? %> - Completed - <% elsif @allocation.latest? %> - Latest - <% end %> -

-
+ <%= render 'allocations/header' %>
<%= render 'allocations/details' %> diff --git a/app/views/funds/show.html.erb b/app/views/funds/show.html.erb index 84f5a26..078209e 100644 --- a/app/views/funds/show.html.erb +++ b/app/views/funds/show.html.erb @@ -6,16 +6,7 @@
<% if @allocation %> -
-

- <%= @allocation.created_at.strftime('%B %d, %Y') %> - <% if @allocation.completed? %> - Completed - <% elsif @allocation.latest? %> - Latest - <% end %> -

-
+ <%= render 'allocations/header' %>
<%= render 'allocations/details' %>