Changeset 1153 for trunk/grails-app/conf


Ignore:
Timestamp:
Nov 17, 2010, 11:34:09 AM (10 years ago)
Author:
robert@…
Message:

Removed template field types INTEGER and FLOAT (since LONG and DOUBLE accept more values and keeping both is confusing for the user), see ticket #154.
Also included message in the template editor to show that a string can only contain max 255 characters. (see ticket #193)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrapTemplates.groovy

    r1118 r1153  
    3939
    4040                def ageField = new TemplateField(
    41                         name: 'Age',type: TemplateFieldType.INTEGER,entity: Subject,unit: 'years',comment: 'Either include age at the start of the study or date of birth (if known)')
     41                        name: 'Age',type: TemplateFieldType.LONG,entity: Subject,unit: 'years',comment: 'Either include age at the start of the study or date of birth (if known)')
    4242                .with { if (!validate()) { errors.each { println it} } else save()}
    4343
     
    9090                .addToFields(genderField)
    9191                .addToFields(new TemplateField(
    92                         name: 'Age', type: TemplateFieldType.INTEGER, entity: Subject, unit: 'weeks', comment: 'Age at start of study'))
     92                        name: 'Age', type: TemplateFieldType.LONG, entity: Subject, unit: 'weeks', comment: 'Age at start of study'))
    9393                .addToFields(new TemplateField(
    9494                        name: 'Age type',type: TemplateFieldType.STRINGLIST,entity: Subject,
     
    9797                        name: 'Cage',type: TemplateFieldType.STRING,entity: Subject,comment:'Indicate the cage used for housing (type and/or size)'))
    9898                .addToFields(new TemplateField(
    99                         name: '#Mice in cage',type: TemplateFieldType.INTEGER,entity: Subject,comment:'If known, indicate the number of mice per cage'))
    100                 .addToFields(new TemplateField(
    101                         name: 'Litter size',type: TemplateFieldType.INTEGER,entity: Subject,comment:'If known, indicate the litter size of the litter from which the subject originates'))
     99                        name: '#Mice in cage',type: TemplateFieldType.LONG,entity: Subject,comment:'If known, indicate the number of mice per cage'))
     100                .addToFields(new TemplateField(
     101                        name: 'Litter size',type: TemplateFieldType.LONG,entity: Subject,comment:'If known, indicate the litter size of the litter from which the subject originates'))
    102102                .addToFields(new TemplateField(
    103103                        name: 'Weight', type: TemplateFieldType.DOUBLE, unit: 'gram',entity: Subject,comment:'If known indicate the weight of the subject in grams at the start of the study'))
     
    120120                        name: 'Race',type: TemplateFieldType.STRING,entity: Subject, comment:'If known and of interest the ethnic group can be indicated'))
    121121                .addToFields(new TemplateField(
    122                         name: 'Waist circumference',type: TemplateFieldType.FLOAT, unit: 'cm',entity: Subject, comment:'The waist circumference is measured just above the hip bone. Indicate the measure at the start of the study.'))
    123                 .addToFields(new TemplateField(
    124                         name: 'Hip circumference',type: TemplateFieldType.FLOAT, unit: 'cm',entity: Subject, comment:'The hip circumference is measured at the level of the two bony prominences front of the hips. Indicate the measure at the start of the study.'))
    125                 .addToFields(new TemplateField(
    126                         name: 'Systolic blood pressure',type: TemplateFieldType.FLOAT, unit: 'mmHg',entity: Subject, comment:'Indicate the levels at the start of the study in mmHG'))
    127                 .addToFields(new TemplateField(
    128                         name: 'Diastolic blood pressure',type: TemplateFieldType.FLOAT, unit: 'mmHg',entity: Subject, comment:'Indicate the levels at the start of the study in mmHG'))
    129                 .addToFields(new TemplateField(
    130                         name: 'Heart rate',type: TemplateFieldType.FLOAT, unit: 'beats/min',entity: Subject, comment:'Indicate the heart rate at the start of in study in beats per minute'))
     122                        name: 'Waist circumference',type: TemplateFieldType.DOUBLE, unit: 'cm',entity: Subject, comment:'The waist circumference is measured just above the hip bone. Indicate the measure at the start of the study.'))
     123                .addToFields(new TemplateField(
     124                        name: 'Hip circumference',type: TemplateFieldType.DOUBLE, unit: 'cm',entity: Subject, comment:'The hip circumference is measured at the level of the two bony prominences front of the hips. Indicate the measure at the start of the study.'))
     125                .addToFields(new TemplateField(
     126                        name: 'Systolic blood pressure',type: TemplateFieldType.DOUBLE, unit: 'mmHg',entity: Subject, comment:'Indicate the levels at the start of the study in mmHG'))
     127                .addToFields(new TemplateField(
     128                        name: 'Diastolic blood pressure',type: TemplateFieldType.DOUBLE, unit: 'mmHg',entity: Subject, comment:'Indicate the levels at the start of the study in mmHG'))
     129                .addToFields(new TemplateField(
     130                        name: 'Heart rate',type: TemplateFieldType.DOUBLE, unit: 'beats/min',entity: Subject, comment:'Indicate the heart rate at the start of in study in beats per minute'))
    131131                .addToFields(new TemplateField(
    132132                        name: 'Run-in-food',type: TemplateFieldType.TEXT,entity: Subject, comment:'If defined, give a short description of the food used before the measurements'))
     
    158158                            name: 'Sample measured weight',
    159159                            unit: 'mg',
    160                             type: TemplateFieldType.FLOAT,
     160                            type: TemplateFieldType.DOUBLE,
    161161                        entity: Sample
    162162                        )
     
    175175                            name: 'Sample measured volume',
    176176                            unit: 'ml',
    177                             type: TemplateFieldType.FLOAT,
     177                            type: TemplateFieldType.DOUBLE,
    178178                                entity: Sample
    179179                        )
     
    270270                        name: 'Growth protocol', entity: Subject, type: TemplateFieldType.TEXT))
    271271                .addToFields(new TemplateField(
    272                         name: 'Position X', entity: Subject, type: TemplateFieldType.FLOAT))
    273                 .addToFields(new TemplateField(
    274                         name: 'Position Y', entity: Subject, type: TemplateFieldType.FLOAT))
     272                        name: 'Position X', entity: Subject, type: TemplateFieldType.DOUBLE))
     273                .addToFields(new TemplateField(
     274                        name: 'Position Y', entity: Subject, type: TemplateFieldType.DOUBLE))
    275275                .addToFields(new TemplateField(
    276276                        name: 'Block', entity: Subject, type: TemplateFieldType.STRING))
    277277                .addToFields(new TemplateField(
    278                         name: 'Temperature at day', entity: Subject, type: TemplateFieldType.FLOAT))
    279                 .addToFields(new TemplateField(
    280                         name: 'Temperature at night', entity: Subject, type: TemplateFieldType.FLOAT))
     278                        name: 'Temperature at day', entity: Subject, type: TemplateFieldType.DOUBLE))
     279                .addToFields(new TemplateField(
     280                        name: 'Temperature at night', entity: Subject, type: TemplateFieldType.DOUBLE))
    281281                .addToFields(new TemplateField(
    282282                        name: 'Photo period', entity: Subject, type: TemplateFieldType.STRING))
     
    343343                        name: 'Block', type: TemplateFieldType.STRING, entity: Subject))
    344344                .addToFields(new TemplateField(
    345                         name: 'Position X', type: TemplateFieldType.FLOAT, entity: Subject))
    346                 .addToFields(new TemplateField(
    347                         name: 'Position Y', type: TemplateFieldType.FLOAT, entity: Subject))
    348                 .addToFields(new TemplateField(
    349                         name: 'Temperature at day', type: TemplateFieldType.FLOAT, entity: Subject))
    350                 .addToFields(new TemplateField(
    351                         name: 'Temperature at night', type: TemplateFieldType.FLOAT, entity: Subject))
     345                        name: 'Position X', type: TemplateFieldType.DOUBLE, entity: Subject))
     346                .addToFields(new TemplateField(
     347                        name: 'Position Y', type: TemplateFieldType.DOUBLE, entity: Subject))
     348                .addToFields(new TemplateField(
     349                        name: 'Temperature at day', type: TemplateFieldType.DOUBLE, entity: Subject))
     350                .addToFields(new TemplateField(
     351                        name: 'Temperature at night', type: TemplateFieldType.DOUBLE, entity: Subject))
    352352                .addToFields(new TemplateField(
    353353                        name: 'Photo period', type: TemplateFieldType.STRING, entity: Subject))
     
    502502                                unit: 'mg',
    503503                                entity: SamplingEvent,
    504                                 type: TemplateFieldType.FLOAT
     504                                type: TemplateFieldType.DOUBLE
    505505                        )
    506506                )
     
    520520                                entity: SamplingEvent,
    521521                                unit: 'ml',
    522                                 type: TemplateFieldType.FLOAT
     522                                type: TemplateFieldType.DOUBLE
    523523                        )
    524524                )
     
    539539                                unit: 'ul',
    540540                                entity: SamplingEvent,
    541                                 type: TemplateFieldType.FLOAT
     541                                type: TemplateFieldType.DOUBLE
    542542                        )
    543543                )
Note: See TracChangeset for help on using the changeset viewer.