File tree Expand file tree Collapse file tree 4 files changed +26
-9
lines changed Expand file tree Collapse file tree 4 files changed +26
-9
lines changed Original file line number Diff line number Diff line change 40
40
</ label >
41
41
< p class ="help-block "> Reverse the sort ordering</ p >
42
42
</ div >
43
+ < div class ="checkbox ">
44
+ < label >
45
+ < input #hideCheckboxes formControlName ="form.controls.hideCheckboxes " type ="checkbox " [checked] ="data?.hide_checkboxes "> Hide checkboxes
46
+ </ label >
47
+ < p class ="help-block "> The first column with checkboxes will not be displayed</ p >
48
+ </ div >
43
49
< div class ="checkbox ">
44
50
< label >
45
51
< input #staticRendering formControlName ="form.controls.staticRendering " type ="checkbox " [checked] ="data?.static_rendering "> Static rendering
Original file line number Diff line number Diff line change @@ -26,11 +26,13 @@ require([
26
26
for ( var i = 0 ; i < data . rows . length ; i ++ ) {
27
27
var row = data . rows [ i ] ;
28
28
html += '<tr>' ;
29
- html += '<td>' +
30
- '<input type="checkbox" name="sdoc" value="' +
31
- row [ 0 ] +
32
- '" />' +
33
- '</td>' ;
29
+ html += '<td>' ;
30
+ if ( self . options . hideCheckboxes !== 'True' ) {
31
+ html += '<input type="checkbox" name="sdoc" value="' +
32
+ row [ 0 ] +
33
+ '" />' ;
34
+ }
35
+ html += '<td>' ;
34
36
html += '<td><a href="' +
35
37
self . options . source +
36
38
'/../document/' + row [ 0 ] +
Original file line number Diff line number Diff line change 11
11
12
12
<!-- TODO(ivanteoh): do we need 'hasReadPermission' in 2.x -->
13
13
<tal : view_parameters
14
- define =" plomino_view python:here;
15
- hideCheckboxes python:False;" >
14
+ define =" hideCheckboxes context/hide_checkboxes|nothing;" >
16
15
17
- <form id =" plomino-view" tal : attributes =" name python:plomino_view .id"
16
+ <form id =" plomino-view" tal : attributes =" name python:context .id"
18
17
class =" plominoviewform" >
19
18
20
19
<h1 class =" documentFirstHeading" tal : content =" context/Title" >Title</h1 >
29
28
<table
30
29
tal : define =" columns python:context.getColumns();"
31
30
tal : attributes =" class python:(context.static_rendering and 'listing') or 'listing plomino-table';
32
- data-pat-plominotable string:source:${context/absolute_url}/tojson;" >
31
+ data-pat-plominotable
32
+ string:source:${context/absolute_url}/tojson;;
33
+ hideCheckboxes:${context/hide_checkboxes};" >
33
34
<tr class =" header-row" >
34
35
<th ></th >
35
36
<tal : headers tal : repeat =" column columns" >
Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ class IPlominoView(model.Schema):
122
122
default = False ,
123
123
)
124
124
125
+ hide_checkboxes = schema .Bool (
126
+ title = _ ('CMFPlomino_label_hide_checkboxes' ,
127
+ default = "Hide checkboxes" ),
128
+ description = _ ('CMFPlomino_help_hide_checkboxes' ,
129
+ default = 'The first column with checkboxes will not be displayed' ),
130
+ default = False ,
131
+ )
132
+
125
133
static_rendering = schema .Bool (
126
134
title = _ ('CMFPlomino_label_static_rendering' ,
127
135
default = "Static rendering" ),
You can’t perform that action at this time.
0 commit comments