Skip to content

Instantly share code, notes, and snippets.

@novoj
Created May 31, 2013 13:27
Show Gist options
  • Save novoj/5684960 to your computer and use it in GitHub Desktop.
Save novoj/5684960 to your computer and use it in GitHub Desktop.
Mail module config
<?xml version="1.0" encoding="utf-8"?>
<gui>
<staticPage id="mail" storagePath="file:/www/p_java/cps/libs_java/prj_edeecms/prj_mail/lib_mail/src/main/resources/META-INF/lib_mail/templates/"> <!-- todo ${moduleName}, v MailModule uz je to pripravene -->
<dictionary>
<dataProviders>
<campaignRecordSource class="com.fg.mail.web.ramjet.campaign.datasource.CampaignRecordSource"/>
<campaignByTitleRecordSource class="com.fg.mail.web.ramjet.campaign.datasource.AggregatedCampaignRecordSource"/>
<recipientAutocompletionDataProvider class="com.fg.mail.web.ramjet.campaign.datasource.RecipientAutocompletionDataProvider"/>
<channelItemProvider class="com.fg.mail.web.ramjet.campaign.datasource.ChannelItemsProvider"/>
<recipientStats class="com.fg.mail.web.ramjet.stats.datasource.RecipientStatsChartDataSource"/>
<recipientListingSource class="com.fg.mail.web.ramjet.common.datasource.RecipientListingSource"/>
<externalRecipientListingSource class="com.fg.mail.web.ramjet.common.datasource.ExternalRecipientListingSource"/>
<addressListSource class="com.fg.mail.web.ramjet.addressList.datasource.AddressListRecordSource"/>
<recipientSource class="com.fg.mail.web.ramjet.common.datasource.RecipientSource"/>
<clientTemplateRecordSource class="com.fg.mail.web.ramjet.campaign.datasource.ClientTemplateRecordSource"/>
<emailPreviewRecordSource class="com.fg.mail.web.ramjet.campaign.datasource.EmailPreviewRecordSource"/>
<messageResultDataProvider class="com.fg.mail.web.ramjet.messageResult.MessageResultDataProvider"/>
</dataProviders>
<commands>
<removeCampaign class="com.fg.mail.web.ramjet.campaign.command.RemoveCampaignCommand"/>
<storeCampaign class="com.fg.mail.web.ramjet.campaign.command.StoreCampaignCommand"/>
<duplicateCampaign class="com.fg.mail.web.ramjet.campaign.command.DuplicateCampaignCommand"/>
<sendCampaign class="com.fg.mail.web.ramjet.campaign.command.SendCampaignCommand"/>
<sendTestCampaign class="com.fg.mail.web.ramjet.campaign.command.SendTestCampaignCommand"/>
<removeRecipient class="com.fg.mail.web.ramjet.addressList.command.RemoveRecipientAction"/>
<storeRecipient class="com.fg.mail.web.ramjet.addressList.command.StoreRecipient"/>
<storeAddressList class="com.fg.mail.web.ramjet.addressList.command.StoreAddressList"/>
<mergeCampaigns class="com.fg.mail.web.ramjet.campaign.command.MergeCampaignsCommand"/>
<downloadAttachment class="com.fg.mail.web.ramjet.campaign.command.DownloadAttachmentCommand"/>
</commands>
<interceptors>
<populateWidgetsFromClientTemplate class="com.fg.mail.web.ramjet.campaign.CampaignEditorBodyWidgetsFillingInterceptor"/>
<populateAttachmentsFromClientTemplate class="com.fg.mail.web.ramjet.campaign.CampaignEditorAttachmentsFillingInterceptor"/>
</interceptors>
<widgets>
<emailPreview extends="record"/>
<emailContent extends="widget"/>
</widgets>
<nodes>
<campaignEditor extends="guidelineFormPage">
<metadata>
<localizationKey>campaignEditor</localizationKey>
</metadata>
<interceptor type="securityInterceptor" condition="not(eq(#params[eventName]#, 'autocomplete'))"/>
<interceptor type="updateWidgetState" on="pageRender" condition="not(eq(#params[eventName]#, 'autocomplete'))"/>
<interceptor type="populateWidgetsFromClientTemplate" on="pageFirstEnter"/>
<interceptor type="populateAttachmentsFromClientTemplate" on="pageFirstEnter"/>
<structure>
<record id="record"
filter="eq(id,#params[campaignId]!?int#)"
order="attachments: asc(sortOrder); addressLists: asc(sortOrder)"
hint="bundle(allInView,!fullAttachments,!campaigns)">
<dataSource type="clientTemplateRecordSource" createNew="true"/>
<h1 id="campaignEditorPageTitle"/>
<messages showGenericErrorMessage="true"/>
<htmlForm id="pageForm">
<btnToolbar>
<saveButton id="store">
<metadata>
<security>
<acl>C</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
</dataset>
</metadata>
<command type="storeCampaign" requires="validatedData"/>
</saveButton>
<button id="send">
<metadata>
<security>
<acl>O</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
<confirm>true</confirm>
<actionConfirmMessage>#message[button.send.confirm.message]#</actionConfirmMessage>
</dataset>
</metadata>
<command type="aggregation">
<command type="storeCampaign" requires="validatedData"/>
<command type="sendCampaign"/>
<resolution>pageRedirect:**/sentCampaignPage?campaignId=[#widgetData[campaignId]#]&amp;batchId=[#flash[idBatch]#]</resolution>
</command>
</button>
<button id="sendTest">
<metadata>
<security>
<acl>O</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
<confirm>true</confirm>
<actionConfirmMessage>#message[button.sendTest.confirm.message]#</actionConfirmMessage>
</dataset>
</metadata>
<command type="aggregation">
<command type="storeCampaign" requires="validatedData"/>
<command type="sendTestCampaign"/>
<resolution>redirectAfterAction</resolution>
</command>
</button>
<previewButton id="preview">
<metadata>
<security>
<acl>W</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.SubmitToNewFrame</decorator>
</dataset>
<enableOn>isNotNull(#widget[record].record.id#)</enableOn>
</metadata>
<command type="storeCampaign" requires="validatedData">
<resolution>pageRedirect:/edee/mail/campaignPreview?campaignId=[#widgetData[campaignId]#]</resolution>
</command>
</previewButton>
</btnToolbar>
<hiddenInput id="campaignId" defaultValue="#params[campaignId]!#">
<metadata>
<pojo>id</pojo>
</metadata>
</hiddenInput>
<fieldset id="emailDetails">
<tagsSelect id="recipients">
<dataSource type="recipientAutocompletionDataProvider" viewName="clientTemplate"/>
<validators>
<required on="send"/>
</validators>
<metadata>
<sortOrder/>
<adam>addressLists@addressListId!</adam>
<adam>sortOrder=addressLists@sortOrder</adam>
<dataset mode="combine">
<itemsCount>1</itemsCount>
<allItems>true</allItems>
<sortable>true</sortable>
<messages>
<allAvailableItems>#@message[allAvailableItems]#</allAvailableItems>
<showAllAvailableItems>#@message[showAllAvailableItems]#</showAllAvailableItems>
</messages>
</dataset>
</metadata>
</tagsSelect>
<textInput id="subject">
<validators>
<required/>
<stringLengthBetween from="1" to="250"/>
</validators>
</textInput>
<redactor id="content"/>
<tagsSelect id="attachments">
<dataSource type="fileAutocompletionDataProvider" model="EDEE" viewName="file" metadataTitle="name"
filter="eq(directory, '0')" order="asc(name)" hint="bundle(allInView)"
storageId="f.file" />
<metadata>
<adam>
<readOnly>attachments@id!</readOnly>
<readOnly>sortOrder=attachments@sortOrder</readOnly>
</adam>
<sortOrder/>
<dataset mode="combine">
<decorator>edee.ui.SelectFiles</decorator>
<storage>f.file</storage>
<path>/</path>
<editUrl type="pageUrl">/edee/metadata/metadataEditor</editUrl>
<editIdParameter>fileId</editIdParameter>
<sortable>true</sortable>
<!--
<storageUploadToRoot>#lookup[storageRootUpload]#</storageUploadToRoot>
<storageAcceptedTypes>#lookup[storageAcceptedTypes]#</storageAcceptedTypes>
<storageSecurityRights>#lookup[storageRights]#</storageSecurityRights>
<storageMaxUploadSize>#lookup[storageMaxUploadSize]#</storageMaxUploadSize>
-->
<messages>
<choose>#@message[showAllAvailableFiles]#</choose>
<edit>#@message[fileProperties]#</edit>
</messages>
</dataset>
</metadata>
</tagsSelect>
</fieldset>
<fieldset id="systemDetails">
<display id="author"/>
<display id="created">
<conversion type="date"/>
</display>
<dateTimeInput id="plannedSendDate"/>
<select id="channelName">
<metadata>
<enableOn>moreThan(#@widget[].itemCount#, 1)</enableOn>
</metadata>
<dataSource type="channelItemProvider"/>
</select>
</fieldset>
</htmlForm>
</record>
</structure>
</campaignEditor>
</nodes>
</dictionary>
<guidelinePage id="dashboard">
<structure>
<h1 id="pageTitle"/>
<htmlForm> <!-- html form potreba kvuli partialUpdatu -->
<rowFluid>
<metadata>
<htmlAttributes>
style="height: auto;"
</htmlAttributes>
</metadata>
<span6>
<checkboxSelect id="chartColumnFilterSelect" defaultValue="OPENED;CLICKED;BOUNCED;UNSUBSCRIBED">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".open" value="OPENED"/>
<fixedInput id=".click" value="CLICKED"/>
<fixedInput id=".bounce" value="BOUNCED"/>
<fixedInput id=".unsubscribe" value="UNSUBSCRIBED"/>
</checkboxSelect>
</span6>
<span6>
<radioSelect id="chartsCountSelect" defaultValue="3">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".one" value="1"/>
<fixedInput id=".three" value="3"/>
<fixedInput id=".five" value="5"/>
</radioSelect>
</span6>
</rowFluid>
<chart id="multipleChart"
filter="in(status, #widgetData[chartColumnFilterSelect]!#)"
order="desc(sendStart)"
hint="paging(1, #widgetData[chartsCountSelect]!#)">
<!-- TODO NEPOČÍTAT DÁVKY KTERÉ JSOU TESTOVACÍ (UŽ MÁME TABULKU) -->
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>ColumnChart</reportChartName>
<legend>whatever</legend>
<height>250</height>
<width>100%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
<rowFluid>
<metadata>
<htmlAttributes>
style="height: auto;"
</htmlAttributes>
</metadata>
<span6>
<chart id="overallClicksChart"
filter="in(status, CLICKED)"
hint="paging(1,1)">
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>PieChart</reportChartName>
<legend>whatever</legend>
<height>250</height>
<width>50%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</span6>
<span6>
<chart id="overallUnsubscribeChart"
filter="in(status, UNSUBSCRIBED)"
hint="paging(1,1)">
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>PieChart</reportChartName>
<legend>whatever</legend>
<height>250</height>
<width>50%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</span6>
</rowFluid>
</htmlForm>
</structure>
</guidelinePage>
<guidelinePage id="campaignList">
<interceptor type="updateWidgetState" on="pageRender"/>
<interceptor type="securityInterceptor"/>
<url path="/campaign-list/" />
<structure>
<h1 id="campaignListHeader"/>
<grid id="grid">
<metadata>
<dataset mode="combine">
<refreshEvent>createClientTemplate</refreshEvent>
<refreshEvent>updateClientTemplate</refreshEvent>
<refreshEvent>removeClientTemplate</refreshEvent>
</dataset>
</metadata>
<createButton id="create" resolution="pageRedirect:/edee/mail/campaignRoutingPage?superTemplate=[#params[superTemplate]#]">
<metadata>
<security>
<acl>A</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.SubmitToNewFrame</decorator>
</dataset>
</metadata>
</createButton>
<editButton id="edit" resolution="pageRedirect:/edee/mail/campaignRoutingPage?campaignId=[#widgetData[campaignId.checkbox]!#]">
<metadata>
<security>
<acl>C</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.SubmitToNewFrame</decorator>
<maxItems>1</maxItems>
<minItems>1</minItems>
</dataset>
</metadata>
</editButton>
<removeButton id="remove">
<metadata>
<security>
<acl>D</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
<minItems>1</minItems>
<confirm>true</confirm>
<loadingLabel>Odesílám...</loadingLabel>
<showCountNumber>true</showCountNumber>
<actionConfirmMessage>#message[button.remove.confirm.message]#</actionConfirmMessage>
</dataset>
</metadata>
<command eventName="remove" type="removeCampaign"
filter="in(id, #widgetData[campaignId.checkbox]#),
in(batchId, #params[batchId]!#)">
<resolution>redirectAfterAction:exceptWidgetData(campaignId.checkbox)</resolution>
</command>
</removeButton>
<button id="merge" eventName="on">
<metadata>
<enableOn>isNull(#session[merged]#)</enableOn>
<security>
<acl>W</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
</dataset>
</metadata>
<command eventName="on" type="mergeCampaigns"/>
</button>
<button id="unmerge" eventName="off">
<metadata>
<enableOn>isNotNull(#session[merged]#)</enableOn>
<security>
<acl>W</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
</dataset>
</metadata>
<command eventName="off" type="mergeCampaigns"/>
</button>
<recordListing id="campaignListing"
filter="and(
eq(idTemplate, #params[superTemplate]#),
contains(subject, #widgetData[subject.filter.1]!#),
contains(author, #widgetData[author.filter.1]!#),
moreThanEq(created, #widgetData[created.filter.from]!?date('d. M. yyyy')#),
lessThanEq(created, #widgetData[created.filter.to]!?date('d. M. yyyy')#)
)"
order="order(#params[filter.orderBy]!created#, #params[filter.orderType]!desc#)"
hint="paging(#params[pageNumber]!1#, 10)">
<metadata>
<defaultOrderBy>created</defaultOrderBy>
<defaultOrderType>desc</defaultOrderType>
</metadata>
<dataSource type="delegatingSource">
<dataSource type="campaignByTitleRecordSource" useWhen="isNotNull(#session[merged]#)"/>
<dataSource type="campaignRecordSource"/>
</dataSource>
<columnCheckbox id="campaignId">
<metadata>
<pojo>id</pojo>
<dataset>
<rowAdditionalSubmitData>
<batchId>#record[].idBatch!#</batchId>
</rowAdditionalSubmitData>
<item>
<name>#record[].subject#</name> <!-- použíto v confirm dialogu u akcí nad gridem -->
</item>
</dataset>
</metadata>
</columnCheckbox>
<column id="subject">
<metadata>
<link>/edee/mail/campaignRoutingPage?campaignId=[#record[].id#]</link>
</metadata>
<columnFilter id=".filter">
<baseTextInput />
</columnFilter>
</column>
<column id="state">
<metadata>
<status>
<InPreparation>blue</InPreparation>
<StoringToDatabase>blue</StoringToDatabase>
<PreparedToBeSent>blue</PreparedToBeSent>
<Sending>blue</Sending>
<FullySent>green</FullySent>
<FullySentWithErrors>blue</FullySentWithErrors>
<FullySentForTest>green</FullySentForTest>
<FullySentForTestWithErrors>blue</FullySentForTestWithErrors>
<Failed>red</Failed>
</status>
</metadata>
</column>
<column id="sentCount"/>
<column id="created">
<conversion type="customDate" pattern="d. M. yyyy"/>
<columnFilter id=".filter">
<baseDateInput id=".from">
<metadata>
<dataset>
<decorator>edee.ui.InputDatePicker</decorator>
<useSimpleNavigationMenu>true</useSimpleNavigationMenu>
</dataset>
</metadata>
</baseDateInput>
<baseDateInput id=".to">
<metadata>
<dataset>
<decorator>edee.ui.InputDatePicker</decorator>
</dataset>
</metadata>
</baseDateInput>
</columnFilter>
</column>
<column id="sendStart">
<conversion type="customDate" pattern="d. M. yyyy"/>
<columnFilter id=".filter">
<baseDateInput id=".from">
<metadata>
<dataset>
<decorator>edee.ui.InputDatePicker</decorator>
<useSimpleNavigationMenu>true</useSimpleNavigationMenu>
</dataset>
</metadata>
</baseDateInput>
<baseDateInput id=".to">
<metadata>
<dataset>
<decorator>edee.ui.InputDatePicker</decorator>
</dataset>
</metadata>
</baseDateInput>
</columnFilter>
</column>
<column id="author">
<columnFilter id=".filter">
<baseTextInput />
</columnFilter>
</column>
<pagination />
</recordListing>
</grid>
</structure>
</guidelinePage>
<guidelinePage id="campaignRoutingPage">
<interceptor on="pageLoad" class="com.fg.mail.web.ramjet.campaign.CampaignRoutingInterceptor"/>
<structure>
<record id="record" filter="eq(id,#params[campaignId]!?int#),eq(idBatch,#params[batchId]!?int#)">
<dataSource type="campaignRecordSource"/>
</record>
</structure>
</guidelinePage>
<guidelineFormPage id="sentCampaignPage">
<interceptor type="securityInterceptor" condition="not(eq(#params[eventName]#, 'autocomplete'))"/>
<interceptor type="updateWidgetState" on="pageRender" condition="not(eq(#params[eventName]#, 'autocomplete'))"/>
<interceptor type="populateWidgetsFromRecord" on="pageFirstEnter"/>
<structure>
<record id="record" filter="eq(id,#params[campaignId]!?int#)">
<dataSource type="clientTemplateRecordSource"/>
<h1 id="campaignEditorPageTitle"/>
<messages showGenericErrorMessage="true"/>
<htmlForm id="pageForm">
<btnToolbar>
<createButton id="duplicateCampaign">
<metadata>
<security>
<acl>C</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
</dataset>
</metadata>
<command type="duplicateCampaign"/>
</createButton>
<previewButton id="history">
<metadata>
<security>
<acl>W</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.SubmitToNewFrame</decorator>
</dataset>
<enableOn>isNotNull(#widget[record].record.id#)</enableOn>
</metadata>
</previewButton>
</btnToolbar>
<hiddenInput id="campaignId" defaultValue="#params[campaignId]!#">
<metadata>
<pojo>id</pojo>
</metadata>
</hiddenInput>
<fieldset id="stats">
<radioSelect id="chartTypeSelect" defaultValue="1">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".general" value="1"/>
<fixedInput id=".addressCount" value="2"/>
<fixedInput id=".openingClickingCount" value="3"/>
<fixedInput id=".openingClickingRate" value="4"/>
</radioSelect>
<fieldset id="generalChartSet">
<metadata>
<enableOn>eq(1, #widgetData[chartTypeSelect]!#)</enableOn>
</metadata>
<checkboxSelect id="generalChartColumnFilterSelect" defaultValue="OPENED,CLICKED,BOUNCED,UNSUBSCRIBED">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".open" value="OPENED"/>
<fixedInput id=".click" value="CLICKED"/>
<fixedInput id=".bounce" value="BOUNCED"/>
<fixedInput id=".unsubscribe" value="UNSUBSCRIBED"/>
</checkboxSelect>
<chart id="generalChart"
filter="and(eq(batch.id, #params[batchId]#),
in(status, #widgetData[generalChartColumnFilterSelect]!#))">
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>ColumnChart</reportChartName>
<legend>Počet adres, na které byl newsletter rozeslán</legend>
<height>250</height>
<width>100%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</fieldset>
<fieldset id="addressCountChartSet">
<metadata>
<enableOn>eq(2, #widgetData[chartTypeSelect]!#)</enableOn>
</metadata>
<radioSelect id="addressCountChartsSelect">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".week" value="1"/>
<fixedInput id=".month" value="2"/>
<fixedInput id=".quarter" value="3"/>
</radioSelect>
<chart id="addressCountChart"
order="desc(sendStart)"
filter="eq(batch.id, 1111)"
hint="paging(1, #widgetData[addressCountChartsSelect]!#)">
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>AreaChart</reportChartName>
<legend>Počet adres v databázi</legend>
<height>250</height>
<width>100%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</fieldset>
<fieldset id="openingClickingCountChartSet">
<metadata>
<enableOn>eq(3, #widgetData[chartTypeSelect]!#)</enableOn>
</metadata>
<rowFluid>
<metadata>
<htmlAttributes>
style="height: auto;"
</htmlAttributes>
</metadata>
<span6>
<checkboxSelect id="openingClickingCountChartColumnFilterSelect">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".open" value="OPENED"/>
<fixedInput id=".click" value="CLICKED"/>
</checkboxSelect>
</span6>
<span6>
<radioSelect id="openingClickingCountChartsCountSelect">
<metadata>
<partialUpdate>click</partialUpdate>
<htmlClass> inline</htmlClass>
</metadata>
<fixedInput id=".hours" value="1"/>
<fixedInput id=".days" value="3"/>
</radioSelect>
</span6>
</rowFluid>
<chart id="openingClickingCountChart"
order="desc(sendStart)"
filter="and(eq(batch.id, ....), in(status, #widgetData[openingClickingCountChartColumnFilterSelect]!#))"
hint="paging(1, #widgetData[openingClickingCountChartsCountSelect]!#)">
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>ColumnChart</reportChartName>
<legend>Otevírání emailu a klikání na odkaz</legend>
<height>250</height>
<width>100%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</fieldset>
<fieldset id="openingClickingRateChartSet">
<metadata>
<enableOn>eq(4, #widgetData[chartTypeSelect]!#)</enableOn>
</metadata>
<rowFluid>
<metadata>
<htmlAttributes>
style="height: auto;"
</htmlAttributes>
</metadata>
<span4>
<chart id="openComparisonToAllChart"
filter="in(status, OPENED)"
hint="paging(1,1)">
<!-- TODO otevrene vuci vsem -->
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>PieChart</reportChartName>
<legend>Otevřené vůči všem</legend>
<height>250</height>
<width>33%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</span4>
<span4>
<chart id="clickComparisonToAllChart"
filter="in(status, CLICKED)"
hint="paging(1,1)">
<!-- TODO kliknute vuci vsem -->
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>PieChart</reportChartName>
<legend>Kliknuté vůči všem</legend>
<height>250</height>
<width>33%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</span4>
<span4>
<chart id="clickComparisonToOpenChart"
filter="in(status, CLICKED)"
hint="paging(1,1)">
<!-- TODO kliknute vuci otevrenym -->
<dataSource type="recipientStats" />
<metadata>
<dataset>
<decorator>edee.module.analytics.Report</decorator>
<reportChartName>PieChart</reportChartName>
<legend>Kliknuté vůči otevřeným</legend>
<height>250</height>
<width>33%</width>
<vAxis>
<format>#%</format>
</vAxis>
</dataset>
</metadata>
</chart>
</span4>
</rowFluid>
</fieldset>
</fieldset>
<fieldset id="emailDetails">
<display id="subject"/>
<tagsSelect id="recipients"> <!-- TODO - JRU to musi udelat readOnly, protoze display css class nepomaha -->
<dataSource type="recipientAutocompletionDataProvider" viewName="clientTemplate"/>
<metadata>
<htmlClass>display</htmlClass>
</metadata>
</tagsSelect>
<controlGroup id="previewContainer">
<metadata>
<htmlClass>display</htmlClass>
</metadata>
<emailPreview id="emailPreview"
filter="eq(includeImages, #params[includeImages]!true?boolean#),
eq(subtype, #params[subtype]!HTML#)">
<dataSource type="emailPreviewRecordSource"/>
<iframe id="preview" width="99%" height="550px" frameborder="true" marginWidth="5" marginHeight="5">
<metadata>
<htmlAttributes>style="background-color: white"</htmlAttributes>
</metadata>
<emailContent id=".content"/>
</iframe>
</emailPreview>
</controlGroup>
<tagsSelect id="attachments">
<dataSource type="fileAutocompletionDataProvider" model="EDEE" viewName="file" metadataTitle="name"
filter="eq(directory, '0')" order="asc(name)" hint="bundle(allInView)"
storageId="f.file" />
<metadata>
<htmlClass>display</htmlClass> <!-- TODO - JRU to musi udelat readOnly, protoze display css class nepomaha -->
<dataset mode="combine">
<decorator>edee.ui.SelectFiles</decorator>
<storage>f.file</storage>
<path>/</path>
<editUrl type="pageUrl">/edee/metadata/metadataEditor</editUrl>
<editIdParameter>fileId</editIdParameter>
<messages>
<choose>#@message[showAllAvailableFiles]#</choose>
<edit>#@message[fileProperties]#</edit>
</messages>
</dataset>
</metadata>
</tagsSelect>
</fieldset>
<record id="sendResult" filter="eq(idBatch, #params[batchId]?int#)">
<dataSource type="messageResultDataProvider"/>
<fieldset id="systemDetails">
<display id="sentBy">
<metadata><pojo>result.sentBy</pojo></metadata>
</display>
<display id="sendStart">
<metadata><pojo>result.dateCreated</pojo></metadata>
<conversion type="dateTime"/>
</display>
<display id="sendFinish">
<metadata><pojo>result.dateFinished</pojo></metadata>
<conversion type="dateTime"/>
</display>
<display id="nextTryAt">
<metadata>
<pojo>result.nextTryAt</pojo>
<enableOn>isNotNull(#record[].result.nextTryAt#)</enableOn>
</metadata>
<conversion type="dateTime"/>
</display>
<display id="sentCount">
<metadata><pojo>result.sentCount</pojo></metadata>
</display>
<display id="errorCount">
<metadata><pojo>result.errorCount</pojo></metadata>
</display>
<display id="channel">
<metadata><pojo>channel.title</pojo></metadata>
</display>
</fieldset>
</record>
</htmlForm>
</record>
</structure>
</guidelineFormPage>
<guidelineFormPage id="campaignPreview">
<command eventName="downloadAttachment" type="downloadAttachment"/>
<structure>
<h1 id="pageTitle"/>
<emailPreview id="emailPreview"
filter="eq(id, #params[campaignId]#),
eq(includeImages, #params[includeImages]!true?boolean#),
eq(subtype, #params[subtype]!HTML#)"
order="fullAttachments: asc(sortOrder)"
hint="bundle(allDefault,fullAttachments)"
template="emailPreview.ftl">
<dataSource type="emailPreviewRecordSource"/>
<iframe id="preview" width="100%" height="550px" frameborder="true" marginWidth="5" marginHeight="5">
<emailContent/>
</iframe>
</emailPreview>
</structure>
</guidelineFormPage>
<guidelinePage id="addressListEditor">
<interceptor type="securityInterceptor"/>
<interceptor type="populateWidgetsFromRecord" on="pageRender" condition="eq(#params[eventName]#, 'store')"/>
<interceptor type="populateWidgetsFromRecord" condition="not(eq(#params[eventName]#, 'store'))"/>
<structure>
<record id="record" filter="eq(id,#params[addressListId]!?int#)">
<dataSource type="addressListSource" addressListId="#params[addressListId]!#"/>
<h1 id="pageTitle"/>
<messages showGenericErrorMessage="true"/>
<htmlForm id="addressListForm">
<btnToolbar>
<saveButton id="store">
<metadata>
<security>
<acl>C</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
</dataset>
</metadata>
<command type="storeAddressList" addressListId="#params[addressListId]!#" addressListNameWidget="addressListName"/>
</saveButton>
</btnToolbar>
<hiddenInput id="addressListId" defaultValue="#params[addressListId]!#"/>
<textInput id="addressListName">
<metadata>
<htmlClass>input-large input-no-border</htmlClass>
<pojo>name</pojo>
</metadata>
<validators>
<required/>
</validators>
</textInput>
</htmlForm>
</record>
</structure>
</guidelinePage>
<guidelinePage id="recipientEditor">
<interceptor type="securityInterceptor"/>
<interceptor type="populateWidgetsFromRecord" on="pageRender" condition="eq(#params[eventName]#, 'store')"/>
<interceptor type="populateWidgetsFromRecord" condition="not(eq(#params[eventName]#, 'store'))"/>
<structure>
<record id="record" filter="eq(id,#params[recipientId]!?int#)">
<dataSource type="recipientSource"/>
<h1 id="pageTitle"/>
<messages showGenericErrorMessage="true"/>
<htmlForm id="recipientForm">
<btnToolbar>
<saveButton id="store">
<metadata>
<security>
<acl>C</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
</dataset>
</metadata>
<command type="storeRecipient">
<viewName>recipient</viewName>
<requires>validatedData</requires>
<invalidatingForm>true</invalidatingForm>
<idAddressListExpression>widgetData[addressListId]</idAddressListExpression>
</command>
</saveButton>
</btnToolbar>
<hiddenInput id="recipientId" defaultValue="#params[recipientId]!#" >
<metadata>
<adam>id</adam>
</metadata>
</hiddenInput>
<hiddenInput id="addressListId" defaultValue="#params[addressListId]!#"/>
<textInput id="address">
<metadata>
<htmlClass>input-large input-no-border</htmlClass>
</metadata>
<validators>
<required/>
<emailFormat/>
</validators>
</textInput>
</htmlForm>
</record>
</structure>
</guidelinePage>
<guidelinePage id="externalRecipientList">
<url path="/external-recipient-list/" />
<structure>
<h1 id="recipientListHeader"/>
<grid id="grid">
<hiddenInput id="addressListId" defaultValue="#params[addressListId]!#"/>
<recordListing id="recipientListing" hint="paging(#params[pageNumber]!1#, 10)">
<dataSource type="externalRecipientListingSource" addressListId="#params[addressListId]#"/>
<column id="address"/>
<column id="name"/>
<pagination />
</recordListing>
</grid>
</structure>
</guidelinePage>
<guidelineFormPage id="internalRecipientList">
<interceptor type="securityInterceptor"/>
<interceptor on="pageProcessStart" class="com.fg.form.core.lifecycle.interceptor.impl.DataProviderRegistrarInterceptor">
<dataProvider class="com.fg.mail.web.ramjet.addressList.AddressListManagerDataProvider"/>
</interceptor>
<url path="/internal-recipient-list/" />
<structure>
<h1 id="recipientListHeader"/>
<grid id="grid">
<metadata>
<dataset mode="combine">
<refreshEvent>createRecipient</refreshEvent>
<refreshEvent>updateRecipient</refreshEvent>
<refreshEvent>removeRecipient</refreshEvent>
</dataset>
</metadata>
<createButton id="create" resolution="pageRedirect:/edee/mail/recipientEditor?addressListId=[#params[addressListId]!#]">
<metadata>
<security>
<acl>A</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.SubmitToNewFrame</decorator>
</dataset>
</metadata>
</createButton>
<editButton id="edit" resolution="pageRedirect:/edee/mail/recipientEditor?recipientId=[#widgetData[recipientId.checkbox]!#]&amp;addressListId=[#params[addressListId]#]">
<metadata>
<security>
<acl>C</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.SubmitToNewFrame</decorator>
<maxItems>1</maxItems>
<minItems>1</minItems>
</dataset>
</metadata>
</editButton>
<removeButton id="remove">
<metadata>
<security>
<acl>D</acl>
<module>mail</module>
</security>
<dataset>
<decorator>edee.ui.form.action.Submit</decorator>
<minItems>1</minItems>
<confirm>true</confirm>
<loadingLabel>Odesílám...</loadingLabel>
<showCountNumber>true</showCountNumber>
<actionConfirmMessage>#message[button.remove.confirm.message]#</actionConfirmMessage>
</dataset>
</metadata>
<command type="removeRecipient" recipientId="#widgetData[recipientId.checkbox]#" addressListId="#params[addressListId]#">
<resolution>redirectAfterAction:exceptWidgetData(recipientId.checkbox)</resolution>
</command>
</removeButton>
<recordListing id="recipientListing" filter="and(eq(state, 1), recipientLists: hasAny(eq(recipientList.id, #params[addressListId]#)))" hint="bundle(allInView);paging(#params[pageNumber]!1#, 10)">
<dataSource type="recipientListingSource" viewName="recipient"/>
<columnCheckbox id="recipientId">
<metadata>
<pojo>id</pojo>
<dataset>
<item>
<name>#record[].address#</name> <!-- použíto v confirm dialogu u akcí nad gridem -->
</item>
</dataset>
</metadata>
</columnCheckbox>
<column id="address"/>
<column id="unsubscribed">
<conversion type="datetime"/>
</column>
<column id="created">
<conversion type="datetime"/>
</column>
<column id="modified">
<conversion type="datetime"/>
</column>
<pagination />
</recordListing>
</grid>
</structure>
</guidelineFormPage>
<parametrizedPage id="service">
<command eventName="removeAddressList" class="com.fg.mail.web.ramjet.addressList.command.RemoveAddressList" addressListId="#params[addressListId]#"/>
</parametrizedPage>
</staticPage>
</gui>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment