git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@43 5e329b0b-a2ee-ea63-e329-299493fc886d
118 lines
3.5 KiB
Plaintext
118 lines
3.5 KiB
Plaintext
<% html_title(l(:dmsf)) %>
|
|
|
|
<div class="contextual">
|
|
</div>
|
|
|
|
<% path = @file.folder.nil? ? [] : @file.folder.dmsf_path %>
|
|
<h2>
|
|
<%= render(:partial => "/dmsf/path", :locals => {:path => path}) %>
|
|
/
|
|
<%= h(@file.last_revision.title) %> <div style="float: right"><%= h(@file.name) %></div>
|
|
<% if @file.notification %>
|
|
<%= image_tag("notify.png", :plugin => "redmine_dmsf", :alt => "Not. act.",
|
|
:title => "Notifications active") %>
|
|
<% end %>
|
|
</h2>
|
|
|
|
<% if User.current.allowed_to?(:file_manipulation, @file.project) %>
|
|
<%= render(:partial => 'file_new_revision') %>
|
|
<% end %>
|
|
|
|
<h3>Revisions</h3>
|
|
<% @file.revisions.each do |revision| %>
|
|
<div class="box dmsf_detail dmsf_revision">
|
|
<div style="float:right">
|
|
<%= link_to("Download",
|
|
{:controller=>"dmsf", :action => "download_revision", :id => @project, :revision_id => revision}) %>
|
|
<% if User.current.allowed_to?(:file_approval, @project) %>
|
|
| <%= link_to("Delete",
|
|
{:action => "delete_revision", :id => @project, :revision_id => revision},
|
|
:class => "delete-link", :title => "Delete revision") %>
|
|
<% end %>
|
|
</div>
|
|
<p class="no-ident">
|
|
<%= label_tag("", revision.source_revision.nil? ? "Created:" : "Changed:") %>
|
|
<%= revision.updated_at.strftime("%Y-%m-%d %H:%M:%S") %> by <%= h(revision.user) %>
|
|
</p>
|
|
<div class="clear">
|
|
<div class="splitcontentleft">
|
|
<p>
|
|
<%= label_tag("", "Title:") %>
|
|
<%= h(revision.title) %>
|
|
</p>
|
|
</div>
|
|
<div class="splitcontentright">
|
|
<p>
|
|
<%= label_tag("", "Filename:") %>
|
|
<%= h(revision.name) %>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<p class="no-ident">
|
|
<%= label_tag("", "Description:") %>
|
|
</p>
|
|
<div class="wiki clear" style="margin-left: 110px">
|
|
<%= textilizable(revision.description) %>
|
|
</div>
|
|
|
|
<div class="splitcontentleft">
|
|
<p>
|
|
<%= label_tag("", "Version:") %>
|
|
<%= revision.major_version %>.<%= revision.minor_version %>
|
|
</p>
|
|
<p>
|
|
<%= label_tag("", "Workflow:") %>
|
|
<%= case revision.workflow
|
|
when 1 then "Waiting for approval"
|
|
when 2 then "Approved"
|
|
else "None"
|
|
end %>
|
|
</p>
|
|
</div>
|
|
<div class="splitcontentright clear">
|
|
<p>
|
|
<%= label_tag("", "Mime:") %>
|
|
<%= h(revision.mime_type) %>
|
|
</p>
|
|
<p>
|
|
<%= label_tag("", "Size:") %>
|
|
<%= number_to_human_size(revision.size) %>
|
|
</p>
|
|
</div>
|
|
<p class="clear">
|
|
<%= label_tag("", "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-link").click(function(event) {
|
|
if(!window.confirm("<%= l(:question_do_you_really_want_to_delete_this_revision) %>")) event.preventDefault();
|
|
})
|
|
|
|
jQuery("#fileFileUpload").change(function() {
|
|
if(jQuery("input[name=\"file[version]\"]:checked").val() == "same") {
|
|
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();
|
|
});
|
|
jQuery("#newRevisionFormContentToggle").text("[+]");
|
|
jQuery("#newRevisionFormContent").hide();
|
|
});
|
|
</script>
|
|
<% end %> |