diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-05-21 07:11:25 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-05-21 07:11:25 +0000 |
commit | 83d148242a573f48011b5de3de4f7532db45effa (patch) | |
tree | ae7127ff711541950bc18b4cabf35c6745ab592d | |
parent | 38f6c588ca3a7f6caa516fb02dc95f4148fbf767 (diff) | |
download | redmine-83d148242a573f48011b5de3de4f7532db45effa.tar.gz redmine-83d148242a573f48011b5de3de4f7532db45effa.zip |
fix back-button on description diff page in case of no browser history (#13697)
Contributed by Filou Centrinov.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11893 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/journals/diff.html.erb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index 21b8755e7..4d425f378 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -5,6 +5,9 @@ <%= simple_format_without_paragraph @diff.to_html %> </div> -<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p> +<p> + <%= link_to(l(:button_back), issue_path(@issue), + :onclick => 'if (history.length > 1) {history.back(); return false;}') %> +</p> <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> |