<commit_before><!DOCTYPE html>
<html 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://java.sun.com/jsp/jstl/core"
      xmlns:o="http://omnifaces.org/ui"
      xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
    <h:head>
    </h:head>
    <h:body>
        <f:metadata>
            <f:viewParam name="id" value="#{manageFilePermissionsPage.dataset.id}"/>
            <f:viewAction action="#{manageFilePermissionsPage.init}"/>
            <f:viewAction action="#{dataverseHeaderFragment.initBreadcrumbs(manageFilePermissionsPage.dataset, bundle['dataverse.permissionsFiles.title'])}"/>
        </f:metadata>
        <ui:composition template="/dataverse_template.xhtml">
            <ui:param name="pageTitle" value="#{bundle['dataverse.permissionsFiles.title']} - #{manageFilePermissionsPage.dataset.displayName}"/>
            <ui:param name="dataverse" value="#{manageFilePermissionsPage.dataset.dataverseContext}"/>
            <ui:param name="dataset" value="#{manageFilePermissionsPage.dataset}"/>
            <ui:param name="version" value="#{manageFilePermissionsPage.dataset.latestVersion}"/>
            <ui:param name="showMessagePanel" value="false"/>
            <ui:define name="body">
                <h:form id="rolesPermissionsForm">
                    <div class="panel-group">
                        <!-- Users/Groups Access Panel -->
                        <div class="panel panel-default">
                            <div data-toggle="collapse" data-target="#panelCollapseUsersGroups" class="panel-heading text-info">
                                #{bundle['dataverse.permissionsFiles.usersOrGroups']} <span class="glyphicon glyphicon-chevron-up"/>
                            </div>
                            <div id="panelCollapseUsersGroups" class="collapse in">
                                <div class="panel-body">
                                    <p:fragment id="userGroupMessages">
                                        <div class="messagePanel">
                                            <iqbs:messages collapsible="true" rendered="#{manageFilePermissionsPage.renderUserGroupMessages}"/>
                                        </div>
                                    </p:fragment>
                                    <p:commandLink id="userGroupsAdd"
                                                   styleClass="btn btn-default pull-right"
                                                   actionListener="#{manageFilePermissionsPage.initAssignDialog}"
                                                   update="assignDialog"
                                                   oncomplete="assignWidget.show();">
                                        <span class="glyphicon glyphicon-user"/> #{bundle['dataverse.permissionsFiles.usersOrGroups.assignBtn']}
                                    </p:commandLink>
                                    <p class="help-block clearfix">#{bundle['dataverse.permissionsFiles.usersOrGroups.description']}</p>
                                    <div>
                                        <p:fragment id="userGroups">
                                            <p:dataTable id="fileAccessRequests" var="access" value="#{manageFilePermissionsPage.fileAccessRequestMap.entrySet().toArray()}" style="margin-bottom:1em;">
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.userOrGroup']}">
                                                    <h:outputText value="@identifier #{access.key.displayInfo.title}"/>
                                                    <h:outputText value=" (#{access.key.displayInfo.affiliation})" rendered="#{!empty access.key.displayInfo.affiliation}"/>
                                                </p:column>
                                                <p:column width="20%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.files']}">
                                                    <p:commandLink id="viewUserGroups"
                                                                   actionListener="#{manageFilePermissionsPage.initAssignDialogForFileRequester(access.key)}"
                                                                   update=":#{p:component('assignDialog')}"
                                                                   oncomplete="assignWidget.show();">
                                                        <h:outputText value="#{access.value.size()} #{access.value.size() eq 1 ?  bundle['dataverse.permissionsFiles.usersOrGroups.file'] : bundle['dataverse.permissionsFiles.usersOrGroups.files']}"/>
                                                    </p:commandLink>
                                                </p:column>
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.action']}">
                                                    <p:commandLink styleClass="btn btn-default"
                                                                   actionListener="#{manageFilePermissionsPage.grantAccessToAllRequests(access.key)}"
                                                                   update=":#{p:component('userGroups')} :#{p:component('restrictedFiles')} @([id$=Messages])">
                                                        <span class="glyphicon glyphicon-ok"/> #{bundle['dataverse.permissionsFiles.assignDialog.grantBtn']}
                                                    </p:commandLink>
                                                    <p:commandLink styleClass="btn btn-default"
                                                                   actionListener="#{manageFilePermissionsPage.rejectAccessToAllRequests(access.key)}"
                                                                   update=":#{p:component('userGroups')} :#{p:component('restrictedFiles')} @([id$=Messages])">
                                                        <span class="glyphicon glyphicon-ban-circle"/> #{bundle['dataverse.permissionsFiles.assignDialog.rejectBtn']}
                                                    </p:commandLink>
                                                </p:column>
                                            </p:dataTable>
                                            <p:dataTable id="userGroupsAccess" var="ra" value="#{manageFilePermissionsPage.roleAssigneeMap.entrySet().toArray()}">
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.userOrGroup']}">
                                                    <h:outputText value="@identifier #{ra.key.displayInfo.title}"/>
                                                    <h:outputText value=" (#{ra.key.displayInfo.affiliation})" rendered="#{!empty ra.key.displayInfo.affiliation}"/>
                                                </p:column>
                                                <p:column width="20%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.files']}">
                                                    <p:commandLink id="viewUserGroups"
                                                                   actionListener="#{manageFilePermissionsPage.initViewRemoveDialogByRoleAssignee(ra.key, ra.value)}"
                                                                   update=":#{p:component('viewRemoveDialog')}"
                                                                   oncomplete="viewRemoveWidget.show();">
                                                        <h:outputText value="#{ra.value.size()} #{ra.value.size() eq 1 ?  bundle['dataverse.permissionsFiles.usersOrGroups.file'] : bundle['dataverse.permissionsFiles.usersOrGroups.files']}"/>
                                                    </p:commandLink>
                                                </p:column>
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.action']}">
                                                    <p:commandLink styleClass="btn btn-default"
                                                                   update=":#{p:component('userGroups')} :#{p:component('restrictedFiles')} @([id$=Messages])"
                                                                   actionListener="#{manageFilePermissionsPage.showUserGroupMessages}"
                                                                   onclick="confirmation.show()">
                                                                   <f:setPropertyActionListener value="#{ra.value}" target="#{manageFilePermissionsPage.selectedRoleAssignmentRows}" />
                                                        <span class="glyphicon glyphicon-remove"/> #{bundle['dataverse.permissionsFiles.viewRemoveDialog.removeBtn']}
                                                    </p:commandLink>
                                                </p:column>
                                            </p:dataTable>
                                        </p:fragment>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- Files (Restricted) Panel -->
                        <div class="panel panel-default">
                            <div data-toggle="collapse" data-target="#panelCollapseFiles" class="panel-heading text-info">
                                #{bundle['dataverse.permissionsFiles.files']} <span class="glyphicon glyphicon-chevron-down"/>
                            </div>
                            <div id="panelCollapseFiles" class="collapse">
                                <div class="panel-body">
                                    <p:fragment id="filesMessages">
                                        <div class="messagePanel">
                                            <iqbs:messages  collapsible="true" rendered="#{manageFilePermissionsPage.renderFileMessages}"/>
                                        </div>
                                    </p:fragment>
                                    <p class="help-block clearfix">#{bundle['dataverse.permissionsFiles.files.description']}</p>
                                    <p:dataTable id="restrictedFiles" var="fileEntry" value="#{manageFilePermissionsPage.fileMap.entrySet().toArray()}">
                                        <p:column width="35%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.fileName']}">
                                            <h:outputText value="#{fileEntry.key.displayName}"/>
                                        </p:column>
                                        <p:column width="10%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.publishedRestrictedState']}" rendered="#{manageFilePermissionsPage.dataset.released}">
                                            <c:set var="fileVersionCount" value="#{fileEntry.key.fileMetadatas.size()}" />
                                            <c:set var="fileVersion" value="#{fileEntry.key.fileMetadata.datasetVersion.id}" />
                                            <c:set var="dsPublishedVersion" value="#{manageFilePermissionsPage.dataset.releasedVersion.id}" />
                                            <c:set var="fileRestricted" value="#{fileEntry.key.restricted}" />
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.deleted']}" rendered="#{fileVersion lt dsPublishedVersion}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.restricted']}" rendered="#{fileRestricted and fileVersion ge dsPublishedVersion}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.public']}" rendered="#{!fileRestricted and fileVersionCount ne 1}"/>
                                        </p:column>
                                        <p:column width="10%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.draftRestrictedState']}" rendered="#{manageFilePermissionsPage.dataset.latestVersion.draft}">
                                            <c:set var="fileVersion" value="#{fileEntry.key.fileMetadata.datasetVersion.id}" />
                                            <c:set var="dsPublishedVersion" value="#{manageFilePermissionsPage.dataset.releasedVersion.id}" />
                                            <c:set var="dsLatestVersion" value="#{manageFilePermissionsPage.dataset.latestVersion.id}" />
                                            <c:set var="latestVersionRestricted" value="#{fileEntry.key.fileMetadata.restricted}" />
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.deleted']}" rendered="#{fileVersion eq dsPublishedVersion}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.restricted']}" rendered="#{fileVersion eq dsLatestVersion and latestVersionRestricted}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.public']}" rendered="#{fileVersion eq dsLatestVersion and !latestVersionRestricted}"/>
                                        </p:column>
                                        <p:column width="20%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.roleAssignees']}">
                                            <p:commandLink id="viewUserGroups"
                                                           actionListener="#{manageFilePermissionsPage.initViewRemoveDialogByFile(fileEntry.key, fileEntry.value)}"
                                                           update=":#{p:component('viewRemoveDialog')}"
                                                           oncomplete="viewRemoveWidget.show();">
                                                <h:outputText value="#{fileEntry.value.size()} #{fileEntry.value.size() eq 1 ?  bundle['dataverse.permissionsFiles.files.roleAssignee'] : bundle['dataverse.permissionsFiles.files.roleAssignees']}"/>
                                            </p:commandLink>
                                        </p:column>
                                        <p:column width="25%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.action']}">
                                            <p:commandLink styleClass="btn btn-default"
                                                           actionListener="#{manageFilePermissionsPage.initAssignDialogByFile(fileEntry.key)}"
                                                           update=":#{p:component('assignDialog')}"
                                                           oncomplete="assignWidget.show();"><span class="glyphicon glyphicon-plus"/> #{bundle['dataverse.permissionsFiles.files.assignBtn']}</p:commandLink>
                                        </p:column>
                                    </p:dataTable>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- View / Remove Users/Groups Popup -->
                    <p:dialog id="viewRemoveDialog" styleClass="largePopUp" header="#{bundle['dataverse.permissionsFiles.viewRemoveDialog.header']}" widgetVar="viewRemoveWidget" modal="true">
                        <div>
                            <p:dataTable id="assignedRoles" var="roleAssignment" value="#{manageFilePermissionsPage.roleAssignments}"
                                         selection="#{manageFilePermissionsPage.selectedRoleAssignmentRows}" rowKey="#{roleAssignment.id}">
                                <p:column selectionMode="multiple" style="width:2%;text-align:center" disabledSelection="#{!roleAssignment.definitionPoint.instanceofDataFile}"/>
                                <p:column width="98%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.userOrGroup']}" rendered="#{!empty manageFilePermissionsPage.selectedFile}">
                                    <h:outputText value="#{roleAssignment.assigneeDisplayInfo.title}"/>
                                </p:column>
                                <p:column width="98%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.fileName']}" rendered="#{!empty manageFilePermissionsPage.selectedRoleAssignee}">
                                    <h:outputText value="#{roleAssignment.definitionPoint.displayName}"/>
                                </p:column>
                            </p:dataTable>
                        </div>
                        <p:commandLink styleClass="btn btn-default" value="#{bundle['dataverse.permissionsFiles.viewRemoveDialog.removeBtn']}"
                                       update="userGroups restrictedFiles @([id$=Messages])"
                                       onclick="confirmation.show()"/>
                        <button type="button" class="btn btn-default" onclick="viewRemoveWidget.hide()" value="Cancel">#{bundle.cancel}</button>
                    </p:dialog>
                    <!-- Assign Users/Groups Popup -->
                    <p:dialog id="assignDialog" header="#{bundle['dataverse.permissionsFiles.assignDialog.header']}" widgetVar="assignWidget" modal="true">
                        <p:fragment id="assignMessages">
                            <div class="messagePanel">
                                <iqbs:messages collapsible="true" />
                            </div>
                        </p:fragment>
                        <p:fragment id="assignRoleContent">
                            <div class="form-horizontal">
                                <p class="help-block">#{bundle['dataverse.permissionsFiles.assignDialog.description']}</p>
                                <div class="form-group" style="visibility: #{empty manageFilePermissionsPage.fileRequester ? 'visible' : 'hidden'}">
                                    <label for="userGroupAccessInput" class="col-sm-3 control-label">
                                        <a href="#" data-toggle="tooltip" data-placement="auto right" class="tooltiplabel right" data-original-title="#{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup.title']}">
                                            #{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup']}
                                        </a>
                                    </label>
                                    <div class="col-sm-9">
                                        <p:autoComplete id="userGroupNameAssign" placeholder="#{bundle['dataverse.permissionspermissionsFiles.userOrGroup.enterName']}"
                                                        multiple="true" forceSelection="true" emptyMessage="#{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup.invalidMsg']}"
                                                        value="#{manageFilePermissionsPage.selectedRoleAssignees}"  completeMethod="#{manageFilePermissionsPage.completeRoleAssignee}"
                                                        required="#{param['DO_VALIDATION']}" requiredMessage="#{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup.requiredMsg']}"
                                                        var="roleAssignee" itemLabel="#{roleAssignee.displayInfo.title}" itemValue="#{roleAssignee}" converter="roleAssigneeConverter">
                                            <p:column>
                                                <h:outputText value="#{roleAssignee.identifier} #{roleAssignee.displayInfo.title}"/> 
                                                <h:outputText value=" (#{roleAssignee.displayInfo.affiliation})" rendered="#{!empty roleAssignee.displayInfo.affiliation}"/>
                                            </p:column><commit_msg>Missed a changed form field labels with tooltip from a tags to span tags on permissions-manage-file page with a prev commit. [ref #1570]<commit_after><!DOCTYPE html>
<html 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://java.sun.com/jsp/jstl/core"
      xmlns:o="http://omnifaces.org/ui"
      xmlns:iqbs="http://xmlns.jcp.org/jsf/composite/iqbs">
    <h:head>
    </h:head>
    <h:body>
        <f:metadata>
            <f:viewParam name="id" value="#{manageFilePermissionsPage.dataset.id}"/>
            <f:viewAction action="#{manageFilePermissionsPage.init}"/>
            <f:viewAction action="#{dataverseHeaderFragment.initBreadcrumbs(manageFilePermissionsPage.dataset, bundle['dataverse.permissionsFiles.title'])}"/>
        </f:metadata>
        <ui:composition template="/dataverse_template.xhtml">
            <ui:param name="pageTitle" value="#{bundle['dataverse.permissionsFiles.title']} - #{manageFilePermissionsPage.dataset.displayName}"/>
            <ui:param name="dataverse" value="#{manageFilePermissionsPage.dataset.dataverseContext}"/>
            <ui:param name="dataset" value="#{manageFilePermissionsPage.dataset}"/>
            <ui:param name="version" value="#{manageFilePermissionsPage.dataset.latestVersion}"/>
            <ui:param name="showMessagePanel" value="false"/>
            <ui:define name="body">
                <h:form id="rolesPermissionsForm">
                    <div class="panel-group">
                        <!-- Users/Groups Access Panel -->
                        <div class="panel panel-default">
                            <div data-toggle="collapse" data-target="#panelCollapseUsersGroups" class="panel-heading text-info">
                                #{bundle['dataverse.permissionsFiles.usersOrGroups']} <span class="glyphicon glyphicon-chevron-up"/>
                            </div>
                            <div id="panelCollapseUsersGroups" class="collapse in">
                                <div class="panel-body">
                                    <p:fragment id="userGroupMessages">
                                        <div class="messagePanel">
                                            <iqbs:messages collapsible="true" rendered="#{manageFilePermissionsPage.renderUserGroupMessages}"/>
                                        </div>
                                    </p:fragment>
                                    <p:commandLink id="userGroupsAdd"
                                                   styleClass="btn btn-default pull-right"
                                                   actionListener="#{manageFilePermissionsPage.initAssignDialog}"
                                                   update="assignDialog"
                                                   oncomplete="assignWidget.show();">
                                        <span class="glyphicon glyphicon-user"/> #{bundle['dataverse.permissionsFiles.usersOrGroups.assignBtn']}
                                    </p:commandLink>
                                    <p class="help-block clearfix">#{bundle['dataverse.permissionsFiles.usersOrGroups.description']}</p>
                                    <div>
                                        <p:fragment id="userGroups">
                                            <p:dataTable id="fileAccessRequests" var="access" value="#{manageFilePermissionsPage.fileAccessRequestMap.entrySet().toArray()}" style="margin-bottom:1em;">
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.userOrGroup']}">
                                                    <h:outputText value="@identifier #{access.key.displayInfo.title}"/>
                                                    <h:outputText value=" (#{access.key.displayInfo.affiliation})" rendered="#{!empty access.key.displayInfo.affiliation}"/>
                                                </p:column>
                                                <p:column width="20%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.files']}">
                                                    <p:commandLink id="viewUserGroups"
                                                                   actionListener="#{manageFilePermissionsPage.initAssignDialogForFileRequester(access.key)}"
                                                                   update=":#{p:component('assignDialog')}"
                                                                   oncomplete="assignWidget.show();">
                                                        <h:outputText value="#{access.value.size()} #{access.value.size() eq 1 ?  bundle['dataverse.permissionsFiles.usersOrGroups.file'] : bundle['dataverse.permissionsFiles.usersOrGroups.files']}"/>
                                                    </p:commandLink>
                                                </p:column>
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.action']}">
                                                    <p:commandLink styleClass="btn btn-default"
                                                                   actionListener="#{manageFilePermissionsPage.grantAccessToAllRequests(access.key)}"
                                                                   update=":#{p:component('userGroups')} :#{p:component('restrictedFiles')} @([id$=Messages])">
                                                        <span class="glyphicon glyphicon-ok"/> #{bundle['dataverse.permissionsFiles.assignDialog.grantBtn']}
                                                    </p:commandLink>
                                                    <p:commandLink styleClass="btn btn-default"
                                                                   actionListener="#{manageFilePermissionsPage.rejectAccessToAllRequests(access.key)}"
                                                                   update=":#{p:component('userGroups')} :#{p:component('restrictedFiles')} @([id$=Messages])">
                                                        <span class="glyphicon glyphicon-ban-circle"/> #{bundle['dataverse.permissionsFiles.assignDialog.rejectBtn']}
                                                    </p:commandLink>
                                                </p:column>
                                            </p:dataTable>
                                            <p:dataTable id="userGroupsAccess" var="ra" value="#{manageFilePermissionsPage.roleAssigneeMap.entrySet().toArray()}">
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.userOrGroup']}">
                                                    <h:outputText value="@identifier #{ra.key.displayInfo.title}"/>
                                                    <h:outputText value=" (#{ra.key.displayInfo.affiliation})" rendered="#{!empty ra.key.displayInfo.affiliation}"/>
                                                </p:column>
                                                <p:column width="20%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.files']}">
                                                    <p:commandLink id="viewUserGroups"
                                                                   actionListener="#{manageFilePermissionsPage.initViewRemoveDialogByRoleAssignee(ra.key, ra.value)}"
                                                                   update=":#{p:component('viewRemoveDialog')}"
                                                                   oncomplete="viewRemoveWidget.show();">
                                                        <h:outputText value="#{ra.value.size()} #{ra.value.size() eq 1 ?  bundle['dataverse.permissionsFiles.usersOrGroups.file'] : bundle['dataverse.permissionsFiles.usersOrGroups.files']}"/>
                                                    </p:commandLink>
                                                </p:column>
                                                <p:column width="40%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.action']}">
                                                    <p:commandLink styleClass="btn btn-default"
                                                                   update=":#{p:component('userGroups')} :#{p:component('restrictedFiles')} @([id$=Messages])"
                                                                   actionListener="#{manageFilePermissionsPage.showUserGroupMessages}"
                                                                   onclick="confirmation.show()">
                                                                   <f:setPropertyActionListener value="#{ra.value}" target="#{manageFilePermissionsPage.selectedRoleAssignmentRows}" />
                                                        <span class="glyphicon glyphicon-remove"/> #{bundle['dataverse.permissionsFiles.viewRemoveDialog.removeBtn']}
                                                    </p:commandLink>
                                                </p:column>
                                            </p:dataTable>
                                        </p:fragment>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- Files (Restricted) Panel -->
                        <div class="panel panel-default">
                            <div data-toggle="collapse" data-target="#panelCollapseFiles" class="panel-heading text-info">
                                #{bundle['dataverse.permissionsFiles.files']} <span class="glyphicon glyphicon-chevron-down"/>
                            </div>
                            <div id="panelCollapseFiles" class="collapse">
                                <div class="panel-body">
                                    <p:fragment id="filesMessages">
                                        <div class="messagePanel">
                                            <iqbs:messages  collapsible="true" rendered="#{manageFilePermissionsPage.renderFileMessages}"/>
                                        </div>
                                    </p:fragment>
                                    <p class="help-block clearfix">#{bundle['dataverse.permissionsFiles.files.description']}</p>
                                    <p:dataTable id="restrictedFiles" var="fileEntry" value="#{manageFilePermissionsPage.fileMap.entrySet().toArray()}">
                                        <p:column width="35%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.fileName']}">
                                            <h:outputText value="#{fileEntry.key.displayName}"/>
                                        </p:column>
                                        <p:column width="10%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.publishedRestrictedState']}" rendered="#{manageFilePermissionsPage.dataset.released}">
                                            <c:set var="fileVersionCount" value="#{fileEntry.key.fileMetadatas.size()}" />
                                            <c:set var="fileVersion" value="#{fileEntry.key.fileMetadata.datasetVersion.id}" />
                                            <c:set var="dsPublishedVersion" value="#{manageFilePermissionsPage.dataset.releasedVersion.id}" />
                                            <c:set var="fileRestricted" value="#{fileEntry.key.restricted}" />
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.deleted']}" rendered="#{fileVersion lt dsPublishedVersion}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.restricted']}" rendered="#{fileRestricted and fileVersion ge dsPublishedVersion}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.public']}" rendered="#{!fileRestricted and fileVersionCount ne 1}"/>
                                        </p:column>
                                        <p:column width="10%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.draftRestrictedState']}" rendered="#{manageFilePermissionsPage.dataset.latestVersion.draft}">
                                            <c:set var="fileVersion" value="#{fileEntry.key.fileMetadata.datasetVersion.id}" />
                                            <c:set var="dsPublishedVersion" value="#{manageFilePermissionsPage.dataset.releasedVersion.id}" />
                                            <c:set var="dsLatestVersion" value="#{manageFilePermissionsPage.dataset.latestVersion.id}" />
                                            <c:set var="latestVersionRestricted" value="#{fileEntry.key.fileMetadata.restricted}" />
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.deleted']}" rendered="#{fileVersion eq dsPublishedVersion}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.restricted']}" rendered="#{fileVersion eq dsLatestVersion and latestVersionRestricted}"/>
                                            <h:outputText value="#{bundle['dataverse.permissionsFiles.files.public']}" rendered="#{fileVersion eq dsLatestVersion and !latestVersionRestricted}"/>
                                        </p:column>
                                        <p:column width="20%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.roleAssignees']}">
                                            <p:commandLink id="viewUserGroups"
                                                           actionListener="#{manageFilePermissionsPage.initViewRemoveDialogByFile(fileEntry.key, fileEntry.value)}"
                                                           update=":#{p:component('viewRemoveDialog')}"
                                                           oncomplete="viewRemoveWidget.show();">
                                                <h:outputText value="#{fileEntry.value.size()} #{fileEntry.value.size() eq 1 ?  bundle['dataverse.permissionsFiles.files.roleAssignee'] : bundle['dataverse.permissionsFiles.files.roleAssignees']}"/>
                                            </p:commandLink>
                                        </p:column>
                                        <p:column width="25%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.action']}">
                                            <p:commandLink styleClass="btn btn-default"
                                                           actionListener="#{manageFilePermissionsPage.initAssignDialogByFile(fileEntry.key)}"
                                                           update=":#{p:component('assignDialog')}"
                                                           oncomplete="assignWidget.show();"><span class="glyphicon glyphicon-plus"/> #{bundle['dataverse.permissionsFiles.files.assignBtn']}</p:commandLink>
                                        </p:column>
                                    </p:dataTable>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- View / Remove Users/Groups Popup -->
                    <p:dialog id="viewRemoveDialog" styleClass="largePopUp" header="#{bundle['dataverse.permissionsFiles.viewRemoveDialog.header']}" widgetVar="viewRemoveWidget" modal="true">
                        <div>
                            <p:dataTable id="assignedRoles" var="roleAssignment" value="#{manageFilePermissionsPage.roleAssignments}"
                                         selection="#{manageFilePermissionsPage.selectedRoleAssignmentRows}" rowKey="#{roleAssignment.id}">
                                <p:column selectionMode="multiple" style="width:2%;text-align:center" disabledSelection="#{!roleAssignment.definitionPoint.instanceofDataFile}"/>
                                <p:column width="98%" headerText="#{bundle['dataverse.permissionsFiles.usersOrGroups.tabHeader.userOrGroup']}" rendered="#{!empty manageFilePermissionsPage.selectedFile}">
                                    <h:outputText value="#{roleAssignment.assigneeDisplayInfo.title}"/>
                                </p:column>
                                <p:column width="98%" headerText="#{bundle['dataverse.permissionsFiles.files.tabHeader.fileName']}" rendered="#{!empty manageFilePermissionsPage.selectedRoleAssignee}">
                                    <h:outputText value="#{roleAssignment.definitionPoint.displayName}"/>
                                </p:column>
                            </p:dataTable>
                        </div>
                        <p:commandLink styleClass="btn btn-default" value="#{bundle['dataverse.permissionsFiles.viewRemoveDialog.removeBtn']}"
                                       update="userGroups restrictedFiles @([id$=Messages])"
                                       onclick="confirmation.show()"/>
                        <button type="button" class="btn btn-default" onclick="viewRemoveWidget.hide()" value="Cancel">#{bundle.cancel}</button>
                    </p:dialog>
                    <!-- Assign Users/Groups Popup -->
                    <p:dialog id="assignDialog" header="#{bundle['dataverse.permissionsFiles.assignDialog.header']}" widgetVar="assignWidget" modal="true">
                        <p:fragment id="assignMessages">
                            <div class="messagePanel">
                                <iqbs:messages collapsible="true" />
                            </div>
                        </p:fragment>
                        <p:fragment id="assignRoleContent">
                            <div class="form-horizontal">
                                <p class="help-block">#{bundle['dataverse.permissionsFiles.assignDialog.description']}</p>
                                <div class="form-group" style="visibility: #{empty manageFilePermissionsPage.fileRequester ? 'visible' : 'hidden'}">
                                    <label for="userGroupAccessInput" class="col-sm-3 control-label">
                                        <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup.title']}">
                                            #{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup']}
                                        </span>
                                    </label>
                                    <div class="col-sm-9">
                                        <p:autoComplete id="userGroupNameAssign" placeholder="#{bundle['dataverse.permissionspermissionsFiles.userOrGroup.enterName']}"
                                                        multiple="true" forceSelection="true" emptyMessage="#{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup.invalidMsg']}"
                                                        value="#{manageFilePermissionsPage.selectedRoleAssignees}"  completeMethod="#{manageFilePermissionsPage.completeRoleAssignee}"
                                                        required="#{param['DO_VALIDATION']}" requiredMessage="#{bundle['dataverse.permissionsFiles.assignDialog.userOrGroup.requiredMsg']}"
                                                        var="roleAssignee" itemLabel="#{roleAssignee.displayInfo.title}" itemValue="#{roleAssignee}" converter="roleAssigneeConverter">
                                            <p:column>
                                                <h:outputText value="#{roleAssignee.identifier} #{roleAssignee.displayInfo.title}"/> 
                                                <h:outputText value=" (#{roleAssignee.displayInfo.affiliation})" rendered="#{!empty roleAssignee.displayInfo.affiliation}"/>
                                            </p:column>
{'fraction_non_alphanumeric': 0.11733796069997067, 'fraction_numerical': 0.002004105973213413, 'mean_word_length': 1.3588723625043237, 'pattern_counts': {'":': 14, '<': 341, '<?xml version=': 0, '>': 341, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 447, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '362721', 'n_tokens_mistral': 8452, 'n_tokens_neox': 8178, 'n_words': 1012}