git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@109 5e329b0b-a2ee-ea63-e329-299493fc886d
159 lines
5.6 KiB
Plaintext
159 lines
5.6 KiB
Plaintext
<% html_title(l(:dmsf)) %>
|
|
|
|
<div class="contextual">
|
|
<% 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(image_tag("unlock.png", :plugin => "redmine_dmsf"),
|
|
{:action => "unlock", :id => @file, :current => request.url },
|
|
:title => l(:title_unlock_file)) %>
|
|
<% else %>
|
|
<%= link_to(image_tag("lock.png", :plugin => "redmine_dmsf"),
|
|
{: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(image_tag("delete.png", :plugin => "redmine_dmsf"),
|
|
{:action => "delete", :id => @file}, :class => "delete-entry", :title => l(:title_delete)) %>
|
|
<% end %>
|
|
<% if User.current.allowed_to?(:file_approval, @project) %>
|
|
|
|
<% if @file.notification %>
|
|
<%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"),
|
|
{:action => "notify_deactivate", :id => @file, :current => request.url },
|
|
:title => l(:title_notifications_active_deactivate)) %>
|
|
<% else %>
|
|
<%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"),
|
|
{:action => "notify_activate", :id => @file, :current => request.url},
|
|
:title => l(:title_notifications_not_active_activate)) %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% path = @file.folder.nil? ? [] : @file.folder.dmsf_path %>
|
|
<h2>
|
|
<%= 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 %>
|
|
</h2>
|
|
|
|
<%= error_messages_for("file") %>
|
|
<%= error_messages_for("revision") %>
|
|
|
|
<%= render(:partial => "file_new_revision") if User.current.allowed_to?(:file_manipulation, @file.project) %>
|
|
|
|
<h3><%= l(:heading_revisions) %></h3>
|
|
<% @file.revisions.each do |revision| %>
|
|
<div class="box dmsf_detail">
|
|
<div style="float:right">
|
|
<%= 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(image_tag("delete.png", :plugin => "redmine_dmsf"),
|
|
{:action => "delete_revision", :id => revision},
|
|
:class => "delete-revision", :title => l(:title_delete_revision)) %>
|
|
<% end %>
|
|
</div>
|
|
<p class="no-ident">
|
|
<%=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)) %>
|
|
</p>
|
|
<div class="clear">
|
|
<div class="splitcontentleft">
|
|
<p>
|
|
<%= label_tag("", l(:label_title) + ":") %>
|
|
<%= h(revision.title) %>
|
|
</p>
|
|
</div>
|
|
<div class="splitcontentright">
|
|
<p>
|
|
<%= label_tag("", l(:label_file) + ":") %>
|
|
<%= (h(revision.folder.dmsf_path_str) + "/") unless revision.folder.nil? %><%= h(revision.name) %>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<p class="no-ident">
|
|
<%= label_tag("", l(:label_description) + ":") %>
|
|
</p>
|
|
<div class="wiki clear" style="margin-left: 110px">
|
|
<%= textilizable(revision.description) %>
|
|
</div>
|
|
|
|
<div class="splitcontentleft">
|
|
<p>
|
|
<%= label_tag("", l(:label_version) + ":") %>
|
|
<%= revision.major_version %>.<%= revision.minor_version %>
|
|
</p>
|
|
<p>
|
|
<%= 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 %>
|
|
</p>
|
|
</div>
|
|
<div class="splitcontentright clear">
|
|
<p>
|
|
<%= label_tag("", l(:label_mime) + ":") %>
|
|
<%= h(revision.mime_type) %>
|
|
</p>
|
|
<p>
|
|
<%= label_tag("", l(:label_size) + ":") %>
|
|
<%= number_to_human_size(revision.size) %>
|
|
</p>
|
|
</div>
|
|
<br style="clear: both"/>
|
|
<p class="no-ident clear">
|
|
<%= label_tag("", l(:label_comment) + ":") %>
|
|
<%= h(revision.comment) %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% content_for :header_tags do %>
|
|
<%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %>
|
|
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" %>
|
|
<script type="text/javascript">
|
|
jQuery.noConflict();
|
|
|
|
jQuery(document).ready(function() {
|
|
jQuery("a.delete-revision").click(function(event) {
|
|
if(!window.confirm("<%= l(:question_do_you_really_want_to_delete_this_revision) %>")) event.preventDefault();
|
|
})
|
|
|
|
jQuery("a.delete-entry").click(function(event) {
|
|
if(!window.confirm("<%= l(:question_do_you_really_want_to_delete_this_entry) %>")) event.preventDefault();
|
|
})
|
|
|
|
jQuery("#file_upload").change(function() {
|
|
if(jQuery("input[name=\"version\"]:checked").val() == "0") {
|
|
jQuery("#fileMinorVersionRadio").prop("checked", true);
|
|
}
|
|
jQuery("#fileSameVersionRadio").prop("disabled", true);
|
|
});
|
|
|
|
jQuery("#newRevisionFormContentToggle").toggle(function() {
|
|
jQuery("#newRevisionFormContentToggle").text("[-]");
|
|
jQuery("#newRevisionFormContent").show();
|
|
}, function() {
|
|
jQuery("#newRevisionFormContentToggle").text("[+]");
|
|
jQuery("#newRevisionFormContent").hide();
|
|
});
|
|
});
|
|
</script>
|
|
<% if @revision.valid? && @file.valid? %>
|
|
<script type="text/javascript">
|
|
jQuery(document).ready(function() {
|
|
jQuery("#newRevisionFormContentToggle").text("[+]");
|
|
jQuery("#newRevisionFormContent").hide();
|
|
});
|
|
</script>
|
|
<% end %>
|
|
<% end %> |