office-alexander-logistics/office-alexander-logistics-app/src/main/webapp/pages/dataviews/data.xhtml

164 lines
No EOL
5.2 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"
template="/layout/template.xhtml">
<f:metadata>
<f:viewAction action="#{dataViewController.onLoad()}" />
</f:metadata>
<ui:define name="content">
<f:view>
<h:form id="dataview_id" pt:autocomplete="on">
<div class="imixs-form">
<div class="imixs-header">
<h1>
<h:outputText value="Data View: " />
<h:outputText value="#{dataViewController.definition.item['name']} " />
</h1>
</div>
<h:panelGroup styleClass="imixs-form-panel imixs-view" layout="block" id="dataview_form_id">
<div class=" imixs-form-section">
<ui:include src="/pages/workitems/forms/custom_sections.xhtml">
<ui:param name="customFormSections" value="#{customFormController.sections}" />
<ui:param name="workitem" value="#{dataViewController.filter}" />
<ui:param name="readonly" value="#{section.readonly}" />
</ui:include>
</div>
</h:panelGroup>
<h:panelGroup styleClass="imixs-view imixs-search" layout="block" id="dataview_result_id">
<ui:param name="searchResult" value="#{viewHandler.getData(dataViewController)}" />
<ui:param name="searchPage"
value="#{(dataViewController.getPageIndex()+1)}/#{(dataViewController.getTotalPages())}" />
<!-- Buttons -->
<div class="imixs-form-section">
<div style="float:left;">
<h:commandButton value="Anzeigen" action="#{dataViewController.run()}">
<f:ajax execute="@form dataview_result_id" render="dataview_result_id"
onevent="updateDataView" />
</h:commandButton>
<h:commandButton value="Excel Export" action="#{dataViewController.run()}" />
<h:commandButton value="Close" action="/pages/notes?faces-redirect=true" />
</div>
<!-- Sort Order -->
<div class="pull-right ">
<span class="search-result-summary">#{message.total_result}
#{dataViewController.getTotalCount()}
#{message.serach_hits}</span>
<div class=" ui-button ui-widget ui-state-default ui-corner-all"
style="padding: 0 10px;">
<h:outputText title="#{message['worklist.sortorder_help']}"
value="#{message['worklist.sortorder']}: " />
<h:selectOneMenu style="background:#fff;"
value="#{dataViewController.filter.item['sortorder']}">
<f:selectItem itemValue="0"
itemLabel="#{message['worklist.sortorder_relevance']}" />
<f:selectItem itemValue="3"
itemLabel="#{message['worklist.sortorder_lastupdate']}" />
<f:selectItem itemValue="1"
itemLabel="#{message['worklist.sortorder_newest']}" />
<f:selectItem itemValue="2"
itemLabel="#{message['worklist.sortorder_oldest']}" />
<f:ajax event="change" render="@form" listener="#{viewHandler.init()}"
onevent="imixsOfficeMain.layoutAjaxEvent" />
</h:selectOneMenu>
<span>
<h:outputText style="margin-left:7px;" value="#{searchPage}" />
</span>
</div>
<h:commandButton actionListener="#{dataViewController.back()}" style="height: 31px;"
disabled="#{dataViewController.pageIndex==0}" value="◀◀ #{message.prev}">
<f:ajax render="dataview_result_id" onevent="updateDataView" />
</h:commandButton>
<h:commandButton actionListener="#{dataViewController.forward()}" style="height: 31px;"
disabled="#{dataViewController.endOfList or dataViewController.getTotalPages() le 1}"
value="#{message.next} ▶▶">
<f:ajax render="dataview_result_id" onevent="updateDataView" />
</h:commandButton>
</div>
</div>
<div class="imixs-form-section">
<h:dataTable id="view_body" styleClass="imixsdatatable" value="#{searchResult}"
var="record">
<h:column>
<f:facet name="header">#{message.name}</f:facet>
<h:link outcome="/pages/workitems/workitem.xhtml?faces-redirect=true"
styleClass="imixs-viewentry-main-link">
<h:outputText value="#{record.item['$workflowsummary']}" />
<f:param name="id" value="#{record.item['$uniqueid']}" />
</h:link>
</h:column>
<h:column>
<f:facet name="header">#{message.modified}</f:facet>
<h:outputText value="#{record.item['$modified']}">
<f:convertDateTime timeZone="#{message.timeZone}" type="both"
pattern="#{message.dateTimePattern}" />
</h:outputText>
</h:column>
</h:dataTable>
</div>
</h:panelGroup>
</div>
</h:form>
<!-- Init script -->
<script type="text/javascript">
/*<![CDATA[*/
$(document).ready(function () {
});
//ajax refresh...
function updateDataView(data, context) {
if (data.status === 'success') {
imixsOfficeMain.layoutAjaxEvent(data);
}
}
/*]]>*/
</script>
</f:view>
</ui:define>
</ui:composition>