Ignore:
Timestamp:
May 24, 2010, 11:48:40 PM (13 years ago)
Author:
keesvb
Message:

Reverting Subject optimization as it breaks the study create wizard on adding Subjects, added help texts to Bootstrap and icons to study create wizard, added new text to home, added help texts to study create wizard pages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy

    r446 r455  
    727727                        // render template fields
    728728                        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>'
    730735                        }
    731736                }
     
    756761                def inputElement= null
    757762
     763                String helpText
     764
    758765                // got a template?
    759766                if (template) {
     
    761768                        entity.giveFields().each() {
    762769                                def fieldValue = entity.getFieldValue(it.name)
     770                                helpText = (it.comment && renderType == 'element') ? it.comment : ''
    763771
    764772                                // output column opening element?
     
    774782                                                        name: prependName + it.escapedName(),
    775783                                                        value: fieldValue
    776                                                 )
     784                                                ){helpText}
    777785                                                break
    778786                                        case 'STRINGLIST':
     
    784792                                                                from: it.listEntries,
    785793                                                                value: fieldValue
    786                                                         )
     794                                                        ){helpText}
    787795                                                } else {
    788796                                                        out << '<span class="warning">no values!!</span>'
     
    800808                                                                value           : fieldValue.toString(),
    801809                                                                ontologies      : it.ontologies
    802                                                         )
     810                                                        ){helpText}
    803811                                                } else {
    804812                                                        out << "$inputElement"(
     
    806814                                                                name            : prependName + it.escapedName(),
    807815                                                                value           : fieldValue.toString()
    808                                                         )
     816                                                        ){helpText}
    809817                                                }
    810818                                                break
     
    852860                                                        value: fieldValue,
    853861                                                        rel: 'date'
    854                                                 )
     862                                                ){helpText}
    855863                                                break
    856864                                        default:
     
    860868                                }
    861869
     870                                // Render comment, if any
     871                                //if (it.comment) {
     872                                //      out << {"$helpText"}
     873                                //}
     874
    862875                                // output column closing element?
    863876                                if (renderType == 'column') {
Note: See TracChangeset for help on using the changeset viewer.