@@ -51,7 +51,7 @@ <h4 class="modal-title" id="myModalLabel">Choose preprocessing parameters</h4>
5151
5252<!-- Prep Template tab pane -->
5353< div class ="tab-pane " id ="prep_template_info_{{pt_id}} " style ="padding: 10px; ">
54- < table border ="0 ">
54+ < table border ="0 " style =" width: 100%; " >
5555 < tr >
5656 < td >
5757 {% if is_editable %}
@@ -104,87 +104,83 @@ <h4 class="modal-title" id="myModalLabel">Choose preprocessing parameters</h4>
104104 <!-- There is no raw data associated with the prep template, show options for adding raw data -->
105105 < tr >
106106 < td style ="padding: 5px; ">
107- < button class ="btn btn-primary glyphicon glyphicon-plus " type ="button " data-toggle ="collapse " data-target ="#add-raw-data-{{pt_id}} " aria-expanded ="false " aria-controls ="add-raw-data-{{pt_id}} " style ="word-spacing: -10px; "> Add raw data</ button >
108- </ td >
109- </ tr >
110- < tr >
111- < td style ="padding: 5px; ">
112- < div class ="collapse " id ="add-raw-data-{{pt_id}} ">
113- < div class ="panel-group " id ="accordion-add-raw-{{pt_id}} " role ="tablist " aria-multiselectable ="true ">
114- <!-- Panel for creating a new raw data -->
115- < div class ="panel panel-default ">
116- < div class ="panel-heading " role ="tab " id ="create-raw-{{pt_id}} ">
117- < h4 class ="panel-title ">
118- < a class ="collapsed " data-toggle ="collapse " data-parent ="#accordion-add-raw-{{pt_id}} " href ="#collapse-new-{{pt_id}} " aria-expanded ="false " aria-controls ="collapse-new-{{pt_id}} ">
119- Add new raw data
120- </ a >
121- </ h4 >
122- </ div >
123- < div id ="collapse-new-{{pt_id}} " class ="panel-collapse collapse " role ="tabpanel " aria-labelledby ="create-raw-{{pt_id}} ">
124- < div class ="panel-body ">
125- What file type is your raw data?
126- < select id ="filetype-{{pt_id}} " onchange ="$('.filesgroup').hide(); $('#files-{{pt_id}}-'+$('#filetype-{{pt_id}}').val()).show(); ">
127- < option value ="0 "> Not selected...</ option >
128- {% for name, value, _ in filetypes %}
129- < option value ="{{value}} "> {{name}}</ option >
130- {% end %}
131- </ select >
132- < div id ="files-{{pt_id}}-0 " class ="filesgroup "> </ div >
133- {% for _, value, filepath_types in filetypes %}
134- < div id ="files-{{pt_id}}-{{value}} " class ="filesgroup ">
135- < table border ="0 ">
136- < tr > < td > < b > Choose the files to link to the raw data</ b > </ td > </ tr >
107+ < div class ="panel-group " id ="accordion-add-raw-{{pt_id}} " role ="tablist " aria-multiselectable ="true ">
108+ <!-- Panel for creating a new raw data -->
109+ < div class ="panel panel-default ">
110+ < div class ="panel-heading " role ="tab " id ="create-raw-{{pt_id}} ">
111+ < h4 class ="panel-title ">
112+ < a class ="collapsed " data-toggle ="collapse " data-parent ="#accordion-add-raw-{{pt_id}} " href ="#collapse-new-{{pt_id}} " aria-expanded ="false " aria-controls ="collapse-new-{{pt_id}} ">
113+ Add new raw data
114+ </ a >
115+ </ h4 >
116+ </ div >
117+ < div id ="collapse-new-{{pt_id}} " class ="panel-collapse collapse " role ="tabpanel " aria-labelledby ="create-raw-{{pt_id}} ">
118+ < div class ="panel-body ">
119+ What file type is your raw data?
120+ < select id ="filetype-{{pt_id}} " onchange ="$('.filesgroup').hide(); $('#files-{{pt_id}}-'+$('#filetype-{{pt_id}}').val()).show(); ">
121+ < option value ="0 "> Not selected...</ option >
122+ {% for name, value, _ in filetypes %}
123+ < option value ="{{value}} "> {{name}}</ option >
124+ {% end %}
125+ </ select >
126+ < div id ="files-{{pt_id}}-0 " class ="filesgroup "> </ div >
127+ {% for _, value, filepath_types in filetypes %}
128+ < div id ="files-{{pt_id}}-{{value}} " class ="filesgroup ">
129+ < br />
130+ < b > Choose the files to link to the raw data</ b >
131+ < br />
132+ < table class ="table table-striped ">
133+ < tr >
134+ < th > File</ th >
135+ < th > </ th >
136+ < th > File type</ th >
137+ </ tr >
138+ {% for f in files %}
137139 < tr >
138- < th > File</ th >
139- < th > </ th >
140- < th > File type</ th >
140+ < td > {{f}}</ td >
141+ < td > </ td >
142+ < td >
143+ < select id ="{{f}} " name ="upload_file_{{pt_id}}_{{value}} ">
144+ < option value =""> Ignore ...</ option >
145+ {% for fp_type in filepath_types %}
146+ < option value ="{{fp_type}} "> {{fp_type}}</ option >
147+ {% end %}
148+ </ select >
149+ </ td >
141150 </ tr >
142- {% for f in files %}
143- < tr >
144- < td > {{f}}</ td >
145- < td > </ td >
146- < td >
147- < select id ="{{f}} " name ="upload_file_{{pt_id}}_{{value}} ">
148- < option value =""> Ignore ...</ option >
149- {% for fp_type in filepath_types %}
150- < option value ="{{fp_type}} "> {{fp_type}}</ option >
151- {% end %}
152- </ select >
153- </ td >
154- </ tr >
155- {% end %}
156- < tr > < td > < a class ="btn btn-primary " onclick ="create_raw_data({{pt_id}}, {{value}}); "> Add</ a > </ td > </ tr >
157- </ table >
158- </ div >
159- {% end %}
160- </ div >
151+ {% end %}
152+ </ table >
153+ < a class ="btn btn-primary " onclick ="create_raw_data({{pt_id}}, {{value}}); "> Link</ a >
154+ </ div >
155+ {% end %}
161156 </ div >
162157 </ div >
163- <!-- Panel for adding an existent raw data to the prep template -->
164- < div class ="panel panel-default ">
165- < div class ="panel-heading " role ="tab " id ="use-existing-{{pt_id}} ">
166- < h4 class ="panel-title ">
167- < a class ="collapsed " data-toggle ="collapse " data-parent ="#accordion-add-raw-{{pt_id}} " href ="#collapse-existing-{{pt_id}} " aria-expanded ="false " aria-controls ="collapse-existing-{{pt_id}} ">
168- Use existing raw data
169- </ a >
170- </ h4 >
171- </ div >
172- < div id ="collapse-existing-{{pt_id}} " class ="panel-collapse collapse " role ="tabpanel " aria-labelledby ="use-existing-{{pt_id}} ">
173- < div class ="panel-body ">
174- {% if other_studies_rd %}
175- Choose raw data from studies that you have access to:
176- < br />
177- < select class ="chosen-select " id ="previous-raw-data-{{pt_id}} " data-placeholder =" ">
178- {% for rd_id, study_name in other_studies_rd %}
179- < option value ="{{rd_id}} "> id: {{rd_id}}, study: {{study_name}}</ option >
180- {% end %}
181- </ select >
182- < br />
183- < a class ="btn btn-primary " onclick ="add_raw_data({{pt_id}}); "> Add</ a >
184- {% else %}
185- There is no existent raw data available.
186- {% end %}
187- </ div >
158+ </ div >
159+ <!-- Panel for adding an existent raw data to the prep template -->
160+ < div class ="panel panel-default ">
161+ < div class ="panel-heading " role ="tab " id ="use-existing-{{pt_id}} ">
162+ < h4 class ="panel-title ">
163+ < a class ="collapsed " data-toggle ="collapse " data-parent ="#accordion-add-raw-{{pt_id}} " href ="#collapse-existing-{{pt_id}} " aria-expanded ="false " aria-controls ="collapse-existing-{{pt_id}} ">
164+ Use existing raw data
165+ </ a >
166+ </ h4 >
167+ </ div >
168+ < div id ="collapse-existing-{{pt_id}} " class ="panel-collapse collapse " role ="tabpanel " aria-labelledby ="use-existing-{{pt_id}} ">
169+ < div class ="panel-body ">
170+ {% if other_studies_rd %}
171+ Choose raw data from studies that you have access to:
172+ < br />
173+ < select class ="chosen-select " id ="previous-raw-data-{{pt_id}} " data-placeholder =" ">
174+ {% for rd_id, study_name in other_studies_rd %}
175+ < option value ="{{rd_id}} "> id: {{rd_id}}, study: {{study_name}}</ option >
176+ {% end %}
177+ </ select >
178+ < br />
179+ < br />
180+ < a class ="btn btn-primary " onclick ="add_raw_data({{pt_id}}); "> Add</ a >
181+ {% else %}
182+ There is no existent raw data available.
183+ {% end %}
188184 </ div >
189185 </ div >
190186 </ div >
0 commit comments