<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:jsf="http://xmlns.jcp.org/jsf"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

    <h:head>
    </h:head>

    <h:body>
        <f:metadata>
            <f:viewParam name="dataverseId" value="#{dataverseServiceBean.findRootDataverse().id}"/>
            <f:viewAction action="#{DashboardUsersPage.init}"/>
            <f:viewAction action="#{dataverseHeaderFragment.initBreadcrumbs(dataverseServiceBean.findRootDataverse())}"/>
            <f:viewAction action="#{dataverseHeaderFragment.addBreadcrumb('/dashboard.xhtml?dataverseId='.concat(dataverse.id), bundle['dashboard.title'])}"/> 
            <f:viewAction action="#{dataverseHeaderFragment.addBreadcrumb(bundle['dashboard.card.users.manage'])}"/>
        </f:metadata>

        <ui:composition template="/dataverse_template.xhtml">
            <ui:param name="pageTitle" value="#{bundle['dashboard.card.users.header']} - #{dataverseServiceBean.findRootDataverse().name} #{bundle.dataverse}"/>
            <ui:param name="showDataverseHeader" value="false"/>
            <ui:define name="body">
                <h:form id="dashboardUsersForm">
                    <div jsf:id="userssHeaderBlock" class="row">
                        <div class="col-xs-6">
                            <div class="input-group">
                                <p:inputText type="hidden" id="selectedPage" value="#{DashboardUsersPage.selectedPage}" />
                                <p:inputText id="searchFiles" styleClass="form-control" value="#{DashboardUsersPage.searchTerm}" widgetVar="inputSearchTerm"
                                             onkeypress="if (event.keyCode == 13) { submitsearch(); return false; }"/>
                                <p:watermark for="searchFiles" value="#{bundle['dashboard.list_users.searchTerm.watermark']}"/>
                                <p:remoteCommand name="submitsearch" action="#{DashboardUsersPage.runUserSearch()}" process="@this @widgetVar(inputSearchTerm)" update="@form" partialSubmit="true"/>
                                <span class="input-group-btn">
                                    <p:commandLink styleClass="btn btn-default" action="#{DashboardUsersPage.runUserSearch()}" 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>

                    <ui:include src="dashboard-users-pager.xhtml">
                        <ui:param name="listPager" value="#{DashboardUsersPage.pager}" />
                    </ui:include>

                    <p:dataTable id="userTable" value="#{DashboardUsersPage.userList}" var="user" widgetVar="userTable">
                        <p:column style="width:60px" class="text-center" headerText="#{bundle['dashboard.list_users.tbl_header.userId']}">
                            <h:outputText value="#{user.id}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.userIdentifier']}">
                            <span class="glyphicon glyphicon-user text-danger" jsf:rendered="#{user.superuser}" style="margin-right:6px;"></span>
                            <h:outputText value="#{user.userIdentifier}" class="#{user.superuser ? 'text-danger' : ''}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.name']}">
                            <h:outputText value="#{user.firstName} #{user.lastName}" />
                        </p:column>
                        <p:column width="18%" headerText="#{bundle['dashboard.list_users.tbl_header.email']}">
                            <h:outputText value="#{user.email}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.affiliation']}">
                            <h:outputText value="#{user.affiliation}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.roles']}">
                            <h:outputText value="#{user.roles}" />
                        </p:column>
                        <p:column width="13%" headerText="#{bundle['dashboard.list_users.tbl_header.authProviderFactoryAlias']}">
                            <h:outputText value="#{DashboardUsersPage.getAuthProviderFriendlyName(user.authProviderId)}" />
                        </p:column>
                        <p:column width="10%" class="text-center" headerText="#{bundle['dashboard.list_users.tbl_header.isSuperuser']}">
                            <!-- A simple implementation of the superuser status toggle - via a boolean checkbox with an immediate ajax update. -->
                            <!-- Uses our standard approach, of showing a confirmation popup ("are you sure you want to toggle this? ...") first,  -->
                            <!-- before saving the toggled value. -->
                            <!-- The current user, the admin user viewing the dashboard, should not be allowed to toggle the superuser status on him- or herself: -->
                            <p:selectBooleanCheckbox id="superUserCheckbox" value="#{user.superuser}" valueChangeListener="#{DashboardUsersPage.setUserToToggleSuperuserStatus(user)}"  disabled="#{user.id == dataverseSession.user.id}">
                                <p:ajax event="change" process="@this" oncomplete="PF('toggleSuperuserConfirmation').show();"  update=":dashboardUsersForm:toggleSuperuserConfirmation"/>
                            </p:selectBooleanCheckbox>
                        </p:column><commit_msg>Minor table column width adjustments on Manage Users pg. [ref #3614]<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:jsf="http://xmlns.jcp.org/jsf"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

    <h:head>
    </h:head>

    <h:body>
        <f:metadata>
            <f:viewParam name="dataverseId" value="#{dataverseServiceBean.findRootDataverse().id}"/>
            <f:viewAction action="#{DashboardUsersPage.init}"/>
            <f:viewAction action="#{dataverseHeaderFragment.initBreadcrumbs(dataverseServiceBean.findRootDataverse())}"/>
            <f:viewAction action="#{dataverseHeaderFragment.addBreadcrumb('/dashboard.xhtml?dataverseId='.concat(dataverse.id), bundle['dashboard.title'])}"/> 
            <f:viewAction action="#{dataverseHeaderFragment.addBreadcrumb(bundle['dashboard.card.users.manage'])}"/>
        </f:metadata>

        <ui:composition template="/dataverse_template.xhtml">
            <ui:param name="pageTitle" value="#{bundle['dashboard.card.users.header']} - #{dataverseServiceBean.findRootDataverse().name} #{bundle.dataverse}"/>
            <ui:param name="showDataverseHeader" value="false"/>
            <ui:define name="body">
                <h:form id="dashboardUsersForm">
                    <div jsf:id="userssHeaderBlock" class="row">
                        <div class="col-xs-6">
                            <div class="input-group">
                                <p:inputText type="hidden" id="selectedPage" value="#{DashboardUsersPage.selectedPage}" />
                                <p:inputText id="searchFiles" styleClass="form-control" value="#{DashboardUsersPage.searchTerm}" widgetVar="inputSearchTerm"
                                             onkeypress="if (event.keyCode == 13) { submitsearch(); return false; }"/>
                                <p:watermark for="searchFiles" value="#{bundle['dashboard.list_users.searchTerm.watermark']}"/>
                                <p:remoteCommand name="submitsearch" action="#{DashboardUsersPage.runUserSearch()}" process="@this @widgetVar(inputSearchTerm)" update="@form" partialSubmit="true"/>
                                <span class="input-group-btn">
                                    <p:commandLink styleClass="btn btn-default" action="#{DashboardUsersPage.runUserSearch()}" 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>

                    <ui:include src="dashboard-users-pager.xhtml">
                        <ui:param name="listPager" value="#{DashboardUsersPage.pager}" />
                    </ui:include>

                    <p:dataTable id="userTable" value="#{DashboardUsersPage.userList}" var="user" widgetVar="userTable">
                        <p:column style="width:60px" class="text-center" headerText="#{bundle['dashboard.list_users.tbl_header.userId']}">
                            <h:outputText value="#{user.id}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.userIdentifier']}">
                            <span class="glyphicon glyphicon-user text-danger" jsf:rendered="#{user.superuser}" style="margin-right:6px;"></span>
                            <h:outputText value="#{user.userIdentifier}" class="#{user.superuser ? 'text-danger' : ''}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.name']}">
                            <h:outputText value="#{user.firstName} #{user.lastName}" />
                        </p:column>
                        <p:column width="20%" headerText="#{bundle['dashboard.list_users.tbl_header.email']}">
                            <h:outputText value="#{user.email}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.affiliation']}">
                            <h:outputText value="#{user.affiliation}" />
                        </p:column>
                        <p:column headerText="#{bundle['dashboard.list_users.tbl_header.roles']}">
                            <h:outputText value="#{user.roles}" />
                        </p:column>
                        <p:column width="12%" headerText="#{bundle['dashboard.list_users.tbl_header.authProviderFactoryAlias']}">
                            <h:outputText value="#{DashboardUsersPage.getAuthProviderFriendlyName(user.authProviderId)}" />
                        </p:column>
                        <p:column width="9%" class="text-center" headerText="#{bundle['dashboard.list_users.tbl_header.isSuperuser']}">
                            <!-- A simple implementation of the superuser status toggle - via a boolean checkbox with an immediate ajax update. -->
                            <!-- Uses our standard approach, of showing a confirmation popup ("are you sure you want to toggle this? ...") first,  -->
                            <!-- before saving the toggled value. -->
                            <!-- The current user, the admin user viewing the dashboard, should not be allowed to toggle the superuser status on him- or herself: -->
                            <p:selectBooleanCheckbox id="superUserCheckbox" value="#{user.superuser}" valueChangeListener="#{DashboardUsersPage.setUserToToggleSuperuserStatus(user)}"  disabled="#{user.id == dataverseSession.user.id}">
                                <p:ajax event="change" process="@this" oncomplete="PF('toggleSuperuserConfirmation').show();"  update=":dashboardUsersForm:toggleSuperuserConfirmation"/>
                            </p:selectBooleanCheckbox>
                        </p:column>
{'fraction_non_alphanumeric': 0.14775853698009386, 'fraction_numerical': 0.0029940119760479044, 'mean_word_length': 2.033627884143348, 'pattern_counts': {'":': 2, '<': 141, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1771355', 'n_tokens_mistral': 3312, 'n_tokens_neox': 3213, 'n_words': 469}