summaryrefslogtreecommitdiff
path: root/Project-Unite/Views/Admin/AddForumCategory.cshtml
blob: 6f852c508300390c03f99314a5a46c7927ef4c2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@model Project_Unite.Models.AddForumCategoryViewModel
@{
    ViewBag.Title = "Add forum category";
}

<h2>Add forum category</h2>

<p>This page allows you to add a new forum category to ShiftOS and define a set of ACL rules for this category.</p>

<div class="panel panel-danger">
    @if(ViewBag.Error != null)
    {
        <p><span class="glyphicon glyphicon-warning-sign"></span> @ViewBag.Error</p>
    }
</div>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(Model => Model.PossibleParents)
    <table class="table-condensed">
        <tr>
            <td>@Html.DisplayNameFor(Model => Model.Name)</td>
            <td>@Html.TextBoxFor(Model => Model.Name, new { @class = "form-control" })</td>
        </tr>    
        <tr>
            <td>@Html.DisplayNameFor(Model => Model.Description)</td>
            <td>@Html.TextBoxFor(Model => Model.Description, new { @class = "form-control" })</td>
        </tr>
        <tr>
            <td>@Html.DisplayNameFor(Model => Model.Parent)</td>
            <td>@Html.DropDownListFor(Model => Model.Parent, Model.PossibleParents, new { @class = "form-control" })</td>
        </tr>
    </table>

    <h4>ACL rule definitions</h4>
    <p>ACL rules for this forum can be edited in the Access Control section. Additionally, you can select an existing forum to copy ACL data from.</p>

    <p><strong>Copy ACL data from: </strong>@Html.DropDownListFor(Model=>Model.StealPermissionsFrom, Model.PossibleParents, new { @class = "form-control" })</p>
    <p>Leave this value as "Top Level" to not copy permissions. Default permission values are 'Can Post' for all roles.</p>
    <h4>Adding new roles</h4>
    <p>When you add a new role to the site, the ACL system will automatically add it to this forum, however its permission data will be set to the default "Can Post" value.</p>
    <hr/>

   
    <input type="submit" value="Add" class="btn btn-primary" />
    @Html.ActionLink("Cancel", "Forums", "Admin", null, new { @class="btn btn-default"})
}