FInalized Menu. Added first static Page...

This commit is contained in:
schnulller
2022-05-16 00:46:08 +02:00
parent c0ff6cea2d
commit d3d3d39bd0
18 changed files with 421 additions and 103 deletions

View File

@@ -0,0 +1,20 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using HaWeb.Models;
namespace HaWeb.Controllers;
public class Briefecontroller : Controller
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
[Route("Briefe")]
[Route("Briefe/{id?}")]
public IActionResult Index(int? id) {
return View();
}
}

View File

@@ -5,7 +5,6 @@ using HaWeb.Models;
namespace HaWeb.Controllers;
[Route("Edition/[action]")]
[Route("Edition/[action]/Index")]
public class EditionController : Controller
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
@@ -37,4 +36,9 @@ public class EditionController : Controller
{
return View();
}
public IActionResult Datenschutzerklaerung()
{
return View();
}
}

View File

@@ -0,0 +1,21 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using HaWeb.Models;
namespace HaWeb.Controllers;
public class HomeController : Controller
{
[Route("")]
public IActionResult Index()
{
return Redirect("/Suche");
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}

View File

@@ -0,0 +1,33 @@
// Handles 304 redirects to links of the old page, so permalinks stay active.\
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using HaWeb.Models;
namespace HaWeb.Controllers;
public class LegacyContoller : Controller
{
[Route("Supplementa/")]
[Route("Supplementa/Register")]
[Route("Supplementa/Register/{id?}")]
public IActionResult SupplementaRegister(string? id) {
if (id != null)
return RedirectPermanent("/Register/Register/" + id);
return RedirectPermanent("/Register/Register");
}
[Route("Supplementa/Bibelstellen")]
public IActionResult SupplementaBibelstellen(string? id) {
if (id != null)
return RedirectPermanent("/Register/Bibelstellen/" + id);
return RedirectPermanent("/Register/Bibelstellen");
}
[Route("Supplementa/Forschung")]
public IActionResult SupplementaForschung(string? id) {
if (id != null)
return RedirectPermanent("/Register/Forschung/" + id);
return RedirectPermanent("/Register/Forschung");
}
}

View File

@@ -0,0 +1,29 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using HaWeb.Models;
namespace HaWeb.Controllers;
[Route("Register/[action]/{id?}")]
public class RegisterController : Controller
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
public IActionResult Register(string? id)
{
return View("Index");
}
public IActionResult Bibelstellen(string? id)
{
return View("Index");
}
public IActionResult Forschung(string? id)
{
return View("Index");
}
}

View File

@@ -4,12 +4,10 @@ using HaWeb.Models;
namespace HaWeb.Controllers;
public class SearchController : Controller
public class SucheController : Controller
{
[Route("")]
[Route("Home")]
[Route("Home/Index")]
[Route("Suche")]
public IActionResult Index()
{
return View();