Merge branch 'master' of https://git.bukova.info/repos/git/isspst
commit
4451850603
@ -0,0 +1,44 @@
|
|||||||
|
package info.bukova.isspst.reporting;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import net.sf.jasperreports.engine.JasperRunManager;
|
||||||
|
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||||
|
import net.sf.jasperreports.engine.util.JRLoader;
|
||||||
|
import net.sf.jasperreports.engine.util.JRProperties;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
public class PredefinedGenerator implements Generator {
|
||||||
|
|
||||||
|
private ReportDefinition definition;
|
||||||
|
private ServletContext ctx;
|
||||||
|
|
||||||
|
public PredefinedGenerator(ReportDefinition definition, ServletContext ctx) {
|
||||||
|
this.definition = definition;
|
||||||
|
this.ctx = ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte[] generate() {
|
||||||
|
byte[] bytes = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
JasperReport report = (JasperReport) JRLoader.loadObject(getReportFile());
|
||||||
|
JRProperties.setProperty("net.sf.jasperreports.default.pdf.encoding", "Cp1250");
|
||||||
|
bytes = JasperRunManager.runReportToPdf(report, definition.getParams(), new JRBeanCollectionDataSource(definition.getDataSet()));;
|
||||||
|
} catch (JRException e) {
|
||||||
|
throw new ReportException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected File getReportFile() {
|
||||||
|
return new File(ctx.getRealPath("WEB-INF/reports") + "/" + definition.getReport().getJasperFile() + ".jasper");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package info.bukova.isspst.reporting;
|
||||||
|
|
||||||
|
import info.bukova.isspst.services.IsspstException;
|
||||||
|
|
||||||
|
public class ReportException extends IsspstException {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public ReportException(Throwable cause) {
|
||||||
|
super("Reporting exception: ", cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReportException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package info.bukova.isspst.ui;
|
||||||
|
|
||||||
|
import info.bukova.isspst.StringUtils;
|
||||||
|
|
||||||
|
import org.zkoss.bind.BindContext;
|
||||||
|
import org.zkoss.bind.Converter;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
|
||||||
|
public class LocaleConverter implements Converter<String, String, Component> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String coerceToBean(String str, Component component, BindContext ctx) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String coerceToUi(String str, Component component, BindContext ctx) {
|
||||||
|
return StringUtils.localize(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package info.bukova.isspst.ui.reporting;
|
||||||
|
|
||||||
|
import java.beans.BeanInfo;
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.beans.Introspector;
|
||||||
|
import java.beans.PropertyDescriptor;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import info.bukova.isspst.reporting.Report;
|
||||||
|
import info.bukova.isspst.reporting.ReportDefinition;
|
||||||
|
import info.bukova.isspst.reporting.ReportType;
|
||||||
|
import info.bukova.isspst.ui.ListChecks;
|
||||||
|
import info.bukova.isspst.ui.LocaleConverter;
|
||||||
|
|
||||||
|
import org.zkoss.bind.annotation.Init;
|
||||||
|
import org.zkoss.zk.ui.select.annotation.WireVariable;
|
||||||
|
|
||||||
|
public class ColSelectVM {
|
||||||
|
|
||||||
|
@WireVariable
|
||||||
|
private ReportDefinition reportDefinition;
|
||||||
|
private LocaleConverter locConverter;
|
||||||
|
|
||||||
|
@Init
|
||||||
|
public void init() {
|
||||||
|
locConverter = new LocaleConverter();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListChecks<String> getColumns() {
|
||||||
|
Report selected = reportDefinition.getReport();
|
||||||
|
List<Object> data = reportDefinition.getDataSet();
|
||||||
|
|
||||||
|
if (selected == null || selected.getType() != ReportType.DYNAMIC) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (data == null || data.size() == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
BeanInfo beanInfo;
|
||||||
|
try {
|
||||||
|
beanInfo = Introspector.getBeanInfo(data.get(0).getClass());
|
||||||
|
} catch (IntrospectionException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
PropertyDescriptor[] pds = beanInfo.getPropertyDescriptors();
|
||||||
|
List<String> properties = new ArrayList<String>();
|
||||||
|
for (PropertyDescriptor pd : pds) {
|
||||||
|
if (!(pd.getName().equals("password") || pd.getName().equals("class") || pd.getName().equals("id") || pd.getName().equals("valid"))) {
|
||||||
|
properties.add(pd.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ListChecks<String> columns = new ListChecks<String>(reportDefinition.getFieldsToPrint(), properties);
|
||||||
|
|
||||||
|
return columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocaleConverter getLocConverter() {
|
||||||
|
return locConverter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReportDefinition getReportDefinition() {
|
||||||
|
return reportDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package info.bukova.isspst.ui;
|
package info.bukova.isspst.ui.reporting;
|
||||||
|
|
||||||
import org.zkoss.bind.annotation.Init;
|
import org.zkoss.bind.annotation.Init;
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
#Obecné
|
||||||
|
created=Vytvořeno
|
||||||
|
ownedBy=Vytvořil
|
||||||
|
modified=Změněno
|
||||||
|
modifiedBy=Změnil
|
||||||
|
|
||||||
|
#Adresa
|
||||||
|
city=Město
|
||||||
|
company=Firma
|
||||||
|
contactName=Kontaktní osoba
|
||||||
|
department=Oddělení
|
||||||
|
description=Poznámka
|
||||||
|
dic=DIČ
|
||||||
|
email=E-mail
|
||||||
|
houseNumber=Číslo domu
|
||||||
|
ic=IČ
|
||||||
|
phone=Telefon
|
||||||
|
state=Stát
|
||||||
|
street=Ulice
|
||||||
|
web=Webová adresa
|
||||||
|
zipCode=PSČ
|
||||||
|
|
||||||
|
#Budova
|
||||||
|
code=Kód
|
||||||
|
name=Název
|
||||||
|
|
||||||
|
#Uživatel
|
||||||
|
accountNonExpired=Platný
|
||||||
|
accountNonLocked=Odemknutý
|
||||||
|
authorities=Role
|
||||||
|
credentialsNonExpired=Heslo je platné
|
||||||
|
enabled=Povolený
|
||||||
|
firstName=Jméno
|
||||||
|
fullName=Plné jméno
|
||||||
|
lastName=Příjmení
|
||||||
|
notify=Posílat oznámení
|
||||||
|
personalNumber=Osobní číslo
|
||||||
|
username=Uživatelské jméno
|
Binary file not shown.
@ -0,0 +1,173 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="address" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2cacf86c-b3c7-40ea-97b1-bdf63b3abc19">
|
||||||
|
<property name="ireport.zoom" value="1.0"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<field name="company" class="java.lang.String"/>
|
||||||
|
<field name="city" class="java.lang.String"/>
|
||||||
|
<field name="street" class="java.lang.String"/>
|
||||||
|
<field name="houseNumber" class="java.lang.String"/>
|
||||||
|
<field name="ic" class="java.lang.Long"/>
|
||||||
|
<field name="zipCode" class="java.lang.String"/>
|
||||||
|
<field name="dic" class="java.lang.String"/>
|
||||||
|
<field name="web" class="java.lang.String"/>
|
||||||
|
<field name="email" class="java.lang.String"/>
|
||||||
|
<field name="contactName" class="java.lang.String"/>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band height="18" splitType="Stretch"/>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="28" splitType="Stretch">
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="f87bcea0-ca1b-494e-af40-25b7ecc257e3" x="247" y="0" width="113" height="26"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="18" isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Adresy]]></text>
|
||||||
|
</staticText>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="16" splitType="Stretch"/>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="163" splitType="Stretch">
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="878c0f64-8c89-4965-8f92-1fe06a5c568e" x="0" y="161" width="555" height="1"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineStyle="Double"/>
|
||||||
|
</graphicElement>
|
||||||
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="094bedd3-551d-42d4-8675-5711d960414e" x="0" y="5" width="555" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="12" isBold="true" pdfFontName="Helvetica-BoldOblique" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{company}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="3e42046a-810f-423f-8134-6b71b4bd0c85" x="0" y="29" width="555" height="1"/>
|
||||||
|
</line>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="afa3900e-e487-4a09-a6f7-989a92a9f1ec" x="0" y="38" width="77" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[IČ]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="496d20e5-929b-4dfd-b770-70ab5c9341f3" x="0" y="58" width="77" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[DIČ]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="f2af95df-0b40-495b-8f54-0e53a1bbdcfb" x="77" y="58" width="128" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{dic}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="b88df725-f080-427b-b977-ca7d6c379f41" x="0" y="78" width="77" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Město]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="627a01de-a497-4654-bd3f-250006079b03" x="77" y="78" width="189" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{city}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="93250d5f-6e5a-4bd3-860f-0778a1464ae2" x="0" y="98" width="77" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Ulice]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="8e4c5326-3905-450a-9ccd-e10b265c8769" x="77" y="98" width="189" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{street}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="a91717ea-dca2-43f9-bf8c-656f60f77f2a" x="0" y="118" width="77" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Číslo]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="6ee787ba-a11c-477f-a7b3-499bdb3206eb" x="77" y="118" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{houseNumber}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="b474f469-5635-48b7-ae02-7670081e1723" x="0" y="138" width="77" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[PSČ]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="bf63acbb-5367-4292-a3d3-863cce98b1a3" x="77" y="138" width="100" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{zipCode}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="f50e23b7-7daa-430b-bd18-290bdb839dc8" x="284" y="38" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Kontaktní osoba]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="ad4dcc95-d692-4dc5-acd1-b29aeb3f27f1" x="284" y="58" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Web]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="a39b1341-2a2a-418b-beba-429521c24b77" x="384" y="58" width="171" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{web}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="20b19927-0028-4fa1-ae21-014546d2d1ee" x="284" y="78" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font isBold="true" pdfFontName="Helvetica-Bold" isPdfEmbedded="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[E-mail]]></text>
|
||||||
|
</staticText>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="e9ab750f-9e93-4bb7-b450-0024bdd116c9" x="384" y="78" width="171" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{email}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="288a7d64-7aff-4358-aa3e-47988849915b" x="384" y="38" width="171" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{contactName}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="5bbc5045-e31c-40f1-8cdf-ad654441862b" x="77" y="38" width="125" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{ic}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band height="14" splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band height="16" splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band height="16" splitType="Stretch"/>
|
||||||
|
</summary>
|
||||||
|
</jasperReport>
|
@ -1,10 +0,0 @@
|
|||||||
<?page title="${labels.ReportReport}" contentType="text/html;charset=UTF-8"?>
|
|
||||||
<zk>
|
|
||||||
<window title="${labels.ReportReport}" border="normal" closable="true" apply="org.zkoss.bind.BindComposer"
|
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.ReportVM')">
|
|
||||||
<toolbar>
|
|
||||||
<toolbarbutton image="/img/send.png" tooltiptext="${labels.ReportSend}"/>
|
|
||||||
</toolbar>
|
|
||||||
<iframe width="800px" height="680px" src="/api/report.pdf"/>
|
|
||||||
</window>
|
|
||||||
</zk>
|
|
@ -1,32 +0,0 @@
|
|||||||
<?page title="${labels.ReportReports}" contentType="text/html;charset=UTF-8"?>
|
|
||||||
<zk>
|
|
||||||
<window id="reportDialog" title="${labels.ReportReports}" border="normal" apply="org.zkoss.bind.BindComposer"
|
|
||||||
viewModel="@id('vm') @init('info.bukova.isspst.ui.ReportDialogVM')"
|
|
||||||
closable="true" width="550px">
|
|
||||||
|
|
||||||
<hbox>
|
|
||||||
<listbox model="@load(vm.reports)" width="250px" height="350px" selectedItem="@bind(vm.selected)">
|
|
||||||
<template name="model">
|
|
||||||
<listitem>
|
|
||||||
<listcell><label value="@load(each.name)"/></listcell>
|
|
||||||
</listitem>
|
|
||||||
</template>
|
|
||||||
</listbox>
|
|
||||||
<groupbox mold="3d" closable="false" width="270px">
|
|
||||||
<caption label="${labels.ReportOptions}"></caption>
|
|
||||||
<hbox>
|
|
||||||
<label value="${labels.ReportTitle}"/> <textbox value="@bind(vm.reportDefinition.reportTitle)"/>
|
|
||||||
</hbox>
|
|
||||||
<vbox children="@load(vm.columns.checks)">
|
|
||||||
<template name="children">
|
|
||||||
<checkbox label="@load(each.member)" checked="@bind(each.checked)"/>
|
|
||||||
</template>
|
|
||||||
</vbox>
|
|
||||||
</groupbox>
|
|
||||||
</hbox>
|
|
||||||
<hbox>
|
|
||||||
<button label="${labels.ReportPrint}" onClick="@command('print', window=reportDialog)"/> <button label="${labels.ButtonStorno}" onClick="reportDialog.detach()"/>
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
</window>
|
|
||||||
</zk>
|
|
@ -0,0 +1,15 @@
|
|||||||
|
<?page title="Column Select" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<zk>
|
||||||
|
<groupbox mold="3d" closable="false" width="270px" apply="org.zkoss.bind.BindComposer"
|
||||||
|
viewModel="@id('vmOpt') @init('info.bukova.isspst.ui.reporting.ColSelectVM')">
|
||||||
|
<caption label="${labels.ReportOptions}"></caption>
|
||||||
|
<hbox>
|
||||||
|
<label value="${labels.ReportTitle}"/> <textbox value="@bind(vmOpt.reportDefinition.reportTitle)"/>
|
||||||
|
</hbox>
|
||||||
|
<vbox children="@load(vmOpt.columns.checks)">
|
||||||
|
<template name="children">
|
||||||
|
<checkbox label="@load(each.member) @converter(vmOpt.locConverter)" checked="@bind(each.checked)"/>
|
||||||
|
</template>
|
||||||
|
</vbox>
|
||||||
|
</groupbox>
|
||||||
|
</zk>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?page title="No Options" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<zk>
|
||||||
|
<div>
|
||||||
|
<label value="${labels.ReportNoOptions}"/>
|
||||||
|
</div>
|
||||||
|
</zk>
|
@ -0,0 +1,11 @@
|
|||||||
|
<?page title="${labels.ReportReport}" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<zk>
|
||||||
|
<window border="normal" closable="true" apply="org.zkoss.bind.BindComposer"
|
||||||
|
viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportVM')">
|
||||||
|
<caption src="/img/print.png" zclass="form-caption" label="${labels.ReportReport}" />
|
||||||
|
<toolbar>
|
||||||
|
<toolbarbutton image="/img/send.png" tooltiptext="${labels.ReportSend}"/>
|
||||||
|
</toolbar>
|
||||||
|
<iframe width="800px" height="660px" src="/api/report.pdf"/>
|
||||||
|
</window>
|
||||||
|
</zk>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?page title="${labels.ReportReports}" contentType="text/html;charset=UTF-8"?>
|
||||||
|
<zk>
|
||||||
|
<window id="reportDialog" border="normal" apply="org.zkoss.bind.BindComposer"
|
||||||
|
viewModel="@id('vm') @init('info.bukova.isspst.ui.reporting.ReportDialogVM')"
|
||||||
|
closable="true" width="550px">
|
||||||
|
<caption src="/img/print.png" zclass="form-caption" label="${labels.ReportReports}" />
|
||||||
|
|
||||||
|
<hbox>
|
||||||
|
<listbox model="@load(vm.reports)" width="250px" height="350px" selectedItem="@bind(vm.selected)">
|
||||||
|
<template name="model">
|
||||||
|
<listitem disabled="@load(each.singleRecord and empty vm.singleObject)">
|
||||||
|
<listcell><label value="@load(each.name)"/></listcell>
|
||||||
|
</listitem>
|
||||||
|
</template>
|
||||||
|
</listbox>
|
||||||
|
<include src="@load(vm.optionsForm)"/>
|
||||||
|
</hbox>
|
||||||
|
<hbox>
|
||||||
|
<button image="/img/print-button.png" label="${labels.ReportPrint}" onClick="@command('print', window=reportDialog)" sclass="nicebutton" disabled="@bind(empty vm.selected)"/> <button image="~./zul/img/misc/drag-disallow.png" label="${labels.ButtonStorno}" onClick="reportDialog.detach()" sclass="nicebutton"/>
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
</window>
|
||||||
|
</zk>
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Loading…
Reference in New Issue