Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

2.0 KB
Raw Blame
@model CustomerModel
@* the grid in a card whose header carries its Add new *@
<div class="grand-card">
    <div class="grand-card__header">
        <button type="button" class="btn btn-outline-secondary btn-sm" onclick="location.href='@Url.Action("CreateDocument", "Document", new { customerId = Model.Id, area = Constants.AreaAdmin })'"><i class="bi bi-plus-lg"></i> @Loc["Admin.Marketing.Document.Add"]</button>
    </div>
    <vc:admin-widget widget-zone="customer_details_documents_top" additional-data="Model"/>
    <div class="grand-card__body grand-card__body--flush">
        <admin-grid id="customer-documents-grid"
                    read-url="@Url.Action("ListDocuments", "Document", new { customerId = Model.Id, StatusId = -1, area = Constants.AreaAdmin })"
                    auto-bind="false">
            <grid-column field="Number" title="@Loc["Admin.Documents.Document.Fields.Number"]">
                <cell-template>
                    <a class="text-decoration-none" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaAdmin })/{{ Id }}">{{ Number }}</a>
                </cell-template>
            </grid-column>
            <grid-column field="Name" title="@Loc["Admin.Documents.Document.Fields.Name"]">
                <cell-template>
                    <a class="text-decoration-none" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaAdmin })/{{ Id }}">{{ Name }}</a>
                </cell-template>
            </grid-column>
            <grid-column field="Published" title="@Loc["Admin.Documents.Document.Fields.Published"]" width="100" align="Center" min-screen-width="500">
                <cell-template>
                    <i data-if="Published" class="bi bi-check-lg text-success" aria-hidden="true"></i>
                    <i data-else class="bi bi-x-lg text-danger" aria-hidden="true"></i>
                </cell-template>
            </grid-column>
        </admin-grid>
    </div>
    <vc:admin-widget widget-zone="customer_details_documents_bottom" additional-data="Model"/>
</div>