<div class="tabs-panel tab-milestones" id="tab-milestones">
  <div class="row">
    <div class="small-12 column">
      <% if @investment.milestones.blank? %>
        <div class="callout primary text-center">
          <%= t('budgets.investments.show.no_milestones') %>
        </div>
      <% end %>
      <section class="timeline">
        <ul class="no-bullet">
          <% @investment.milestones.each do |milestone| %>
            <li>
              <div class="milestone-content">
                <% if milestone.publication_date.present? %>
                  <span class="milestone-date">
                    <strong><%= t("budgets.investments.show.milestone_publication_date",
                                publication_date: l(milestone.publication_date.to_date)) %></strong>
                  </span>
                <% end %>
                <%= image_tag(milestone.image_url(:large), { alt: milestone.image.title, class: "margin", id: "image_#{milestone.id}" }) if milestone.image.present? %>
                <p><%= milestone.description %></p>
                <% if milestone.documents.present? %>
                  <div class="document-link text-center">
                    <p>
                      <span class="icon-document"></span>&nbsp;
                      <strong><%= t("shared.documentation") %></strong>
                    </p>
                    <% milestone.documents.each do |document| %>
                      <%= link_to document.title,
                              document.attachment.url,
                              target: "_blank",
                              rel: "nofollow" %><br>
                    <% end %>
                  </div>
                <% end %>
              </div>
            </li>
          <% end %>
        </ul>
      </section>
    </div>
  </div>
</div>
