summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-24 13:57:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-24 13:57:27 +0000
commit941a240535ac1b62f210afefefa4a0013b185a5f (patch)
tree5090119acea6a096027d4581c24975cafe1d4340 /app/views
parented5b5d0559015a1d31d44b6c606cab24cc72926c (diff)
downloadredmine-941a240535ac1b62f210afefefa4a0013b185a5f.tar.gz
redmine-941a240535ac1b62f210afefefa4a0013b185a5f.zip
Commit messages are now scanned for referenced or fixed issue IDs.
Keywords and the status to apply to fixed issues can be defined in Admin -> Settings. Default keywords: - for referencing issues: refs, references, IssueID - for fixing issues: fixes,closes There's no default status defined for fixed issue. You'll have to specify it if you want to enable auto closure of issues. Example of a working commit message: "This commit references #1, #2 and fixes #3" git-svn-id: http://redmine.rubyforge.org/svn/trunk@473 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/show.rhtml7
-rw-r--r--app/views/repositories/revision.rhtml9
-rw-r--r--app/views/settings/edit.rhtml12
3 files changed, 26 insertions, 2 deletions
diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml
index a967b57db..2eb01f094 100644
--- a/app/views/issues/show.rhtml
+++ b/app/views/issues/show.rhtml
@@ -44,7 +44,12 @@ end %>
</tr>
</table>
<hr />
-<br />
+
+<% if @issue.changesets.any? %>
+<div style="float:right;">
+ <em><%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %></em>
+</div>
+<% end %>
<b><%=l(:field_description)%> :</b><br /><br />
<%= textilizable @issue.description %>
diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml
index f738f8cda..b443e8c64 100644
--- a/app/views/repositories/revision.rhtml
+++ b/app/views/repositories/revision.rhtml
@@ -10,6 +10,15 @@
<p><em><%= @changeset.committer %>, <%= format_time(@changeset.committed_on) %></em></p>
<%= textilizable @changeset.comment %>
+<% if @changeset.issues.any? %>
+<h3><%= l(:label_related_issues) %></h3>
+<ul>
+<% @changeset.issues.each do |issue| %>
+ <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
+<% end %>
+</ul>
+<% end %>
+
<div style="float:right;">
<div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %>&nbsp;</div>
<div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %>&nbsp;</div>
diff --git a/app/views/settings/edit.rhtml b/app/views/settings/edit.rhtml
index 7a678c53f..4c9b55029 100644
--- a/app/views/settings/edit.rhtml
+++ b/app/views/settings/edit.rhtml
@@ -50,8 +50,18 @@
<p><label><%= l(:setting_sys_api_enabled) %></label>
<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p>
-
</div>
+
+<fieldset class="box"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
+<p><label><%= l(:setting_commit_ref_keywords) %></label>
+<%= text_field_tag 'settings[commit_ref_keywords]', Setting.commit_ref_keywords, :size => 30 %><br /><em><%= l(:text_coma_separated) %></em></p>
+
+<p><label><%= l(:setting_commit_fix_keywords) %></label>
+<%= text_field_tag 'settings[commit_fix_keywords]', Setting.commit_fix_keywords, :size => 30 %>
+&nbsp;<%= l(:label_applied_status) %>: <%= select_tag 'settings[commit_fix_status_id]', options_for_select( [["", 0]] + IssueStatus.find(:all).collect{|status| [status.name, status.id.to_s]}, Setting.commit_fix_status_id) %>
+<br /><em><%= l(:text_coma_separated) %></em></p>
+</fieldset>
+
<%= submit_tag l(:button_save) %>
</div>
<% end %> \ No newline at end of file