misc. changes
This commit is contained in:
@@ -24,10 +24,12 @@ namespace pointMaster.Controllers
|
||||
vm.links.Add(new NavUrl("Patruljer", "/Patrulje"));
|
||||
vm.links.Add(new NavUrl("Point", "/Point"));
|
||||
vm.links.Add(new NavUrl("Poster", "/Poster"));
|
||||
vm.links.Add(new NavUrl("Statistikker", "/stats"));
|
||||
}
|
||||
if (User.Identity != null && User.Identity.IsAuthenticated)
|
||||
{
|
||||
vm.links.Add(new NavUrl("Giv point", "/point/givpoint"));
|
||||
vm.links.Add(new NavUrl("Vælg post", "/point/skiftpost"));
|
||||
vm.links.Add(new NavUrl("Log ud", "/account/signout"));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace pointMaster.Controllers
|
||||
|
||||
if (string.IsNullOrEmpty(Request.Cookies["Post"]))
|
||||
{
|
||||
return RedirectToAction(nameof(SelectPoster));
|
||||
return RedirectToAction(nameof(SkiftPost));
|
||||
}
|
||||
|
||||
int.TryParse(Request.Cookies["Post"], out var postId);
|
||||
@@ -56,7 +56,7 @@ namespace pointMaster.Controllers
|
||||
{
|
||||
if (string.IsNullOrEmpty(Request.Cookies["Post"]))
|
||||
{
|
||||
return RedirectToAction(nameof(SelectPoster));
|
||||
return RedirectToAction(nameof(SkiftPost));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace pointMaster.Controllers
|
||||
|
||||
if (postId == null)
|
||||
{
|
||||
return RedirectToAction(nameof(SelectPoster));
|
||||
return RedirectToAction(nameof(SkiftPost));
|
||||
}
|
||||
int.TryParse(postId, out var postIntId);
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace pointMaster.Controllers
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
public async Task<IActionResult> SelectPoster()
|
||||
public async Task<IActionResult> SkiftPost()
|
||||
{
|
||||
var vm = new SelectPostViewModel();
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace pointMaster.Controllers
|
||||
|
||||
Response.Cookies.Append("Post", id.ToString(), cookieOptions);
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
return Redirect("/");
|
||||
}
|
||||
|
||||
public ActionResult DeletePoint(int id)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>#</th>
|
||||
<th>Patrulje</th>
|
||||
<th>Point</th>
|
||||
</tr>
|
||||
@@ -35,7 +35,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>#</th>
|
||||
<th>Patrulje</th>
|
||||
<th>Point</th>
|
||||
</tr>
|
||||
@@ -57,7 +57,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>#</th>
|
||||
<th>Patrulje</th>
|
||||
<th>Point</th>
|
||||
</tr>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<div class="button-group">
|
||||
<div class="button-group-button">
|
||||
<a asp-action="SelectPoster" asp-controller="Point" class="btn btn-primary">Skift Post</a>
|
||||
<a asp-action="SkiftPost" asp-controller="Point" class="btn btn-primary">Skift Post</a>
|
||||
</div>
|
||||
<div class="button-group-button">
|
||||
<a asp-action="SkiftPatrulje" asp-controller="Point" class="btn btn-primary">Skift Patrulje</a>
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
<h3>Du giver point som: @Model.post.Name</h3>
|
||||
}
|
||||
<h1>Vælg patrulje</h1>
|
||||
@foreach (var patrulje in Model.Patruljer)
|
||||
{
|
||||
<ul class="list-group">
|
||||
@foreach (var patrulje in Model.Patruljer)
|
||||
{
|
||||
<a asp-action="GivPoint" asp-controller="Point" asp-route-id="@patrulje.Id" class="btn btn-primary mb-2">@patrulje.Name</a>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
@@ -3,9 +3,9 @@
|
||||
ViewData["Title"] = "Vælg post";
|
||||
}
|
||||
<h1>Vælg post</h1>
|
||||
<ul class="list-group">
|
||||
@foreach(var item in Model.Poster)
|
||||
{
|
||||
<div>
|
||||
<a asp-action="SelectPost" asp-route-id="@item.Id" class="btn btn-primary mb-2">@item.Name</a>
|
||||
</div>
|
||||
<a asp-action="SelectPost" asp-route-id="@item.Id" class="btn btn-primary">@item.Name</a>
|
||||
}
|
||||
</ul>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="stat-dashboard">
|
||||
<div class="stat-panel">
|
||||
<h1>Stats</h1>
|
||||
<h1>Statistikker</h1>
|
||||
<div class="stats">
|
||||
<div
|
||||
class="stat"
|
||||
|
||||
Reference in New Issue
Block a user