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 4.0KB

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