mirror of https://github.com/Squidex/squidex.git
49 changed files with 402 additions and 138 deletions
@ -0,0 +1,13 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Squidex.Infrastructure; |
||||
|
|
||||
|
namespace Squidex.Read |
||||
|
{ |
||||
|
public interface ITrackCreatedByEntity |
||||
|
{ |
||||
|
RefToken CreatedBy { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
// ==========================================================================
|
||||
|
// ITrackLastModifiedByEntity.cs
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex Group
|
||||
|
// All rights reserved.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using Squidex.Infrastructure; |
||||
|
|
||||
|
namespace Squidex.Read |
||||
|
{ |
||||
|
public interface ITrackLastModifiedByEntity |
||||
|
{ |
||||
|
RefToken LastModifiedBy { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,60 @@ |
|||||
|
// ==========================================================================
|
||||
|
// RefTokenSerializer.cs
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex Group
|
||||
|
// All rights reserved.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using MongoDB.Bson.Serialization; |
||||
|
using MongoDB.Bson.Serialization.Serializers; |
||||
|
using Squidex.Infrastructure; |
||||
|
|
||||
|
// ReSharper disable InvertIf
|
||||
|
|
||||
|
namespace Squidex.Store.MongoDb.Utils |
||||
|
{ |
||||
|
public class RefTokenSerializer : SerializerBase<RefToken> |
||||
|
{ |
||||
|
private static bool isRegistered; |
||||
|
private static readonly object LockObject = new object(); |
||||
|
|
||||
|
public static bool Register() |
||||
|
{ |
||||
|
if (!isRegistered) |
||||
|
{ |
||||
|
lock (LockObject) |
||||
|
{ |
||||
|
if (!isRegistered) |
||||
|
{ |
||||
|
BsonSerializer.RegisterSerializer(new RefTokenSerializer()); |
||||
|
|
||||
|
isRegistered = true; |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
public override RefToken Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args) |
||||
|
{ |
||||
|
var value = context.Reader.ReadString(); |
||||
|
|
||||
|
return value != null ? RefToken.Parse(value) : null; |
||||
|
} |
||||
|
|
||||
|
public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, RefToken value) |
||||
|
{ |
||||
|
if (value != null) |
||||
|
{ |
||||
|
context.Writer.WriteString(value.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
context.Writer.WriteNull(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
@import '_mixins'; |
||||
|
@import '_vars'; |
||||
|
|
||||
|
.user-ref { |
||||
|
color: $color-theme-blue-dark; |
||||
|
} |
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
Binary file not shown.
@ -1,3 +1,4 @@ |
|||||
@import '_bootstrap.scss'; |
@import '_bootstrap.scss'; |
||||
@import '_layout.scss'; |
@import '_layout.scss'; |
||||
@import '_panels.scss'; |
@import '_panels.scss'; |
||||
|
@import '_history.scss'; |
||||
Loading…
Reference in new issue