office-dynamixs-ai/dynamixs-ai-app/docker/deployments/dynamixs-ai.war/pages/admin/processlist.xhtml
2025-05-31 14:46:56 +02:00

202 lines
7.3 KiB
HTML

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
xmlns:marty="http://xmlns.jcp.org/jsf/composite/marty"
xmlns:i="http://xmlns.jcp.org/jsf/composite/imixs"
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions"
template="/layout/template.xhtml">
<ui:define name="content">
<script type="text/javascript">
/*<![CDATA[*/
// The following code is used to layout the tables with the jquery datatable plugin.
$(document).ready(function() {
updateTableLayout();
});
function updateTable(e) {
if (e.status == 'success') {
$('.imixsdatatable').layoutImixsTable()
}
}
function updateTableLayout() {
$('[id$=processtable]').each(function() {
// with the following line we test if the jsf datatable realy contains data
// in cases with empty rows on default column is displayed.
//alert($('tbody tr:nth-child(1) td',adatatable).length);
if ($('tbody tr:nth-child(1) td', $(this)).length > 1)
$(this).dataTable({
"bRetrieve" : true,
"iDisplayLength" : #{propertyController.getProperty('admin.view.table.displaylength','30')},
"bLengthChange" : false,
"bSortable" : false,
"bJQueryUI" : true,
'aaSorting' : [] // no inital sorting
}
);
});
}
/*]]>*/
</script>
<f:view>
<h:form>
<div class="imixs-view">
<!-- *** Header **** -->
<div class="imixs-header">
<h1>
<h:outputText value="#{message['process.view']}" />
</h1>
</div>
<div class="imixs-body">
<h:dataTable id="processtable"
value="#{viewHandler.getData(processViewController)}" var="record"
styleClass="imixsdatatable">
<h:column>
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{message.name}"/>
</h:panelGroup>
</f:facet>
<h:panelGroup
styleClass="typcn #{(record.item['$taskid'] eq 301)?'typcn-lock-open imixs-state-success':'typcn-lock-closed imixs-state-error'} " />
<h:link outcome="/pages/admin/process" styleClass="imixs-viewentry-main-link">
<h:outputText value="#{record.item['name']}" />
<h:outputText rendered="#{empty record.item['name']}"
value=" - no name - " />
<f:param name="id" value="#{record.item['$uniqueid']}" />
</h:link>
</h:column>
<h:column >
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{message.modified}"/>
</h:panelGroup>
</f:facet>
<!-- hidden sort field -->
<h:outputText value="#{record.item['$lasteventdate']}" style="display:none">
<f:convertDateTime timeZone="#{message.timeZone}" type="both"
pattern="yyyyMMdd" />
</h:outputText>
<h:outputText value="#{record.item['$lasteventdate']}">
<f:convertDateTime timeZone="#{message.timeZone}" type="both"
pattern="#{message.dateTimePattern}" />
</h:outputText>
<h:outputText value=" #{message.by} #{userController.getUserName(record.item['$Editor'])}" title="#{record.item['$Editor']}" />
</h:column>
<h:column>
<f:facet name="header">Manager</f:facet>
<ui:repeat var="grp"
value="#{record.itemListArray['process.manager']}">
<ui:param name="displayname" value="#{userController.getUserName(grp)}"></ui:param>
<h:outputText value="#{userController.getUserName(grp)}" title="#{grp} - #{userController.getEmail(grp)}" />
<ui:fragment rendered="#{(empty displayname) and (!empty grp)}">
<ui:param name="isrole" value="#{userInputController.isRole(grp)}"/>
<h:outputText value="#{grp}" title="#{isrole?'Access Role':'Unknown User!'}"
class="#{isrole?'imixs-warning':'imixs-important'}" />
</ui:fragment>
<br />
</ui:repeat>
</h:column>
<h:column>
<f:facet name="header">Team</f:facet>
<ui:repeat var="grp"
value="#{record.itemListArray['process.team']}">
<ui:param name="displayname" value="#{userController.getUserName(grp)}"></ui:param>
<h:outputText value="#{userController.getUserName(grp)}" title="#{grp} - #{userController.getEmail(grp)}" />
<ui:fragment rendered="#{(empty displayname) and (!empty grp)}">
<ui:param name="isrole" value="#{userInputController.isRole(grp)}"/>
<h:outputText value="#{grp}" title="#{isrole?'Access Role':'Unknown User!'}"
class="#{isrole?'imixs-warning':'imixs-important'}" />
</ui:fragment>
<br />
</ui:repeat>
</h:column>
<h:column>
<f:facet name="header">Assist</f:facet>
<ui:repeat var="grp"
value="#{record.itemListArray['process.assist']}">
<ui:param name="displayname" value="#{userController.getUserName(grp)}"></ui:param>
<h:outputText value="#{userController.getUserName(grp)}" title="#{grp} - #{userController.getEmail(grp)}" />
<ui:fragment rendered="#{(empty displayname) and (!empty grp)}">
<ui:param name="isrole" value="#{userInputController.isRole(grp)}"/>
<h:outputText value="#{grp}" title="#{isrole?'Access Role':'Unknown User!'}"
class="#{isrole?'imixs-warning':'imixs-important'}" />
</ui:fragment>
<br />
</ui:repeat>
</h:column>
<h:column>
<f:facet name="header">Workflows</f:facet>
<h:panelGroup
rendered="#{!empty record.item['txtWorkflowList']}">
<ul>
<ui:repeat var="grp"
value="#{record.itemListArray['txtWorkflowList']}">
<li><h:outputText value="#{grp}" /></li>
</ui:repeat>
</ul>
</h:panelGroup>
</h:column>
<h:column>
<f:facet name="header">Reports</f:facet>
<h:panelGroup rendered="#{!empty record.item['txtReportList']}">
<ul>
<ui:repeat var="grp"
value="#{record.itemListArray['txtReportList']}">
<li><h:outputText value="#{grp}" /></li>
</ui:repeat>
</ul>
</h:panelGroup>
</h:column>
<h:column>
<f:facet name="header">Status</f:facet>
<h:outputText value="#{record.item['$workflowstatus']}" />
</h:column>
<h:column>
<f:facet name="header">#{message.action}</f:facet>
<!-- Edit -->
<h:link outcome="/pages/admin/process?faces-redirect=true" styleClass="imixs-viewentry-main-link">
<span class="typcn typcn-pencil imixs-state-info"></span>
#{message.edit}
<f:param name="id" value="#{record.item['$uniqueid']}" />
</h:link>
</h:column>
</h:dataTable>
</div>
<div class="imixs-footer">
<h:button outcome="/pages/admin/organisation" value="#{message['organigram.title']}" />
<h:button outcome="/pages/admin/process?id=" value="#{message.add}" />
<h:commandButton action="home" value="#{message.close}" styleClass="imixs-close-action" />
</div>
</div>
</h:form>
</f:view>
</ui:define>
</ui:composition>