app/views/educode_sales/places/index.html.erb in educode_sales-0.1.0 vs app/views/educode_sales/places/index.html.erb in educode_sales-0.1.1
- old
+ new
@@ -1,16 +1,22 @@
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<span class="table-label">渠道列表</span>
+ <% if can? :create, EducodeSales::Place %>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add"> 添加渠道</button>
+ <% end %>
</div>
</script>
<table class="layui-hide" id="place" lay-filter="currentTableFilter"></table>
<script type="text/html" id="currentTableBar">
+ <% if can? :update, EducodeSales::Place %>
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
+ <% end %>
+ <% if can? :destroy, EducodeSales::Place %>
<a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
+ <% end %>
</script>
<script type="text/html" id="showchance">
<a href="/educode_sales/businesses" class="layui-table-link">{{ d.chance }}</a>
</script>
\ No newline at end of file