Revision view optimized for better reading

This commit is contained in:
Karel Picman 2013-05-28 14:56:07 +02:00
parent 64d8c521df
commit a2c0e1f471
7 changed files with 69 additions and 74 deletions

View File

@ -42,17 +42,7 @@
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %> <%= l(:option_version_minor) %><br />
<%= radio_button_tag("version", 2, @revision.major_version != @file.last_revision.major_version) %>
<%= @file.last_revision.major_version + 1 %>.0 <%= l(:option_version_major) %><br />
</div>
<p>
<%= label_tag('workflow', l(:label_workflow) + ':') %>
<%= select_tag(
'dmsf_workflow_id',
dmsf_workflows_for_select(@project, @file.last_revision.dmsf_workflow_id))%>
<% if @file.last_revision.dmsf_workflow_id && @file.last_revision.workflow == 3%>
<%= submit_tag(l(:label_dmsf_wokflow_action_start)) %>
<% end %>
</p>
</div>
</div>
<div class="splitcontentright clear">
<p>

View File

@ -57,66 +57,72 @@
<h3><%= l(:heading_revisions) %></h3>
<% @file.revisions.visible[@revision_pages.current.offset,@revision_pages.items_per_page].each do |revision| %>
<div class="revision_box dmsf_detail">
<div class="ui-widget-header ui-corner-tl ui-corner-tr">
<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) %>
&nbsp;
<%= 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 %>
</div>
<%= label_tag('', l(:info_revision, :rev => revision.id)) %>
<%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %>
<%= l(:info_changed_by_user, :changed => format_time(revision.updated_at), :user => h(revision.user)) %>
</div>
<div class="clear">
<div class="splitcontentleft">
<%= label_tag("", l(:label_title) + ":") %>
<%= h(revision.title) %>
</div>
<div class="splitcontentright">
<%= label_tag("", l(:label_file) + ":") %>
<%= (h(revision.folder.dmsf_path_str) + "/") unless revision.folder.nil? %><%= h(revision.name) %>
</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">
<%= label_tag("", l(:label_version) + ":") %>
<%= revision.major_version %>.<%= revision.minor_version %>
<br/>
<%= label_tag('', l(:label_workflow) + ':') %>
<%= revision.workflow_str true %>
</div>
<div class="splitcontentright clear">
<%= label_tag("", l(:label_mime) + ":") %>
<%= h(revision.mime_type) %>&nbsp;
<br/>
<%= label_tag("", l(:label_size) + ":") %>
<%= number_to_human_size(revision.size) %>
</div>
<div class="no-ident clear">
<%= render "dmsf/custom_fields", :object => revision %>
</div>
<div class="splitcontentleft clear">
<%= label_tag("", l(:label_comment) + ":") %>
<%= h(revision.comment) %>
</div>
<%= render(:partial => "revision_access", :locals => {:revision => revision}) if User.current.allowed_to?(:file_approval, @file.project) %>
</div>
<br/>
<div class="revision_box dmsf_detail dataTables_wrapper">
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
<div class="dataTables_lenght">
<div class="controls" style="float: right">
<%= link_to_function(image_tag('rev_downloads.png', :plugin => 'redmine_dmsf'), "$('#revision_access-#{revision.id}').toggle()", :title => 'Download entries')%>
<%= link_to(image_tag('rev_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('rev_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 %>
</div>
<i><%= l(:info_revision, :rev => revision.id) %></i>
<%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %>
<%= l(:info_changed_by_user, :changed => format_time(revision.updated_at)) %>
<%= link_to(revision.user) %>
</div>
</div>
<div style="border: 1px solid #e4e4e4;">
<div class="clear">
<div class="splitcontentleft">
<%= label_tag("", l(:label_title) + ":") %>
<%= h(revision.title) %>
</div>
<div class="splitcontentright">
<%= label_tag("", l(:label_file) + ":") %>
<%= (h(revision.folder.dmsf_path_str) + "/") unless revision.folder.nil? %><%= h(revision.name) %>
</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">
<%= label_tag("", l(:label_version) + ":") %>
<%= revision.major_version %>.<%= revision.minor_version %>
<br/>
<%= label_tag('', l(:label_workflow) + ':') %>
<%= revision.workflow_str true %>
</div>
<div class="splitcontentright clear">
<%= label_tag("", l(:label_mime) + ":") %>
<%= h(revision.mime_type) %>&nbsp;
<br/>
<%= label_tag("", l(:label_size) + ":") %>
<%= number_to_human_size(revision.size) %>
</div>
<div class="no-ident clear">
<%= render "dmsf/custom_fields", :object => revision %>
</div>
<div class="splitcontentleft clear">
<%= label_tag("", l(:label_comment) + ":") %>
<%= h(revision.comment) %>
</div>
<br/>
<div id="<%= "revision_access-#{revision.id}" %>" style="display:none">
<%= render(:partial => "revision_access", :locals => {:revision => revision}) if User.current.allowed_to?(:file_approval, @file.project) %>
</div>
</div>
</div>
<br/>
<br/>
<% end %>
<p class="pagination"><%= pagination_links_full @revision_pages, @file.revisions.visible.count %></p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

View File

@ -244,8 +244,7 @@ table.access-table tbody td, table.access-table tbody tr:hover td {
margin-bottom: 10px;
background-color:#f6f6f6;
color:#505050;
line-height:1.5em;
/*border: 1px solid #e4e4e4;*/
line-height:1.5em;
}
div.revision_box .ui-widget-header {

View File

@ -92,7 +92,7 @@ en:
:title_delete_revision: "Delete revision"
:label_created: "Created"
:label_changed: "Changed"
:info_changed_by_user: "%{changed} by %{user}"
:info_changed_by_user: "%{changed} by"
:label_filename: "Filename"
:label_version: "Version"
:label_workflow: "Workflow"