grantcallendar/app/views/home/_dotation_card.pdf.erb

55 lines
1.5 KiB
Plaintext

<table style="width: 100% ">
<thead>
<tr><th colspan="2"><strong><%= dotation.name %></strong></th></tr>
<tr>
<th colspan="2"><%= dotation.formal_name %></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Składanie wniosków</strong></td>
<h4>
<% unless dotation.start_date.blank? %>od <%= dotation.start_date_ret %><br /><% end %>
<% unless dotation.end_date.blank? %>do <%= dotation.end_date_ret %><% end %>
</h4>
</tr>
<tr>
<td>Lokalizacja: </td>
<td><strong><%= dotation.localization %></strong></td>
</tr>
<% unless dotation.max_amount.blank? %>
<tr>
<td>
<strong>Wartość projektu </strong>
</td>
<td>
do <%= change_ammount(dotation.max_amount) %> <%= dotation.max_amount_curr.name %>
</td>
</tr>
<% end %>
<% unless dotation.max_percent.blank? %>,
<tr>
<td><strong>Poziom dofinansowania</strong></td>
<td>do <%= dotation.max_percent %>% dotacji</td>
</tr>
<% end %>
<% unless dotation.expenses.blank? %>
<tr>
<td><strong>Co można dofinansować? </strong></td>
<td>
<% max_expense = dotation.expenses.count %>
<% dotation.expenses.limit(5).each_with_index do |expense, index| %>
<%= expense.name %>
<% if index < max_expense - 1 && index < 4 %>
<%= ', ' -%>
<% elsif max_expense > 5 %>
<%= '...' -%>
<% end %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>