You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/managements/partners.html.erb

82 lines
3.0 KiB

<div class="mt20">
<div class="clearfix edu-back-white padding20-30">
<input class="fl task-form-20 task-height-30" placeholder="输入合作伙伴名称进行搜索">
<a href="javascript:void(0)" class="fl task-btn task-btn-orange ml10">搜索</a>
<a href="javascript:void(0)" class="fl task-btn ml10">清除</a>
</div>
<div class="clearfix mt20">
<div class="with25 fl edu-back-white">
<%= link_to "+添加",all_partners_managements_path,remote:true,class:"color-blue addOperation" %>
<ul class="partnerList">
<% @partners.each_with_index do |partner,index| %>
<li>
<%= link_to "#{partner.name}", partners_managements_path(:partner => partner), :class => "#{partner.active}" %>
</li>
<% end %>
</ul>
</div>
<div class="with75 fl pl20">
<div class="edu-back-white">
<div>
<div class="padding10-20">
<p class="mb20"><span class="mr30 color-grey-9">添加时间</span><span class="color-grey-6"><%= format_time @current_partner.try(:created_at) %></span></p>
<div class="clearfix">
<span class="mr45 color-grey-9 fl">管理员</span>
<ul class="manageList">
<li>
<%= link_to '+', add_partner_member_box_managements_path(:partner => 1), :remote => true, :class => "addManage" %>
</li>
<% unless @current_partner.nil? %>
<% @current_partner.users.each_with_index do |user, index| %>
<li>
<%= image_tag(url_to_avatar(user)) %>
<a href="javascript:void(0)" class="removeImg">
<i class="iconfont icon-htmal5icon19 color-grey-9"></i>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
</div>
<div class="tableList">
<li class="clearfix tableHead">
<span>序号</span>
<span>客户名称</span>
<span><a href="javascript:void(0)" class="color-blue">+添加</a></span>
<span>添加时间</span>
</li>
<% @current_partner.try(:customers).try(:each) do |customer| %>
<li>
<span><%= customer.school.id %></span>
<span class="task-hide"><%= customer.school.name %></span>
<span>
<a href="javascript:void(0)" class="color-grey-9">删除</a>
</span>
<span>
2019-04-03 16:04
</span>
</li>
<% end %>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function(){
$(".partnerList li").on("click","a",function(){
$(".partnerList li a").removeClass("active");
$(this).addClass("active");
})
$(".removeImg").on("click",function(){
$(this).parents("li").remove();
})
})
</script>