# HG changeset patch # User luisf # Date 1316194578 -3600 # Node ID f098cfb337217f92bcbf16cea794cb1ab14052f5 # Parent 5163e3ec00b8bb3c044e35c10e3c9355eba9b435 Feature #296 - now lists the visible user's publications on its user page. diff -r 5163e3ec00b8 -r f098cfb33721 vendor/plugins/redmine_bibliography/app/views/users/show.rhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/plugins/redmine_bibliography/app/views/users/show.rhtml Fri Sep 16 18:36:18 2011 +0100 @@ -0,0 +1,104 @@ +<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %> + +
+<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %> +
+ +

<%= avatar @user, :size => "50" %> <%=h @user.name %>

+ +
+ + +

<%=l(:label_ssamr_description)%>

+<%= textilizable @description %> + +

<%=l(:label_ssamr_institution)%>

+

<%= h @institution_name %>

+ + +<% unless @memberships.empty? %> +

<%=l(:label_project_plural)%>

+ +<% end %> +<%= call_hook :view_account_left_bottom, :user => @user %> +
+ +
+ +
+ <% @publications = Publication.all(:include => :authors, :conditions => "authors.id = #{@user.author.id}") %> + +

<%=l(:publications) %> <%= "(" + @publications.count.to_s + ")" %>

+ + <% @publications.each do |publication|%> +
+ <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %> +
+ +
+ + <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %> + + <% if publication.bibtex_entry.year.to_s != "" %> + + <%= publication.bibtex_entry.year %> + + <% end %> +
+ <% end %> +
+ + + +<% unless @events_by_day.empty? %> +

<%= link_to l(:label_activity), :controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %>

+ +

+<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> +

+ +
+<% @events_by_day.keys.sort.reverse.each do |day| %> +

<%= format_activity_day(day) %>

+
+<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> +
+ <%= format_time(e.event_datetime, false) %> + <%= content_tag('span', h(e.project), :class => 'project') %> + <%= link_to format_activity_title(e.event_title), e.event_url %>
+
<%= format_activity_description(e.event_description) %>
+<% end -%> +
+<% end -%> +
+ +<% other_formats_links do |f| %> + <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %> +<% end %> + +<% content_for :header_tags do %> + <%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> +<% end %> +<% end %> +<%= call_hook :view_account_right_bottom, :user => @user %> +
+ +<% html_title @user.name %> diff -r 5163e3ec00b8 -r f098cfb33721 vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Sep 16 17:52:00 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Sep 16 18:36:18 2011 +0100 @@ -11,6 +11,8 @@ publications_box: "My Publications" label_my_publications_box: "My Publications" view_all_publications: "View All Project's Publications" + publications: Publications + identify_author_question: Is the right person selected above? identify_author_yes: "Yes"