annotate app/views/users/.svn/text-base/show.rhtml.svn-base @ 8:0c83d98252d9 yuya

* Add custom repo prefix and proper auth realm, remove auth cache (seems like an unwise feature), pass DB handle around, various other bits of tidying
author Chris Cannam
date Thu, 12 Aug 2010 15:31:37 +0100
parents 513646585e45
children 1d32c0a0efbf
rev   line source
Chris@0 1 <div class="contextual">
Chris@0 2 <%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %>
Chris@0 3 </div>
Chris@0 4
Chris@0 5 <h2><%= avatar @user, :size => "50" %> <%=h @user.name %></h2>
Chris@0 6
Chris@0 7 <div class="splitcontentleft">
Chris@0 8 <ul>
Chris@0 9 <% unless @user.pref.hide_mail %>
Chris@0 10 <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
Chris@0 11 <% end %>
Chris@0 12 <% for custom_value in @custom_values %>
Chris@0 13 <% if !custom_value.value.blank? %>
Chris@0 14 <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
Chris@0 15 <% end %>
Chris@0 16 <% end %>
Chris@0 17 <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
Chris@0 18 <% unless @user.last_login_on.nil? %>
Chris@0 19 <li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li>
Chris@0 20 <% end %>
Chris@0 21 </ul>
Chris@0 22
Chris@0 23 <% unless @memberships.empty? %>
Chris@0 24 <h3><%=l(:label_project_plural)%></h3>
Chris@0 25 <ul>
Chris@0 26 <% for membership in @memberships %>
Chris@0 27 <li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %>
Chris@0 28 (<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li>
Chris@0 29 <% end %>
Chris@0 30 </ul>
Chris@0 31 <% end %>
Chris@0 32 <%= call_hook :view_account_left_bottom, :user => @user %>
Chris@0 33 </div>
Chris@0 34
Chris@0 35 <div class="splitcontentright">
Chris@0 36
Chris@0 37 <% unless @events_by_day.empty? %>
Chris@0 38 <h3><%= link_to l(:label_activity), :controller => 'projects', :action => 'activity', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3>
Chris@0 39
Chris@0 40 <p>
Chris@0 41 <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
Chris@0 42 </p>
Chris@0 43
Chris@0 44 <div id="activity">
Chris@0 45 <% @events_by_day.keys.sort.reverse.each do |day| %>
Chris@0 46 <h4><%= format_activity_day(day) %></h4>
Chris@0 47 <dl>
Chris@0 48 <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
Chris@0 49 <dt class="<%= e.event_type %>">
Chris@0 50 <span class="time"><%= format_time(e.event_datetime, false) %></span>
Chris@0 51 <%= content_tag('span', h(e.project), :class => 'project') %>
Chris@0 52 <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
Chris@0 53 <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
Chris@0 54 <% end -%>
Chris@0 55 </dl>
Chris@0 56 <% end -%>
Chris@0 57 </div>
Chris@0 58
Chris@0 59 <% other_formats_links do |f| %>
Chris@0 60 <%= f.link_to 'Atom', :url => {:controller => 'projects', :action => 'activity', :id => nil, :user_id => @user, :key => User.current.rss_key} %>
Chris@0 61 <% end %>
Chris@0 62
Chris@0 63 <% content_for :header_tags do %>
Chris@0 64 <%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
Chris@0 65 <% end %>
Chris@0 66 <% end %>
Chris@0 67 <%= call_hook :view_account_right_bottom, :user => @user %>
Chris@0 68 </div>
Chris@0 69
Chris@0 70 <% html_title @user.name %>