1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Fixed page description not being used.

This commit is contained in:
Uncled1023 2016-02-26 21:54:11 -08:00
parent 6fa093175d
commit 668f6acae2
8 changed files with 15 additions and 13 deletions

View File

@ -14,7 +14,7 @@ namespace Teknik.Areas.About.Controllers
public ActionResult Index()
{
ViewBag.Title = "About - " + Config.Title;
ViewBag.Message = "What is Teknik?";
ViewBag.Description = "What is Teknik?";
return View(new AboutViewModel());
}

View File

@ -21,7 +21,7 @@ namespace Teknik.Areas.Contact.Controllers
public ActionResult Index()
{
ViewBag.Title = "Contact - " + Config.Title;
ViewBag.Message = "Contact Teknik Support";
ViewBag.Description = "Contact Teknik Support";
return View(new ContactViewModel());
}

View File

@ -14,6 +14,7 @@ namespace Teknik.Areas.Error.Controllers
public ActionResult Exception(Exception exception)
{
ViewBag.Title = "Exception - " + Config.Title;
ViewBag.Description = "Just a boring 'ol exception. Nothing to see here, move along.";
if (Response != null)
Response.StatusCode = 200;
@ -28,6 +29,7 @@ namespace Teknik.Areas.Error.Controllers
public ActionResult General(Exception exception)
{
ViewBag.Title = "Http Exception - " + Config.Title;
ViewBag.Description = "There has been a Http exception. Run!";
ErrorViewModel model = new ErrorViewModel();
model.Description = exception.Message;
@ -40,7 +42,7 @@ namespace Teknik.Areas.Error.Controllers
public ActionResult Http403(Exception exception)
{
ViewBag.Title = "403 - " + Config.Title;
ViewBag.Message = "Access Denied";
ViewBag.Description = "Access Denied";
ErrorViewModel model = new ErrorViewModel();
model.Exception = exception;
@ -52,7 +54,7 @@ namespace Teknik.Areas.Error.Controllers
public ActionResult Http404(Exception exception)
{
ViewBag.Title = "404 - " + Config.Title;
ViewBag.Message = "Uh Oh, can't find it!";
ViewBag.Description = "Uh Oh, can't find it!";
ErrorViewModel model = new ErrorViewModel();
model.Exception = exception;
@ -64,7 +66,7 @@ namespace Teknik.Areas.Error.Controllers
public ActionResult Http500(Exception exception)
{
ViewBag.Title = "500 - " + Config.Title;
ViewBag.Message = "Something Borked";
ViewBag.Description = "Something Borked";
ErrorViewModel model = new ErrorViewModel();
model.Exception = exception;

View File

@ -15,7 +15,7 @@ namespace Teknik.Areas.Privacy.Controllers
public ActionResult Index()
{
ViewBag.Title = "Privacy Policy - " + Config.Title;
ViewBag.Message = "Teknik privacy policy.";
ViewBag.Description = "Teknik privacy policy.";
return View(new PrivacyViewModel());
}

View File

@ -35,14 +35,14 @@ namespace Teknik.Areas.Profile.Controllers
ProfileViewModel model = new ProfileViewModel();
ViewBag.Title = "User Does Not Exist - " + Config.Title;
ViewBag.Message = "The User does not exist";
ViewBag.Description = "The User does not exist";
User user = db.Users.Where(u => u.Username == username).FirstOrDefault();
if (user != null)
{
ViewBag.Title = username + "'s Profile - " + Config.Title;
ViewBag.Message = "Viewing " + username + "'s Profile";
ViewBag.Description = "Viewing " + username + "'s Profile";
model.UserID = user.UserId;
model.Username = user.Username;
@ -79,14 +79,14 @@ namespace Teknik.Areas.Profile.Controllers
SettingsViewModel model = new SettingsViewModel();
ViewBag.Title = "User Does Not Exist - " + Config.Title;
ViewBag.Message = "The User does not exist";
ViewBag.Description = "The User does not exist";
User user = db.Users.Where(u => u.Username == username).FirstOrDefault();
if (user != null)
{
ViewBag.Title = "Settings - " + Config.Title;
ViewBag.Message = "Your " + Config.Title + " Settings";
ViewBag.Description = "Your " + Config.Title + " Settings";
model.UserID = user.UserId;
model.Username = user.Username;

View File

@ -18,7 +18,7 @@ namespace Teknik.Areas.Transparency.Controllers
public ActionResult Index()
{
ViewBag.Title = "Transparency - " + Config.Title;
ViewBag.Message = "Teknik transparency and statistics.";
ViewBag.Description = "Teknik transparency and statistics.";
TransparencyViewModel model = new TransparencyViewModel();
Upload.Models.Upload upload = db.Uploads.OrderByDescending(u => u.UploadId).FirstOrDefault();

View File

@ -37,7 +37,7 @@ namespace Teknik.Controllers
public DefaultController()
{
ViewBag.Title = Config.Title;
ViewBag.Message = Config.Description;
ViewBag.Description = Config.Description;
if (Response != null)
{

View File

@ -9,7 +9,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="@Model.Config.Description" />
<meta name="description" content="@ViewBag.Description" />
<meta name="author" content="@Model.Config.Author" />
<title>@ViewBag.Title</title>
<link rel="shortcut icon" href="/Images/favicon.ico" type="image/x-icon" />