Mercurial > hg > LGDataverses
view src/main/webapp/dataverseuser.xhtml @ 14:be7787c36e58 default tip
new: nofity LGSercies for deleted files
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Mon, 02 Nov 2015 16:41:23 +0100 |
| parents | a50cf11e5178 |
| children |
line wrap: on
line source
<!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:jsf="http://xmlns.jcp.org/jsf"> <h:head> </h:head> <h:body> <ui:composition template="/dataverse_template.xhtml"> <ui:param name="pageTitle" value="#{bundle.account} - #{dataverseServiceBean.findRootDataverse().name} #{bundle.dataverse}"/> <ui:param name="dataverse" value="#{dataverseServiceBean.findRootDataverse()}"/> <ui:param name="showDataverseHeader" value="false"/> <ui:param name="loginRedirectPage" value="dataverseuser.xhtml"/> <ui:define name="body"> <f:loadBundle basename="Bundle" var="bundle"/> <f:metadata> <f:viewParam name="editMode" value="#{DataverseUserPage.editMode}"/> <f:viewParam name="selectTab" value="#{DataverseUserPage.selectTab}"/> <f:viewAction action="#{DataverseUserPage.init}" /> <f:viewParam name="q" value="#{SearchIncludeFragment.query}"/> <f:viewParam name="types" value="#{SearchIncludeFragment.selectedTypesString}"/> <f:viewParam name="fq1" value="#{SearchIncludeFragment.fq1}"/> <f:viewParam name="fq0" value="#{SearchIncludeFragment.fq0}"/> <f:viewParam name="fq2" value="#{SearchIncludeFragment.fq2}"/> <f:viewParam name="fq3" value="#{SearchIncludeFragment.fq3}"/> <f:viewParam name="fq4" value="#{SearchIncludeFragment.fq4}"/> <f:viewParam name="fq5" value="#{SearchIncludeFragment.fq5}"/> <f:viewParam name="fq6" value="#{SearchIncludeFragment.fq6}"/> <f:viewParam name="fq7" value="#{SearchIncludeFragment.fq7}"/> <f:viewParam name="fq8" value="#{SearchIncludeFragment.fq8}"/> <f:viewParam name="fq9" value="#{SearchIncludeFragment.fq9}"/> <f:viewParam name="sort" value="#{SearchIncludeFragment.sortField}"/> <f:viewParam name="order" value="#{SearchIncludeFragment.sortOrder}"/> <f:viewParam name="page" value="#{SearchIncludeFragment.page}"/> <f:viewParam name="debug" value="#{SearchIncludeFragment.debug}"/> <f:viewAction action="#{SearchIncludeFragment.search(true)}" /> <f:viewAction action="#{dataverseHeaderFragment.initBreadcrumbs(dataverseServiceBean.findRootDataverse(), (DataverseUserPage.editMode == 'CREATE' ? bundle['user.createBtn'] : bundle.account))}"/> </f:metadata> <h:form id="dataverseUserForm"> <p:focus context="dataverseUserForm"/> <div class="clearfix" jsf:rendered="#{empty DataverseUserPage.editMode}"> <div class="btn-group pull-right"> <button type="button" id="editAccount" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <ui:fragment rendered="#{!empty DataverseUserPage.builtinUser}"> <span class="glyphicon glyphicon-pencil"/> #{bundle['account.edit']} </ui:fragment> <ui:fragment rendered="#{empty DataverseUserPage.builtinUser}"> #{bundle['account.info']} </ui:fragment> <span class="caret"></span> </button> <ul class="dropdown-menu pull-right text-left" role="menu"> <ui:fragment rendered="#{!empty DataverseUserPage.builtinUser}"> <li> <p:commandLink id="editAccount" actionListener="#{DataverseUserPage.edit}" update="@form"> <h:outputText value="#{bundle['account.info']}" /> </p:commandLink> </li> <li> <p:commandLink id="changePassword" actionListener="#{DataverseUserPage.changePassword}" update="@form"> <h:outputText value="#{bundle.passwd}" /> </p:commandLink> </li> </ui:fragment> <li> <h:outputLink value="/apitoken.xhtml"> <h:outputText value="#{bundle.apiTaken}" /> </h:outputLink> </li> </ul> </div> </div> <p:panel rendered="#{DataverseUserPage.editMode == 'FORGOT'}"> <h:outputText value="#{bundle['user.lostPasswdTip']}" /> </p:panel> <p:tabView id="dataRelatedToMeView" activeIndex="#{DataverseUserPage.activeIndex}" dynamic="true" rendered="#{empty DataverseUserPage.editMode}"> <p:ajax event="tabChange" listener="#{DataverseUserPage.onTabChange}" update="@all" oncomplete="javascript:dataverseuser_page_rebind();" /> <p:tab id="dataRelatedToMe" title="#{bundle['user.dataRelatedToMe']}"> <ui:fragment> <ui:include src="search-include-fragment.xhtml"> <ui:param name="showFacets" value="true"/> <ui:param name="showSearch" value="true"/> <ui:param name="dataverseRedirectPage" value="dataverseuser.xhtml"/> </ui:include> </ui:fragment> </p:tab> <p:tab id="notifications" title="#{bundle['header.user.selectTab.notifications']}"> <div class="table-container"> <ui:repeat value="#{DataverseUserPage.notificationsList}" var="item"> <div class="notification-item #{item.displayAsRead ? '' : 'bg-warning'}"> <div class="notification-item-cell"> <ui:fragment rendered="#{item.theObject == null}"> <h:outputText value="#{bundle['notification.generic.objectDeleted']}" /> </ui:fragment> <ui:fragment rendered="#{item.theObject != null}"> <ui:fragment rendered="#{item.type == 'CREATEACC'}"> <i class="icon-dataverse text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.welcome']}" escape="false"> <f:param value="#{dataverseServiceBean.applicationVersion}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'CREATEDV'}"> <i class="icon-dataverse text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.createDataverse']}" escape="false"> <f:param value="#{item.theObject.getAlias()}"/> <f:param value="#{item.theObject.getDisplayName()}"/> <f:param value="#{item.theObject.getOwner().getAlias()}"/> <f:param value="#{item.theObject.getOwner().getDisplayName()}"/> <f:param value="#{systemConfig.guidesBaseUrl}"/> <f:param value="#{systemConfig.version}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'CREATEDS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.createDataset']}" escape="false"> <f:param value="#{item.theObject.getDataset().getGlobalId()}"/> <f:param value="#{item.theObject.getDataset().getDisplayName()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getAlias()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getDisplayName()}"/> <f:param value="#{systemConfig.guidesBaseUrl}"/> <f:param value="#{systemConfig.version}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'SUBMITTEDDS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.wasSubmittedForReview']}" escape="false"> <f:param value="#{item.theObject.getDataset().getGlobalId()}"/> <f:param value="#{item.theObject.getDataset().getDisplayName()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getAlias()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getDisplayName()}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'RETURNEDDS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.wasReturnedByReviewer']}" escape="false"> <f:param value="#{item.theObject.getDataset().getGlobalId()}"/> <f:param value="#{item.theObject.getDataset().getDisplayName()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getAlias()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getDisplayName()}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'PUBLISHEDDS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.wasPublished']}" escape="false"> <f:param value="#{item.theObject.getDataset().getGlobalId()}"/> <f:param value="#{item.theObject.getDataset().getDisplayName()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getAlias()}"/> <f:param value="#{item.theObject.getDataset().getOwner().getDisplayName()}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'REQUESTFILEACCESS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.requestFileAccess']}" escape="false"> <f:param value="#{item.theObject.id}"/> <f:param value="#{item.theObject.displayName}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'GRANTFILEACCESS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.grantFileAccess']}" escape="false"> <f:param value="#{item.theObject.getGlobalId()}"/> <f:param value="#{item.theObject.displayName}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'REJECTFILEACCESS'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.rejectFileAccess']}" escape="false"> <f:param value="#{item.theObject.getGlobalId()}"/> <f:param value="#{item.theObject.displayName}"/> </h:outputFormat> </ui:fragment> <ui:fragment rendered="#{item.type == 'MAPLAYERUPDATED'}"> <i class="icon-dataset text-icon-inline text-muted"></i> <h:outputFormat value="#{bundle['notification.worldMap.added']}" escape="false"> <f:param value="#{item.theObject.getDataset().getGlobalId()}"/> <f:param value="#{item.theObject.getDataset().getDisplayName()}"/> </h:outputFormat> </ui:fragment> </ui:fragment> <h:outputText value="#{item.sendDate}" styleClass="text-muted small"/> </div> <div class="notification-item-cell"> <p:commandLink title="#{bundle.removeNotification}" styleClass="bootstrap-button-tooltip" action="#{DataverseUserPage.remove(item.id)}" update=":#{p:component('notifications')}" oncomplete="bind_bsui_components();"> <span class="glyphicon glyphicon-remove"></span> </p:commandLink> </div> </div> </ui:repeat> </div> </p:tab> <p:tab id="accountInfo" title="Account Information"> <div jsf:rendered="#{empty DataverseUserPage.builtinUser}"> #{bundle['user.toEditDetail']} </div> <div class="form-horizontal" jsf:rendered="#{!empty DataverseUserPage.builtinUser}"> <!-- Username --> <div class="form-group"> <label for="userNameEmail" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.username.illegal.tip']}"> #{bundle['user.username']} </span> </label> <div class="col-sm-9"> <p class="form-control-static">#{DataverseUserPage.builtinUser.userName}</p> </div> </div> <!-- First Name --> <div class="form-group"> <label for="firstName" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.firstName.tip']}"> #{bundle['user.firstName']} </span> </label> <div class="col-sm-9"> <p class="form-control-static">#{DataverseUserPage.builtinUser.firstName}</p> </div> </div> <!-- Last Name --> <div class="form-group"> <label for="lastName" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.lastName.tip']}"> #{bundle['user.lastName']} </span> </label> <div class="col-sm-9"> <p class="form-control-static">#{DataverseUserPage.builtinUser.lastName}</p> </div> </div> <!-- Email --> <div class="form-group"> <label for="email" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.email.tip']}"> #{bundle.email} </span> </label> <div class="col-sm-9"> <p class="form-control-static">#{DataverseUserPage.builtinUser.email}</p> </div> </div> <!-- Affiliation --> <div class="form-group"> <label for="affiliation" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.affiliation.tip']}"> #{bundle.affiliation} </span> </label> <div class="col-sm-9"> <p class="form-control-static">#{DataverseUserPage.builtinUser.affiliation}</p> </div> </div> <!-- Position --> <div class="form-group"> <label for="position" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.position.tip']}"> #{bundle['user.position']} </span> </label> <div class="col-sm-9"> <p class="form-control-static">#{DataverseUserPage.builtinUser.position}</p> </div> </div> </div> </p:tab> <ui:remove> <p:tab id="groupsRoles" title="#{bundle['header.user.selectTab.groupsAndRoles']}"> <span class="glyphicon glyphicon-info-sign"></span> #{bundle['groupAndRoles.manageTips']} </p:tab> </ui:remove> </p:tabView> <p:tabView id="accountInfoView" rendered="#{!empty DataverseUserPage.editMode}"> <p:tab id="accountInfoEdit" title="#{bundle['account.info']}"> <div class="clearfix"> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' and systemConfig.shibEnabled == true}"> <p class="help-block"><span class="glyphicon glyphicon-info-sign"/> <h:outputText value=" #{bundle['user.institutionLogIn.tip']}" escape="false"/></p> </ui:fragment> <div class="form-horizontal"> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == 'EDIT'}"> <!-- Username --> <div class="form-group col-sm-11"> <label for="userNameEmail" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.username.illegal.tip']}"> #{bundle['user.username']} <span class="glyphicon glyphicon-asterisk text-danger"/> </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:inputText id="userName" styleClass="form-control" tabindex="1" validator="#{DataverseUserPage.validateUserName}" value="#{DataverseUserPage.builtinUser.userName}" disabled="#{DataverseUserPage.editMode != 'CREATE'}" binding="#{DataverseUserPage.usernameField}"/> <p:message for="userName" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == DataverseUserPage.changePasswordMode}"> <!-- Current Password --> <div class="form-group col-sm-11"> <label for="currentPassword" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.currentPasswd.tip']}"> #{bundle['user.currentPasswd']} <span class="glyphicon glyphicon-asterisk text-danger"/> </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:password id="currentPassword" tabindex="1" label="#{bundle['user.currentPasswd']}" styleClass="form-control" validator="#{DataverseUserPage.validateCurrentPassword}" value="#{DataverseUserPage.currentPassword}" /> <p:message for="currentPassword" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == DataverseUserPage.changePasswordMode}"> <!-- Password --> <div class="form-group col-sm-11"> <label for="inputPassword" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.passwd.illegal.tip']}"> <h:outputText value="#{DataverseUserPage.editMode == 'CREATE' ? 'Password' : 'New Password'}" /> <span class="glyphicon glyphicon-asterisk text-danger"></span> </span> </label> <div class="col-sm-9"> <p class="help-block"><span class="glyphicon glyphicon-info-sign"/> #{bundle['user.updatePassword.password']}</p> <p:panelGrid columns="2" styleClass="noBorders"> <p:password id="inputPassword" tabindex="2" label="#{DataverseUserPage.editMode == 'CREATE' ? 'Password' : 'New Password'}" styleClass="form-control" match="retypePassword" value="#{DataverseUserPage.inputPassword}" validator="#{DataverseUserPage.validateNewPassword}" /> <p:message for="inputPassword" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == DataverseUserPage.changePasswordMode}"> <!-- Retype Password --> <div class="form-group col-sm-11"> <label for="retypePassword" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.rePasswd.tip']}"> #{bundle['user.rePasswd']} <span class="glyphicon glyphicon-asterisk text-danger"/> </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:password id="retypePassword" tabindex="3" label="#{bundle['user.rePasswd']}" styleClass="form-control" value="#{DataverseUserPage.inputPassword}" /> <p:message for="retypePassword" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == 'EDIT'}"> <!-- First Name --> <div class="form-group col-sm-11"> <label for="firstName" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.firstName.tip']}"> #{bundle['user.firstName']} <span class="glyphicon glyphicon-asterisk text-danger"/> </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:inputText id="firstName" tabindex="4" styleClass="form-control" value="#{DataverseUserPage.builtinUser.firstName}" /> <p:message for="firstName" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == 'EDIT'}"> <!-- Last Name --> <div class="form-group col-sm-11"> <label for="lastName" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.lastName.tip']}"> #{bundle['user.lastName']} <span class="glyphicon glyphicon-asterisk text-danger"/> </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:inputText id="lastName" tabindex="5" styleClass="form-control" value="#{DataverseUserPage.builtinUser.lastName}" /> <p:message for="lastName" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == 'EDIT'}"> <!-- Email --> <div class="form-group col-sm-11"> <label for="email" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{user.email.tip}"> #{bundle.email} <span class="glyphicon glyphicon-asterisk text-danger"/> </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:inputText id="email" tabindex="6" styleClass="form-control" validator="#{DataverseUserPage.validateUserEmail}" value="#{DataverseUserPage.builtinUser.email}" /> <p:message for="email" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == 'EDIT'}"> <!-- Affiliation --> <div class="form-group col-sm-11"> <label for="affiliation" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.affiliation.tip']}"> #{bundle.affiliation} </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:inputText id="affiliation" tabindex="7" styleClass="form-control" value="#{DataverseUserPage.builtinUser.affiliation}" /> <p:message for="affiliation" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE' or DataverseUserPage.editMode == 'EDIT'}"> <!-- Position --> <div class="form-group col-sm-11"> <label for="position" class="col-sm-3 control-label"> <span data-toggle="tooltip" data-placement="auto right" class="tooltiplabel text-info" data-original-title="#{bundle['user.position.tip']}"> #{bundle['user.position']} </span> </label> <div class="col-sm-9"> <p:panelGrid columns="2" styleClass="noBorders"> <p:inputText id="position" tabindex="8" styleClass="form-control" value="#{DataverseUserPage.builtinUser.position}" /> <p:message for="position" display="text" /> </p:panelGrid> </div> </div> </ui:fragment> <ui:fragment rendered="#{DataverseUserPage.editMode == 'CREATE'}"> <!-- Terms of Use --> <ui:include src="termsofuse.xhtml"/> </ui:fragment> </div> <div class="button-block pull-left"> <p:commandButton id="save" tabindex="9" value="#{DataverseUserPage.editMode == 'CREATE' ? bundle['user.createBtn']:bundle.saveChanges}" action="#{DataverseUserPage.save}" update="@form,:messagePanel,:userDisplayInfoTitle" /> <p:commandButton id="cancel" tabindex="10" value="#{bundle.cancel}" action="#{DataverseUserPage.cancel}" process="@this" update="@form"> <p:resetInput target="@form" /> </p:commandButton> </div> </div> </p:tab> </p:tabView> </h:form> </ui:define> </ui:composition> </h:body> </html>
