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.5 KB
Raw Blame
@{
    //page title
    ViewBag.Title = Loc["Admin.Address.AddressAttributes"];
    var area = ViewContext.RouteData.Values["area"]?.ToString();
}

@* The checkout attribute list's shape: Add new as the one primary action in the page header and
   the grid in a flush card. *@
<admin-page title="@Loc["Admin.Address.AddressAttributes"]" icon="bi-card-list">
    <page-actions>
        <partial name="Partials/WidgetZone.ListButtons"/>
        <a href="@Url.Action("Create", "AddressAttribute", new { area })" class="btn btn-primary">
            <i class="bi bi-plus-lg"></i> @Loc["Admin.Common.AddNew"]
        </a>
    </page-actions>

    <admin-card flush>
        <admin-grid id="addressattributes-grid"
                    read-url="@Url.Action("List", "AddressAttribute", new { area })"
                    pager="Compact">
            <grid-text name="view" value="@Loc["Admin.Common.View"]"/>
            <grid-text name="edit" value="@Loc["Admin.Common.Edit"]"/>
            <grid-column field="Name" title="@Loc["Admin.Address.AddressAttributes.Fields.Name"]">
                <cell-template>
                    <a class="text-decoration-none" href="Edit/{{ Id }}">{{ Name }}</a>
                </cell-template>
            </grid-column>
            <grid-column field="AttributeControlTypeName" title="@Loc["Admin.Address.AddressAttributes.Fields.AttributeControlType"]" width="200" align="Center" min-screen-width="750"/>
            <grid-column field="IsRequired" title="@Loc["Admin.Address.AddressAttributes.Fields.IsRequired"]" width="100" align="Center">
                <cell-template>
                    <i data-if="IsRequired" 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>
            <grid-column field="DisplayOrder" title="@Loc["Admin.Address.AddressAttributes.Fields.DisplayOrder"]" width="100" min-screen-width="750"/>
            <grid-column field="IsGlobalAttribute" title="@Loc["Admin.Common.View"]" width="120" align="Center">
                <cell-template>
                    <a data-if="IsGlobalAttribute" class="text-decoration-none" href="Edit/{{ Id }}"><span class="grand-chip">{{ $texts.view }}</span></a>
                    <a data-else class="text-decoration-none" href="Edit/{{ Id }}"><span class="grand-chip grand-chip--green">{{ $texts.edit }}</span></a>
                </cell-template>
            </grid-column>
        </admin-grid>
    </admin-card>
</admin-page>