afimb/chouette2

View on GitHub
app/views/imports/_import.erb

Summary

Maintainability
Test Coverage
<div id="index_item" class="panel panel-default import">
  <div class="panel-heading">
    <div class="panel-title clearfix">
      <% if policy(:application).write? %>
        <span class="pull-right">
          <%= link_to referential_import_path(@referential, import.id), :method => :delete, :data => {:confirm =>  t('imports.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
            <span class="fa fa-trash-o"></span>
          <% end %>
        </span>
      <% end %>
      <h5>
        <%= link_to( referential_import_path(@referential, import.id), :class => "preview", :title => "#{ImportTask.model_name.human.capitalize} #{import.name}") do %>
          <%= job_status_title(import) %>
        <% end %>
      </h5>
    </div>
  </div>
  <div class="panel-body">
    <p><%= link_to font_awesome_classic_tag("fa-file-#{import.filename_extension}-o") + t("imports.show.imported_file"), imported_file_referential_import_path(@referential, import.id) if import.file_path?  %></p>
    <p><%= link_to font_awesome_classic_tag("fa-external-link") + t("imports.show.compliance_check"), compliance_check_referential_import_path(@referential, import.id) if import.compliance_check? %></p>
  </div>
  <div class="panel-footer">
    <%= import_attributes_tag(import) %>

    <div class="history">
      <%=  l(import.created_at, :format => "%d/%m/%Y %H:%M") if import.created_at %> | <%= import.user_name %>
    </div>
  </div>
</div>