Files
BusinessMgr-2019/SaBusinessMgrCoreWebPortal/Views/Association/Index.cshtml
T
2024-11-26 11:33:22 +00:00

121 lines
5.1 KiB
Plaintext

@model Model_Association
@inject SbmLocaliser Localiser
@{
/* Associations - Index */
ViewData["Title"] = "Associations";
Model.AdditionalFiles_JS.Add("js/sbm-assoc.js");
}
<div class="sbm-panel Associations fullheight">
<script type="text/javascript">
sbm.lbl.createCust= '@(Localiser.GetJavascriptText("caption.customer.create"))';
sbm.lbl.createSupp= '@(Localiser.GetJavascriptText("caption.supplier.create"))';
</script>
<div class="sbm-panel-data sbm-flex">
@* Filter form - wrap header to include paging controls. *@
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmAssociationFilter", @class = "sbm-form", @onSubmit = "return false;" }))
{
@* Header - Page caption, paging controls, actions. *@
<div class="sbm-panel-header">
<div class="row">
<div class="col">
<partial name="~/Views/Common/ResultsPaging.cshtml" />
</div>
<div class="fixed center"><div class="sbm-panel-caption">@Localiser["label.associations"]</div></div>
<div class="col right">
@* Burger menu *@
<ul class="nav navbar-nav navbar-dark navbar-right sbm-burger">
<li class="dropdown-toggle caret-off">
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
<ul class="dropdown-menu dropdown-menu-right sbm-dropdown-menu">@* Menu items will be inserted here. *@</ul>
</li>
</ul>
</div>
</div>
</div>
@* Filter Panel *@
<div class="sbm-panel-filter">
<div class="row">
<div class="col-sm-4 row pb4">
@* Association Category *@
<div class="col-4 col-sm-4 sbm-label text-left text-sm-right">@Localiser["label.type"]</div>
<div class="col-7 col-sm-8">
@Html.DropDownListFor(model => model.Filter.AssociationType, Model.GetAssociationTypeCodesForSelect(), Localiser["label.any"], new { @id = "", @class = "FilterAssociationType sbm-select" })
</div>
</div>
<div class="col-sm-4 row pb4">
@* Association filter - name etc. *@
<div class="col-4 col-sm-4 sbm-label text-left text-sm-right">@Localiser["label.search"]</div>
<div class="col-7 col-sm-8">
@Html.TextBoxFor(model => model.Filter.Search, new { @id = "", @class = "FilterSearch sbm-input", @maxlength = "32" })
</div>
</div>
</div>
</div>
}
@* Item list *@
<div class="sbm-panel-item-table sbm-flex">
<table class="sbm-item-list">
<thead>
<tr>
<th class="@Model.GetFieldName(Model_Association.ItemField.Type) width10pc pl-1">@Localiser["label.type"]</th>
<th class="@Model.GetFieldName(Model_Association.ItemField.Code) width10pc pl-1">@Localiser["label.code"]</th>
<th class="@Model.GetFieldName(Model_Association.ItemField.Target) width25pc">@Localiser["label.name"]</th>
<th class="@Model.GetFieldName(Model_Association.ItemField.Address) width25pc d-none d-md-table-cell">@Localiser["label.address"]</th>
<th class="@Model.GetFieldName(Model_Association.ItemField.Notes) width25pc d-none d-md-table-cell">@Localiser["label.notes"]</th>
<th class="@Model.GetFieldName(Model_Association.ItemField.Status) width10pc center">@Localiser["label.status"]</th>
<th class="right" style="width:2%;"></th>
</tr>
<tr><td colspan="6"><div class="sbm-panel-messages"></div></td></tr>
</thead>
<tbody></tbody>
</table>
</div>
@* Element templates *@
<div class="sbm-panel-item-template">
@* Burger dropdown item template - ul is ignored *@
<ul class="sbm-dropdown-menu AssociationList">
<li class="sbm-dropdown-item sbm-action"><div class="sbm-label">XXX</div></li>
</ul>
@* Association row template - table is ignored. *@
<table>
<tr class="sbm-row-item Association">
<td class="@Model.GetFieldName(Model_Association.ItemField.Type) pl-1"></td>
<td class="@Model.GetFieldName(Model_Association.ItemField.Code) pl-1"></td>
<td class="@Model.GetFieldName(Model_Association.ItemField.Target)"></td>
<td class="@Model.GetFieldName(Model_Association.ItemField.Address) d-none d-md-table-cell"></td>
<td class="@Model.GetFieldName(Model_Association.ItemField.Notes) d-none d-md-table-cell"></td>
<td class="@Model.GetFieldName(Model_Association.ItemField.Status) center"></td>
<td>
<div class="right">
@* Burger menu *@
<ul class="nav navbar-nav navbar-light navbar-right sbm-burger">
<li class="dropdown-toggle caret-off">
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="sbm-ellipsis-dot"></span><span class="sbm-ellipsis-dot"></span><span class="sbm-ellipsis-dot"></span></a>
<ul class="dropdown-menu dropdown-menu-right sbm-dropdown-menu">@* Menu items will be inserted here. *@</ul>
</li>
</ul>
</div>
</td>
</tr>
</table>
@* Burger dropdown item template - ul is ignored *@
<ul class="sbm-dropdown-menu Association">
<li class="sbm-dropdown-item sbm-action"><div class="sbm-label">XXX</div></li>
</ul>
</div>
</div>
</div>
<partial name="Panel-AssociationDialog.cshtml" />