@@ -287,17 +287,26 @@ <h4 class="modal-title" id="folder-modal-label"> @Messages("create.header", "Fo
287287
288288 < div class ="tabbable " id ="bottomDatasetTabbable "> <!-- Only required for left/right tabs -->
289289 < ul class ="nav nav-tabs margin-bottom-20 " >
290- < li role ="presentation " class ="active "> < a href ="#tab-files " role ="tab " data-toggle ="tab "> Files </ a > </ li >
291- < li role ="presentation "> < a href ="#tab-metadata " role ="tab " data-toggle ="tab "> Metadata </ a > </ li >
292- < li role ="presentation "> < a href ="#tab-extractions " role ="tab " data-toggle ="tab "> Extractions </ a > </ li >
293- < li role ="presentation "> < a href ="#tab-visua " role ="tab " data-toggle ="tab "> Visualizations</ a > </ li >
294- < li role ="presentation "> < a href ="#tab-comments " role ="tab " data-toggle ="tab "> Comments (@comments.size)</ a > </ li >
290+ @if(dataset.files.isEmpty && (m.size > 0)) {
291+ < li role ="presentation "> < a href ="#tab-files " id ="files " role ="tab " data-toggle ="tab "> Files </ a > </ li >
292+ < li role ="presentation " class ="active "> < a href ="#tab-metadata " id ="metadata " role ="tab " data-toggle ="tab "> Metadata </ a > </ li >
293+ } else {
294+ < li role ="presentation " class ="active "> < a href ="#tab-files " id ="files " role ="tab " data-toggle ="tab "> Files </ a > </ li >
295+ < li role ="presentation "> < a href ="#tab-metadata " id ="metadata " role ="tab " data-toggle ="tab "> Metadata </ a > </ li >
296+ }
297+ < li role ="presentation "> < a href ="#tab-extractions " id ="extractions " role ="tab " data-toggle ="tab "> Extractions </ a > </ li >
298+ < li role ="presentation "> < a href ="#tab-visua " id ="visua " role ="tab " data-toggle ="tab "> Visualizations</ a > </ li >
299+ < li role ="presentation "> < a href ="#tab-comments " id ="comments " role ="tab " data-toggle ="tab "> Comments (@comments.size)</ a > </ li >
295300 @if(relatedDataset.size > 0) {
296301 < li role ="relation "> < a href ="#tab-relations " role ="tab " data-toggle ="tab "> Related</ a > </ li >
297302 }
298303 </ ul >
299304 < div class ="tab-content ">
305+ @if(dataset.files.isEmpty && (m.size > 0)) {
306+ < div role ="tabpanel " class ="tab-pane fade " id ="tab-files ">
307+ } else {
300308 < div role ="tabpanel " class ="tab-pane fade in active " id ="tab-files ">
309+ }
301310 < div id ="loading-spinner " class ="center-glyphicon valign-link ">
302311 < span class ="glyphicon glyphicon-refresh glyphicon-animation-spin glyphicon-5x "> </ span >
303312 < span class ="sr-only "> Loading...</ span >
@@ -310,7 +319,11 @@ <h4 class="modal-title" id="folder-modal-label"> @Messages("create.header", "Fo
310319 }
311320 < div class ="
list-unstyled "
id ="
[email protected] "
> @comment(comments)
</ div > 312321 </ div >
322+ @if(dataset.files.isEmpty && (m.size > 0)) {
323+ < div role ="tabpanel " class ="tab-pane fade in active " id ="tab-metadata ">
324+ } else {
313325 < div role ="tabpanel " class ="tab-pane fade " id ="tab-metadata ">
326+ }
314327 @if(user.isDefined) {
315328 < div class ="row ">
316329 < div class ="col-md-12 ">
@@ -371,8 +384,9 @@ <h4>Statistics</h4>
371384 </ div >
372385 </ div >
373386
387+ @* FIXME tabsInURL.js Commented out since it creates some issues with dataset previewers *@
374388 @* FIXME Commented out since it creates some issues with dataset previewers *@
375- @*< script src ="@routes.Assets.at( "javascripts /tabsInURL.js")" type="text/javascript "> </ script > *@
389+ @* < script src ="@routes.Assets.at( "javascripts /tabsInURL.js")" type="text/javascript "> </ script > *@
376390 < script src ="@routes.Assets.at( "javascripts /errorRedirect.js")" type="text/javascript "> </ script >
377391 < script src ="@routes.Assets.at( "javascripts /updateLicenseInfo.js")" language="javascript "> </ script >
378392 < script src ="@routes.Assets.at( "javascripts /datasetListProcess.js")" type="text/javascript "> </ script >
@@ -871,5 +885,4 @@ <h4>Statistics</h4>
871885 }
872886
873887 </ script >
874- }
875-
888+ }
0 commit comments