Skip to content
Snippets Groups Projects
ProjectOverviewPage.xhtml 7.71 KiB
Newer Older
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
        <ui:composition template="/templates/PagesTemplate.xhtml">
            <ui:param name="unsavedModifications" value="false"/>
            <ui:param name="projectName" value="#{currentProjectOverviewBean.projectName}"/>
            <ui:param name="pagename" value="projectOverview"/>
            <ui:param name="showProjectName" value="false"/>

            <ui:define name="bundleIncludes">
                <f:loadBundle var="localizedProjectOverviewMessages" basename="lang.ProjectOverviewPage"/>
            </ui:define>

            <ui:define name="cssIncludes">
                <link rel="stylesheet" type="text/css" href="#{root}/css/ProjectOverviewPage.css" />
            </ui:define>

            <!-- Those are the menu bar entries left from the help-submenu. -->
            <ui:define name="furtherMenuBarEntries">
                <p:submenu label="#{localizedMessages.file}">
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                    <c:if test="#{sec:areAnyGranted('User, Administrator')}">
                        <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-newProject" value="  #{localizedProjectOverviewMessages.newProject}" onclick="newProjectDialog.show()" ajax="true"/>
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                        <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-importProject" value="  #{localizedProjectOverviewMessages.importProject}" onclick="importProjectDialog.show()" ajax="true"/>
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                        <p:separator/>
                    </c:if>
                    <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-reload" value="  #{localizedProjectOverviewMessages.refreshProjectsList}" update=":projectsListForm" action="#{currentProjectOverviewBean.updateAvailableProjects()}" ajax="true"/>
                    <p:separator/>
                    <p:menuitem styleClass="element-with-whitespace" icon="ui-icon-settings" value="  #{localizedMessages.settings}" onclick="settingsDlg.show()" ajax="true"/>
                </p:submenu>
            </ui:define>   

            <ui:define name="centerContent">
                <h:form id="projectsListForm">  
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                    <p:dataTable emptyMessage="#{localizedMessages.noRecordsFound}" rows="15" paginator="true" paginatorPosition="both" var="project" rowsPerPageTemplate="5,10,15,25,50" value="#{currentProjectOverviewBean.projects}" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" selection="#{currentProjectOverviewBean.projectName}" rowKey="#{project}" selectionMode="single">  
                        <!-- Makes sure that rows are selected instantaneously. -->
                        <p:ajax event="rowSelect" listener="#{currentProjectOverviewBean.rowSelectHandler}" update=":menuForm" />

                        <p:column headerText="#{localizedProjectOverviewMessages.projectName}" id="modelHeader" sortBy="#{project}">  
                            <p:commandLink id="dynaButton" value="#{project}"/>

                            <p:menu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:210px">  
                                <p:menuitem icon="ui-icon-analysisEditor" id="openButton" value="  #{localizedMessages.analysisEditor}" styleClass="element-with-whitespace" ajax="false" outcome="analysisEditor">
                                    <f:param name="projectName" value="#{project}"/>
                                </p:menuitem>
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                                <c:if test="#{sec:areAnyGranted('User, Administrator')}">
                                    <p:menuitem icon="ui-icon-analysis" id="controlAnalysis"  styleClass="element-with-whitespace" value="  #{localizedMessages.analysis}" ajax="false"  outcome="controller">
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                                        <f:param name="projectName" value="#{project}"/>
                                    </p:menuitem>
                                </c:if>
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                                <c:if test="#{sec:areAnyGranted('User, Administrator')}">
                                    <p:menuitem icon="ui-icon-cockpitEditor" id="editAnalysisViews"  styleClass="element-with-whitespace" value="  #{localizedMessages.cockpitEditor}" ajax="false" outcome="cockpitEditor" >
                                        <f:param name="projectName" value="#{project}"/>
                                    </p:menuitem>
                                </c:if>
                                <p:menuitem icon="ui-icon-cockpit" id="showAnalysis"  styleClass="element-with-whitespace" value="  #{localizedMessages.cockpit}" ajax="false" outcome="cockpit">
                                    <f:param name="projectName" value="#{project}"/>
                                </p:menuitem>
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                                <c:if test="#{sec:areAnyGranted('User, Administrator')}">
                                    <p:separator/>
                                    <p:menuitem id="copyButton" icon="ui-icon-copy"  styleClass="element-with-whitespace" value="  #{localizedProjectOverviewMessages.copyProject}" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="copyProjectDialog.show()" update=":messages"/>
                                    <p:menuitem id="renameButton" icon="ui-icon-edit"  styleClass="element-with-whitespace" value="  #{localizedProjectOverviewMessages.renameProject}"  action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="renameProjectDialog.show()" disabled="true" update=":messages"/>
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                                    <p:menuitem id="deleteButton" icon="ui-icon-delete"  styleClass="element-with-whitespace" value="  #{localizedProjectOverviewMessages.deleteProject}" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="deleteProjectDialog.show()" update=":messages"/>      
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                                </c:if>
                            </p:menu>
                        </p:column>  
                        <p:column headerText="#{localizedProjectOverviewMessages.state}" style="text-align: center" sortBy="#{projectsBean.getAnalysisControllerState(project)}">  
                            <h:outputText value="#{projectsBean.getAnalysisControllerState(project)}"/>  
                        </p:column>

Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                        <p:column headerText="#{localizedProjectOverviewMessages.owner}" style="text-align: center">   
                            <h:outputText value="#{projectsBean.getOwner(project)}" />  
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                        </p:column>  
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed

                        <p:column headerText="#{localizedProjectOverviewMessages.lastModification}" sortBy="#{projectsBean.getCurrTimeStamp(project)}" style="text-align: center">  
                            <h:outputText value="#{projectsBean.getCurrTimeStamp(project)}" />  
                        </p:column>  
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed

Nils Christian Ehmke's avatar
Nils Christian Ehmke committed
                        <p:column headerText="#{localizedProjectOverviewMessages.lastEditor}" style="text-align: center">   
                            <h:outputText value="#{projectsBean.getLastUser(project)}" /> 
Nils Christian Ehmke's avatar
Nils Christian Ehmke committed

            <ui:define name="furtherDialogIncludes">
                <ui:include src="../dialogs/ProjectOverviewPageDialogs.xhtml" />
            </ui:define>