%if params[:doc_info].present?
attachment=Attachment.find(params[:doc_info])
end
%>
">
<%=t('attachment.info')%>
<%if attachment.present? %>
<%=logo(attachment,:size => '64')%>
- <%=t('agenda.entry.title')%> : <%=attachment.filename%>
- <%=t('author')%>: <%=link_to attachment.author.name, user_path(attachment.author)%>
- <%=t('size')%>: <%=attachment.get_size.strip!%>
- <%=t('updated_at')%>: <%=attachment.updated_at.to_date.to_formatted_s(:rfc822)%>
- <%=t('version.one')%>: <%=attachment.version%>
- <%=t('tags')%>:<%=tags_list attachment.tags%>
<%if attachment.authorize?(:update,:to => current_user)%>
- <%= attachment.tags.size>0 ? link_to(image_tag("icons/edit_tag.png", :title=> t('tag.edit')),"", :id => "edit_attachment_tags", :class=>"no-dot") : link_to(image_tag('icons/add_tag.png', :title => t('tag.add')), "", :id => "edit_attachment_tags", :class=>"no-dot")%>
<%end%>
<%if attachment.authorize?(:read,:to => current_user) %>
- <%=link_to(image_tag("icons/download_doc.png", :title => t('download'),:class=>"icon"), space_attachment_path(@space,attachment, :format => attachment.format!), :class=>"no-dot")%>
<%end%>
<%if attachment.authorize?(:delete, :to => current_user)%>
- <%=link_to(image_tag("icons/delete_doc.png", :title => t('delete.one'), :class =>"icon"), space_attachment_path(@space,attachment), {:method => :delete, :confirm => t('delete.confirm', :element => t('attachment.one'))}, :class=>"no-dot")%>
<%end%>
<%if attachment.current_version? && attachment.authorize?(:update,:to => current_user)%>
- <%=link_to(image_tag("icons/new_version_doc.png", :title=> t('version.new'), :class=>"icon"), space_attachments_path(@space, :new_version => attachment.id), :class => "new_version no-dot")%>
<%end%>
<%if attachment.post.present?%>
- <%=link_to(image_tag("icons/comment_doc.png", :title => t('post.one'),:class=>"icon"), space_post_path(@space,attachment.post), :class=>"no-dot")%>
<%end%>
<%if attachment.event.present?%>
- <%=link_to(image_tag("icons/date_doc.png", :title => t('date.one'),:class=>"icon"), space_event_path(@space,attachment.event), :class=>"no-dot")%>
<%end%>
<%else%>
<%=t('attachment.not_selected')%>
<%end%>