From 0ef04e81ff10945dcbc129a27776ce3d6bf8bead Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Wed, 21 Oct 2020 08:01:17 -0400 Subject: [PATCH] Fixed issue where Page Url expansion script for 1.0.4 was not implemented properly - it was not tagged as an embedded resource. --- .../Modules/Admin/Profiles/Edit.razor | 31 +++++++++++++------ .../Modules/Admin/UserProfile/Index.razor | 27 +++++++++++++--- Oqtane.Server/Oqtane.Server.csproj | 4 +++ Oqtane.Server/Scripts/Tenant.01.00.04.01.sql | 3 -- Oqtane.Server/Scripts/Tenant.02.00.00.01.sql | 16 ++++++++++ Oqtane.Shared/Models/Profile.cs | 3 +- 6 files changed, 66 insertions(+), 18 deletions(-) delete mode 100644 Oqtane.Server/Scripts/Tenant.01.00.04.01.sql create mode 100644 Oqtane.Server/Scripts/Tenant.02.00.00.01.sql diff --git a/Oqtane.Client/Modules/Admin/Profiles/Edit.razor b/Oqtane.Client/Modules/Admin/Profiles/Edit.razor index 73847560..44843e8e 100644 --- a/Oqtane.Client/Modules/Admin/Profiles/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Profiles/Edit.razor @@ -1,4 +1,4 @@ -@namespace Oqtane.Modules.Admin.Profiles +@namespace Oqtane.Modules.Admin.Profiles @inherits ModuleBase @inject NavigationManager NavigationManager @inject IProfileService ProfileService @@ -6,7 +6,7 @@ + + + + diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 9af5980d..3d90e303 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -33,6 +33,7 @@ + @@ -59,6 +60,9 @@ + + + diff --git a/Oqtane.Server/Scripts/Tenant.01.00.04.01.sql b/Oqtane.Server/Scripts/Tenant.01.00.04.01.sql deleted file mode 100644 index ba14575a..00000000 --- a/Oqtane.Server/Scripts/Tenant.01.00.04.01.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE [dbo].[Page] -ALTER COLUMN [Path] [nvarchar](256) NOT NULL -GO diff --git a/Oqtane.Server/Scripts/Tenant.02.00.00.01.sql b/Oqtane.Server/Scripts/Tenant.02.00.00.01.sql new file mode 100644 index 00000000..7f509242 --- /dev/null +++ b/Oqtane.Server/Scripts/Tenant.02.00.00.01.sql @@ -0,0 +1,16 @@ +/* + +Version 2.0.0 Tenant migration script + +*/ + +ALTER TABLE [dbo].[Page] +ALTER COLUMN [Path] [nvarchar](256) NOT NULL +GO + +ALTER TABLE [dbo].[Profile] ADD + [Options] [nvarchar](2000) NULL +GO + +UPDATE [dbo].[Profile] SET Options = '' +GO \ No newline at end of file diff --git a/Oqtane.Shared/Models/Profile.cs b/Oqtane.Shared/Models/Profile.cs index 11ecec07..dc4f6266 100644 --- a/Oqtane.Shared/Models/Profile.cs +++ b/Oqtane.Shared/Models/Profile.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Oqtane.Models { @@ -15,6 +15,7 @@ namespace Oqtane.Models public string DefaultValue { get; set; } public bool IsRequired { get; set; } public bool IsPrivate { get; set; } + public string Options { get; set; } public string CreatedBy { get; set; } public DateTime CreatedOn { get; set; }
- + @@ -14,7 +14,7 @@
- + @@ -22,7 +22,7 @@
- + @@ -30,7 +30,7 @@
- + @@ -38,7 +38,7 @@
- + @@ -46,7 +46,7 @@
- + @@ -54,7 +54,7 @@
- + @@ -62,7 +62,15 @@
- + + + +
+
- + - @if (p.IsRequired) + @if (!string.IsNullOrEmpty(p.Options)) { - + } else { - + @if (p.IsRequired) + { + + } + else + { + + } }