diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index ca5ca43..cdcbd1f 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -16,5 +16,5 @@ using System.Reflection; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.1.429")] -[assembly: AssemblyFileVersion("3.0.1.429")] +[assembly: AssemblyVersion("3.0.1.430")] +[assembly: AssemblyFileVersion("3.0.1.430")] diff --git a/WebApplication/AdminHome.aspx b/WebApplication/AdminHome.aspx index 39073e4..9c3c375 100644 --- a/WebApplication/AdminHome.aspx +++ b/WebApplication/AdminHome.aspx @@ -33,6 +33,28 @@

+ +
+

+ +

+ +
+
+
+ +

+ + + + + +
+



diff --git a/WebApplication/AdminHome.aspx.cs b/WebApplication/AdminHome.aspx.cs index 9a824d0..92843d2 100644 --- a/WebApplication/AdminHome.aspx.cs +++ b/WebApplication/AdminHome.aspx.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Net; using System.Text; using System.Web; @@ -26,6 +27,15 @@ namespace ScrewTurn.Wiki { rptIndex.DataBind(); DisplayOrphansCount(); + + string anon = Settings.AnonymousGroup; + foreach(UserGroup group in Users.GetUserGroups()) { + if(group.Name != anon) { + ListItem item = new ListItem(group.Name, group.Name); + item.Selected = true; + lstGroups.Items.Add(item); + } + } } } @@ -40,6 +50,43 @@ namespace ScrewTurn.Wiki { lblOrphanPagesCount.Text = orphans.ToString(); } + protected void cvGroups_ServerValidate(object sender, ServerValidateEventArgs e) { + e.IsValid = false; + foreach(ListItem item in lstGroups.Items) { + if(item.Selected) { + e.IsValid = true; + break; + } + } + } + + protected void btnSendBulkEmail_Click(object sender, EventArgs e) { + lblEmailResult.CssClass = ""; + lblEmailResult.Text = ""; + + Page.Validate("email"); + if(!Page.IsValid) return; + + List emails = new List(); + foreach(ListItem item in lstGroups.Items) { + if(item.Selected) { + UserGroup group = Users.FindUserGroup(item.Value); + if(group != null) { + foreach(string user in group.Users) { + UserInfo u = Users.FindUser(user); + if(u != null) emails.Add(u.Email); + } + } + } + } + + EmailTools.AsyncSendMassEmail(emails.ToArray(), Settings.SenderEmail, + txtSubject.Text, txtBody.Text, false); + + lblEmailResult.CssClass = "resultok"; + lblEmailResult.Text = Properties.Messages.MassEmailSent; + } + protected void btnClearCache_Click(object sender, EventArgs e) { Redirections.Clear(); Content.ClearPseudoCache(); diff --git a/WebApplication/AdminHome.aspx.designer.cs b/WebApplication/AdminHome.aspx.designer.cs index f6334a4..1be7ac9 100644 --- a/WebApplication/AdminHome.aspx.designer.cs +++ b/WebApplication/AdminHome.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4016 +// Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -22,6 +22,105 @@ namespace ScrewTurn.Wiki { /// protected global::System.Web.UI.WebControls.Literal lblAdminHome; + ///

+ /// lblBulkEmail control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal lblBulkEmail; + + /// + /// lblBulkEmailInfo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal lblBulkEmailInfo; + + /// + /// lstGroups control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBoxList lstGroups; + + /// + /// lblSubject control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal lblSubject; + + /// + /// txtSubject control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtSubject; + + /// + /// txtBody control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtBody; + + /// + /// btnSendBulkEmail control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSendBulkEmail; + + /// + /// rfvSubject control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvSubject; + + /// + /// rfvBody control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvBody; + + /// + /// cvGroups control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CustomValidator cvGroups; + + /// + /// lblEmailResult control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblEmailResult; + /// /// lblSystemStatusContent control. /// diff --git a/WebApplication/App_LocalResources/AdminHome.aspx.cs-CZ.resx b/WebApplication/App_LocalResources/AdminHome.aspx.cs-CZ.resx index 33c9ae1..f032d49 100644 --- a/WebApplication/App_LocalResources/AdminHome.aspx.cs-CZ.resx +++ b/WebApplication/App_LocalResources/AdminHome.aspx.cs-CZ.resx @@ -117,6 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Send Bulk Email + + + + + + You must select at least one group + + + You can send an email message to all users of one or more groups. + + + Mass Email + + + Subject + + + Body is required + + + Subject is required + diff --git a/WebApplication/App_LocalResources/AdminHome.aspx.da-DK.resx b/WebApplication/App_LocalResources/AdminHome.aspx.da-DK.resx index 01d3c13..5c2459f 100644 --- a/WebApplication/App_LocalResources/AdminHome.aspx.da-DK.resx +++ b/WebApplication/App_LocalResources/AdminHome.aspx.da-DK.resx @@ -117,6 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Send Bulk Email + + + + + + You must select at least one group + + + You can send an email message to all users of one or more groups. + + + Mass Email + + + Subject + + + Body is required + + + Subject is required + Shutdown Application diff --git a/WebApplication/App_LocalResources/AdminHome.aspx.de-DE.resx b/WebApplication/App_LocalResources/AdminHome.aspx.de-DE.resx index 01d3c13..5c2459f 100644 --- a/WebApplication/App_LocalResources/AdminHome.aspx.de-DE.resx +++ b/WebApplication/App_LocalResources/AdminHome.aspx.de-DE.resx @@ -117,6 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Send Bulk Email + + + + + + You must select at least one group + + + You can send an email message to all users of one or more groups. + + + Mass Email + + + Subject + + + Body is required + + + Subject is required + Shutdown Application diff --git a/WebApplication/App_LocalResources/AdminHome.aspx.es-ES.resx b/WebApplication/App_LocalResources/AdminHome.aspx.es-ES.resx index 1629d9b..d8a618d 100644 --- a/WebApplication/App_LocalResources/AdminHome.aspx.es-ES.resx +++ b/WebApplication/App_LocalResources/AdminHome.aspx.es-ES.resx @@ -117,6 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Send Bulk Email + + + + + + You must select at least one group + + + You can send an email message to all users of one or more groups. + + + Mass Email + + + Subject + + + Body is required + + + Subject is required + Parar aplicación diff --git a/WebApplication/App_LocalResources/AdminHome.aspx.fr-FR.resx b/WebApplication/App_LocalResources/AdminHome.aspx.fr-FR.resx index 01d3c13..5c2459f 100644 --- a/WebApplication/App_LocalResources/AdminHome.aspx.fr-FR.resx +++ b/WebApplication/App_LocalResources/AdminHome.aspx.fr-FR.resx @@ -117,6 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Send Bulk Email + + + + + + You must select at least one group + + + You can send an email message to all users of one or more groups. + + + Mass Email + + + Subject + + + Body is required + + + Subject is required + Shutdown Application diff --git a/WebApplication/App_LocalResources/AdminHome.aspx.hu-HU.resx b/WebApplication/App_LocalResources/AdminHome.aspx.hu-HU.resx index 6ba2909..8e44d04 100644 --- a/WebApplication/App_LocalResources/AdminHome.aspx.hu-HU.resx +++ b/WebApplication/App_LocalResources/AdminHome.aspx.hu-HU.resx @@ -1,4 +1,4 @@ - +