source: trunk/grails-app/taglib/dbnp/studycapturing/AssayExporterTagLib.groovy @ 1583

Last change on this file since 1583 was 1583, checked in by s.h.sikkema@…, 11 years ago

UI improvements to assay exporter (ticket #159)

File size: 1.1 KB
Line 
1/**
2 * AssayTagLib Tag Library
3 *
4 * Description of my tab library
5 *
6 * @author  your email (+name?)
7 * @since       2010mmdd
8 * @package     ???
9 *
10 * Revision information:
11 * $Rev: 1430 $
12 * $Author: work@osx.eu $
13 * $Date: 2011-01-21 21:05:36 +0100 (Fri, 21 Jan 2011) $
14 */
15package dbnp.studycapturing
16
17class AssayExporterTagLib {
18
19    static namespace = 'assayExporter'
20
21    def categorySelector = {attrs, body ->
22
23        out << '<div class="element">'
24        out << g.checkBox(name: attrs.ref, value: true, class: 'category')
25        out << attrs.category
26        out << '</div>'
27
28    }
29
30    def fieldSelectors = { attrs, body ->
31
32        attrs.fields.eachWithIndex { it, index ->
33
34            def helpText = it.comment
35
36            out << '<div class="element">'
37            out << g.checkBox(name: "${attrs.ref}_$index", value: true, class: 'field')
38            out << it.name
39            if (helpText) {
40                out << '<div class="helpIcon"></div>'
41                out << "<div class=\"helpContent\">$helpText</div>"
42            }
43            out << '</div>'
44        }
45    }
46}
Note: See TracBrowser for help on using the repository browser.