pull/16476/head
Engincan VESKE 2 years ago
parent d63154af52
commit 9a766facfb

@ -115,7 +115,7 @@ $(function (){
}
},
{
title: l("CommentUrl"),
title: l("URL"),
data: "url",
render: function (data, type, row) {
if (data !== null) {

@ -10,5 +10,6 @@ public static class CommentConsts
public static int MaxEntityIdLength { get; set; } = CmsEntityConsts.MaxEntityIdLength;
public static int MaxTextLength { get; set; } = 512;
public static int MaxCommentUrlLength { get; set; } = 512;
public static int MaxUrlLength { get; set; } = 512;
}

@ -218,6 +218,6 @@
"CaptchaCodeErrorMessage" : "The answer you entered for the CAPTCHA was not correct. Please try again",
"CaptchaCodeMissingMessage": "The captcha code is missing!",
"UnAllowedExternalUrlMessage": "You included an unallowed external URL. Please try again without the external URL.",
"CommentUrl": "Url"
"URL": "URL"
}
}

@ -37,7 +37,7 @@ public class Comment : AggregateRoot<Guid>, IHasCreationTime, IMustHaveCreator,
[NotNull] string text,
Guid? repliedCommentId,
Guid creatorId,
[CanBeNull] string url,
[CanBeNull] string url = null,
Guid? tenantId = null)
: base(id)
{

@ -79,7 +79,7 @@ public static class CmsKitDbContextModelCreatingExtensions
b.Property(x => x.EntityId).IsRequired().HasMaxLength(CommentConsts.MaxEntityIdLength);
b.Property(x => x.Text).IsRequired().HasMaxLength(CommentConsts.MaxTextLength);
b.Property(x => x.RepliedCommentId);
b.Property(x => x.Url).HasMaxLength(CommentConsts.MaxCommentUrlLength);
b.Property(x => x.Url).HasMaxLength(CommentConsts.MaxUrlLength);
b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId });
b.HasIndex(x => new { x.TenantId, x.RepliedCommentId });

@ -193,8 +193,7 @@ public class CmsKitDataSeedContributor : IDataSeedContributor, ITransientDepende
_cmsKitTestData.EntityId1,
"comment",
null,
_cmsKitTestData.User1Id,
""
_cmsKitTestData.User1Id
));
await _commentRepository.InsertAsync(new Comment(_guidGenerator.Create(),
@ -202,8 +201,7 @@ public class CmsKitDataSeedContributor : IDataSeedContributor, ITransientDepende
_cmsKitTestData.EntityId1,
"reply",
comment1.Id,
_cmsKitTestData.User2Id,
""
_cmsKitTestData.User2Id
));
await _commentRepository.InsertAsync(new Comment(_guidGenerator.Create(),
@ -211,8 +209,7 @@ public class CmsKitDataSeedContributor : IDataSeedContributor, ITransientDepende
_cmsKitTestData.EntityId1,
"reply",
comment1.Id,
_cmsKitTestData.User1Id,
""
_cmsKitTestData.User1Id
));
await _commentRepository.InsertAsync(new Comment(_guidGenerator.Create(),
@ -220,8 +217,7 @@ public class CmsKitDataSeedContributor : IDataSeedContributor, ITransientDepende
_cmsKitTestData.EntityId1,
"comment",
null,
_cmsKitTestData.User2Id,
""
_cmsKitTestData.User2Id
));
await _commentRepository.InsertAsync(new Comment(_guidGenerator.Create(),
@ -229,8 +225,7 @@ public class CmsKitDataSeedContributor : IDataSeedContributor, ITransientDepende
_cmsKitTestData.EntityId2,
"comment",
null,
_cmsKitTestData.User2Id,
""
_cmsKitTestData.User2Id
));
await _commentRepository.InsertAsync(new Comment(_guidGenerator.Create(),
@ -238,8 +233,7 @@ public class CmsKitDataSeedContributor : IDataSeedContributor, ITransientDepende
_cmsKitTestData.EntityId1,
"comment",
null,
_cmsKitTestData.User2Id,
""
_cmsKitTestData.User2Id
));
}

Loading…
Cancel
Save