Created
February 8, 2018 13:03
-
-
Save tusmester/fae3fa8414fa1bfa1fa71c7fe672fb7e to your computer and use it in GitHub Desktop.
#sn #mvc #view #index #dashboard
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"; | |
} | |
@using SenseNet.ContentRepository.Storage.Security | |
@using SenseNet.Portal.Helpers | |
@model SnWebApplication.Models.DashboardViewModel | |
<h2>@ViewBag.Title</h2> | |
<h3>@ViewBag.Message</h3> | |
<div class="row"> | |
<div class="col-md-4"> | |
@Html.MvcActionLink("New task", "Create", "Dashboard") | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-md-4"> | |
<h3>My tasks</h3> | |
<table> | |
<thead><tr><th>To do</th><th>Due date</th><th></th></tr></thead> | |
<tbody> | |
@foreach (var task in this.Model.MyTasks) | |
{ | |
<tr> | |
<td>@task.DisplayName</td> | |
<td>@task.DueDate</td> | |
<td> | |
@if (task.Task?.Security.HasPermission(PermissionType.Delete) ?? false) | |
{ | |
@Html.RouteLink("Delete", "Default", new RouteValueDictionary | |
{ | |
{"controller", "Dashboard"}, | |
{"action", "Delete"}, | |
{"Id", @task.Id} | |
}) | |
} | |
</td> | |
</tr> | |
} | |
</tbody> | |
</table> | |
</div> | |
<div class="col-md-4"> | |
<h3>More tasks</h3> | |
<table> | |
<thead><tr><th>To do</th><th>Due date</th><th>Assigned to</th><th></th></tr></thead> | |
<tbody> | |
@foreach (var task in this.Model.OthersTasks) | |
{ | |
<tr><td>@task.DisplayName</td><td>@task.DueDate</td><td>@task.AssignedToText</td> | |
<td> | |
@if (task.Task?.Security.HasPermission(PermissionType.Delete) ?? false) | |
{ | |
@Html.RouteLink("Delete", "Default", new RouteValueDictionary | |
{ | |
{"controller", "Dashboard"}, | |
{"action", "Delete"}, | |
{"Id", @task.Id} | |
}) | |
} | |
</td> | |
</tr> | |
} | |
</tbody> | |
</table> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment