From a2c0e1f47154ffd082abd273b97823c8cbb7965c Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Tue, 28 May 2013 14:56:07 +0200 Subject: [PATCH] Revision view optimized for better reading --- .../dmsf_files/_file_new_revision.html.erb | 12 +- app/views/dmsf_files/show.html.erb | 126 +++++++++--------- assets/images/rev_delete.png | Bin 0 -> 647 bytes assets/images/rev_download.png | Bin 0 -> 656 bytes assets/images/rev_downloads.png | Bin 0 -> 642 bytes assets/stylesheets/dmsf.css | 3 +- config/locales/en.yml | 2 +- 7 files changed, 69 insertions(+), 74 deletions(-) create mode 100644 assets/images/rev_delete.png create mode 100644 assets/images/rev_download.png create mode 100644 assets/images/rev_downloads.png diff --git a/app/views/dmsf_files/_file_new_revision.html.erb b/app/views/dmsf_files/_file_new_revision.html.erb index 2a58bf45..e09f73f7 100644 --- a/app/views/dmsf_files/_file_new_revision.html.erb +++ b/app/views/dmsf_files/_file_new_revision.html.erb @@ -42,17 +42,7 @@ <%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %> <%= l(:option_version_minor) %>
<%= radio_button_tag("version", 2, @revision.major_version != @file.last_revision.major_version) %> <%= @file.last_revision.major_version + 1 %>.0 <%= l(:option_version_major) %>
- -

- <%= 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 %> - -

+

diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index f1458a6a..2c86be27 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -57,66 +57,72 @@

<%= l(:heading_revisions) %>

<% @file.revisions.visible[@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('', 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)) %> - -
-
-
- <%= 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) + ':') %> - <%= revision.workflow_str true %> -
-
- <%= label_tag("", l(:label_mime) + ":") %> - <%= h(revision.mime_type) %>  -
- <%= label_tag("", l(:label_size) + ":") %> - <%= number_to_human_size(revision.size) %> -
-
- <%= render "dmsf/custom_fields", :object => revision %> -
-
- <%= label_tag("", l(:label_comment) + ":") %> - <%= h(revision.comment) %> -
- <%= render(:partial => "revision_access", :locals => {:revision => revision}) if User.current.allowed_to?(:file_approval, @file.project) %> -
-
+
+
+
+
+ <%= 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 %> +
+ <%= 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)) %> + <%= link_to(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) + ':') %> + <%= revision.workflow_str true %> +
+
+ <%= label_tag("", l(:label_mime) + ":") %> + <%= h(revision.mime_type) %>  +
+ <%= label_tag("", l(:label_size) + ":") %> + <%= number_to_human_size(revision.size) %> +
+
+ <%= render "dmsf/custom_fields", :object => revision %> +
+
+ <%= label_tag("", l(:label_comment) + ":") %> + <%= h(revision.comment) %> +
+
+
" style="display:none"> + <%= render(:partial => "revision_access", :locals => {:revision => revision}) if User.current.allowed_to?(:file_approval, @file.project) %> +
+
+
+
+
<% end %>

<%= pagination_links_full @revision_pages, @file.revisions.visible.count %>

diff --git a/assets/images/rev_delete.png b/assets/images/rev_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..8c631734658b8fb36ec8f7bcdff5e6810299a6c0 GIT binary patch literal 647 zcmV;20(kw2P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*l6 z3KkK|_CX>@2HM@dakSAh-}0005vNklg`YRCm9EhxpI5k== zf!4Wl*(NLb1p&it_ha_GztNUn>Q{P>oI5aNtSJw&#@R zp%xZs@9ydxI9;y`af~@Q;A58ce;9N5QkuRx+F*o04n%IuOyRJw=z?WcD&$E*9>-Xf z3htlY)tLsN$bAQH`o3?QZkM0NppC(FyZF9umti9k*&5f3KjNkXcWbsSd6x0r7&^wJ zLogMkq@)x@$6-H7bPC%Itsfm31R@Tw<0-Z3K(P;WjM2a~AO~J7D&^Qf0{J&%z5wT& zTBmC4BQ53d#)euSGGMc*_4C64SAnNCoan=T5iVZP`s=g=P6Z-+p~$@{+?_zA6^Sg( hJf>*}^Ecc-<2Os>zR&j^rZoTn002ovPDHLkV1n%&7c>9> literal 0 HcmV?d00001 diff --git a/assets/images/rev_download.png b/assets/images/rev_download.png new file mode 100644 index 0000000000000000000000000000000000000000..c3c74e1a323e1c1ffef0b7f810720ff76328b319 GIT binary patch literal 656 zcmV;B0&o3^P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*l6 z3k3kddD)@>00Iz6L_t(I%e9hCXcJKsh0mS$nwU;I5^a^Dn`#$kr)Z-g;t#kHMK=ab z2tuI2h(j>h3WDMybfw@{BHf6(@h>>wu0lT12qo{N%FQ(Fb` zt{#VTzsJ4z5IX9}%Rc(-x-A~T)S%5 z*J`O$3bg<3K~e|R(|z0f3m(Pu!^^zhEsD2m{caq0$*H%v!fD2unQB<|vy<09R#@4X zhZfK*8c@7DyLX)MC>|!HkP0cZ`nwd86IXoP$7kzvt!AZpsgyFm$`uVgNu@yK2|wYnRRVyEg#f_xr(2(?mL*Mq%`2qjz6#$sNGq z9D07N1Y7>2Qa)7fkm05JS8bnMK;xy6wWS7gE*k>MA|A2A>E0YEew z#fC}LG!0Tp5Yc#WEOgPc$Md?fP%TgAt3xR^P#~(8&Y$5A^{+ qGMW7Qbj9QG6+kcu0MK=PL+?-J-_xIPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*l6 z3j_;KurX@@00II@L_t(I%e9g}s8Vqh$G^Ydy{T7GxEQ+J&6ek$4K4*OL0d>E5?oL) zl1tvTsU`$896+~w_hcDmrfphpW z9F(r>g5x;Cp}yPg$TUs6*=*9jE*=^sNqSC1X(F;NHO3gTEbEMjUIX}iEkIF}6VCZ< z#u)YhST2`8hQs08KLQ-bvGE;-jYh)`g+ix3pYN8}>pkI|vrEWD z2LLvo&o`6F)dFdB_o<#PFjZQFJ-nMAAAI-bNpAOIo)W9*}* zX^%xwd~cd&uhZ!~Td&tERaIda#`VESrBYY3rfK&wnaoW9$Y!&DpRRN|4FHJ6VgP`A cKL1