|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Signum.Entities.Basics;
using Signum.Utilities;
using System.Reflection;
using Signum.Entities;
namespace Signum.Web.Widgets
{
public class NotesClient
{
public static string ViewPrefix = "~/signum/Views/Widgets/{0}.cshtml";
public static void Start()
{
if (Navigator.Manager.NotDefined(MethodInfo.GetCurrentMethod()))
{
Navigator.AddSetting(new EntitySettings<NoteDN>(EntityType.Default) { PartialViewName = _ => ViewPrefix.Formato("Note"), IsCreable = _ => false });
}
WidgetsHelper.GetWidgetsForView +=
(entity, partialViewName, prefix) => entity is IdentifiableEntity ? NoteWidgetHelper.CreateWidget((IdentifiableEntity)entity, partialViewName, prefix) : null;
NoteWidgetHelper.NoteType = typeof(NoteDN);
NoteWidgetHelper.CreateNote = ei => ei.IsNew ? null : new NoteDN { Target = ei.ToLite() };
NoteWidgetHelper.NotesQueryColumn = "Target";
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm Computer Scientist, one of the founders of Signum Software, and the lead developer behind Signum Framework.
www.signumframework.com
I love programming in C#, Linq, Compilers, Algorithms, Functional Programming, Computer Graphics, Maths...