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

1 parent 70edcc96
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
</div> </div>
</div> </div>
</div> </div>
<div tal:condition="allow_check=='true'"> <!-- <div tal:condition="allow_check=='true'">
<div class="row"> <div class="row"> -->
<!-- <!--
<div class="input-group col-md-2"> <div class="input-group col-md-2">
<span class="input-group-addon"> <span class="input-group-addon">
...@@ -57,13 +57,14 @@ ...@@ -57,13 +57,14 @@
</div> </div>
--> -->
</div> <!-- </div> -->
<table id="${tableid}" class="table table-bordered table-hover table-condensed dataTable no-footer"> <table id="${tableid}" class="table table-bordered table-hover table-condensed dataTable no-footer">
<thead> <thead>
<tr> <tr>
<tal:block tal:repeat="child field"> <tal:block tal:repeat="child field">
<th class="no-sort" tal:condition="child.name=='id'"> <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>
<th tal:condition="child.name!='id'"> <th tal:condition="child.name!='id'">
${child.title} ${child.title}
......
...@@ -34,7 +34,7 @@ class TableWidget(MappingWidget): ...@@ -34,7 +34,7 @@ class TableWidget(MappingWidget):
""" """
template = "detable" template = "detable.pt"
readonly_template = "readonly/detable" readonly_template = "detable.pt"
requirements = (("deform", None), requirements = (("deform", None),
{"js": "opensipkd.base:static/v3/js/plugin/datatables/jquery.dataTables.min.js"}) {"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!