From b6549d763ae7a4dc9ad2f00c7b9d6becc1e39012 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 20 Jan 2008 15:38:11 +0000 Subject: [PATCH] Added related changesets messages on issue details view. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1085 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_changesets.rhtml | 8 ++++++++ app/views/issues/_pdf.rfpdf | 20 ++++++++++++++++++-- app/views/issues/show.rhtml | 13 +++++++------ lang/bg.yml | 1 + lang/cs.yml | 1 + lang/de.yml | 1 + lang/en.yml | 1 + lang/es.yml | 1 + lang/fi.yml | 1 + lang/fr.yml | 1 + lang/he.yml | 1 + lang/it.yml | 1 + lang/ja.yml | 1 + lang/ko.yml | 1 + lang/lt.yml | 1 + lang/nl.yml | 1 + lang/pl.yml | 1 + lang/pt-br.yml | 1 + lang/pt.yml | 1 + lang/ro.yml | 1 + lang/ru.yml | 1 + lang/sr.yml | 1 + lang/sv.yml | 1 + lang/zh-tw.yml | 1 + lang/zh.yml | 1 + public/stylesheets/application.css | 5 +++++ 26 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 app/views/issues/_changesets.rhtml diff --git a/app/views/issues/_changesets.rhtml b/app/views/issues/_changesets.rhtml new file mode 100644 index 000000000..1a4c1a5bd --- /dev/null +++ b/app/views/issues/_changesets.rhtml @@ -0,0 +1,8 @@ + diff --git a/app/views/issues/_pdf.rfpdf b/app/views/issues/_pdf.rfpdf index 558399abb..6830506f6 100644 --- a/app/views/issues/_pdf.rfpdf +++ b/app/views/issues/_pdf.rfpdf @@ -66,8 +66,24 @@ pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY) pdf.Ln - - pdf.SetFontStyle('B',9) + + if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, issue.project) + pdf.SetFontStyle('B',9) + pdf.Cell(190,5, l(:label_associated_revisions), "B") + pdf.Ln + for changeset in @issue.changesets + pdf.SetFontStyle('B',8) + pdf.Cell(190,5, format_time(changeset.committed_on) + " - " + changeset.committer) + pdf.Ln + unless changeset.comments.blank? + pdf.SetFontStyle('',8) + pdf.MultiCell(190,5, changeset.comments) + end + pdf.Ln + end + end + + pdf.SetFontStyle('B',9) pdf.Cell(190,5, l(:label_history), "B") pdf.Ln for journal in issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC") diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 7208e37be..45423a2e0 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -57,12 +57,6 @@ end %>
-<% if @issue.changesets.any? %> -
- <%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %> -
-<% end %> -

<%=l(:field_description)%>

<%= textilizable @issue, :description, :attachments => @issue.attachments %> @@ -81,6 +75,13 @@ end %>
+<% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %> +
+

<%=l(:label_associated_revisions)%>

+<%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %> +
+<% end %> + <% if @journals.any? %>

<%=l(:label_history)%>

diff --git a/lang/bg.yml b/lang/bg.yml index ae5630ecf..7f994acd4 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/cs.yml b/lang/cs.yml index 813dade3f..6e904c106 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/de.yml b/lang/de.yml index 660289768..27ca40a3d 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/en.yml b/lang/en.yml index 7d3912760..6580d398a 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -359,6 +359,7 @@ label_modification: %d change label_modification_plural: %d changes label_revision: Revision label_revision_plural: Revisions +label_associated_revisions: Associated revisions label_added: added label_modified: modified label_deleted: deleted diff --git a/lang/es.yml b/lang/es.yml index 37821e129..1c6776555 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -564,3 +564,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/fi.yml b/lang/fi.yml index 4aee95bb9..7eba540a7 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -566,3 +566,4 @@ default_activity_development: Kehitys enumeration_issue_priorities: Tapahtuman prioriteetit enumeration_doc_categories: Dokumentin luokat enumeration_activities: Aktiviteetit (ajan seuranta) +label_associated_revisions: Associated revisions diff --git a/lang/fr.yml b/lang/fr.yml index 841f132d4..ce3817d3c 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -359,6 +359,7 @@ label_modification: %d modification label_modification_plural: %d modifications label_revision: Révision label_revision_plural: Révisions +label_associated_revisions: Révisions associées label_added: ajouté label_modified: modifié label_deleted: supprimé diff --git a/lang/he.yml b/lang/he.yml index 666675e75..928c68baa 100644 --- a/lang/he.yml +++ b/lang/he.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/it.yml b/lang/it.yml index 24e39955a..a16228149 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/ja.yml b/lang/ja.yml index d68013296..56f846947 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -562,3 +562,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/ko.yml b/lang/ko.yml index 75a4bef4c..7a509478e 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -561,3 +561,4 @@ button_update: 변경사항기록 label_change_properties: 속성 변경 label_general: 일반 label_repository_plural: 저장소들 +label_associated_revisions: Associated revisions diff --git a/lang/lt.yml b/lang/lt.yml index 8cf573d10..8455260f1 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -562,3 +562,4 @@ text_load_default_configuration: Load the default configuration text_no_configuration_data: "Roles, trackers, issue statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded." label_repository_plural: Repositories error_can_t_load_default_data: "Default configuration could not be loaded: %s" +label_associated_revisions: Associated revisions diff --git a/lang/nl.yml b/lang/nl.yml index 44633e4b4..92e5a5971 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -562,3 +562,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/pl.yml b/lang/pl.yml index 3353333b8..548917a36 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -561,3 +561,4 @@ button_update: Uaktualnij label_change_properties: Zmień właściwości label_general: Ogólne label_repository_plural: Repozytoria +label_associated_revisions: Associated revisions diff --git a/lang/pt-br.yml b/lang/pt-br.yml index 684b51daa..45e66cd52 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/pt.yml b/lang/pt.yml index 0ce2d3471..54b74c47c 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/ro.yml b/lang/ro.yml index 95e0ea318..c3427d261 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -561,3 +561,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/ru.yml b/lang/ru.yml index 131b5c77c..7bf47c8fc 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -560,3 +560,4 @@ button_update: Обновить label_change_properties: Изменить свойства label_general: Общее label_repository_plural: Репозитории +label_associated_revisions: Associated revisions diff --git a/lang/sr.yml b/lang/sr.yml index ece6cf6e2..6c486a83f 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -562,3 +562,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/sv.yml b/lang/sv.yml index cf1e760f9..0cb9a2d67 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -562,3 +562,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml index b0c258bcf..465855b58 100644 --- a/lang/zh-tw.yml +++ b/lang/zh-tw.yml @@ -562,3 +562,4 @@ default_activity_development: 開發 enumeration_issue_priorities: 項目重要性 enumeration_doc_categories: 文件分類 enumeration_activities: 活動 (time tracking) +label_associated_revisions: Associated revisions diff --git a/lang/zh.yml b/lang/zh.yml index 2d537b250..c42c60fac 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -564,3 +564,4 @@ button_update: Update label_change_properties: Change properties label_general: General label_repository_plural: Repositories +label_associated_revisions: Associated revisions diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 5bada6e06..ec3ae159d 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -135,6 +135,11 @@ hr { width: 100%; height: 1px; background: #ccc; border: 0;} textarea.wiki-edit { width: 99%; } li p {margin-top: 0;} div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;} + +div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em;} +div#issue-changesets ul {list-style-position: outside; list-style-type:none; margin: 0; padding: 0;} +div#issue-changesets li { padding: 4px; } + .autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;} #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; } -- 2.39.5