# HG changeset patch # User luisf # Date 1314183401 -3600 # Node ID c1866eed921e8554a163fa52e1042b3e2dca6acb # Parent 156bd1153f47fe8adf448ac9f2102341ebd377d4# Parent c4ddb9531f4c1e0dfbf8f31a232f1e61ce4c5eba Merge from 616:c4ddb9531f4c diff -r c4ddb9531f4c -r c1866eed921e vendor/plugins/redmine_bibliography/app/controllers/authors_controller.rb --- a/vendor/plugins/redmine_bibliography/app/controllers/authors_controller.rb Wed Aug 24 11:53:10 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/controllers/authors_controller.rb Wed Aug 24 11:56:41 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 c4ddb9531f4c -r c1866eed921e vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb --- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 24 11:53:10 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 24 11:56:41 2011 +0100 @@ -2,6 +2,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 c4ddb9531f4c -r c1866eed921e vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb Wed Aug 24 11:53:10 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/authors/show.html.erb Wed Aug 24 11:56:41 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 %>