Просмотр исходного кода

Fixed page description not being used.

tags/2.0.3
Teknikode 4 лет назад
Родитель
Сommit
668f6acae2

+ 1
- 1
Teknik/Areas/About/Controllers/AboutController.cs Просмотреть файл

@@ -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());
}

+ 1
- 1
Teknik/Areas/Contact/Controllers/ContactController.cs Просмотреть файл

@@ -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());
}

+ 5
- 3
Teknik/Areas/Error/Controllers/ErrorController.cs Просмотреть файл

@@ -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;

+ 1
- 1
Teknik/Areas/Privacy/Controllers/PrivacyController.cs Просмотреть файл

@@ -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());
}

+ 4
- 4
Teknik/Areas/Profile/Controllers/ProfileController.cs Просмотреть файл

@@ -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;

+ 1
- 1
Teknik/Areas/Transparency/Controllers/TransparencyController.cs Просмотреть файл

@@ -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();

+ 1
- 1
Teknik/Controllers/DefaultController.cs Просмотреть файл

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

if (Response != null)
{

+ 1
- 1
Teknik/Views/Shared/_Layout.cshtml Просмотреть файл

@@ -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" />

Загрузка…
Отмена
Сохранить