Revision 720:5eb7efd59ed7 vendor/plugins/redmine_bibliography/app/views/users

View differences:

vendor/plugins/redmine_bibliography/app/views/users/show.rhtml
1
<%= stylesheet_link_tag 'bibliography', :plugin => 'redmine_bibliography' %>
2

  
3
<div class="contextual">
4
<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %>
5
</div>
6

  
7
<h2><%= avatar @user, :size => "50" %> <%=h @user.name %></h2>
8

  
9
<div class="splitcontentleft">
10
<ul>
11
	<% unless @user.pref.hide_mail %>
12
		<li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
13
	<% end %>
14
	<% @user.visible_custom_field_values.each do |custom_value| %>
15
	<% if !custom_value.value.blank? %>
16
    <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
17
	<% end %>
18
	<% end %>
19
    <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
20
	<% unless @user.last_login_on.nil? %>
21
		<li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li>
22
	<% end %>
23
</ul>
24

  
25
<h3><%=l(:label_ssamr_description)%></h3>
26
<%= textilizable @description %>
27

  
28
<h3><%=l(:label_ssamr_institution)%></h3>
29
<p><%= h @institution_name %></p>
30

  
31

  
32
<% unless @memberships.empty? %>
33
<h3><%=l(:label_project_plural)%></h3>
34
<ul>
35
<% for membership in @memberships %>
36
	<li><%= link_to_project(membership.project) %>
37
    (<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li>
38
<% end %>
39
</ul>
40
<% end %>
41
<%= call_hook :view_account_left_bottom, :user => @user %>
42
</div>
43

  
44
<div class="splitcontentright">
45

  
46
  <% if @user.author %>
47
  <div id="bibliography">
48
    <% @publications = Publication.all(:include => :authors, :conditions => "authors.id = #{@user.author.id}") %>
49

  
50
    <h3><%=l(:publications) %> <%= "(" + @publications.count.to_s + ")" %> </h3>
51

  
52
    <% @publications.each do |publication|%>    
53
      <dt>
54
        <%= link_to publication.title, :controller => 'publications', :action => 'show', :id => publication %>
55
      </dt>
56

  
57
      <dd>
58
        <span class="authors">
59
          <%= publication.authorships.map { |a| h a.name_on_paper }.join(', ') %>
60
        </span>
61
        <% if publication.bibtex_entry.year.to_s != "" %>
62
          <span class="year">
63
            <%= publication.bibtex_entry.year %>
64
          </span>
65
        <% end %>
66
      </dd>
67
  	<% end %>
68
  </div>
69
  <% end %>
70

  
71

  
72
<% unless @events_by_day.empty? %>
73
<h3><%= link_to l(:label_activity), :controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3>
74

  
75
<p>
76
<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
77
</p>
78

  
79
<div id="activity">
80
<% @events_by_day.keys.sort.reverse.each do |day| %>
81
<h4><%= format_activity_day(day) %></h4>
82
<dl>
83
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
84
  <dt class="<%= e.event_type %>">
85
  <span class="time"><%= format_time(e.event_datetime, false) %></span>
86
  <%= content_tag('span', h(e.project), :class => 'project') %>
87
  <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
88
  <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
89
<% end -%>
90
</dl>
91
<% end -%>
92
</div>
93

  
94
<% other_formats_links do |f| %>
95
	<%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
96
<% end %>
97

  
98
<% content_for :header_tags do %>
99
		<%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
100
<% end %>
101
<% end %>
102
<%= call_hook :view_account_right_bottom, :user => @user %>
103
</div>
104

  
105
<% html_title @user.name %>

Also available in: Unified diff