The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HelpController.cs 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using Teknik.Areas.Help.ViewModels;
  7. using Teknik.Controllers;
  8. using Teknik.Filters;
  9. namespace Teknik.Areas.Help.Controllers
  10. {
  11. public class HelpController : DefaultController
  12. {
  13. // GET: Help/Help
  14. [TrackPageView]
  15. [AllowAnonymous]
  16. public ActionResult Index()
  17. {
  18. ViewBag.Title = "Help - " + Config.Title;
  19. HelpViewModel model = new HelpViewModel();
  20. return View(model);
  21. }
  22. [TrackPageView]
  23. [AllowAnonymous]
  24. public ActionResult API(string version, string service)
  25. {
  26. HelpViewModel model = new HelpViewModel();
  27. if (string.IsNullOrEmpty(version) && string.IsNullOrEmpty(service))
  28. {
  29. ViewBag.Title = "API Help - " + Config.Title;
  30. return View("~/Areas/Help/Views/Help/API/API.cshtml", model);
  31. }
  32. else if(!string.IsNullOrEmpty(version) && !string.IsNullOrEmpty(service))
  33. {
  34. ViewBag.Title = service + " API " + version + " Help - " + Config.Title;
  35. return View("~/Areas/Help/Views/Help/API/" + version + "/" + service + ".cshtml", model);
  36. }
  37. return RedirectToRoute("*.Error.Http404");
  38. }
  39. [TrackPageView]
  40. [AllowAnonymous]
  41. public ActionResult Blog()
  42. {
  43. ViewBag.Title = "Blogging Help - " + Config.Title;
  44. HelpViewModel model = new HelpViewModel();
  45. return View("~/Areas/Help/Views/Help/Blog.cshtml", model);
  46. }
  47. [TrackPageView]
  48. [AllowAnonymous]
  49. public ActionResult Git()
  50. {
  51. ViewBag.Title = "Git Service Help - " + Config.Title;
  52. HelpViewModel model = new HelpViewModel();
  53. return View("~/Areas/Help/Views/Help/Git.cshtml", model);
  54. }
  55. [TrackPageView]
  56. [AllowAnonymous]
  57. public ActionResult IRC()
  58. {
  59. ViewBag.Title = "IRC Server Help - " + Config.Title;
  60. HelpViewModel model = new HelpViewModel();
  61. return View("~/Areas/Help/Views/Help/IRC.cshtml", model);
  62. }
  63. [TrackPageView]
  64. [AllowAnonymous]
  65. public ActionResult Mail()
  66. {
  67. ViewBag.Title = "Mail Server Help - " + Config.Title;
  68. HelpViewModel model = new HelpViewModel();
  69. return View("~/Areas/Help/Views/Help/Mail.cshtml", model);
  70. }
  71. [TrackPageView]
  72. [AllowAnonymous]
  73. public ActionResult Markdown()
  74. {
  75. ViewBag.Title = "Markdown Help - " + Config.Title;
  76. HelpViewModel model = new HelpViewModel();
  77. return View("~/Areas/Help/Views/Help/Markdown.cshtml", model);
  78. }
  79. [TrackPageView]
  80. [AllowAnonymous]
  81. public ActionResult Mumble()
  82. {
  83. ViewBag.Title = "Mumble Server Help - " + Config.Title;
  84. HelpViewModel model = new HelpViewModel();
  85. return View("~/Areas/Help/Views/Help/Mumble.cshtml", model);
  86. }
  87. [TrackPageView]
  88. [AllowAnonymous]
  89. public ActionResult RSS()
  90. {
  91. ViewBag.Title = "RSS Help - " + Config.Title;
  92. HelpViewModel model = new HelpViewModel();
  93. return View("~/Areas/Help/Views/Help/RSS.cshtml", model);
  94. }
  95. [TrackPageView]
  96. [AllowAnonymous]
  97. public ActionResult Tools()
  98. {
  99. ViewBag.Title = "Tool Help - " + Config.Title;
  100. HelpViewModel model = new HelpViewModel();
  101. return View("~/Areas/Help/Views/Help/Tools.cshtml", model);
  102. }
  103. [TrackPageView]
  104. [AllowAnonymous]
  105. public ActionResult Upload()
  106. {
  107. ViewBag.Title = "Upload Service Help - " + Config.Title;
  108. HelpViewModel model = new HelpViewModel();
  109. return View("~/Areas/Help/Views/Help/Upload.cshtml", model);
  110. }
  111. }
  112. }