<label><%= controller.get_plural_activity_label %></label>
<div>
	<% if !controller.is_referral || controller.is_referral && controller.deletePermission %>
		<div class="wk-contextual">
			<%= link_to controller.get_activity_label, url_for(:controller => 'wkcrmactivity', :action => 'edit', :parentType => currentObj.class.name, :parentId => currentObj.id, :controller_from => controller_name, :action_from => action_name, id: nil), :class => 'icon icon-add' %>
		</div>
	<% end %>
	<% status = ['H', 'C', 'D'] %>
	<%= render partial: "wkcrmactivity/activity_list", locals: { activities: currentObj.blank? ? nil : currentObj.activities.where.not(:status => status) } %>
</div>
<% if !controller.is_referral %>
	<label><%= l(:label_history) %></label>
	<div>
		<%= render partial: "wkcrmactivity/activity_list", locals: { activities: currentObj.blank? ? nil : currentObj.activities.where(:status => status) } %>
	</div>
<% end %>