-
Notifications
You must be signed in to change notification settings - Fork 0
/
show.html.erb
70 lines (63 loc) · 1.8 KB
/
show.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<div id='main_body'>
<h4>客户交流记录内容</h4>
<p class="notice"><%= notice %></p>
<p>
<b>客户名称:</b>
<%= @customer.name %>
</p>
<p>
<b>联系人:</b>
<%= @customer_comm_record.reported_by.name %>
</p>
<p>
<b>联系日期:</b>
<%= @customer_comm_record.comm_date.strftime("%Y/%m/%d") %>
</p>
<p>
<b>联系分类:</b>
<%= @customer_comm_record.comm_category.try(:name) if @customer_comm_record.comm_category_id.present? %>
</p>
<p>
<b>关于:</b>
<%= @customer_comm_record.subject %>
</p>
<p>
<b>客户联系人名&电话:</b>
<%= @customer_comm_record.contact_info %>
</p>
<p>
<b>内容:</b>
<%= @customer_comm_record.content %>
</p>
<p>
<b>联系方式:</b>
<%= @customer_comm_record.via %>
</p>
<p>
<b>删除:</b>
<%= @customer_comm_record.void %>
</p>
<p>
<b>输入/更改:</b>
<%= @customer_comm_record.last_updated_by.name %>
</p>
<p>
<b>Logs:</b>
<ul>
<% Commonx::Log.where('resource_id = ? AND resource_name = ?', @customer_comm_record.id, params[:controller].sub('/', '_')).order("created_at DESC").each do |p| %>
<li>
<%= (p.created_at + 8.hours).strftime("%Y-%m-%d").to_s + ', ' + p.last_updated_by.name + ', ' + p.log %>
</li>
<% end %>
</ul>
</p>
<table class="table table-striped">
<tr>
<th>
<%= link_to '新Log', SUBURI + commonx.new_log_path(:resource_id => @customer_comm_record.id, :resource_name => params[:controller], :subaction => 'customer_comm_record', :format => :js),
:remote => true, :id => 'new_log_link', :class => BUTTONS_CLS['action'] if has_action_right?('create_customer_comm_record', 'commonx_logs') %> </th>
</tr>
</table>
<%= link_to t('Back'), SUBURI + "/authentify/view_handler?index=0", :id => 'close', :class => BUTTONS_CLS['action'] %>
</div>