# HG changeset patch # User luisf # Date 1314116175 -3600 # Node ID 156bd1153f47fe8adf448ac9f2102341ebd377d4 # Parent 712324fee0c00ee2aea8f6e6556415c7c2075a05 Fix for Feature #235. This view is no longer a priority. diff -r 712324fee0c0 -r 156bd1153f47 vendor/plugins/redmine_bibliography/app/controllers/authors_controller.rb --- a/vendor/plugins/redmine_bibliography/app/controllers/authors_controller.rb Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/controllers/authors_controller.rb Tue Aug 23 17:16:15 2011 +0100 @@ -1,12 +1,13 @@ class AuthorsController < ApplicationController + helper :publications + include PublicationsHelper def index @authors = Author.find(:all) end def show - @author = Author.find(params[:id]) - + @author = Author.find(params[:id]) end end diff -r 712324fee0c0 -r 156bd1153f47 vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb --- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Tue Aug 23 17:16:15 2011 +0100 @@ -1,6 +1,12 @@ require 'bibtex' module PublicationsHelper + + def link_to_publication(publication, options={}, html_options = nil) + url = {:controller => 'publications', :action => 'show', :id => publication}.merge(options) + link_to(h(publication.title), url, html_options) + end + def projects_check_box_tags(name, projects) s = '' projects.sort.each do |project| diff -r 712324fee0c0 -r 156bd1153f47 vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb Tue Aug 23 15:47:15 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb Tue Aug 23 17:16:15 2011 +0100 @@ -13,7 +13,7 @@ <% @author.authorships.each do |authorship| %> - <%= h authorship.publication.title %> + <%= link_to_publication(authorship.publication) %> <%= h authorship.name_on_paper %> <%= h authorship.email %> <%= h authorship.institution %>