-
Notifications
You must be signed in to change notification settings - Fork 479
/
filesFragment.xhtml
689 lines (645 loc) · 54.6 KB
/
filesFragment.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:pt="http://java.sun.com/jsf/passthrough"
xmlns:cc="http://java.sun.com/jsf/composite"
xmlns:o="http://omnifaces.org/ui"
xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
<o:importFunctions type="java.lang.Math" />
<p:remoteCommand name="refreshPaginator" action="#{DatasetPage.refreshPaginator()}" process="@this" update="@form" />
<!-- Toggle Files Display Components -->
<div jsf:id="filesDisplayToggleBlock" jsf:rendered="#{DatasetPage.fileTreeViewRequired}" class="row">
<div class="form-group col-xs-12">
<label class="col-xs-2 control-label" style="padding:.3em 1em;">
#{bundle['file.display.label']}
</label>
<div class="col-xs-4 input-group">
<p:selectOneButton id="displayValue" styleClass="form-control" value="#{DatasetPage.fileDisplayMode}"
style="padding:0;border:0;box-shadow:none;">
<f:selectItem itemLabel="#{bundle['file.display.table']}" itemValue="Table" />
<f:selectItem itemLabel="#{bundle['file.display.tree']}" itemValue="Tree" />
<!-- AJAX UPDATES TO TOGGLE p:dataTable widgetVar="filesTable" AND p:tree widgetVar="filesTree" COMPONENTS BELOW -->
<p:ajax update=":datasetForm" process="@this" oncomplete="bind_bsui_components();"/>
</p:selectOneButton>
</div>
</div>
</div>
<p:remoteCommand name="rebindCommand" process="@this" update="filesTable" oncomplete="javascript:bind_bsui_components();"/>
<!-- Files Table -->
<p:dataTable id="filesTable"
rows="10" paginator="#{DatasetPage.fileMetadatasSearch.size() gt 10}" paginatorPosition="bottom"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} #{bundle['file.dynamicCounter.filesPerPage']} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,25,50"
style="margin-right:1px;"
value="#{DatasetPage.fileMetadatasSearch}"
rowIndexVar="rowNum" rowKey="#{fileMetadata.dataFile.storageIdentifier}"
selection="#{DatasetPage.selectedFiles}" var="fileMetadata" widgetVar="filesTable"
rendered="#{DatasetPage.fileDisplayTable and empty DatasetPage.editMode and (DatasetPage.workingVersion != null)}"
emptyMessage="#{DatasetPage.workingVersion.fileMetadatas.size() == 0 ? bundle['file.notFound.tip'] : bundle['file.notFound.search']}">
<p:ajax event="page" listener="#{DatasetPage.fileListingPaginatorListener}" update="filesTable" process="@this" oncomplete="refreshPaginator(),rebindCommand()" immediate="true"/>
<p:ajax event="toggleSelect" listener="#{DatasetPage.toggleAllSelected()}" update="filesTable" process="@this" oncomplete="rebindCommand()" />
<p:ajax event="rowUnselectCheckbox" listener="#{DatasetPage.setSelectAllFiles(false)}" update="filesTable" process="@this" oncomplete="rebindCommand()" />
<p:ajax event="rowSelect" listener="#{DatasetPage.setSelectAllFiles(false)}" update="filesTable" process="@this" oncomplete="rebindCommand()" />
<p:ajax event="rowSelectCheckbox" listener="#{DatasetPage.setSelectAllFiles(false)}" update="filesTable" process="@this" oncomplete="rebindCommand()" />
<p:ajax event="rowUnselect" listener="#{DatasetPage.setSelectAllFiles(false)}" update="filesTable" process="@this" oncomplete="rebindCommand()" />
<p:ajax event="rowDblselect" listener="#{DatasetPage.setSelectAllFiles(false)}" update="filesTable" process="@this" oncomplete="rebindCommand()" />
<f:facet name="header">
<div class="row form-inline" jsf:id="cloudStorageBlock" jsf:rendered="#{DatasetPage.showComputeButton()}">
<!-- Cloud Storage Access -->
<div class="form-group col-xs-12 text-left">
<div class="col-xs-12">
<p class="help-block">
<h:outputFormat value="#{bundle['file.cloudStorageAccess.help']}" escape="false">
<f:param value="#{systemConfig.guidesBaseUrl}"/>
<f:param value="#{systemConfig.guidesVersion}"/>
<f:param value="#{DatasetPage.cloudEnvironmentName}"/>
</h:outputFormat>
</p>
</div>
<label class="col-sm-3 control-label">
#{bundle['file.cloudStorageAccess']}
<span class="glyphicon glyphicon-question-sign tooltip-icon"
data-toggle="tooltip" data-placement="auto top" data-original-title="#{bundle['file.cloudStorageAccess.tip']}"></span>
</label>
<div class="col-md-4 col-sm-5 col-xs-6 input-group">
<div id="copy-input" class="form-control">#{DatasetPage.swiftContainerName}</div>
<span class="input-group-btn">
<button class="btn btn-default btn-copy" type="button" id="copy-button" data-clipboard-action="copy" data-clipboard-target="#copy-input">
<span class="glyphicon glyphicon-copy"></span> #{bundle['file.copy']}
</button>
</span>
<script>
//<![CDATA[
$(document).ready(function () {
// clipboard.js > cloud storage copy btn
var clipboard = new Clipboard('button.btn-copy');
clipboard.on('success', function (e) {
console.log(e);
});
clipboard.on('error', function (e) {
console.log(e);
});
});
//]]>
</script>
</div>
</div>
</div>
<div jsf:id="filesHeaderBlock" class="row">
<div class="col-xs-5">
<!-- FILE SEARCH -->
<div class="input-group" jsf:rendered="#{DatasetPage.workingVersion.fileMetadatas.size() gt 1}">
<label id="searchLabel" class="sr-only" jsf:for="searchFiles">#{bundle.search}</label>
<p:inputText id="searchFiles" title="#{bundle.search}" styleClass="form-control" value="#{DatasetPage.fileLabelSearchTerm}" widgetVar="inputSearchTerm"
onkeypress="if (event.keyCode == 13) {
submitsearch();
return false;
}">
<f:passThroughAttribute name="aria-labelledby" value="searchLabel"/>
</p:inputText>
<p:watermark for="searchFiles" value="#{bundle['file.search.placeholder']}"/>
<h:inputHidden id="showAccessPopup" value="#{DatasetPage.showAccessPopup}"/>
<p:remoteCommand name="submitsearch" action="#{DatasetPage.updateFileSearch()}" process="@this @widgetVar(inputSearchTerm)" update="@form" partialSubmit="true"/>
<span class="input-group-btn">
<p:commandLink styleClass="btn btn-default" action="#{DatasetPage.updateFileSearch()}" process="@this @widgetVar(inputSearchTerm)" update="@form" partialSubmit="true">
<span class="glyphicon glyphicon-search"></span> #{bundle['dataverse.search.btn.find']}
</p:commandLink>
</span>
</div>
</div>
<div class="col-xs-7 text-right">
<p:outputPanel id="filesButtons">
<!-- 4.2.1: replaced permissionsWrapper.canIssueUpdateDatasetCommand(DatasetPage.dataset) with DatasetPage.canUpdateDataset() -->
<!-- tab-header pull-right -->
<div jsf:id="uploadComputeBlock" class="button-block pull-right no-margin-top"
jsf:rendered="#{!(DatasetPage.editMode == 'FILE' or DatasetPage.editMode == 'CREATE')
and (DatasetPage.canUpdateDataset()
or (!(empty DatasetPage.workingVersion.fileMetadatas) and DatasetPage.workingVersion.fileMetadatas.size() > 1))}">
<!-- DOWNLOAD DCM SCRIPT BUTTON -->
<h:commandLink id="rsyncDLFF" actionListener="#{DatasetPage.downloadRsyncScript()}" styleClass="btn btn-default"
rendered="#{DatasetPage.sessionUserAuthenticated
and DatasetPage.canUpdateDataset() and empty DatasetPage.workingVersion.fileMetadatas
and !widgetWrapper.widgetView and DatasetPage.lockedDueToDcmUpload}">
<span class="glyphicon glyphicon-download-alt"/> <h:outputText value=" #{bundle['file.rsyncUpload.step2.downloadScriptButton']}"/>
</h:commandLink>
<!-- UPLOAD FILES BUTTON -->
<h:outputLink value="/editdatafiles.xhtml?datasetId=#{DatasetPage.dataset.id}&mode=UPLOAD"
type="button" styleClass="btn btn-default btn-access #{DatasetPage.lockedFromEdits ? 'disabled' : ''}"
disabled="#{DatasetPage.lockedFromEdits}" rendered="#{DatasetPage.sessionUserAuthenticated
and DatasetPage.canUpdateDataset()
and !widgetWrapper.widgetView}">
<span class="glyphicon glyphicon-plus"/> <h:outputText id="uploadFile-s-Link" value="#{bundle['file.uploadFiles']}"/>
</h:outputLink>
</div>
</p:outputPanel>
</div>
</div>
<!-- FILES FILTER FACETS -->
<div class="row" style="margin-bottom:10px;" jsf:rendered="#{(DatasetPage.workingVersion.fileMetadatas.size() gt 1)}">
<div class="col-xs-9 text-left" jsf:rendered="#{DatasetPage.indexedVersion}">
<div class="text-muted small" style="font-weight:normal;" jsf:rendered="#{(DatasetPage.fileMetadatasSearch.size() gt 0)}">#{bundle['file.results.filter']}</div>
<!-- FACET: TYPE -->
<div class="btn-group" style="margin-right:20px;" jsf:rendered="#{!(empty DatasetPage.fileTypeFacetLabels)}">
<button type="button" class="btn btn-link dropdown-toggle" style="padding:0;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
#{bundle['file.results.filter.type']} <h:outputText value="#{(empty DatasetPage.fileTypeFacet) ? bundle['file.results.filter.all'] : DatasetPage.fileTypeFacet}"
styleClass="#{!empty DatasetPage.fileTypeFacet ? 'highlightBold' : ''}"/> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<!-- link for "All" - all file types: -->
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{empty DatasetPage.fileTypeFacet ? 'highlightBold' : ''}" value="#{bundle['file.results.filter.all']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileTag" value="#{DatasetPage.fileTagsFacet}"/>
<f:param name="fileSortField" value="#{DatasetPage.fileSortField}"/>
<f:param name="fileSortOrder" value="#{DatasetPage.fileSortOrder}"/>
</h:outputLink></li>
<li role="separator" class="divider"></li>
<ui:repeat value="#{DatasetPage.fileTypeFacetLabels}" var="facetLabel">
<li><h:outputLink value="/dataset.xhtml">
<h:outputFormat styleClass="#{facetLabel.name == DatasetPage.fileTypeFacet ? 'highlightBold' : ''}" value="#{facetLabel.name} ({0})">
<f:param value="#{facetLabel.count}"/>
</h:outputFormat>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value='"#{facetLabel.name}"'/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileTag" value="#{DatasetPage.fileTagsFacet}"/>
<f:param name="fileSortField" value="#{DatasetPage.fileSortField}"/>
<f:param name="fileSortOrder" value="#{DatasetPage.fileSortOrder}"/>
</h:outputLink></li>
</ui:repeat>
</ul>
</div>
<!-- FACET: ACCESS -->
<div class="btn-group" style="margin-right:20px;" jsf:rendered="#{!(empty DatasetPage.fileAccessFacetLabels)}">
<button type="button" class="btn btn-link dropdown-toggle" style="padding:0;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
#{bundle['file.results.filter.access']} <h:outputText value="#{(empty DatasetPage.fileAccessFacet) ? bundle['file.results.filter.all'] : DatasetPage.fileAccessFacet}"
styleClass="#{!empty DatasetPage.fileAccessFacet ? 'highlightBold' : ''}"/> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<!-- link for "All" - i.e., all (both) types of access: -->
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{empty DatasetPage.fileAccessFacet ? 'highlightBold' : ''}" value="#{bundle['file.results.filter.all']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileTag" value="#{DatasetPage.fileTagsFacet}"/>
<f:param name="fileSortField" value="#{DatasetPage.fileSortField}"/>
<f:param name="fileSortOrder" value="#{DatasetPage.fileSortOrder}"/>
</h:outputLink></li>
<li role="separator" class="divider"></li>
<ui:repeat value="#{DatasetPage.fileAccessFacetLabels}" var="facetLabel">
<li><h:outputLink value="/dataset.xhtml">
<h:outputFormat styleClass="#{facetLabel.name == DatasetPage.fileAccessFacet ? 'highlightBold' : ''}" value="#{facetLabel.name} ({0})">
<f:param value="#{facetLabel.count}"/>
</h:outputFormat>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{facetLabel.name}"/>
<f:param name="fileTag" value="#{DatasetPage.fileTagsFacet}"/>
<f:param name="fileSortField" value="#{DatasetPage.fileSortField}"/>
<f:param name="fileSortOrder" value="#{DatasetPage.fileSortOrder}"/>
</h:outputLink></li>
</ui:repeat>
</ul>
</div>
<!-- FACET: TAG -->
<div class="btn-group" style="margin-right:20px;" jsf:rendered="#{!(empty DatasetPage.fileTagsFacetLabels)}">
<button type="button" class="btn btn-link dropdown-toggle" style="padding:0;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
#{bundle['file.results.filter.tag']} <h:outputText value="#{(empty DatasetPage.fileTagsFacet) ? bundle['file.results.filter.all'] : DatasetPage.fileTagsFacet}"
styleClass="#{!empty DatasetPage.fileTagsFacet ? 'highlightBold' : ''}"/> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<!-- link for "All" - i.e., all file tags: -->
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{empty DatasetPage.fileTagsFacet ? 'highlightBold' : ''}" value="#{bundle['file.results.filter.all']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileSortField" value="#{DatasetPage.fileSortField}"/>
<f:param name="fileSortOrder" value="#{DatasetPage.fileSortOrder}"/>
</h:outputLink></li>
<li role="separator" class="divider"></li>
<ui:repeat value="#{DatasetPage.fileTagsFacetLabels}" var="facetLabel">
<li><h:outputLink value="/dataset.xhtml">
<h:outputFormat styleClass="#{facetLabel.name == DatasetPage.fileTagsFacet ? 'highlightBold' : ''}" value="#{facetLabel.name} ({0})">
<f:param value="#{facetLabel.count}"/>
</h:outputFormat>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileTag" value='"#{facetLabel.name}"'/>
<f:param name="fileSortField" value="#{DatasetPage.fileSortField}"/>
<f:param name="fileSortOrder" value="#{DatasetPage.fileSortOrder}"/>
</h:outputLink></li>
</ui:repeat>
</ul>
</div>
</div>
<div class="col-xs-3 text-right #{DatasetPage.indexedVersion ? '' : 'col-xs-offset-9'}">
<!-- FILES SORT -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-sort"></span> #{bundle['file.results.btn.sort']} <span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right text-left">
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{((empty DatasetPage.fileSortField) or DatasetPage.fileSortField == 'name') and (empty DatasetPage.fileSortOrder) ? 'highlightBold' : ''}" value="#{bundle['file.results.btn.sort.option.nameAZ']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
</h:outputLink></li>
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{(DatasetPage.fileSortField == 'name' and DatasetPage.fileSortOrder == 'desc') ? 'highlightBold' : ''}" value="#{bundle['file.results.btn.sort.option.nameZA']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileSortField" value="name"/>
<f:param name="fileSortOrder" value="desc"/>
</h:outputLink></li>
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{(DatasetPage.fileSortField == 'date' and (empty DatasetPage.fileSortOrder)) ? 'highlightBold' : ''}" value="#{bundle['file.results.btn.sort.option.newest']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileSortField" value="date"/>
</h:outputLink></li>
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{(DatasetPage.fileSortField == 'date' and DatasetPage.fileSortOrder == 'desc') ? 'highlightBold' : ''}" value="#{bundle['file.results.btn.sort.option.oldest']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileSortField" value="date"/>
<f:param name="fileSortOrder" value="desc"/>
</h:outputLink></li>
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{DatasetPage.fileSortField == 'size' ? 'highlightBold' : ''}" value="#{bundle['file.results.btn.sort.option.size']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileSortField" value="size"/>
</h:outputLink></li>
<li><h:outputLink value="/dataset.xhtml">
<h:outputText styleClass="#{DatasetPage.fileSortField == 'type' ? 'highlightBold' : ''}" value="#{bundle['file.results.btn.sort.option.type']}"/>
<f:param name="persistentId" value="#{DatasetPage.persistentId}"/>
<f:param name="version" value="#{DatasetPage.version}"/>
<f:param name="q" value="#{DatasetPage.fileLabelSearchTerm}"/>
<f:param name="fileTypeGroupFacet" value="#{DatasetPage.fileTypeFacet}"/>
<f:param name="fileAccess" value="#{DatasetPage.fileAccessFacet}"/>
<f:param name="fileSortField" value="type"/>
</h:outputLink></li>
</ul>
</div>
</div>
</div>
<div class="row" jsf:rendered="#{DatasetPage.workingVersion.fileMetadatas.size() gt 10 and (DatasetPage.selectedFiles.size() gt 0)}">
<div class="col-xs-12 bg-warning text-left" style="font-weight:normal;padding-top:.5em;">
<!-- SELECTION MESSAGE -->
<p>
<h:outputFormat value="#{bundle['file.numFilesSelected']}">
<f:param value="#{DatasetPage.selectedFiles.size()}"/>
</h:outputFormat>
<ui:fragment rendered="#{DatasetPage.selectedFiles.size() lt DatasetPage.workingVersion.fileMetadatas.size()}">
 
<p:commandLink action="#{DatasetPage.selectAllFiles}" update="@form">
<h:outputFormat value="#{bundle['file.selectAllFiles']}">
<f:param value="#{DatasetPage.fileMetadatasSearch.size()}"/>
</h:outputFormat>
</p:commandLink>
</ui:fragment>
 
<p:commandLink value="#{bundle['file.clearSelection']}" action="#{DatasetPage.clearSelection}" update="@form"/>
</p>
</div>
</div>
</f:facet>
<p:column selectionMode="multiple" class="text-center" ariaHeaderText="#{bundle['file.select.tooltip']}"/>
<p:column class="col-file-metadata">
<f:facet name="header">
<f:passThroughAttribute name="aria-label" value="#{bundle['file.count.label']}"/>
<div jsf:id="filesHeaderCount">
<!-- Files Count -->
<h:outputFormat value="#{DatasetPage.fileMetadatasSearch.size() == 1 ? bundle['file.count.one'] : bundle['file.count']}" styleClass="highlightBold" rendered="#{DatasetPage.fileMetadatasSearch.size() gt 0}">
<f:param value="#{(DatasetPage.filePaginatorPage * DatasetPage.rowsPerPage) + 1}"/>
<f:param value="#{Math:min((DatasetPage.filePaginatorPage + 1) * DatasetPage.rowsPerPage,DatasetPage.fileMetadatasSearch.size()) }"/>
<f:param value="#{DatasetPage.fileMetadatasSearch.size()}"/>
</h:outputFormat>
</div>
</f:facet>
<div class="col-file-flexbox">
<div class="col-file-thumb pull-left">
<div class="thumbnail-block text-center">
<!-- Thumbnail Preview -->
<span class="file-thumbnail-preview-img" jsf:rendered="#{!empty fileMetadata.dataFile.id and DatasetPage.isThumbnailAvailable(fileMetadata)}"
data-toggle="popover" data-placement="top" data-trigger="hover" data-html="true" data-content="<img src="/api/access/datafile/#{fileMetadata.dataFile.id}?imageThumb=400" alt="#{bundle['file.preview']} #{fileMetadata.label}" />"
data-template='<div class="popover thumb-preview" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'>
<img src="#{DatasetPage.getDataFileThumbnailAsBase64(fileMetadata)}" alt="#{fileMetadata.label}"/>
</span>
<!-- Default Icon -->
<span class="icon-#{dataFileServiceBean.getFileThumbnailClass(fileMetadata.dataFile)} file-thumbnail-icon text-muted" jsf:rendered="#{(!empty fileMetadata.dataFile.id and !DatasetPage.isThumbnailAvailable(fileMetadata)) or (empty fileMetadata.dataFile.id and !dataFileServiceBean.isTemporaryPreviewAvailable(fileMetadata.dataFile.storageIdentifier, fileMetadata.dataFile.contentType))}"/>
<!-- the "temp preview" is for new, not yet saved files; these should never appear on this page - as we now have the editfilespage for that, correct? -->
<ui:fragment rendered="#{empty fileMetadata.dataFile.id and !empty fileMetadata.dataFile.storageIdentifier and dataFileServiceBean.isTemporaryPreviewAvailable(fileMetadata.dataFile.storageIdentifier, fileMetadata.dataFile.contentType)}">
<img src="/api/access/tempPreview/#{fileMetadata.dataFile.storageIdentifier}?mimetype=#{fileMetadata.dataFile.contentType}" alt="#{fileMetadata.label}"/>
<h:outputText id="imgPreview" value="#{bundle['preview']}" styleClass="bg-info text-info text-center show"/>
</ui:fragment>
<!-- Restricted File Icon -->
<div class="file-icon-restricted-block" jsf:rendered="#{fileMetadata.restricted and !fileDownloadHelper.canDownloadFile(fileMetadata)}">
<span class="glyphicon glyphicon-lock text-danger"/>
</div>
<div class="file-icon-restricted-block" jsf:rendered="#{fileMetadata.restricted and fileDownloadHelper.canDownloadFile(fileMetadata) }">
<span class="icon-unlock text-success"/>
</div>
</div>
</div>
<div class="file-metadata-block">
<a href="#{widgetWrapper.wrapURL('/file.xhtml?'.concat(!empty fileMetadata.dataFile.globalIdString ? 'persistentId=' : 'fileId=').concat(!empty fileMetadata.dataFile.globalIdString ? fileMetadata.dataFile.globalIdString : fileMetadata.dataFile.id).concat('&version=').concat(fileMetadata.datasetVersion.friendlyVersionNumber))}">
#{fileMetadata.label}
</a>
<!-- HIERARCHY + TYPE + SIZE + DATE + CHECKSUM -->
<div class="text-muted small">
<!-- id:#{fileMetadata.dataFile.id} -->
<div jsf:rendered="#{!empty fileMetadata.directoryLabel}">
<h:outputText id="fileHierarchy" value="#{fileMetadata.directoryLabel}/"/>
</div>
<h:outputText id="fileTypeOutputRegular" value="#{fileMetadata.dataFile.friendlyType}" rendered="#{!(fileMetadata.dataFile.tabularData)}"/>
<h:outputText id="fileTypeOutputTabular" value="#{bundle['file.type.tabularData']}" rendered="#{fileMetadata.dataFile.tabularData}"/>
<h:outputText id="fileSize" value=" - #{fileMetadata.dataFile.friendlySize}" rendered="#{!(DatasetPage.editMode == 'FILE' or DatasetPage.editMode == 'CREATE')}"/>
<h:outputText id="fileCreatePublishDate" value=" - #{fileMetadata.getFileDateToDisplay()}" rendered="#{!(empty fileMetadata.id)}"/>
<h:outputFormat id="fileDownloadCount" value=" - {0} #{bundle['metrics.downloads']}" rendered="#{!(DatasetPage.editMode == 'FILE' or DatasetPage.editMode == 'CREATE' or settingsWrapper.rsyncOnly)}">
<f:param value="#{DatasetPage.getGuestbookResponseCount(fileMetadata)}"/>
</h:outputFormat>
<div class="checksum-block" style="word-break: break-all;" jsf:rendered="#{!fileMetadata.dataFile.tabularData}">
<h:outputText id="file-checksum" value="#{fileMetadata.dataFile.checksumType}: #{fileMetadata.dataFile.checksumValue}" rendered="#{!(empty fileMetadata.dataFile.checksumValue) and ((DatasetPage.editMode != 'FILE' and DatasetPage.editMode != 'CREATE') or !DatasetPage.isDuplicate(fileMetadata))}"/>
</div>
</div>
<!-- UNF + Variables, Obsersvations -->
<div class="text-muted small" style="word-break: break-all;" jsf:rendered="#{fileMetadata.dataFile.tabularData}">
<h:outputText id="fileNumVars" value="#{fileMetadata.dataFile.dataTable.varQuantity} #{bundle['file.metaData.dataFile.dataTab.variables']}, " rendered="#{fileMetadata.dataFile.tabularData}"/>
<h:outputText id="fileNumObs" value="#{fileMetadata.dataFile.dataTable.caseQuantity} #{bundle['file.metaData.dataFile.dataTab.observations']} #{!empty fileMetadata.dataFile.unf ? ' - ' : ''}" rendered="#{fileMetadata.dataFile.tabularData}"/>
<h:outputText id="fileUNF" value="#{fileMetadata.dataFile.unf}" rendered="#{!empty fileMetadata.dataFile.unf}"/>
</div>
<div class="file-description-block small" jsf:rendered="#{!(empty fileMetadata.description)}">
<h:outputText id="fileDescNonEmpty" value="#{fileMetadata.description}" rendered="#{!(DatasetPage.editMode == 'FILE' or DatasetPage.editMode == 'CREATE') and !(empty fileMetadata.description)}"/>
</div>
<div class="file-tags-block #{DatasetPage.editMode == 'FILE' or DatasetPage.editMode == 'CREATE' ? 'margin-top-half' : ''}" jsf:rendered="#{!(empty fileMetadata.categories) or !(empty fileMetadata.dataFile.tags)}">
<ui:fragment rendered="#{!(empty fileMetadata.categories)}">
<ui:repeat value="#{fileMetadata.categories}" var="cat">
<h:outputText value="#{cat.name}" styleClass="label label-default"/>
</ui:repeat>
</ui:fragment>
<ui:fragment >
<ui:repeat value="#{fileMetadata.dataFile.tags}" var="tag">
<h:outputText value="#{tag.typeLabel}" styleClass="label label-info"/>
</ui:repeat>
</ui:fragment>
</div>
</div>
</div>
</p:column>
<p:column class="col-file-action button-block text-right" ariaHeaderText="#{bundle['file.actionsBlock']}" rendered="#{!(DatasetPage.editMode == 'FILE' or DatasetPage.editMode == 'CREATE')}">
<f:facet name="header">
<!-- EDIT -->
<div style="margin-right:14px;" class="btn-group" jsf:rendered="#{DatasetPage.sessionUserAuthenticated
and DatasetPage.canUpdateDataset() and !widgetWrapper.widgetView and (DatasetPage.fileMetadatasSearch.size() gt 0)}">
<button type="button" class="btn btn-default btn-access dropdown-toggle" data-toggle="dropdown"
disabled="#{DatasetPage.lockedFromEdits ? 'disabled' : ''}">
<span class="glyphicon glyphicon-pencil"/> #{bundle['file.editFiles']} <span class="caret"></span>
</button>
<ul class="dropdown-menu multi-level pull-right text-left" role="menu">
<ui:include src="file-edit-button-fragment.xhtml">
<ui:param name="fileMetadataForAction" value="#{DatasetPage.fileMetadataForAction}"/>
<ui:param name="bean" value="#{DatasetPage}"/>
<ui:param name="unrestrictFileAction" value="restrictFiles"/>
<ui:param name="editFileAction" value="editFileMetadata"/>
<ui:param name="refreshTagsPopoupAction" value="refreshTagsPopUp"/>
</ui:include>
</ul>
</div>
<!-- NOTE the disabled="{_datasetPage.lockedFromDownload}" attributes on the 6 batch download buttons below. -->
<!-- it looks like they were put there in order to disable downloads while the dataset is locked. -->
<!-- Nobody appears to remember why we would ever want to do that... especially since individual downloads -->
<!-- are currently allowed on locked datasets. I've been asked to re-enable these download buttons, even -->
<!-- when the dataset is locked. I didn't want to completely remove the disabled="" attributes, -->
<!-- since I feel we should figure out/remember why we put that logic in place in the first place... -->
<!-- so I have replaced them with {false && DatasetPage.lockedFromDownload}. - L.A. Aug. 2018 -->
<div jsf:id="downloadButtonBlockNormal" class="btn-group"
jsf:rendered="#{(!(empty DatasetPage.workingVersion.fileMetadatas)
and DatasetPage.workingVersion.fileMetadatas.size() > 1) and DatasetPage.downloadButtonAvailable
and !DatasetPage.isHasTabular()}">
<p:commandLink rendered="#{!(DatasetPage.downloadPopupRequired)}"
styleClass="btn btn-default btn-download"
disabled="#{false and DatasetPage.lockedFromDownload}"
update="@form"
actionListener="#{DatasetPage.validateFilesForDownload(false, false)}">
<span class="glyphicon glyphicon-download-alt"/> #{bundle.download}
</p:commandLink>
<!-- guest book or terms of use, etc. enabled - open "download popup" first: -->
<p:commandLink rendered="#{DatasetPage.downloadPopupRequired}"
styleClass="btn btn-default btn-download"
disabled="#{false and DatasetPage.lockedFromDownload}"
action="#{DatasetPage.validateFilesForDownload(true, false)}"
update="@form" oncomplete="">
<span class="glyphicon glyphicon-download-alt"/> #{bundle.download}
</p:commandLink>
</div>
<div jsf:id="downloadButtonBlockTabular" class="btn-group"
jsf:rendered="#{(!(empty DatasetPage.workingVersion.fileMetadatas)
and DatasetPage.workingVersion.fileMetadatas.size() > 1) and DatasetPage.downloadButtonAvailable
and DatasetPage.isHasTabular()}">
<button type="button" class="btn btn-default btn-download dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-download-alt"/> #{bundle.download} <span class="caret"></span>
</button>
<ul jsf:id="downloadDropdownOptions" class="dropdown-menu multi-level pull-right text-left" role="menu">
<li >
<p:commandLink rendered="#{!(DatasetPage.downloadPopupRequired)}"
disabled="#{false and DatasetPage.lockedFromDownload}"
update="@form"
actionListener="#{DatasetPage.validateFilesForDownload(false, true)}">
#{bundle.downloadOriginal}
</p:commandLink>
<!-- guest book or terms of use, etc. enabled - open "download popup" first: -->
<p:commandLink rendered="#{DatasetPage.downloadPopupRequired}"
disabled="#{false and DatasetPage.lockedFromDownload}"
action="#{DatasetPage.validateFilesForDownload(true, true)}"
update="@form" oncomplete="">
#{bundle.downloadOriginal}
</p:commandLink>
</li>
<li> <!--jsf:rendered="# {DatasetPage.isTabularDataSelected()}"-->
<p:commandLink rendered="#{!(DatasetPage.downloadPopupRequired)}"
disabled="#{false and DatasetPage.lockedFromDownload}"
update="@form"
actionListener="#{DatasetPage.validateFilesForDownload(false, false)}">
#{bundle.downloadArchival}
</p:commandLink>
<!-- guest book or terms of use, etc. enabled - open "download popup" first: -->
<p:commandLink rendered="#{DatasetPage.downloadPopupRequired}"
disabled="#{false and DatasetPage.lockedFromDownload}"
action="#{DatasetPage.validateFilesForDownload(true, false)}"
update="@form" oncomplete="">
#{bundle.downloadArchival}
</p:commandLink>
</li>
</ul>
</div>
<p:commandLink rendered="#{DatasetPage.fileAccessRequestMultiButtonRequired}"
styleClass="btn btn-default btn-request"
update="@form" action="#{DatasetPage.requestAccessMultipleFiles()}"
disabled="#{DatasetPage.locked}">
<span class="glyphicon glyphicon-bullhorn"/> #{bundle['file.requestAccess']}
</p:commandLink>
<p:commandLink rendered="#{DatasetPage.fileAccessRequestMultiSignUpButtonRequired}"
styleClass="btn btn-default btn-request"
onclick="PF('accessSignUpLogIn_popup').show()"
disabled="#{DatasetPage.locked}">
<span class="glyphicon glyphicon-bullhorn"/> #{bundle['file.requestAccess']}
</p:commandLink>
<script type="text/javascript">
function downloadFiles(url, filelist) {
filelist = filelist + ','; //Prevents last file from being dropped on server
var form = $('<form></form>').attr('action', url).attr('method', 'post').attr('enctype', 'text/plain');
form.append($("<input></input>").attr('type', 'hidden').attr('name', 'fileIds').attr('value', filelist));
//Submit and then remove form
form.appendTo('body').submit().remove();
}
</script>
</f:facet>
<!-- FILE LEVEL MSGs -->
<div class="bg-info text-info text-center margin-bottom-half" jsf:rendered="#{fileMetadata.dataFile.ingestInProgress}">
<!-- Ingest in progress... -->
<span class="glyphicon glyphicon-info-sign"/> #{bundle['file.ingestInProgress']}
</div>
<div class="bg-warning text-warning text-center margin-bottom-half" jsf:rendered="#{fileMetadata.dataFile.ingestProblem and DatasetPage.canUpdateDataset()}">
<!-- Ingest failed -->
<span class="glyphicon glyphicon-warning-sign"/> #{bundle['file.ingestFailed.header']} 
<span data-toggle="tooltip" data-trigger="hover" data-placement="top" data-title="#{bundle['file.ingestFailed.message']} #{fileMetadata.dataFile.ingestReportMessage}">
<span class="glyphicon glyphicon-question-sign"/>
</span>
</div>
<!-- END: FILE LEVEL MSGs -->
<div class="btn-group" role="group" aria-label="#{bundle['file.actionsBlock']}" jsf:rendered="#{showAccessFileButtonGroup}">
<!-- Access File - Download, Explore, Compute -->
<div class="btn-group" jsf:rendered="#{showAccessFileButtonGroup}">
<!-- TO-DO FIX RSYNC LOGIC !fileMetadata.dataFile.filePackage or
fileMetadata.dataFile.filePackage and systemConfig.HTTPDownload -->
<ui:fragment rendered="#{DatasetPage.isShowPreviewButton(fileMetadata.dataFile.id) and not fileMetadata.restricted}">
<a class="btn-preview btn btn-link bootstrap-button-tooltip" title="#{bundle.preview}"
href="#{widgetWrapper.wrapURL('/file.xhtml?'.concat(!empty fileMetadata.dataFile.globalIdString ? 'persistentId=' : 'fileId=').concat(!empty fileMetadata.dataFile.globalIdString ? fileMetadata.dataFile.globalIdString : fileMetadata.dataFile.id).concat('&version=').concat(fileMetadata.datasetVersion.friendlyVersionNumber))}">
<span class="glyphicon glyphicon-eye-open"/><span class="sr-only">#{bundle.preview}</span>
</a>
</ui:fragment>
<a type="button" style="padding:6px 8px;" class="btn-access-file btn btn-link bootstrap-button-tooltip dropdown-toggle"
title="#{bundle['file.accessBtn']}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-download-alt"/><span class="sr-only">#{bundle['file.accessBtn']}</span><span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right text-left">
<!-- Explore/Download/Request Button Block -->
<ui:include src="file-download-button-fragment.xhtml">
<ui:param name="fileMetadata" value="#{fileMetadata}"/>
<ui:param name="downloadPopupRequired" value="#{DatasetPage.downloadPopupRequired}"/>
<ui:param name="requestAccessPopupRequired" value="#{DatasetPage.requestAccessPopupRequired}"/>
<ui:param name="guestbookResponse" value="#{DatasetPage.guestbookResponse}"/>
<ui:param name="guestbookResponseService" value="#{DatasetPage.guestbookResponseService}"/>
<ui:param name="fileDownloadService" value="#{DatasetPage.fileDownloadService}"/>
<ui:param name="lockedFromDownload" value="#{DatasetPage.lockedFromDownload}"/>
<ui:param name="exploreTools" value="#{DatasetPage.getExploreToolsForDataFile(fileMetadata.dataFile.id)}"/>
</ui:include>
<!-- END: Explore/Download/Request Button Block -->
<!-- Data Access for Rsync Download -->
<ui:fragment rendered="#{fileMetadata.dataFile.filePackage and systemConfig.rsyncDownload
and !DatasetPage.workingVersion.getDataset().getStorageIdentifier().startsWith('s3://')}">
<li class="dropdown-header">#{bundle['file.accessBtn.header.download']} <span class="glyphicon glyphicon-download-alt"/></li>
<li>
<p:commandLink onclick="PF('rsyncDataAccessPopup').show()">
#{bundle['file.dataFilesTab.dataAccess']}
</p:commandLink>
</li>
</ui:fragment>
<!-- END: Data Access for Rsync Download -->
</ul>
</div>
<!-- TO-DO NEW FILE OPTIONS RENDER LOGIC -->
<!-- File Options -->
<div class="btn-group" jsf:rendered="#{!widgetWrapper.widgetView
and DatasetPage.sessionUserAuthenticated
and DatasetPage.canUpdateDataset()}">
<!-- Kebab / Edit / File Options Dropdown -->
<a type="button" style="padding:6px 8px;" class="btn-file-options btn btn-link bootstrap-button-tooltip dropdown-toggle #{DatasetPage.lockedFromEdits ? 'disabled' : ''}"
disabled="#{DatasetPage.lockedFromEdits ? 'disabled' : ''}"
title="#{bundle['file.optionsBtn']}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-option-vertical"/><span class="sr-only">#{bundle['file.optionsBtn']}</span><span class="caret"></span>
</a>
<ul class="dropdown-menu multi-level pull-right text-left">
<li class="dropdown-header">#{bundle['file.optionsBtn.header.edit']} <span class="glyphicon glyphicon-pencil"/></li>
<!-- TO-DO NEW FILE-LEVEL EDIT OPTIONS... RENDER LOGIC, LINKS, DISABLED LOGIC -->
<!-- Edit Options -->
<ui:include src="file-edit-button-fragment.xhtml">
<ui:param name="fileMetadata" value="#{fileMetadata}"/>
<ui:param name="fileMetadataForAction" value="#{DatasetPage.fileMetadataForAction}"/>
<ui:param name="isDraftReplacementFile" value="#{false}"/>
<ui:param name="hasPackageFile" value="#{fileMetadata.dataFile.filePackage}"/>
<ui:param name="configureTools" value="#{DatasetPage.getConfigureToolsForDataFile(fileMetadata.dataFile.id)}"/>
<ui:param name="bean" value="#{DatasetPage}"/>
<ui:param name="unrestrictFileAction" value="restrictFiles"/>
</ui:include>
</ul>
</div>
<!-- END: File Options -->
</div>
</p:column>
</p:dataTable>
<!-- Files Tree -->
<p:tree id="filesTree" style="width:100%;"
rendered="#{DatasetPage.fileDisplayTree}"
widgetVar="filesTree"
value="#{DatasetPage.filesTreeRoot}"
var="node">
<p:treeNode expandedIcon="ui-icon ui-icon-folder-open" collapsedIcon="ui-icon ui-icon-folder-collapsed">
<!-- For a folder, the node payload is just its name as a String object, that we display here: -->
<h:outputText value="#{node}" />
</p:treeNode>
<p:treeNode type="customFileNode">
<!-- For a file, the payload data ("node") is the corresponding FileMetadata object: -->
<span class="icon-#{dataFileServiceBean.getFileThumbnailClass(node.dataFile)} text-muted" />
<!-- same approach to rendering file page links, as in the file table above: -->
<!-- if the file has the global id, we use that; if not, we use the database id in the url. -->
<ui:fragment rendered="#{!empty node.dataFile.globalIdString}">
<a href="#{widgetWrapper.wrapURL('/file.xhtml?persistentId='.concat(node.dataFile.globalIdString).concat('&version=').concat(DatasetPage.workingVersion.friendlyVersionNumber))}">
#{node.label}
</a>
</ui:fragment>
<ui:fragment rendered="#{empty node.dataFile.globalIdString}">
<a href="#{widgetWrapper.wrapURL('/file.xhtml?fileId='.concat(node.dataFile.id).concat('&version=').concat(DatasetPage.workingVersion.friendlyVersionNumber))}">
#{node.label}
</a>
</ui:fragment>
<span class="text-muted">(#{node.dataFile.friendlySize})</span>
</p:treeNode>
</p:tree>
</ui:composition>