MiraitSystems/enju_trunk

View on GitHub
app/views/agent_import_results/show.html.erb

Summary

Maintainability
Test Coverage
<div id="content_detail" class="ui-corner-all">
<h1 class="title"><%= t('page.showing', :model => t('activerecord.models.agent_import_result')) -%></h1>
<div id="content_list">
<p id="notice"><%= notice %></p>

<p>
  <b><%= t('activerecord.models.agent_import_file') %></b>
  <%= @agent_import_result.agent_import_file.agent_import_file_name %>
</p>

<p>
  <b><%= t('activerecord.models.agent') %></b>
  <%= link_to @agent_import_result.agent.full_name, @agent_import_result.user if @agent_import_result.user %>
</p>

<p>
  <b><%= t('activerecord.attributes.user.username') %></b>
  <%= link_to @agent_import_result.user.username, @agent_import_result.user if @agent_import_result.user %>
</p>

<p>
  <b><%= t('activerecord.attributes.agent_import_result.body') %></b>
  <%- if @agent_import_result.body -%><br />
    <% if SystemConfiguration.get("set_output_format_type") == false %>
      <% @agent_import_result.body.split(",").each_with_index do |item, i| %>
        &nbsp;<%= t('activerecord.attributes.agent_import_result.index') %><%= "#{h(i+1)}:" %>&nbsp;<%= h(item) %><br />
      <% end %>
    <% else %>
      <% @agent_import_result.body.split("\t").each_with_index do |item, i| %>
        &nbsp;<%= t('activerecord.attributes.agent_import_result.index') %><%= "#{h(i+1)}:" %>&nbsp;<%= h(item) %><br />
      <% end %>
    <% end %>
  <% end %>
  </p>

<p>
  <b><%= t('page.created_at') %></b>
  <%=l @agent_import_result.created_at %>
</p>

</div>
</div>

<div id="submenu" class="ui-corner-all">
  <ul>
    <li><%= link_to t('page.back'), agent_import_results_path %></li>
  </ul>
</div>