<script>
    $(document).ready(function(){
        $(".popupClose").click(function(){
            $(".popupWrap").css("display","none");
        });
    });
</script>
<span class="f16 fontBlue fb">选择版本 </span>
<p class="c_red">注：该文件有历史版本，请选择您需要的文件，点击文件名下载。</p>
<p class="fontGrey3 mb4 fb">版本及序号</p>

<div style="max-height:165px; overflow-y:auto; background-color: #e3e3e3; line-height:33px;" class="p10">
    <span class="attachment">
      <%= link_to truncate(@attachment.filename,length: 35, omission: '...'),
                  download_named_attachment_path(@attachment.id, @attachment.filename),
                  :title => @attachment.filename+"\n"+@attachment.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f14 fb link_file_a2 fl"  %>
    </span>
  <span class="fr">版本号：当前</span>
  <div class="cl"></div>
  <% @attachment_histories.each do |history| %>
      <span class="attachment">
          <%= link_to truncate(history.filename,length: 35, omission: '...'),
                    download_history_attachment_path(history.id, history.filename),
                    :title => history.filename+"\n"+history.description.to_s,
                    :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f14 fb link_file_a2 fl"  %>
      </span>
      <span class="fr">版本号：<%= history.version %></span>
      <div class="cl"></div>
  <% end %>
</div>
