<div class="row">
  <div class="col-md-12">
    <h3><%= @dotation.formal_name %></h3>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <br />
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <h4><b>WIELKOŚĆ PRZEDSIĘBIORSTWA</b></h4>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <% @company_sizes.each do |company_size| %>
      <% if @dotation.company_sizes.include?(company_size) %>
        <%= image_tag 'yes'%> <%= company_size.name %>
      <% else %>
        <%= image_tag 'no' %> <%= company_size.name %>
      <% end %>
      &nbsp;&nbsp;
    <% end %>
  </div>
</div>
<br />
<% if !@dotation.expert_id.blank? && !@dotation.expert_info.blank? %>
<div class="row">
  <div class="col-md-12">
    <table style="border: none;">
      <thead>
        <tr><th colspan="2"><h4><b>SUBIEKTYWNA OPINIA EKSPERTA</b></h4></th></tr>
      </thead>
      <tbody>
          <tr>
            <td style="border-style: none solid none none; border-color: #6c757d; border-width: 1px;" width="25%" valign="top">
              <%= render '/experts/expert_show', expert: @dotation.expert %>
            </td>
            <td valign="top">
              <div style="margin-left: 5px;">
              <%= raw @dotation.expert_info %>
              </div>
            </td>
          </tr>
      </tbody>
    </table>
  </div>
</div>
<% end %>
<br />

<hr />
<div class="row">
  <div class="col-md-12">
    <table class="table table-lg table-bordered">
      <tbody>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Ogłoszenie aktualnego/najbliższego naboru</b></td><td>#{@dotation.ann_date_ret}</span></td></tr>" unless @dotation.announcement_date.blank? %>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Rozpoczęcie aktualnego/najbliższego naboru</b></td><td>#{@dotation.start_date_ret}</span></td></tr>" unless @dotation.start_date.blank? %>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Zakończenie aktualnego/najbliższego naboru</b></td><td>#{@dotation.end_date_ret}</span></td></tr>" unless @dotation.end_date.blank? %>
        <tr>
          <td style='text-transform: uppercase;'><b>Co można dofinansować? </b></td>
          <td>
            <ul>
              <% @dotation.expenses.each do |expense| %>
                <li><%= expense.name %></li>
              <% end %>
            </ul>
          </td>
        </tr>
        <% unless @dotation.localization.blank? %>
          <tr>
            <td style='text-transform: uppercase;'><b>Miejsce realizacji projektu</b></td>
            <td><%= @dotation.localization %></td>
          </tr>
        <% end %>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Minimalna wartość projektu (wydatków): </b></td><td>#{HomeHelper.change_ammount(@dotation.min_amount)} #{@dotation.min_amount_curr.name}</span></td></tr>" unless @dotation.min_amount.blank? %>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Maksymalna wartość projektu (wydatków): </b></td><td>#{HomeHelper.change_ammount(@dotation.max_amount)} #{@dotation.max_amount_curr.name}</span></td></tr>" unless @dotation.max_amount.blank? %>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Minimalna wartość dotacji: </b></td><td>#{HomeHelper.change_ammount(@dotation.min_dot_ammount)} #{@dotation.min_dot_amount_curr.name}</span></td></tr>" unless @dotation.min_dot_ammount.blank? %>
        <%= raw "<tr><td><span style='text-transform: uppercase;'><b>Maksymalna wartość dotacji: </b></td><td>#{HomeHelper.change_ammount(@dotation.max_dot_ammount)} #{@dotation.max_dot_amount_curr.name}</span></td></tr>" unless @dotation.max_dot_ammount.blank? %>
      </tbody>
    </table>
    <br />
    <h3 style='text-transform: uppercase;'><b>Szczegółowy opis dotacji</b></h3>
    <div class="row">
      <div class="col-md-12">
        <%= raw @dotation.full_descr %>
      </div>
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <h3 style='text-transform: uppercase;'>Pomoc w opracowaniu wniosku – komu można zlecić opracowanie dokumentów do tego konkursu</h3>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <%= render '/partners/partner_show', partner: @dotation.partner %>
    <div id="consultation_form_id"></div>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <p>&nbsp;</p>
    <h3>Inne dotacje, które mogą Ciebie zainteresować</h3>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <% @intersting_dotations.each do |interesting_dotation| %>
      <%= render 'dotation_card', dotation: interesting_dotation %>
    <% end %>
  </div>
</div>



<div class="row">
  <div class="col-md-12">
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <%= raw @dotation.positioning_text %>
  </div>
</div>
<div class="row">
  <div class="col-md-12">
    <% @dotation.tags.each do |tag| %>
      <span class="badge badge-secondary"><%= tag.name %></span>
    <% end %>
  </div>
</div>
