<commit_before><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">

    <ui:fragment rendered="#{fileMetadata.dataFile.ingestProblem and canUpdateDataset}">
        <!-- Ingest Problem - this is the infamous "red triangle" error. As of 4.2, we only want to show it to the owner of the dataset: -->
        <span class="ingest-warning" data-toggle="popover" data-container="body" data-trigger="hover" data-placement="left" data-html="true" data-title="&lt;span class='text-danger h5'&gt;#{bundle['file.ingestFailed']}&lt;/span&gt;" data-content="&lt;span class='text-danger'&gt;#{fileMetadata.dataFile.ingestReportMessage}&lt;/span&gt;">
            <span class="glyphicon glyphicon-warning-sign text-danger"/>
        </span>
    </ui:fragment>
    
    <!-- WorldMap Preview -->
    <div class="modal fade" id="map-modal-#{fileMetadata.id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header text-left">
                    <button type="button" class="close" data-dismiss="modal" aria-label="#{bundle['close']}"><span aria-hidden="true">&#215;</span></button>
                    <h4 class="modal-title" id="myModalLabel"><span style="color:#c75b1d;">#{bundle['file.previewMap']}</span> #{fileMetadata.label}</h4>
                </div>
                <div class="modal-body">
                    <iframe id="id_iframe_map" height="300" width="100%" src="#{ worldMapPermissionHelper.getMapLayerMetadata(fileMetadata.dataFile).getEmbedMapLink() }"></iframe>
                </div>
                <div class="modal-footer clearfix">
                    <a href="#{ DatasetPage.getMapLayerMetadata(fileMetadata.dataFile).getLayerLink() }" target="_blank"><img src="https://worldmap.harvard.edu/static/theme/img/WorldMap-Logo_26px.png" alt="#{bundle['file.mapData.worldMap']}" class="pull-left" style="margin-top:5px;" /></a>
                    <a href="#{ DatasetPage.getMapLayerMetadata(fileMetadata.dataFile).getLayerLink() }" class="btn btn-default" target="_blank"><span class="glyphicon glyphicon-equalizer"/> #{bundle['file.metaData.viewOnWorldMap']}</a>
                    <button type="button" class="btn btn-default" data-dismiss="modal">#{bundle['close']}</button>
                </div>
            </div>
        </div>
    </div>
    <button type="button" jsf:rendered="#{worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata)}" class="btn btn-default" data-target="#map-modal-#{fileMetadata.id}" data-toggle="modal">
        <span class="glyphicon glyphicon-map-marker"/> #{bundle['preview']}
    </button>

    <div class="btn-group" jsf:rendered="#{twoRavensHelper.canSeeTwoRavensExploreButtonFromPage(fileMetadata) and worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata)}">           
        <!-- Explore Dropdown: When TwoRavens **AND** WorldMap Explore options are available -->
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><commit_msg>#3601 - fix where modal 'Explore on WorldMap' button wasn't working on the File page.  fragment was referencing the DatasetPage.getMapLayerMetadata<commit_after><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">

    <ui:fragment rendered="#{fileMetadata.dataFile.ingestProblem and canUpdateDataset}">
        <!-- Ingest Problem - this is the infamous "red triangle" error. As of 4.2, we only want to show it to the owner of the dataset: -->
        <span class="ingest-warning" data-toggle="popover" data-container="body" data-trigger="hover" data-placement="left" data-html="true" data-title="&lt;span class='text-danger h5'&gt;#{bundle['file.ingestFailed']}&lt;/span&gt;" data-content="&lt;span class='text-danger'&gt;#{fileMetadata.dataFile.ingestReportMessage}&lt;/span&gt;">
            <span class="glyphicon glyphicon-warning-sign text-danger"/>
        </span>
    </ui:fragment>
    
    <!-- WorldMap Preview -->
    <div class="modal fade" id="map-modal-#{fileMetadata.id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header text-left">
                    <button type="button" class="close" data-dismiss="modal" aria-label="#{bundle['close']}"><span aria-hidden="true">&#215;</span></button>
                    <h4 class="modal-title" id="myModalLabel"><span style="color:#c75b1d;">#{bundle['file.previewMap']}</span> #{fileMetadata.label}</h4>
                </div>
                <div class="modal-body">
                    <iframe id="id_iframe_map" height="300" width="100%" src="#{ worldMapPermissionHelper.getMapLayerMetadata(fileMetadata.dataFile).getEmbedMapLink() }"></iframe>
                </div>
                <div class="modal-footer clearfix">
                    <a href="#{ worldMapPermissionHelper.getMapLayerMetadata(fileMetadata.dataFile).getLayerLink() }" target="_blank"><img src="https://worldmap.harvard.edu/static/theme/img/WorldMap-Logo_26px.png" alt="#{bundle['file.mapData.worldMap']}" class="pull-left" style="margin-top:5px;" /></a>
                    <a href="#{ worldMapPermissionHelper.getMapLayerMetadata(fileMetadata.dataFile).getLayerLink() }" class="btn btn-default" target="_blank"><span class="glyphicon glyphicon-equalizer"/> #{bundle['file.metaData.viewOnWorldMap']}</a>
                    <button type="button" class="btn btn-default" data-dismiss="modal">#{bundle['close']}</button>
                </div>
            </div>
        </div>
    </div>
    <button type="button" jsf:rendered="#{worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata)}" class="btn btn-default" data-target="#map-modal-#{fileMetadata.id}" data-toggle="modal">
        <span class="glyphicon glyphicon-map-marker"/> #{bundle['preview']}
    </button>

    <div class="btn-group" jsf:rendered="#{twoRavensHelper.canSeeTwoRavensExploreButtonFromPage(fileMetadata) and worldMapPermissionHelper.canUserSeeExploreWorldMapButtonFromPage(fileMetadata)}">           
        <!-- Explore Dropdown: When TwoRavens **AND** WorldMap Explore options are available -->
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{'fraction_non_alphanumeric': 0.17759188151398794, 'fraction_numerical': 0.007679648930334613, 'mean_word_length': 3.7295719844357977, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 91, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 28}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4258692', 'n_tokens_mistral': 2368, 'n_tokens_neox': 2262, 'n_words': 337}