diff --git a/Project-Unite/Controllers/DeveloperController.cs b/Project-Unite/Controllers/DeveloperController.cs index f656132..aed4eb5 100644 --- a/Project-Unite/Controllers/DeveloperController.cs +++ b/Project-Unite/Controllers/DeveloperController.cs @@ -146,6 +146,8 @@ public ActionResult AddWikiCategory() if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) return new HttpStatusCodeResult(403); + ViewBag.Developer = true; + var mdl = new AddWikiCategoryViewModel(); return View(mdl); @@ -157,7 +159,7 @@ public ActionResult AddWikiCategory(AddWikiCategoryViewModel model) { if (!ACL.Granted(User.Identity.Name, "CanAccessDevCP")) return new HttpStatusCodeResult(403); - + ViewBag.Developer = true; if (!ModelState.IsValid) return View(model); diff --git a/Project-Unite/Project-Unite.csproj b/Project-Unite/Project-Unite.csproj index 33cb81c..3201682 100644 --- a/Project-Unite/Project-Unite.csproj +++ b/Project-Unite/Project-Unite.csproj @@ -544,6 +544,7 @@ + diff --git a/Project-Unite/Views/Developer/AddWikiCategory.cshtml b/Project-Unite/Views/Developer/AddWikiCategory.cshtml new file mode 100644 index 0000000..6f188ad --- /dev/null +++ b/Project-Unite/Views/Developer/AddWikiCategory.cshtml @@ -0,0 +1,36 @@ +@model Project_Unite.Models.AddWikiCategoryViewModel +@{ + ViewBag.Title = "Add wiki category"; +} + +

Add wiki category

+ +

Please fill the form to add a new category.

+ +@using (Html.BeginForm()) +{ +
+
+ @Html.ValidationSummary() +
+
+ + + + + + + + + + + + + + +
Category name: + @Html.TextBoxFor(Model=>Model.Name, new { @class="form-control"}) +
Parent category: + @Html.DropDownListFor(Model => Model.ParentId, Model.Parents, new { @class = "form-control" }) +
+} \ No newline at end of file