Changeset 453 for trunk/grails-app/conf


Ignore:
Timestamp:
May 20, 2010, 5:02:22 PM (13 years ago)
Author:
roberth
Message:

Improved study list, study detail view and study comparison. Also improved performance issues

File:
1 edited

Legend:

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

    r442 r453  
    104104                        ).save();
    105105
    106                         // Create 30 roles to test pagination
    107                         def roleCounter = 1;
    108                         30.times { new PersonRole( name: "Rol #${roleCounter++}" ).save() }
    109 
    110106                        // Create persons
    111107                        def person1 = new Person(
     
    138134                        30.times { new Person( firstName: "Person #${personCounter}", lastName: "Testperson", email: "email${personCounter++}@testdomain.com" ).save() }
    139135
    140                         // Create templates
     136                        // Create a few publications
     137                        println ".adding publications"
     138                        def publication1 = new Publication(
     139                            title: "Postnatal development of hypothalamic leptin receptors",
     140                            authorsList: "Cottrell EC, Mercer JG, Ozanne SE.",
     141                            pubMedID: "20472140",
     142                            comments: "Not published yet",
     143                            DOI: "unknown"
     144                        )
     145                        .save();
     146
     147                        def publication2 = new Publication(
     148                            title: "Induction of regulatory T cells decreases adipose inflammation and alleviates insulin resistance in ob/ob mice",
     149                            authorsList: "Ilan Y, Maron R, Tukpah AM, Maioli TU, Murugaiyan G, Yang K, Wu HY, Weiner HL.",
     150                            pubMedID: "20445103",
     151                            comments: "",
     152                            DOI: ""
     153                        )
     154                        .save();
     155
     156            // Create templates
    141157
    142158                        def genderField = new TemplateField(
     
    554570                                .addToEventGroups(HFBL4)
    555571
    556                                 // Add persons to study
     572                                // Add persons and publications to study
    557573                                def studyperson1 = new StudyPerson( person: person1, role: role1 ).save();
    558574                                def studyperson2 = new StudyPerson( person: person2, role: role2 ).save();
     
    561577                                .addToPersons( studyperson1 )
    562578                                .addToPersons( studyperson2 )
     579                                .addToPublications( publication1 )
     580                                .addToPublications( publication2 )
    563581                                .save()
    564582
     
    624642                                humanStudy.addToSamplingEvents(bloodSamplingEvent)
    625643                                humanStudy.addToEventGroups rootGroup
    626                                 humanStudy.save()
     644
     645
     646                                // Add persons to study
     647                                def studyperson3 = new StudyPerson( person: person1, role: role2 ).save();
     648
     649                                humanStudy
     650                                .addToPersons( studyperson3 )
     651                                .addToPublications( publication2 )
     652                                .save()
    627653
    628654                                /*
     
    697723                                humanStudy.addToAssays(lipidAssayRef);
    698724                                humanStudy.save()
    699                                
     725
     726                                mouseStudy.addToAssays(lipidAssayRef);
     727                                mouseStudy.save()
     728
    700729                        }
    701730                }
Note: See TracChangeset for help on using the changeset viewer.