|
|
|
@ -75,11 +75,11 @@ module OpenProject |
|
|
|
|
# Options: |
|
|
|
|
# * :text - Link text (default to the formatted revision) |
|
|
|
|
def link_to_revision(revision, project, options = {}) |
|
|
|
|
text = options.delete(:text) || format_revision(revision) |
|
|
|
|
rev = revision.respond_to?(:identifier) ? revision.identifier : revision |
|
|
|
|
url_options = { controller: '/repositories', action: 'revision', project_id: project, rev: rev } |
|
|
|
|
html_options = { title: l(:label_revision_id, format_revision(revision)) }.merge options |
|
|
|
|
link_to(h(text), url_options, html_options) |
|
|
|
|
text = options.delete(:text) || format_revision(revision) |
|
|
|
|
rev = revision.respond_to?(:identifier) ? revision.identifier : revision |
|
|
|
|
url_opts = { controller: '/repositories', action: 'revision', project_id: project, rev: rev } |
|
|
|
|
html_options = { title: l(:label_revision_id, format_revision(revision)) }.merge(options) |
|
|
|
|
link_to(h(text), url_opts, html_options) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
# Generates a link to a message |
|
|
|
|