Mercurial > hg > soundsoftware-site
changeset 617:c1866eed921e feature_36
Merge from 616:c4ddb9531f4c
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 24 Aug 2011 11:56:41 +0100 |
parents | 156bd1153f47 (diff) c4ddb9531f4c (current diff) |
children | 18e0709fd0d9 |
files | vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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|
--- 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| %> <tr id="authorship-<%= authorship.id %>" class="<%= cycle('odd', 'even') %>"> - <td class="title"><%= h authorship.publication.title %></td> + <td class="title"><%= link_to_publication(authorship.publication) %></td> <td class="name"><%= h authorship.name_on_paper %></td> <td class="email"><%= h authorship.email %></td> <td class="institution"><%= h authorship.institution %></td>