Workitem 46
Add variables into web site parking page template
This commit is contained in:
parent
69ec933e40
commit
e0829fed82
7 changed files with 31 additions and 3 deletions
|
@ -22006,6 +22006,8 @@ INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [Property
|
|||
GO
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'DefaultDocuments', N'Default.htm,Default.asp,index.htm,Default.aspx')
|
||||
GO
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False')
|
||||
GO
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableAnonymousAccess', N'True')
|
||||
GO
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableBasicAuthentication', N'False')
|
||||
|
|
|
@ -9,5 +9,6 @@ SET @build_date = '${release.date}T00:00:00' -- ISO 8601 Format (YYYY-MM-DDTHH:M
|
|||
IF NOT EXISTS (SELECT * FROM [dbo].[Versions] WHERE [DatabaseVersion] = @build_version)
|
||||
BEGIN
|
||||
INSERT [dbo].[Versions] ([DatabaseVersion], [BuildDate]) VALUES (@build_version, @build_date)
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False')
|
||||
END
|
||||
GO
|
||||
GO
|
|
@ -404,6 +404,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (!String.IsNullOrEmpty(pageName)
|
||||
&& pageContent != null)
|
||||
{
|
||||
|
||||
if (Utils.ParseBool(webPolicy["EnableParkingPageTokens"], false))
|
||||
{
|
||||
pageContent = pageContent.Replace("[DOMAIN_NAME]", site.Name);
|
||||
pageContent = pageContent.Replace("[SITE_IP]", site.SiteIPAddress);
|
||||
|
||||
}
|
||||
string path = Path.Combine(
|
||||
FilesController.GetVirtualPackagePath(packageId, site.ContentPath), pageName);
|
||||
|
||||
|
|
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="chkAddParkingPage.Text" xml:space="preserve">
|
||||
<value>Add Parking Page</value>
|
||||
|
@ -147,6 +147,9 @@
|
|||
<data name="chkDedicatedPool.Text" xml:space="preserve">
|
||||
<value>Dedicated Application Pool</value>
|
||||
</data>
|
||||
<data name="chkEnableParkingPageTokens" xml:space="preserve">
|
||||
<value>Allow tokens</value>
|
||||
</data>
|
||||
<data name="chkParentPaths.Text" xml:space="preserve">
|
||||
<value>Enable Parent Paths</value>
|
||||
</data>
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
<td class="Normal" valign=top>
|
||||
<asp:TextBox ID="txtPageContent" runat="server" Rows="10" TextMode="MultiLine" Width="100%" CssClass="NormalTextBox" Wrap="False"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" valign=top></td>
|
||||
<td><asp:checkbox id="chkEnableParkingPageTokens" meta:resourcekey="chkEnableParkingPageTokens" Text="Allow tokens" Runat="server"></asp:checkbox></td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Panel>
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace WebsitePanel.Portal
|
|||
txtPageName.Text = settings["ParkingPageName"];
|
||||
txtPageContent.Text = settings["ParkingPageContent"];
|
||||
PublishingProfileTextBox.Text = settings["PublishingProfile"];
|
||||
chkEnableParkingPageTokens.Checked = Utils.ParseBool(settings["EnableParkingPageTokens"], false);
|
||||
|
||||
// default documents
|
||||
if (!String.IsNullOrEmpty(settings["DefaultDocuments"]))
|
||||
|
@ -102,6 +103,7 @@ namespace WebsitePanel.Portal
|
|||
settings["ParkingPageName"] = txtPageName.Text;
|
||||
settings["ParkingPageContent"] = txtPageContent.Text;
|
||||
settings["PublishingProfile"] = PublishingProfileTextBox.Text;
|
||||
settings["EnableParkingPageTokens"] = chkEnableParkingPageTokens.Checked.ToString();
|
||||
|
||||
// default documents
|
||||
settings["DefaultDocuments"] = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ',')); ;
|
||||
|
|
|
@ -75,6 +75,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtPageContent;
|
||||
|
||||
/// <summary>
|
||||
/// chkEnableParkingPageTokens control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkEnableParkingPageTokens;
|
||||
|
||||
/// <summary>
|
||||
/// WebPublishingProfile control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue