presentation

This commit is contained in:
Paul Schneider 2026-07-01 00:13:57 +01:00
commit ec54108cf0
9 changed files with 26 additions and 322 deletions

View file

@ -14,16 +14,13 @@ namespace Yavsc.Controllers
{
readonly ApplicationDbContext _context;
readonly IStringLocalizer<BugController> _localizer;
readonly IStringLocalizer<Yavsc.Models.IT.Fixing.Resources> _statusLocalizer;
public BugController(ApplicationDbContext context,
IStringLocalizer<BugController> localizer,
IStringLocalizer<Resources> statusLocalizer
public BugController(ApplicationDbContext context,
IStringLocalizer<BugController> localizer
)
{
_context = context;
_localizer = localizer;
_statusLocalizer = statusLocalizer;
_localizer = localizer;
}
// GET: Bug
@ -61,11 +58,11 @@ namespace Yavsc.Controllers
}
IEnumerable<SelectListItem> Statuses(BugStatus ?status) =>
_statusLocalizer.CreateSelectListItems(typeof(BugStatus), status);
_localizer.CreateSelectListItems(typeof(BugStatus), status);
IEnumerable<SelectListItem> Features(ApplicationDbContext context) =>
IEnumerable<SelectListItem> Features(ApplicationDbContext context) =>
context.Feature.CreateSelectListItems<Feature>(f => f.Id.ToString(), f => $"{f.ShortName} ({f.Description})", null)
.AddNull(_localizer["noAttachedFID"]);
.AddNull(_localizer["noAttachedFID"]);
// POST: Bug/Create
[HttpPost]
@ -152,20 +149,20 @@ namespace Yavsc.Controllers
return RedirectToAction("Index");
}
[Authorize("AdministratorOnly")]
public async Task<IActionResult> DeleteAllLike(long? id)
{
if (id == null)
{
return NotFound();
}
Bug bugref = await _context.Bug.SingleAsync(m => m.Id == id);
if (bugref == null)
}
Bug bugRef = await _context.Bug.SingleAsync(m => m.Id == id);
if (bugRef == null)
{
return null;
}
var bugs = _context.Bug.Where(b => b.Description == bugref.Description);
var bugs = _context.Bug.Where(b => b.Description == bugRef.Description);
return View(bugs);
}

View file

@ -59,5 +59,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="noAttachedFID"><value>Pas de fonctionalité attachée</value></data>
<data name="Inserted"><value> inséré</value></data>
<data name="Confirmed"><value> Confirmé</value></data>
<data name="Rejected"><value> Rejeté</value></data>
<data name="Feature"><value> Fonctionnalité</value></data>
<data name="Fixed"><value> Fixé</value></data>
</root>

View file

@ -21,7 +21,7 @@
<input type="hidden" asp-for="RoleName" />
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Submit"]" class="btn btn-primary" />
<input type="submit" value="Submit" class="btn btn-primary" />
</div>
</div>

View file

@ -12,14 +12,14 @@
@Html.DisplayFor(model => model)
<p>
<a asp-action="Edit" >Edit</a>
<a asp-action="Edit" >Edit</a>
<a asp-action="Delete" asp-route-id="@Model.UserId">Delete</a>
</p>
}
else {
<p>
Aucun profile renseigné"]
<a asp-action="Create" class="btn btn-success">Renseigner ce paramêtrage"]</a>
Aucun profile renseigné
<a asp-action="Create" class="btn btn-success">Renseigner ce paramêtrage</a>
</p>
}
</div>

View file

@ -7,7 +7,7 @@
<h2>Index</h2>
<p>
<a asp-action="Create">Ajouter un utilisateur à un cercle"]</a>
<a asp-action="Create">Ajouter un utilisateur à un cercle</a>
</p>
<table class="table">
<tr>
@ -15,18 +15,18 @@
<th>Utilisateur</th>
<th></th>
</tr>
@foreach (var item in Model) {
var itemKey = new { Id = item.CircleId } ;
<tr>
<td>
@Html.DisplayFor(m=>item.Circle)
@Html.DisplayFor(m=>item.Circle)
</td>
<td>
@Html.DisplayFor(m=>item.Member)
@Html.DisplayFor(m=>item.Member)
</td>
<td>