From 30e230ef421af5233bf9cd81856b29ae2b550b6c Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Wed, 30 Mar 2016 10:47:30 +0200 Subject: [PATCH] Change table styling and add labels for better accessability --- app/views/meeting_contents/history.html.erb | 110 +++++++++++++++----- 1 file changed, 83 insertions(+), 27 deletions(-) diff --git a/app/views/meeting_contents/history.html.erb b/app/views/meeting_contents/history.html.erb index 2a9c60fa63..5504171ecf 100644 --- a/app/views/meeting_contents/history.html.erb +++ b/app/views/meeting_contents/history.html.erb @@ -27,33 +27,89 @@ See doc/COPYRIGHT.md for more details.

<%= l(:label_history) %>

<%= form_tag({:action => "diff"}, :method => :get) do %> - - - - - - - - - - -<% show_diff = @content_versions.size > 1 %> -<% @content_versions.each_with_index do |content_version,index| %> -"> - - - - - - - -<% end %> - -
#<%= Meeting.human_attribute_name(:updated_on) %><%= Meeting.human_attribute_name(:author) %><%= Meeting.human_attribute_name(:comments) %>
- <%= content_version.version == @content.version ? - link_to(content_version.version, tab_meeting_path(@meeting, :tab => @content_type.sub(/^meeting_/, ''))) : - link_to(content_version.version, send(:"#{@content_type}_version_path", @meeting, content_version.version)) %> - <%= radio_button_tag('version_to', content_version.version, (index==0), :id => "checkbox-from-#{index}", :onclick => "$('checkbox-to-#{index+1}').checked=true;") if show_diff && (index < @content_versions.size-1) %><%= radio_button_tag('version_from', content_version.version, (index==1), :id => "checkbox-to-#{index}") if show_diff && (index > 0) %><%= format_time(content_version.created_at) %><%= User.find content_version.user_id %><%=h content_version.notes %>
+
+
+ + + + + + + + + + + + + + + + + + + + + <% show_diff = @content_versions.size > 1 %> + <% @content_versions.each_with_index do |content_version,index| %> + + + + + + + + + <% end %> + +
+
+
+ # + +
+
+
+
+
+ + <%= Meeting.human_attribute_name(:updated_on) %> + +
+
+
+
+
+ + <%= Meeting.human_attribute_name(:author) %> + +
+
+
+
+
+ + <%= Meeting.human_attribute_name(:comments) %> + +
+
+
+ <%= content_version.version == @content.version ? + link_to(content_version.version, tab_meeting_path(@meeting, :tab => @content_type.sub(/^meeting_/, '')), id: "version-#{content_version.version}") : + link_to(content_version.version, send(:"#{@content_type}_version_path", @meeting, content_version.version), id: "version-#{content_version.version}") %> + + <% if show_diff && (index < @content_versions.size-1) %> + <%= radio_button_tag('version_to', content_version.version, (index==0), :id => "checkbox-from-#{index}", :onclick => "$('checkbox-to-#{index+1}').checked=true;") %> + + <% end %> + + <% if show_diff && (index > 0) %> + <%= radio_button_tag('version_from', content_version.version, (index==1), :id => "checkbox-to-#{index}") %> + + <% end %> + <%= format_time(content_version.created_at) %><%= User.find content_version.user_id %><%=h content_version.notes %>
+
+
+
<%= styled_button_tag l(:label_view_diff), class: '-small -highlight' if show_diff %> <%= pagination_links_full @content_versions %> <% end %>