sleepepi/sleepportal

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

Summary

Maintainability
Test Coverage
<% @title = @source_file_type.name %>
<div class="page-header">
  <h1>
    <%= link_to @source.name, @source %> &middot; <%= link_to 'File Types', source_file_types_path(source_id: @source.id) %> &middot; <%= @title %>
  </h1>
  <% if @source.user_has_action?(current_user, "edit data source mappings") %>
    <%= link_to "Edit Source File Type", edit_source_file_type_path(@source_file_type, source_id: @source.id), class: 'btn btn-xs btn-default' %>
    <%= link_to "Delete Source File Type", source_file_type_path(@source_file_type, source_id: @source.id), data: { confirm: "Are you sure you want to delete Source File Type #{@source_file_type.name}?" }, method: :delete, class: 'btn btn-xs btn-danger-inverse' %>
  <% end %>
</div>

<dl class="dl-horizontal">
  <dt>File Type</dt>
  <dd><%= link_to @source_file_type.file_type.name_and_extension, @source_file_type.file_type if @source_file_type.file_type %></dd>

</dl>