<% if can_view_asset?(@data_file, params[:code]) -%>
    <h2>Factors Studied</h2>
    <div class="factors-studied clearfix">
      <% unless @display_data_file.studied_factors.empty? -%>
          <ul>
            <%= render :partial=>"studied_factors/condition_or_factor_row_headings", :locals=>{:asset => 'data_file', :show_delete=>false} %>
            <%= render :partial=>"studied_factors/condition_or_factor_row",:collection=>@display_data_file.studied_factors, :locals=>{:asset => 'data_file', :show_delete=>false} %>
          </ul>
      <% else -%>
          <span class="none_text">No factors studied for this <%= t('data_file') %>.</span>
      <% end -%>
    </div>

    <% if @data_file.can_edit? -%>
        <%= button_link_to('Edit factors studied (latest version)', 'edit', data_file_studied_factors_path(@data_file)) -%>
    <% end -%>
<% end -%>

<% if can_view_asset?(@data_file, params[:code]) -%>
    <%= folding_panel('Factors Studied') do %>
        <div class="factors-studied clearfix">
          <% unless @display_data_file.studied_factors.empty? -%>
              <ul>
                <%= render :partial=>"studied_factors/condition_or_factor_row_headings", :locals=>{:asset => 'data_file', :show_delete=>false} %>
                <%= render :partial=>"studied_factors/condition_or_factor_row",:collection=>@display_data_file.studied_factors, :locals=>{:asset => 'data_file', :show_delete=>false} %>
              </ul>
          <% else -%>
              <span class="none_text">No factors studied for this <%= t('data_file') %>.</span>
          <% end -%>
        </div>

        <% if @data_file.can_edit? -%>
            <%= button_link_to('Edit factors studied (latest version)', 'edit', data_file_studied_factors_path(@data_file)) -%>
        <% end -%>
    <% end -%>
<% end -%>

Put factors studied in a panel
Put factors studied in a panel
