Refactor template references in TableWidget and update condition for checkbox display in datatable

1 parent 70edcc96
......@@ -45,8 +45,8 @@
</div>
</div>
</div>
<div tal:condition="allow_check=='true'">
<div class="row">
<!-- <div tal:condition="allow_check=='true'">
<div class="row"> -->
<!--
<div class="input-group col-md-2">
<span class="input-group-addon">
......@@ -57,13 +57,14 @@
</div>
-->
</div>
<!-- </div> -->
<table id="${tableid}" class="table table-bordered table-hover table-condensed dataTable no-footer">
<thead>
<tr>
<tal:block tal:repeat="child field">
<th class="no-sort" tal:condition="child.name=='id'">
<input type="checkbox" class="${tableid}checkAll" id="${tableid}checkAll"/>
<input tal:condition="allow_check=='true'" type="checkbox" class="${tableid}checkAll" id="${tableid}checkAll"/>
<span tal:condition="allow_check!='true'">${child.title}</span>
</th>
<th tal:condition="child.name!='id'">
${child.title}
......
......@@ -34,7 +34,7 @@ class TableWidget(MappingWidget):
"""
template = "detable"
readonly_template = "readonly/detable"
template = "detable.pt"
readonly_template = "detable.pt"
requirements = (("deform", None),
{"js": "opensipkd.base:static/v3/js/plugin/datatables/jquery.dataTables.min.js"})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!