<% edit_allowed = User.current.allowed_to?(:manage_files, @course) %>
<% if file_dense_list.any? %>
    <div id="edit-file-dense-form-<%=attachment.id%>" class="hidden">
      <%= select_tag "file_dense",
                     options_for_select(file_dense_list,attachment.file_dense_str), :onchange=>"file_dense_edit("+attachment.id.to_s + ",this.value)"%>
    </div>
    <%= link_to(image_tag('edit/edit.png'), 'javascript:void(0);',:style=>"white-space:nowrap;", :id=>"edit_box_dense"+attachment.id.to_s ,
                :onclick =>"$('#edit-file-dense-form-" +attachment.id.to_s+ "').show();
                $('#field_file_dense_id_label" +attachment.id.to_s+ "').hide();
                $('#edit_box_dense" +attachment.id.to_s+ "').hide();") if edit_allowed %>

<% end %>