-
-
-

-
-
-
-
-
- <%=CurrentData.Name %>
-
+
+
-
-
-
+
+ <%=CurrentData.Name %>
+
diff --git a/src/Views/Blocks/EMailTemplatePreview.aspx.cs b/src/Views/Blocks/EMailTemplatePreview.aspx.cs
index cabb3ab..e979eef 100644
--- a/src/Views/Blocks/EMailTemplatePreview.aspx.cs
+++ b/src/Views/Blocks/EMailTemplatePreview.aspx.cs
@@ -20,6 +20,8 @@ public partial class EMailTemplatePreview : PreviewPage, IRenderTemplate contents)
{
- // Define a content area
var contentArea = new ContentArea();
- // Add the blocks to preview
foreach (var content in contents)
{
contentArea.Items.Add(new ContentAreaItem { ContentLink = content.ContentLink });
}
- // Create a temporary property for the content area
var previewProperty = new PropertyContentArea { Value = contentArea, Name = "PreviewPropertyData", IsLanguageSpecific = true };
-
- // Render the temporary property using the Property control in the web form
propertyControl.InnerProperty = previewProperty;
}
diff --git a/src/Views/Blocks/ParticipantBlockPreviewControl.ascx b/src/Views/Blocks/ParticipantBlockPreviewControl.ascx
index 80f1e9a..c519aab 100644
--- a/src/Views/Blocks/ParticipantBlockPreviewControl.ascx
+++ b/src/Views/Blocks/ParticipantBlockPreviewControl.ascx
@@ -2,48 +2,47 @@
<%@ Register Namespace="EPiServer.Web.WebControls" TagPrefix="EPiServer" %>
<%@ Register Namespace="EPiServer.XForms.WebControls" TagPrefix="XForms" %>
-
-
-
-
-
-
-
-
+ // go to the latest tab, if it exists:
+ var lastTab = localStorage.getItem('lastTab');
+ if (lastTab) {
+ $('[href="' + lastTab + '"]').tab('show');
+ }
+ });
+
+
+
+
+
+
+
+
@@ -60,50 +59,55 @@
-
+
-
+
|
- |
+
+
-
+
|
- |
+
+
-
+
|
- <%=CurrentData.AttendStatus %> |
+ <%=CurrentData.AttendStatus %>
-
+
|
- |
+
+
-
+
|
- |
+
+
-
+
|
- |
+
+
@@ -116,14 +120,15 @@
@@ -131,10 +136,12 @@
@@ -142,12 +149,12 @@
diff --git a/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.cs b/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.cs
index 401fc55..f849112 100644
--- a/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.cs
+++ b/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.cs
@@ -36,9 +36,16 @@ protected void Page_Init(object sender, EventArgs e)
protected void UpdateParticipant_Click(object sender, EventArgs e)
{
- ParticipantBlock current = (CurrentBlock.CreateWritableClone() as ParticipantBlock);
- current.XForm = DetailsXFormControl.Data.Data.OuterXml;
- Locate.ContentRepository().Save(current as IContent, EPiServer.DataAccess.SaveAction.Publish);
+ try
+ {
+ ParticipantBlock current = (CurrentBlock.CreateWritableClone() as ParticipantBlock);
+ current.XForm = DetailsXFormControl.Data.Data.OuterXml;
+ Locate.ContentRepository().Save(current as IContent, EPiServer.DataAccess.SaveAction.Publish);
+ StatusLiteral.Text = "OK";
+ }
+ catch (Exception ex) {
+ StatusLiteral.Text = ex.Message;
+ }
}
protected void UpdateSessions_Click(object sender, EventArgs e)
diff --git a/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.designer.cs b/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.designer.cs
index cc78177..8f6a68b 100644
--- a/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.designer.cs
+++ b/src/Views/Blocks/ParticipantBlockPreviewControl.ascx.designer.cs
@@ -66,6 +66,15 @@ public partial class ParticipantBlockPreviewControl {
///
protected global::EPiServer.XForms.WebControls.XFormControl DetailsXFormControl;
+ ///
+ /// StatusLiteral control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal StatusLiteral;
+
///
/// SessionList control.
///
diff --git a/src/Views/Blocks/ScheduledEmailBlockPreview.aspx b/src/Views/Blocks/ScheduledEmailBlockPreview.aspx
index 2fea2ee..d9449d1 100644
--- a/src/Views/Blocks/ScheduledEmailBlockPreview.aspx
+++ b/src/Views/Blocks/ScheduledEmailBlockPreview.aspx
@@ -40,7 +40,9 @@
-
+
+
+
diff --git a/src/Views/Blocks/ScheduledEmailBlockPreview.aspx.cs b/src/Views/Blocks/ScheduledEmailBlockPreview.aspx.cs
index 455edf8..438ce96 100644
--- a/src/Views/Blocks/ScheduledEmailBlockPreview.aspx.cs
+++ b/src/Views/Blocks/ScheduledEmailBlockPreview.aspx.cs
@@ -17,6 +17,7 @@
using EPiServer.Web;
using EPiServer.Web.Mvc;
using EPiServer.Web.WebControls;
+using BVNetwork.Attend.Business.API;
namespace BVNetwork.Attend.Views.Blocks
{
@@ -29,6 +30,8 @@ public partial class ScheduledEmailBlockPreview : PreviewPage, IRenderTemplate((CurrentData as ScheduledEmailBlock).EmailTemplateContentReference)
- });
+ }, "MailPreview");
+ }
else
ConfirmMailTemplateBlockPreviewPlaceHolder.Visible = false;
@@ -93,10 +100,13 @@ protected string EventUrl
}
- private void SetupPreviewPropertyControl(Property propertyControl, IEnumerable contents)
+ private void SetupPreviewPropertyControl(Property propertyControl, IEnumerable contents, string tag)
{
var contentArea = new ContentArea();
+ if(!string.IsNullOrEmpty(tag))
+ contentArea.Tag = tag;
+
foreach (var content in contents)
{
contentArea.Items.Add(new ContentAreaItem { ContentLink = content.ContentLink });
@@ -125,7 +135,7 @@ private void ConvertEmailTemplateToLocal(string sharedBlock, string localBlock)
localBlockData.Subject = sharedBlockData.Subject;
localBlockData.To = sharedBlockData.To;
currentScheduledEmailBlock.EmailTemplateContentReference = null;
- Locate.ContentRepository().Save(currentScheduledEmailBlock as IContent, SaveAction.Save | SaveAction.ForceCurrentVersion);
+ Locate.ContentRepository().Save(currentScheduledEmailBlock as IContent, AttendScheduledEmailEngine.GetForcedSaveActionFor(currentScheduledEmailBlock as IVersionable));
ClientScript.RegisterStartupScript(this.GetType(), "scriptid", "window.parent.location.href='" + EPiServer.Editor.PageEditing.GetEditUrl((CurrentData as IContent).ContentLink) + "'", true);
}
@@ -145,7 +155,7 @@ protected void previewRepeater_ItemDataBound(object sender, System.Web.UI.WebCon
if (previewArea.Supported)
{
- SetupPreviewPropertyControl(propertyControl, new[] { CurrentData });
+ SetupPreviewPropertyControl(propertyControl, new[] { CurrentData }, string.Empty);
}
}
diff --git a/src/Views/Blocks/SessionBlockPreview.aspx b/src/Views/Blocks/SessionBlockPreview.aspx
index b5e93f2..baacbe3 100644
--- a/src/Views/Blocks/SessionBlockPreview.aspx
+++ b/src/Views/Blocks/SessionBlockPreview.aspx
@@ -1,6 +1,7 @@
<%@ Page Language="C#" Inherits="BVNetwork.Attend.Views.Blocks.SessionBlockPreview" MasterPageFile="~/modules/BVNetwork.Attend/Views/MasterPages/Attend.Master" %>
+
diff --git a/src/Views/Blocks/SessionBlockPreview.aspx.cs b/src/Views/Blocks/SessionBlockPreview.aspx.cs
index 4f43e56..7b3d381 100644
--- a/src/Views/Blocks/SessionBlockPreview.aspx.cs
+++ b/src/Views/Blocks/SessionBlockPreview.aspx.cs
@@ -27,6 +27,8 @@ public partial class SessionBlockPreview : PreviewPage, IRenderTemplate
-
diff --git a/src/Views/Blocks/SessionBlockPreviewControl.ascx.cs b/src/Views/Blocks/SessionBlockPreviewControl.ascx.cs
index 83451f7..8f00fca 100644
--- a/src/Views/Blocks/SessionBlockPreviewControl.ascx.cs
+++ b/src/Views/Blocks/SessionBlockPreviewControl.ascx.cs
@@ -57,7 +57,18 @@ private void SetupPreviewPropertyControl(Property propertyControl, IEnumerable
(CurrentBlock.EventPage) as IContent).ContentLink); } }
+ protected string EventUrl
+ {
+ get
+ {
+ if ((CurrentData as SessionBlock).EventPage != null)
+ return
+ EPiServer.Editor.PageEditing.GetEditUrl(
+ (Locate.ContentRepository().Get((CurrentData as SessionBlock).EventPage)
+ as IContent).ContentLink);
+ return string.Empty;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx b/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx
index 1c8409c..f7823ad 100644
--- a/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx
+++ b/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx
@@ -42,6 +42,7 @@
+
diff --git a/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.cs b/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.cs
index 756af89..bd96da0 100644
--- a/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.cs
+++ b/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.cs
@@ -19,6 +19,8 @@ public partial class EmailTemplateBlockControl : BlockControlBase(p => p.SendAsSms);
DataBind();
diff --git a/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.designer.cs b/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.designer.cs
index 1954ed4..6663ea4 100644
--- a/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.designer.cs
+++ b/src/Views/Blocks/Static/EmailTemplateBlockControl.ascx.designer.cs
@@ -20,5 +20,14 @@ public partial class EmailTemplateBlockControl {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.HtmlControls.HtmlGenericControl SendAsSMSProperty;
+
+ ///
+ /// MainBodyControl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::EPiServer.Web.WebControls.Property MainBodyControl;
}
}
diff --git a/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx b/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx
new file mode 100644
index 0000000..e45fc12
--- /dev/null
+++ b/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx
@@ -0,0 +1,47 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmailTemplateBlockPreviewControl.ascx.cs" Inherits="BVNetwork.Attend.Views.Blocks.Static.EmailTemplateBlockPreviewControl" %>
+
+
+ <%=CurrentBlock.SendAsSms ? " " : " " %>
+
+ <%=CurrentBlock.SendAsSms ? "SMS" : "Mail" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx.cs b/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx.cs
new file mode 100644
index 0000000..9e6337d
--- /dev/null
+++ b/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.HtmlControls;
+using EPiServer;
+using EPiServer.Core;
+using EPiServer.Web;
+using EPiServer.Web.WebControls;
+using BVNetwork.Attend.Models.Blocks;
+using EPiServer.Framework.DataAnnotations;
+
+namespace BVNetwork.Attend.Views.Blocks.Static
+{
+
+ [TemplateDescriptor(AvailableWithoutTag = true, TagString = "MailPreview", Default = true, Path = "~/Modules/BVNetwork.Attend/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx")]
+ public partial class EmailTemplateBlockPreviewControl : BlockControlBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+
+ {
+ BVNetwork.Attend.Business.Localization.FixEditModeCulture.TryToFix();
+
+ (this.Page as PageBase).EditHints.Add("SendAsSms");
+ SendAsSMSProperty.ApplyEditAttributes(p => p.SendAsSms);
+ DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx.designer.cs b/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx.designer.cs
new file mode 100644
index 0000000..f43d065
--- /dev/null
+++ b/src/Views/Blocks/Static/EmailTemplateBlockPreviewControl.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace BVNetwork.Attend.Views.Blocks.Static {
+
+
+ public partial class EmailTemplateBlockPreviewControl {
+
+ ///
+ /// SendAsSMSProperty control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl SendAsSMSProperty;
+ }
+}
diff --git a/src/Views/Pages/EventPagePreview.aspx.cs b/src/Views/Pages/EventPagePreview.aspx.cs
index c996f17..d99cc5d 100644
--- a/src/Views/Pages/EventPagePreview.aspx.cs
+++ b/src/Views/Pages/EventPagePreview.aspx.cs
@@ -41,6 +41,7 @@ protected void Page_Init(object sender, EventArgs e)
{
Sessions = AttendSessionEngine.GetSessions(CurrentPage.ContentLink).ToList();
+ BVNetwork.Attend.Business.Localization.FixEditModeCulture.TryToFix();
//ParticipantsContentArea.DataBind();
//SessionsContentArea.DataBind();
@@ -171,15 +172,11 @@ private void ConvertEmailTemplateToLocal(string sharedBlock, string localBlock)
localBlockData.Subject = sharedBlockData.Subject;
localBlockData.To = sharedBlockData.To;
currentEventPageBase[sharedBlock] = null;
- Locate.ContentRepository().Save(currentEventPageBase, SaveAction.Save | SaveAction.ForceCurrentVersion);
+ Locate.ContentRepository().Save(currentEventPageBase, AttendScheduledEmailEngine.GetForcedSaveActionFor(currentEventPageBase));
ClientScript.RegisterStartupScript(this.GetType(), "scriptid", "window.parent.location.href='" + EPiServer.Editor.PageEditing.GetEditUrl((CurrentData as IContent).ContentLink) + "'", true);
}
-
-
-
-
public bool SendStatusMail(ParticipantBlock participant, EmailTemplateBlock et)
{
EmailSender email;