Changeset 417


Ignore:
Timestamp:
May 12, 2010, 4:09:15 PM (7 years ago)
Author:
tabma
Message:
  • split up the templates in 'simple' and 'advanced' and created a new index page for the Import Wizard
Location:
trunk/grails-app
Files:
5 added
2 edited
1 copied
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy

    r415 r417  
    3636     * Default page
    3737     **/
    38     def index = {
    39         [templates:Template.list()]
     38    def index = {       
     39    }
     40
     41    def simplewizard = {
     42        def entities = ["Subject", "Event", "Sample"]
     43        render(view:"index_simple", model:[studies:Study.list(), entities:entities])
     44    }
     45
     46    def advancedwizard = {
     47        render(view:"index_advanced", model:[templates:Template.list()])
    4048    }
    4149
  • trunk/grails-app/views/importer/index.gsp

    r359 r417  
    1313  <body>
    1414    <h1>Importer wizard</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>
    16         <g:form controller="importer" method="post" action="upload" enctype="multipart/form-data">
    17         <table border="0">
    18         <tr>
    19             <td width="100px">
    20                 Choose your Excel file to import:
    21             </td>
    22             <td width="100px">
    23                 <input type="file" name="importfile"/>
    24             </td>
    25         </tr>
    26         <tr>
    27             <td>
    28                 Template
    29             </td>
    30             <td>
    31                 <g:select name="template_id" from="${templates}" optionKey="id"/>
    32             </td>
    33         </tr>
    34         <tr>
    35             <td colspan="2">
    36                 <input type="submit" value="Next"/>
    37             </td>
    38         </tr>
    39         </table>
    40         </g:form>
     15    <p>Which import wizard do you want to use?</p>
     16
     17    <ol>
     18        <li>
     19            <g:link controller="importer" action="simplewizard">Simple wizard</g:link>
     20        </li>
     21        <li>
     22            <g:link controller="importer" action="advancedwizard">Advanced wizard</g:link>
     23        </li>
     24    </ol>
    4125
    4226  </body>
  • trunk/grails-app/views/importer/index_advanced.gsp

    r412 r417  
    99  <head>
    1010    <meta name="layout" content="main"/>
    11     <title>Importer wizard</title>
     11    <title>Importer wizard (advanced)</title>
    1212  </head>
    1313  <body>
    14     <h1>Importer wizard</h1>
     14    <h1>Importer wizard (advanced)</h1>
    1515    <p>You can import your Excel data to the server by choosing a file from your local harddisk in the form below.</p>
    1616        <g:form controller="importer" method="post" action="upload" enctype="multipart/form-data">
Note: See TracChangeset for help on using the changeset viewer.