File: check_box_table.mak

package info (click to toggle)
python-toscawidgets 0.9.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,080 kB
  • ctags: 1,072
  • sloc: python: 3,906; makefile: 18; sh: 13
file content (29 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%namespace name="tw" module="tw.core.mako_util"/>\
<table ${tw.attrs(
    [('class', css_class),
     ('id', context.get('id'))],
    attrs=list_attrs
)}>
	<tbody>
	% for i,row in enumerate(options_rows):
	<tr>
		% for value, desc, attrs in row:
		<td>
			<% id_c = str(id_counter.next()) %>
			<input ${tw.attrs(
				[('type', field_type),
				 ('name', name),
				 ('id', (context.get('id') or '') + '_' + id_c),
				 ('value', value)],
				attrs=attrs
			)} />\
            <label for="${(context.get('id') or '')}_${id_c}">${tw.content(desc)}</label>
		</td>
		% endfor
        % for j in xrange(num_cols - len(row)):
            <td></td>
        % endfor
	</tr>
    % endfor
	</tbody>
</table>\