app/views/educode_sales/ideas/index.html.erb in educode_sales-0.9.56 vs app/views/educode_sales/ideas/index.html.erb in educode_sales-0.9.57
- old
+ new
@@ -73,19 +73,25 @@
</div>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<span class="table-label">方案管理</span>
- <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add">新增项目方案</button>
+ <% if can? :create, EducodeSales::Idea %>
+ <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn pull-right" lay-event="add">新增项目方案</button>
+ <% end %>
</div>
</script>
<div class="">
<table class="layui-hide" id="ideas_table" style="min-height: 300px;" lay-filter="ideas_table"></table>
</div>
<script type="text/html" id="currentTableBar">
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-edita" lay-event="add_event">详情</a>
- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="idea_edit">编辑</a>
- <a class="layui-btn layui-btn-danger layui-btn-xs data-count-edit" lay-event="idea_recycle">移除</a>
+ <% if can? :update, EducodeSales::Idea %>
+ <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="idea_edit">编辑</a>
+ <% end %>
+ <% if can? :destroy, EducodeSales::Idea %>
+ <a class="layui-btn layui-btn-danger layui-btn-xs data-count-edit" lay-event="idea_recycle">移除</a>
+ <% end %>
</script>
<script>
layui.use(['form', 'table', 'miniPage', 'element', 'request', 'laydate'], function () {
var $ = layui.jquery,
form = layui.form,
\ No newline at end of file