@page "{id:int}"
@model Admin.Pages.Forum.Board.Meta.PermissionModel
@{
    ViewData["Title"] = "게시판 관리 - 권한";
    ViewData["Sector"] = "Permission";
    ViewData["BoardID"] = Model.BoardID;
    ViewData["BoardList"] = Model.BoardList;
    ViewData["QueryString"] = Model.QueryString;
}

<div class="container">
    <partial name="_Header" />
    <partial name="_StatusMessage" />
    <partial name="/Pages/Forum/Board/_NavTabs.cshtml" />

    <form name="f_admin_write" id="fAdminWrite" method="post" accept-charset="utf-8" autocomplete="off" enctype="multipart/form-data">
        <input type="hidden" asp-for="Input.ID" />
        <input type="hidden" asp-for="Input.BoardID" />

        <p class="text-muted form-text">권한은 최고관리자가 가장 높습니다. 권한이 높은 순으로 정책이 적용됩니다.</p>

        <div class="row mb-3">
            <label for="Input_BoardAccess" class="col-md-2 col-form-label">게시판 접근</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.BoardAccess" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.BoardAccess" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_PostView" class="col-md-2 col-form-label">글 열람</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.PostView" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.PostView" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_PostWrite" class="col-md-2 col-form-label">글 작성</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.PostWrite" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.PostWrite" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_CommentView" class="col-md-2 col-form-label">댓글 목록</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.CommentView" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.CommentView" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_CommentWrite" class="col-md-2 col-form-label">댓글 작성</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.CommentWrite" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.CommentWrite" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_ReplyWrite" class="col-md-2 col-form-label">답글 작성</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.ReplyWrite" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.ReplyWrite" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_FileUpload" class="col-md-2 col-form-label">파일 업로드</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.FileUpload" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.FileUpload" class="text-danger"></span>
            </div>
        </div>
        <div class="row mb-3">
            <label for="Input_FileDownload" class="col-md-2 col-form-label">파일 다운로드</label>
            <div class="col-12 col-lg-auto">
                <select asp-for="Input.FileDownload" class="form-select" asp-items="@Model.PermissionList"></select>
                <span asp-validation-for="Input.FileDownload" class="text-danger"></span>
            </div>
        </div>
        <hr />
        <div class="d-grid gap-2 text-center d-md-block">
            <button type="submit" class="btn btn-success">저장</button>
            <a href="/Forum/Board/List\@Model.QueryString" class="btn btn-secondary">취소</a>
        </div>
        <br />
    </form>
</div>