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

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

in exporter: module error display improvements (ie. display on screen but still able to export); removed changes to simplewizard; removed unnecessary imports; should handle 'null' parent subject from samples correctly; should handle non number values from modules correctly; deselects module measurements in case of module error/no measurements; removed obsolete entry in topnav

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        def categoryName = attrs.remove('category')
24        attrs['class'] = 'category'
25        out << '<div class="element">'
26        out << g.checkBox(attrs)
27        out << categoryName
28        out << '</div>'
29
30    }
31
32    def fieldSelectors = { attrs, body ->
33
34        attrs.fields.eachWithIndex { it, index ->
35
36            def helpText = it.comment
37
38            out << '<div class="element">'
39            out << g.checkBox(name: "${attrs.ref}_$index", value: true, class: 'field')
40            out << it.name
41            if (helpText) {
42                out << '<div class="helpIcon"></div>'
43                out << "<div class=\"helpContent\">$helpText</div>"
44            }
45            out << '</div>'
46        }
47    }
48}
Note: See TracBrowser for help on using the repository browser.