Changeset 455 for trunk/grails-app/taglib
- Timestamp:
- May 24, 2010, 11:48:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r446 r455 727 727 // render template fields 728 728 entity.giveFields().each() { 729 out << '<div class="' + attrs.get('class') + '">' + it.name + '</div>' 729 out << '<div class="' + attrs.get('class') + '">' + it.name + (it.unit ? " (${it.unit})" : '') 730 if (it.comment) { 731 out << '<div class="helpIcon"></div>' 732 out << '<div class="helpContent">' + it.comment + '</div>' 733 } 734 out << '</div>' 730 735 } 731 736 } … … 756 761 def inputElement= null 757 762 763 String helpText 764 758 765 // got a template? 759 766 if (template) { … … 761 768 entity.giveFields().each() { 762 769 def fieldValue = entity.getFieldValue(it.name) 770 helpText = (it.comment && renderType == 'element') ? it.comment : '' 763 771 764 772 // output column opening element? … … 774 782 name: prependName + it.escapedName(), 775 783 value: fieldValue 776 ) 784 ){helpText} 777 785 break 778 786 case 'STRINGLIST': … … 784 792 from: it.listEntries, 785 793 value: fieldValue 786 ) 794 ){helpText} 787 795 } else { 788 796 out << '<span class="warning">no values!!</span>' … … 800 808 value : fieldValue.toString(), 801 809 ontologies : it.ontologies 802 ) 810 ){helpText} 803 811 } else { 804 812 out << "$inputElement"( … … 806 814 name : prependName + it.escapedName(), 807 815 value : fieldValue.toString() 808 ) 816 ){helpText} 809 817 } 810 818 break … … 852 860 value: fieldValue, 853 861 rel: 'date' 854 ) 862 ){helpText} 855 863 break 856 864 default: … … 860 868 } 861 869 870 // Render comment, if any 871 //if (it.comment) { 872 // out << {"$helpText"} 873 //} 874 862 875 // output column closing element? 863 876 if (renderType == 'column') {
Note: See TracChangeset
for help on using the changeset viewer.