Index: app/views/issues/show.html.erb =================================================================== --- app/views/issues/show.html.erb (revision 14622) +++ app/views/issues/show.html.erb (working copy) @@ -120,7 +120,12 @@ <% if @journals.present? %>
+

<%=l(:label_history)%>

+<% if @journals.detect {|j| ! j.details.empty?} %> + <%= check_box_tag 'show_notes_only', 1, false, {onclick: "toggleJournalDetails(this)"} %><%= label_tag 'show_notes_only', l(:label_show_notes_only) %> +<% end %> +
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
<% end %> Index: config/locales/en.yml =================================================================== --- config/locales/en.yml (revision 14622) +++ config/locales/en.yml (working copy) @@ -971,6 +971,7 @@ label_fields_mapping: Fields mapping label_file_content_preview: File content preview label_create_missing_values: Create missing values + label_show_notes_only: Show notes only button_login: Login button_submit: Submit Index: public/javascripts/application.js =================================================================== --- public/javascripts/application.js (revision 14622) +++ public/javascripts/application.js (working copy) @@ -650,6 +650,16 @@ toggleDisabledInit(); }); +function toggleJournalDetails(el) { + var checked = $(el).is(':checked'); + details = $('.journal:not(.has-notes), .journal .details'); + if (checked) { + details.hide(); + } else { + details.show(); + } +} + $(document).ready(setupAjaxIndicator); $(document).ready(hideOnLoad); $(document).ready(addFormObserversForDoubleSubmit); Index: public/stylesheets/application.css =================================================================== --- public/stylesheets/application.css (revision 14622) +++ public/stylesheets/application.css (working copy) @@ -375,6 +375,9 @@ div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; } div#issue-changesets p { margin-top: 0; margin-bottom: 1em;} +div#history-header { margin: 8px 0 15px; } +div#history-header h3 { display: inline; } + .journal ul.details img {margin:0 0 -3px 4px;} div.journal {overflow:auto;} div.journal.private-notes {border-left:2px solid #d22; padding-left:4px; margin-left:-6px;}