Mercurial > hg > soundsoftware-site
changeset 532:76d064830472 feature_36
added more content to the My Publications Block on the My Page view.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 25 Jul 2011 17:53:41 +0100 |
parents | baf26f9eb1cf |
children | b1c56157d64d 0058debf7871 |
files | vendor/plugins/redmine_bibliography/app/models/publication.rb vendor/plugins/redmine_bibliography/app/views/my/blocks/_publications_box.html.erb vendor/plugins/redmine_bibliography/config/locales/en.yml |
diffstat | 3 files changed, 9 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 @@ -<h2><%= l('publications_box')%></h2> +<h3><%=l(:label_my_publications_box)%> <%= "(" + User.current.author.authorships.count.to_s + ")" unless User.current.author.nil? %></h3> + <% Publication.find(:all).each do |pub|%> <div class="wiki"> - <h3><%= pub.title %> </h3> + <h3><%= link_to pub.title, pub %></h3> + + <% pub.projects.each do |proj| %> + <%= link_to proj.name, proj %> + <% end %> + </div> <% end %>
--- 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"