changeset 1352:939f4a491900 issue_556

Adds a link to a publication's external URL (if exists). Proposed solution for issue #556.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 12 Jul 2013 15:26:30 +0100
parents 6e033c113bd4
children 99e0ed523b17 75fd8eace091
files plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb plugins/redmine_bibliography/config/locales/en.yml
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb	Fri Jul 12 12:56:26 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb	Fri Jul 12 15:26:30 2013 +0100
@@ -18,6 +18,12 @@
          <%= link_to(l("more_details_link"), {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%>
 
          <%= link_to l(:bibtex_link).html_safe, "javascript:void(0)", :class => "bibtex-link"-%>
+
+        <%- unless publication.external_url.blank? -%>
+            <%= link_to l(:external_url_link), publication.external_url, {:target => "_blank"} -%>
+        <%- end -%>
+
+
        </dd>
        <dd class="bibtex-textarea collapsed" style="display: none;">
          <textarea readonly> <%= print_bibtex_format(publication) -%> </textarea>
--- a/plugins/redmine_bibliography/config/locales/en.yml	Fri Jul 12 12:56:26 2013 +0100
+++ b/plugins/redmine_bibliography/config/locales/en.yml	Fri Jul 12 15:26:30 2013 +0100
@@ -150,4 +150,5 @@
 
   bibtex_link: "[B<small>IB</small>T<sub>E</sub>X]"
   more_details_link: "[More Details]"
+  external_url_link: "[URL (ext.)]"