This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using SenseNet.ContentRepository; | |
using SenseNet.ContentRepository.Storage.Security; | |
using SenseNet.Search; | |
namespace SnWebApplication.Models | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
ViewBag.Title = "Dashboard"; | |
} | |
@model SnWebApplication.Models.DashboardViewModel | |
<h2>@ViewBag.Title</h2> | |
<h3>@ViewBag.Message</h3> | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using SnWebApplication.Models; | |
namespace SnWebApplication.Controllers | |
{ | |
public class DashboardController : Controller | |
{ | |
public string SitePath { get; } = "/Root/Sites/Default_Site"; | |
public string TaskListName { get; } = "Tasks"; | |
public string TaskListPath => SitePath + "/" + TaskListName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SenseNet.ContentRepository; | |
using SenseNet.Search; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace SnWebApplication.Models | |
{ | |
public class DashboardViewModel | |
{ | |
public IEnumerable<TaskViewModel> MyTasks => Content.All |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using SenseNet.ContentRepository; | |
using SenseNet.ContentRepository.Storage.Security; | |
namespace SnWebApplication.Models | |
{ | |
public class TaskViewModel | |
{ | |
public readonly Task Task; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult LogOff() | |
{ | |
SenseNet.Portal.Virtualization.AuthenticationHelper.Logout(); | |
return RedirectToLocal("/"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Microsoft.AspNet.Identity | |
@if (Request.IsAuthenticated) | |
{ | |
using (Html.BeginRouteForm("Default", new | |
{ | |
ReturnUrl = ViewBag.ReturnUrl, | |
controller = "Account", | |
action = "LogOff" | |
}, FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
ViewBag.Title = "Create task"; | |
} | |
@using SnWebApplication.Models | |
@model TaskViewModel | |
<h2>@ViewBag.Title</h2> | |
<div class="row"> | |
<div class="col-md-8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
ViewBag.Title = "Delete task"; | |
ViewBag.Message = "Are you sure you want to delete this task?"; | |
} | |
@using SnWebApplication.Models | |
@model TaskViewModel | |
<h2>@ViewBag.Title</h2> | |
<h3>@ViewBag.Message</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using SNCR = SenseNet.ContentRepository; | |
using SenseNet.ContentRepository.Storage; | |
using SenseNet.ContentRepository.Storage.Security; | |
using SnWebApplication.Models; | |
namespace SnWebApplication.Controllers |
OlderNewer