changeset 1316:b189ccd72882 redmine-2.2-integration

Merge
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 18 Jun 2013 15:33:49 +0100
parents 12556ba57d17 (current diff) 033fecbc3438 (diff)
children 9c2a5a4514a8 5490d6392ee3
files
diffstat 5 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/helpers/publications_helper.rb	Tue Jun 18 15:33:36 2013 +0100
+++ b/plugins/redmine_bibliography/app/helpers/publications_helper.rb	Tue Jun 18 15:33:49 2013 +0100
@@ -123,7 +123,7 @@
 
   def print_ieee_format(publication)
     Rails.cache.fetch("publication-#{publication.id}-ieee") do
-      publication.print_entry(:ieee)
+      publication.print_entry(:ieee).html_safe
     end
   end
 
--- a/plugins/redmine_bibliography/app/models/publication.rb	Tue Jun 18 15:33:36 2013 +0100
+++ b/plugins/redmine_bibliography/app/models/publication.rb	Tue Jun 18 15:33:49 2013 +0100
@@ -101,11 +101,10 @@
     end
 
     if style == :ieee
-      CiteProc.process bib.to_citeproc, :style => :ieee, :format => :html
+      CiteProc.process(bib.to_citeproc, :style => :ieee, :format => :html)
     else
       bibtex = bib.to_s :include => :meta_content
       bibtex.strip!
-      logger.error { bibtex }
     end
   end
 end
--- a/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb	Tue Jun 18 15:33:36 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb	Tue Jun 18 15:33:49 2013 +0100
@@ -15,9 +15,9 @@
           <%= print_ieee_format(publication) %>
        </dt>
        <dd>
-         <%= link_to("[More Details]", {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%>
+         <%= link_to(l("more_details_link"), {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%>
 
-         <%= link_to_function "[B<small>IB</small>T<sub>E</sub>X]", onclick="toggleBibtex(this)" -%>
+         <%= link_to l(:bibtex_link).html_safe, "javascript:void(0)", :class => "bibtex-link"-%>
        </dd>
        <dd class="bibtex-textarea collapsed" style="display: none;">
          <textarea readonly> <%= print_bibtex_format(publication) %> </textarea>
--- a/plugins/redmine_bibliography/assets/javascripts/bibtex.js	Tue Jun 18 15:33:36 2013 +0100
+++ b/plugins/redmine_bibliography/assets/javascripts/bibtex.js	Tue Jun 18 15:33:49 2013 +0100
@@ -1,6 +1,5 @@
-function toggleBibtex(el) {
-  var dd = Element.up(el).next('dd');
 
-  dd.toggleClassName('collapsed');
-  Effect.toggle(dd, 'slide', {duration:0.2});
-}
\ No newline at end of file
+$('.bibtex-link').live("click", function() {
+  $this = $(this);
+  $this.closest('dd').next('dd').toggle();
+});
\ No newline at end of file
--- a/plugins/redmine_bibliography/config/locales/en.yml	Tue Jun 18 15:33:36 2013 +0100
+++ b/plugins/redmine_bibliography/config/locales/en.yml	Tue Jun 18 15:33:49 2013 +0100
@@ -148,5 +148,6 @@
   mail_subject_publication_added: "You have been added as an author to a new publication"
   mail_body_publication_added: "A new publication (%{publication}) has been added to the project '%{project}.'"
 
+  bibtex_link: "[B<small>IB</small>T<sub>E</sub>X]"
+  more_details_link: "[More Details]"
 
-