% html_title(l(:dmsf)) %>
<% if User.current.allowed_to?(:file_manipulation, @project) %>
<% unless @file.locked_for_user? && !User.current.allowed_to?(:force_file_unlock, @project)%>
<% if @file.locked? %>
<%= link_to_function(image_tag("unlock.png", :plugin => "redmine_dmsf"),
"manipulation_link('#{url_for(:action => 'unlock', :id => @file, :current => request.url)}')",
:title => l(:title_unlock_file)) %>
<% else %>
<%= link_to_function(image_tag("lock.png", :plugin => "redmine_dmsf"),
"manipulation_link('#{url_for(:action => 'lock', :id => @file, :current => request.url)}')",
:title => l(:title_lock_file)) %>
<% end %>
<% end %>
<% if User.current.allowed_to?(:file_manipulation, @project) && !@file.locked_for_user? %>
<%= link_to_function(image_tag("delete.png", :plugin => "redmine_dmsf"),
"confirmation_link('#{url_for(:action => 'delete', :id => @file)}', '#{l(:question_do_you_really_want_to_delete_this_entry)}')",
:title => l(:title_delete)) %>
<% end %>
<% if User.current.allowed_to?(:file_approval, @project) %>
<% if @file.notification %>
<%= link_to_function(image_tag("notify.png", :plugin => "redmine_dmsf"),
"manipulation_link('#{url_for(:action => 'notify_deactivate', :id => @file, :current => request.url)}')",
:title => l(:title_notifications_active_deactivate)) %>
<% else %>
<%= link_to_function(image_tag("notifynot.png", :plugin => "redmine_dmsf"),
"manipulation_link('#{url_for(:action => 'notify_activate', :id => @file, :current => request.url)}')",
:title => l(:title_notifications_not_active_activate)) %>
<% end %>
<% end %>
<% end %>
<%= link_to(image_tag("copy.png"), {:controller => :dmsf_files_copy, :action => "new", :id => @file }, :title => l(:title_copy_or_move)) %>
<% path = @file.folder.nil? ? [] : @file.folder.dmsf_path %>
<%= render(:partial => "/dmsf/path", :locals => {:path => path}) %>
/
<%= h(@file.last_revision.title) %>
<%= image_tag("notify.png", :plugin => "redmine_dmsf", :title => l(:title_notifications_active)) if @file.notification %>
<%= error_messages_for("file") %>
<%= error_messages_for("revision") %>
<%= render(:partial => "file_new_revision") if User.current.allowed_to?(:file_manipulation, @file.project) %>
<% form_tag("", :id => "manipulation_form") do %>
<% end %>
<%= l(:heading_revisions) %>
<% @file.revisions[@revision_pages.current.offset,@revision_pages.items_per_page].each do |revision| %>
<%= link_to(image_tag("download.png", :plugin => "redmine_dmsf"),
{:action => "show", :id => @file, :download => revision},
:title => l(:title_title_version_version_download, :title => h(revision.title), :version => revision.version)) %>
<% if User.current.allowed_to?(:file_approval, @project) %>
<%= link_to_function(image_tag("delete.png", :plugin => "redmine_dmsf"),
"confirmation_link('#{url_for(:action => 'delete_revision', :id => revision)}', '#{l(:question_do_you_really_want_to_delete_this_revision)}')",
:title => l(:title_delete_revision)) %>
<% end %>
<%=label_tag("", (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)) + ":")%>
<%= l(:info_changed_by_user, :changed => revision.updated_at.strftime("%Y-%m-%d %H:%M:%S"), :user => h(revision.user)) %>
<%= label_tag("", l(:label_title) + ":") %>
<%= h(revision.title) %>
<%= label_tag("", l(:label_file) + ":") %>
<%= (h(revision.folder.dmsf_path_str) + "/") unless revision.folder.nil? %><%= h(revision.name) %>
<%= label_tag("", l(:label_description) + ":") %>
<%= textilizable(revision.description) %>
<%= label_tag("", l(:label_version) + ":") %>
<%= revision.major_version %>.<%= revision.minor_version %>
<%= label_tag("", l(:label_workflow) + ":") %>
<%= case revision.workflow
when 1 then l(:option_workflow_waiting_for_approval)
when 2 then l(:option_workflow_approved)
else l(:option_workflow_none)
end %>
<%= label_tag("", l(:label_mime) + ":") %>
<%= h(revision.mime_type) %>
<%= label_tag("", l(:label_size) + ":") %>
<%= number_to_human_size(revision.size) %>
<%= label_tag("", l(:label_comment) + ":") %>
<%= h(revision.comment) %>
<%= render(:partial => "revision_access", :locals => {:revision => revision}) if User.current.allowed_to?(:file_approval, @file.project) %>
<% end %>
<%
sUrl = "jquery.dataTables/en.json"
sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && !I18n.locale.to_s.match(/^en.*/)
%>
<% if @revision.valid? && @file.valid? %>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "jquery-ui/jquery-ui-1.8.13.css", :plugin => "redmine_dmsf" %>
<%= stylesheet_link_tag "jquery.dataTables/jquery-ui.dataTables.css", :plugin => "redmine_dmsf" %>
<%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %>
<%= javascript_include_tag "jquery-1.6.1.min.js", :plugin => "redmine_dmsf" %>
<%= javascript_include_tag "jquery-ui-1.8.13.min.js", :plugin => "redmine_dmsf" %>
<%= javascript_include_tag "jquery.dataTables/jquery.dataTables.min.js", :plugin => "redmine_dmsf" %>
<% end %>