summaryrefslogtreecommitdiff
path: root/Project-Unite/Views
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-27 18:57:07 -0400
committerMichael <[email protected]>2017-03-27 18:57:07 -0400
commit1dcbadf2eb928c63ce3a968f311f6af6b81d33a4 (patch)
tree53491bbdee3e5d77059f810541441ff585c96d0e /Project-Unite/Views
parent7111f0d5cd4123287d2510d77350d849afe7ea98 (diff)
downloadproject-unite-1dcbadf2eb928c63ce3a968f311f6af6b81d33a4.tar.gz
project-unite-1dcbadf2eb928c63ce3a968f311f6af6b81d33a4.tar.bz2
project-unite-1dcbadf2eb928c63ce3a968f311f6af6b81d33a4.zip
Beginning of wiki development
Diffstat (limited to 'Project-Unite/Views')
-rw-r--r--Project-Unite/Views/Wiki/Index.cshtml76
1 files changed, 76 insertions, 0 deletions
diff --git a/Project-Unite/Views/Wiki/Index.cshtml b/Project-Unite/Views/Wiki/Index.cshtml
new file mode 100644
index 0000000..dc7d8bb
--- /dev/null
+++ b/Project-Unite/Views/Wiki/Index.cshtml
@@ -0,0 +1,76 @@
+@model Project_Unite.Models.WikiViewModel
+
+@{
+ if (Model.Page == null)
+ {
+ ViewBag.Title = "Wiki";
+ }
+ else
+ {
+ ViewBag.Title = Model.Page.Name + " - Wiki";
+ }
+}
+
+@helper CreateCategoryListRecursive(Project_Unite.Models.WikiCategory category) {
+ <li>@category.Name
+ <ul>
+ @foreach(var cat in category.Children)
+ {
+ CreateCategoryListRecursive(cat);
+ }
+ @foreach(var page in category.Pages)
+ {
+ <li>@Html.ActionLink(page.Name, "Index", "Wiki", new { id = page.Id }, null)</li>
+ }
+ </ul>
+ </li>
+}
+
+<div class="row">
+ <div class="col-xs-4 panel">
+ <div class="panel-body">
+ <h4>Pages</h4>
+
+ <ul>
+ @foreach(var cat in Model.Categories)
+ {
+ CreateCategoryListRecursive(cat);
+ }
+ </ul>
+ </div>
+ </div>
+
+ <div class="col-xs-8 panel">
+ <div class="panel-body">
+ @if(Model.Page != null)
+ {
+ <h1>@Model.Page.Name</h1>
+
+ <p>@Html.Markdown(Model.Page.Contents)</p>
+ }
+ else
+ {
+ <h1>ShiftOS Wiki</h1>
+
+ <p>The ShiftOS Wiki is a community and developer-driven handbook for everything you need to know about ShiftOS. It contains tutorials, guides, code examples, and loads of other interesting things. Read on!</p>
+
+ <h3>How to post to and edit the wiki</h3>
+
+ <p>If you have a ShiftOS account, and have the right privileges to a category, simply click the "Add new page" button at the top, and fill in the blanks.</p>
+
+ <p>If you don't have a ShiftOS account, this is the perfect time to @Html.ActionLink("create one", "Register", "Account")! Without one, how would you play the game?</p>
+
+ <h3>Adding categories</h3>
+
+ <p>Adding categories is only available to those with the `CanManageWikiCategories` access control definition. If you have this ACL definition, you may manage wiki categories from the Developer Control Panel.</p>
+
+ <h3>This wiki supports Markdown!</h3>
+
+ <p>You can use Markdown in the wiki, just like you would in a forum post, skin description or user status update. We use the CommonMark standard - which is the standard used by websites and software like GitHub, Discourse, Gitter, and various others.</p>
+
+
+ }
+ </div>
+ </div>
+</div>
+