Pmad.Milsymbol.AspNetCore
0.1.53
dotnet add package Pmad.Milsymbol.AspNetCore --version 0.1.53
NuGet\Install-Package Pmad.Milsymbol.AspNetCore -Version 0.1.53
<PackageReference Include="Pmad.Milsymbol.AspNetCore" Version="0.1.53" />
<PackageVersion Include="Pmad.Milsymbol.AspNetCore" Version="0.1.53" />
<PackageReference Include="Pmad.Milsymbol.AspNetCore" />
paket add Pmad.Milsymbol.AspNetCore --version 0.1.53
#r "nuget: Pmad.Milsymbol.AspNetCore, 0.1.53"
#:package Pmad.Milsymbol.AspNetCore@0.1.53
#addin nuget:?package=Pmad.Milsymbol.AspNetCore&version=0.1.53
#tool nuget:?package=Pmad.Milsymbol.AspNetCore&version=0.1.53
Milsymbol for ASP.NET Core
Setup
In Program.cs, on the Mvc Builder, add the Milsymbol components.
builder.Services
.AddControllersWithViews()
.AddMilsymbolMvcComponents();
In Program.cs, on the ApplicationBuilder, add the Milsymbol static files middleware.
app.UseMilsymbolStaticFiles();
In _ViewImports.cshtml, add the Milsymbol tag helpers.
@addTagHelper *, Pmad.Milsymbol.AspNetCore
ORBAT Component <pmad-orbat />
Implement the IOrbatUnit interface, or use the provided class OrbatUnitViewModel, and in the model, add a property of type IOrbarUnit
public required IOrbatUnit RootUnit { get; set; }
In the view (.cshtml file), add the ORBAT component.
<pmad-orbat root-unit="@Model.RootUnit" />
To set a tooltip, or a link on each unit symbol, you can :
- implement the interface
IOrbatUnitViewModelon the model and provideHrefandTitle, - or use the provided class
OrbatUnitTitleViewModeland setHrefandTitle - or set delegates on
pmad-orbattag
<pmad-orbat
root-unit="@Model.RootUnit"
unit-title="@(u => ((YourOrbatUnit)u).Label)"
unit-link-controller="Units" unit-link-action="Details" unit-link-route="@(u => new { id = ((YourOrbatUnit)u).UnitID })" />
Symbol Component <pmad-symbol-selector />
APP-6D symbol selector component.
This component requires Boostrap 4 or 5. Version of bootstrap is automatically detected. Anyway, you can force the version by setting the DesignSystem in AddMilsymbolMvcComponents.
builder.Services
.AddControllersWithViews()
.AddMilsymbolMvcComponents(DesignSystem.Boostrap5); // DesignSystem.Automatic by default
Basic usage with Symbol as string property in the model:
<pmad-symbol-selector asp-for="Symbol" />
Component has differents layouts:
layout="Default"(default): Only dropdown listslayout="Extended": Standard identity and Dummy/HQ/TF are selected with buttons, other categories are selected with dropdown lists
Please note that this component will automaticly include choices.js and milsymbol.js.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.FileProviders.Embedded (>= 8.0.11)
- Pmad.Milsymbol (>= 0.1.53)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.