@page
@model ZpcBulletinBoard.Pages.Pages.IndexModel

@{
    ViewData["Title"] = "Strani - Pregled";
    Layout = "~/Pages/Layouts/_Layout.cshtml";
}

@section Styles {
    <link rel="stylesheet" href="~/css/pages/index.css" asp-append-version="true" />

}

<h4 class="d-flex justify-content-between align-items-center w-100 font-weight-bold py-1 mb-4">
    <span>
        <span class="text-muted font-weight-light">
            <i>Oglasna deska strani</i>
            /</span> Pregled
    </span>
</h4>

<div class="row">
    <div class="col-12 mb-2 text-right">
        <div class="btn-group">
            <input id="inpSearchPage" class="form-control" type="text" value="" placeholder="Iskanje..." autocomplete="off">
            <button id="btnRefresh" type="submit" class="btn btn-secondary" aria-label="Osveži" title="Osveži">
                <i class="opacity-75 ion ion-md-refresh"></i>
            </button>
        </div>
    </div>
</div>

<div class="card">
    <h6 class="card-header">
        Strani
    </h6>
    <div class="div-pages">

    </div>
    <div class="card-footer py-3 text-right">
        <a href="javascript:;" onclick="openModalAddPage();" class="btn btn-primary">Dodaj novo</a>
    </div>
</div>

<div id="divModalAddEditPage" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Urejanje strani</h5>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <input id="inpModalAddEditPageIdPage" type="hidden" />
                <div class="form-group">
                    <label class="control-label">Ime</label>
                    <input id="inpModalAddEditPageName" class="form-control"/>
                </div>
                <div class="form-group">
                    <label class="control-label">Razmerje</label>
                    <select id="selModalAddEditPageRatio" class="form-control" asp-items="Html.GetEnumSelectList<Models.Editor.BulletinBoard.RatioEnum>()">
                    </select>
                </div>
                <div class="form-group">
                    <label class="control-label">Tip</label>
                    <select id="selModalAddEditPageType" class="form-control" asp-items="Html.GetEnumSelectList<Models.Editor.BulletinBoardPage.TypeEnum>()">
                    </select>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="saveModalAddEditPage();">Shrani</button>
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Prekliči</button>
            </div>
        </div>
    </div>
</div>

<div id="divModalPageEditorPicture" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Urejanje slike</h5>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <input id="inpModalPageEditorPictureIdPage" type="hidden" />
                <div class="form-group">
                    <label class="control-label">Izberi sliko</label>
                    <input type="file" id="inpModalPageEditorPicturePicture" class="form-control" />
                </div>
                <hr/>
                <img id="imgModalPageEditorPicture" src="" class="img-fluid" alt="Responsive image">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="saveModalPageEditorPicture();">Shrani</button>
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Prekliči</button>
            </div>
        </div>
    </div>
</div>

<div id="divModalPageEditorLink" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Urejanje zunanje povezave</h5>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <input id="inpModalPageEditorLinkIdPage" type="hidden" />
                <div class="form-group">
                    <label class="control-label">Povezava</label>
                    <input id="inpModalPageEditorLinkLink" class="form-control" />
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="saveModalPageEditorLink();">Shrani</button>
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Prekliči</button>
            </div>
        </div>
    </div>
</div>

@Html.AntiForgeryToken()
@section Scripts {
    <script src="~/js/pages/index.js" asp-append-version="true"></script>
}