-
Notifications
You must be signed in to change notification settings - Fork 41
/
_note.html.erb
47 lines (37 loc) · 1.31 KB
/
_note.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div id="user_note" class='cms_form admin_form' style='width:680px;'>
<div align="right"><a href="javascript:void(0);" onclick="RedBox.close();">[x] close</a></div>
<h3><%= @user.name %></h3>
<div style='width:315px; padding-right:10px; float:left;'>
<% stat_view do |t| -%>
<%= t.raw 'First Name'.t, @user.first_name %>
<%= t.raw 'Last Name'.t, @user.last_name %>
<%= t.raw 'Email'.t, @user.email %>
<%= t.raw 'Last Visit'.t, @user.last_log_entry.occurred_at ? @user.last_log_entry.occurred_at.strftime(DEFAULT_DATETIME_FORMAT.t) : 'Never'.t %>
<% end -%>
<% if @user.last_session -%>
<div style="height:220px; overflow:auto;">
<% @user.last_session.domain_log_entries.find(:all, :order => 'occurred_at DESC').each do |entry| -%>
<%= entry.url %>
<br/>
<% end -%>
</div>
<% end -%>
</div>
<div style='width:325px; float:left;'>
<% remote_cms_form_for :note, @note, :update => 'RB_window' do |f| %>
<%= f.text_area :note, :rows => 3, :vertical => true, :label => 'Note'.t %>
<%= f.submit 'Add Note' %>
<% end -%>
<br/>
<% unless @notes.empty? -%>
<div style="height:220px; overflow:auto;">
<% @notes.each do |note| -%>
<div class="note">
<%= render :partial => 'user_note', :locals => {:note => note} %>
</div>
<% end -%>
</div>
<% end -%>
</div>
<div class="clear"></div>
</div>