Changeset 492
- Timestamp:
- May 28, 2010, 11:08:19 AM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy
r489 r492 53 53 * and the first n rows to the preview 54 54 * @param importfile uploaded file to import 55 * @param study.id study identifier 55 56 */ 56 57 def upload_advanced = { 57 58 def wb = handleUpload('importfile') 59 58 60 59 61 session.importer_header = ImporterService.getHeader(wb, 0) 60 62 session.importer_template_id = params.template_id 63 session.importer_study = Study.get(params.study.id.toInteger()) 61 64 session.importer_workbook = wb 62 65 … … 93 96 def templates = Template.get(session.importer_template_id) 94 97 95 render(view:"step2 ", model:[entities: selectedentities, header:session.importer_header, templates:templates])98 render(view:"step2_simple", model:[entities: selectedentities, header:session.importer_header, templates:templates]) 96 99 } 97 100 … … 194 197 */ 195 198 def saveproperties = { 196 session.importer_study = Study.get(params.study.id.toInteger())197 199 198 200 params.columnproperty.index.each { columnindex, property_id -> -
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r489 r492 57 57 def entities = attrs['entities'] 58 58 def allfieldtypes = (attrs['allfieldtypes']==null) ? "false" : "true" 59 println attrs['allfieldtypes']59 60 60 61 61 out << render ( template:"common/properties", … … 84 84 def allfieldtypes = attrs['allfieldtypes'] 85 85 86 def templatefields = (allfieldtypes=="true") ? t.fields .list(): t.fields.findAll { it.type == mc.templatefieldtype }86 def templatefields = (allfieldtypes=="true") ? t.fields : t.fields.findAll { it.type == mc.templatefieldtype } 87 87 88 88 (mc.identifier) ? out << "<select style=\"font-size:10px\" name=\"\" disabled><option>Identifier</option></select>": -
trunk/grails-app/views/importer/common/_properties.gsp
r489 r492 14 14 %> 15 15 <g:form name="propertiesform" action="saveproperties"> 16 <p><g:select name="study.id" from="${dbnp.studycapturing.Study.list()}" optionKey="id" class="selectsmall"/></p>17 16 <table> 18 17 <g:each var="stdentity" in ="${standardentities}"> -
trunk/grails-app/views/importer/index_advanced.gsp
r485 r492 13 13 <body> 14 14 <h1>Importer wizard (advanced)</h1> 15 <p>You can import your Excel data to the server by choosing a file from your local harddisk in the form below.</p> 15 <p>You can import your Excel data to the server by choosing a file from your local harddisk in the form below. 16 Then choose the template you want to use and finally the study you want to import the data to.</p> 16 17 <g:form controller="importer" method="post" action="upload_advanced" enctype="multipart/form-data"> 17 18 <table border="0"> … … 31 32 <g:select name="template_id" from="${templates}" optionKey="id"/> 32 33 </td> 34 </tr> 35 <tr> 36 <td> 37 Study 38 </td> 39 <td> 40 <g:select name="study.id" from="${dbnp.studycapturing.Study.list()}" optionKey="id" class="selectsmall"/> 41 </td> 33 42 </tr> 34 43 <tr> -
trunk/grails-app/views/importer/step2.gsp
r485 r492 25 25 <body> 26 26 <h1>Step 2: import wizard entities/properties</h1> 27 <p> First select the study you want to add the data to.The next step is to assign properties to the columns. Below you see the entities and columns, please make your27 <p>The next step is to assign properties to the columns. Below you see the entities and columns, please make your 28 28 selections.</p> 29 29 30 <importer:properties entities="${entities}" header="${header}" templates="${templates}"/> 30 31 </body>
Note: See TracChangeset
for help on using the changeset viewer.