├── README.md ├── app └── views │ └── issues │ └── _collapsed_journals.html.erb ├── assets ├── javascripts │ └── collapsed_journals.js └── stylesheets │ └── collapsed_journals.css ├── config └── locales │ ├── de.yml │ ├── en.yml │ ├── pl.yml │ ├── pt-BR.yml │ ├── ru.yml │ └── uk.yml ├── init.rb └── lib └── issue_history_hook_listener.rb /README.md: -------------------------------------------------------------------------------- 1 | Redmine Collapsed Journals Plugin 2 | ================================= 3 | 4 | Collapses issue history items without an assosiated note. 5 | 6 | Translated into 4 languages: English, German, Russian, Ukrainian, Brazilian Portuguese. 7 | 8 | This plugin is the fork of [Hide Journal Details](http://www.redmine.org/plugins/hide_journal_details) plugin by [Jürgen Diez](http://www.redmine.org/users/76374). 9 | 10 | Screenshot 11 | ---------- 12 | ![Redmine Collapsed Journals Plugin Screenshot](http://stgeneral.github.io/redmine-collapsed-journals/images/screenshots/collapsed-journals-screenshot.png) 13 | 14 | Installation notes 15 | ------------------ 16 | 17 | Plugin's directory should be named `collapsed_journals` exactly. 18 | 19 | Other installation instructions are generic and can be found at [Redmine Plugins page](http://www.redmine.org/projects/redmine/wiki/Plugins). 20 | 21 | Compatible with Redmine 2.4, 2.3, 2.2. 22 | 23 | Proressive plugins for Redmine 24 | ------------------------------------ 25 | 26 | * [Progressive Projects List](http://stgeneral.github.io/redmine-progressive-projects-list/) - overall projects status on one page. 27 | * [Progressive Redmine Theme](http://stgeneral.github.io/redmine-progressive-theme/) - extends default theme with some nice features. 28 | * [Progressive Gantt Mods](http://stgeneral.github.io/redmine-progressive-gantt-mods/) - assignee column and some preferences for Gantt chart. 29 | * [Collapsed Journals Plugin](https://github.com/stgeneral/redmine-collapsed-journals) - collapses issue history items without an assosiated note 30 | 31 | -------------------------------------------------------------------------------- /app/views/issues/_collapsed_journals.html.erb: -------------------------------------------------------------------------------- 1 | <% if @journals.present? %> 2 |
3 | 6 | 7 | <%= l(:label_hide_journal_details) %> 8 | 9 |
10 | 13 | <% end %> -------------------------------------------------------------------------------- /assets/javascripts/collapsed_journals.js: -------------------------------------------------------------------------------- 1 | function showJournalDetails() 2 | { 3 | $(".toggle-journal-details").toggle(); 4 | 5 | $(".journal").show(); 6 | $(".journal .details").show(); 7 | } 8 | 9 | function hideJournalDetails() 10 | { 11 | $(".toggle-journal-details").toggle(); 12 | 13 | $(".journal").hide(); 14 | $(".journal.has-notes").show(); 15 | $(".journal .details").hide(); 16 | } 17 | 18 | function checkHash(location) 19 | { 20 | var note_id = location.hash.substr(1); 21 | if (note_id == "") { 22 | return false; 23 | } 24 | 25 | var note_node = document.getElementById(note_id); 26 | 27 | if (note_node) { 28 | $(note_node.parentNode).show(); 29 | $(note_node.childNodes).show(); 30 | return true; 31 | } else { 32 | return false; 33 | } 34 | } 35 | 36 | function checkHashForLink() 37 | { 38 | checkHash(this); 39 | } 40 | 41 | function initializeVisibility() 42 | { 43 | $("#history").prepend($("#toggle-journal-details-div")); 44 | 45 | $("a.issue").on("click", checkHashForLink); 46 | 47 | $("#show-journal-details").show(); 48 | 49 | $(".journal").hide(); 50 | $(".journal.has-notes").show(); 51 | $(".journal .details").hide(); 52 | 53 | if (checkHash(window.location)) { 54 | window.location.href = window.location.href; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /assets/stylesheets/collapsed_journals.css: -------------------------------------------------------------------------------- 1 | #toggle-journal-details-div { 2 | float: right; 3 | padding-top: 5px; 4 | padding-right: 5px; 5 | } 6 | 7 | #hide-journal-details { 8 | display: none; 9 | } 10 | -------------------------------------------------------------------------------- /config/locales/de.yml: -------------------------------------------------------------------------------- 1 | de: 2 | label_show_journal_details: "Details einblenden" 3 | label_hide_journal_details: "Details ausblenden" 4 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | label_show_journal_details: "Show details" 3 | label_hide_journal_details: "Hide details" 4 | -------------------------------------------------------------------------------- /config/locales/pl.yml: -------------------------------------------------------------------------------- 1 | pl: 2 | label_show_journal_details: "Pokaż szczegóły" 3 | label_hide_journal_details: "Ukryj szczegóły" 4 | -------------------------------------------------------------------------------- /config/locales/pt-BR.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | label_show_journal_details: "Exibir detalhes" 3 | label_hide_journal_details: "Ocultar detalhes" 4 | -------------------------------------------------------------------------------- /config/locales/ru.yml: -------------------------------------------------------------------------------- 1 | ru: 2 | label_show_journal_details: "Показать детали" 3 | label_hide_journal_details: "Скрыть детали" 4 | -------------------------------------------------------------------------------- /config/locales/uk.yml: -------------------------------------------------------------------------------- 1 | uk: 2 | label_show_journal_details: "Показати деталі" 3 | label_hide_journal_details: "Сховаты деталі" 4 | -------------------------------------------------------------------------------- /init.rb: -------------------------------------------------------------------------------- 1 | unless File.basename(File.dirname(__FILE__)) == 'collapsed_journals' 2 | raise "Collapsed Journals plugin directory should be 'collapsed_journals' instead of '#{File.basename(File.dirname(__FILE__))}'" 3 | end 4 | 5 | Redmine::Plugin.register :collapsed_journals do 6 | name 'Collapsed Journals Plugin' 7 | author 'Dmitry Babenko' 8 | description 'Collapses issue history items without an assosiated note' 9 | version '0.0.3' 10 | url 'https://github.com/stgeneral/redmine-collapsed-journals' 11 | author_url 'https://github.com/stgeneral' 12 | requires_redmine :version_or_higher => '2.2.0' 13 | end 14 | 15 | require_dependency 'issue_history_hook_listener' 16 | -------------------------------------------------------------------------------- /lib/issue_history_hook_listener.rb: -------------------------------------------------------------------------------- 1 | class IssueHistoryHookListener < Redmine::Hook::ViewListener 2 | render_on :view_issues_show_description_bottom, :partial => "collapsed_journals" 3 | 4 | def view_layouts_base_html_head(context) 5 | stylesheet_link_tag('collapsed_journals', :plugin => :collapsed_journals) + 6 | javascript_include_tag('collapsed_journals', :plugin => :collapsed_journals) 7 | end 8 | end 9 | --------------------------------------------------------------------------------