afimb/chouette2

View on GitHub
app/views/exports/_export.erb

Summary

Maintainability
Test Coverage
<div id="index_item" class="panel panel-default export">
  <div class="panel-heading">
    <div class="panel-title clearfix">
      <% if policy(:application).write? %>
        <span class="pull-right">
          <%= link_to referential_export_path(@referential, export.id), :method => :delete, :data => {:confirm =>  t('exports.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
            <span class="fa fa-trash-o"></span>
          <% end %>
        </span>
      <% end %>
      <h5>
    <%= link_to( referential_export_path(@referential, export.id), :class => "preview", :title => "#{Export.model_name.human.capitalize} #{export.name}") do %>
        <%= job_status_title(export) %>
    <% end %>
      </h5>
    </div>
  </div>
  <div class="panel-body">
    <p><%= link_to( font_awesome_classic_tag("fa-file-#{export.filename_extension}-o") + t("exports.show.exported_file"), exported_file_referential_export_path(@referential, export.id) ) if export.file_path %></p>
    <p><%= link_to font_awesome_classic_tag("fa-external-link") + t("exports.show.compliance_check"), compliance_check_referential_export_path(@referential, export.id) if export.compliance_check? %></p>
  </div>
  <div class="panel-footer">
    <%= export_attributes_tag(export) %>
    <div class="history">
      <%= l export.created_at, :format => "%d/%m/%Y %H:%M" %> | <%= export.user_name %>
    </div>
  </div>
</div>