# HG changeset patch # User luisf # Date 1311612821 -3600 # Node ID 76d064830472d12b55876e0a9bbf60c858296126 # Parent baf26f9eb1cf2b02b7dae29d26b1136ee700e516 added more content to the My Publications Block on the My Page view. diff -r baf26f9eb1cf -r 76d064830472 vendor/plugins/redmine_bibliography/app/models/publication.rb --- a/vendor/plugins/redmine_bibliography/app/models/publication.rb Sun Jul 25 17:11:14 2010 +0100 +++ b/vendor/plugins/redmine_bibliography/app/models/publication.rb Mon Jul 25 17:53:41 2011 +0100 @@ -16,26 +16,4 @@ has_and_belongs_to_many :projects, :uniq => true - attr_writer :current_step - - def current_step - @current_step || steps.first - end - - def steps - %w[new review] - end - - def next_step - self.current_step = steps[steps.index(current_step)+1] - end - - def previous_step - self.current_step = steps[steps.index(current_step)-1] - end - - def first_step? - current_step == steps.first - end - end diff -r baf26f9eb1cf -r 76d064830472 vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb --- a/vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb Sun Jul 25 17:11:14 2010 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb Mon Jul 25 17:53:41 2011 +0100 @@ -1,7 +1,13 @@ -

<%= l('publications_box')%>

+

<%=l(:label_my_publications_box)%> <%= "(" + User.current.author.authorships.count.to_s + ")" unless User.current.author.nil? %>

+ <% Publication.find(:all).each do |pub|%>
-

<%= pub.title %>

+

<%= link_to pub.title, pub %>

+ + <% pub.projects.each do |proj| %> + <%= link_to proj.name, proj %> + <% end %> +
<% end %> diff -r baf26f9eb1cf -r 76d064830472 vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Sun Jul 25 17:11:14 2010 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Mon Jul 25 17:53:41 2011 +0100 @@ -5,6 +5,7 @@ author: "Author" name: "Name" publications_box: "My Publications" + label_my_publications_box: "My Publications" label_add_me_as_author: "Add me as an author" label_add_another_author: "Add another author"