Pages auf Englisch umbenannt

This commit is contained in:
BuildTools 2024-02-28 19:53:53 +01:00
parent 67ae87b78d
commit 2ad3da8b20
5 changed files with 30 additions and 11 deletions

View File

@ -16,13 +16,26 @@
<div class="d-flex gap-3">
<div class="border border-2 rounded p-3 w-100">
<h4>Mein Cocktail</h4>
<div class="mb-3">
<label class="form-label" for="cocktailname">Cocktailname</label>
<input id="cocktailname" name="cocktailname" type="text" class="form-control" @bind="@EditCocktail.Name" />
</div>
<div class="mb-3">
<label class="form-label" for="ersteller">Ersteller</label>
<input id="ersteller" name="ersteller" type="text" class="form-control" @bind="@EditCocktail.Ersteller" />
</div>
<div class="mb-3">
<label class="form-label" for="cocktailimage">Bild</label>
<div class="mb-2">
@if (EditCocktail.ImageURL != null)
{
<img style="max-width:128px;" src="@EditCocktail.ImageURL" />
} else
{
<div>Kein Bild vorhanden</div>
}
</div>
<label class="form-label" for="cocktailimage">Neues Bild hochladen</label>
<InputFile OnChange="Bild_OnChange" class="form-control" id="cocktailimage" name="cocktailimage" accept=".jpg,.png,.jpeg,.gif,.webp" />
</div>
@ -44,18 +57,18 @@
<th>@cf.Flasche.Name</th>
<td>
<div class="input-group">
<input class="form-control" id="Menge" name="menge" type="text" @bind="@cf.Menge" />
<input class="form-control" id="Menge" name="menge" type="number" @bind="@cf.Menge" />
<span class="input-group-text">ml</span>
</div>
</td>
<td>
<div class="btn-group">
<button class="btn btn-outline-secondary" @onclick="args => FlascheReihenfolge(args, cf,-2)">
<button class="btn btn-outline-primary" @onclick="args => FlascheReihenfolge(args, cf,-2)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-caret-up-fill" viewBox="0 0 16 16">
<path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z" />
</svg>
</button>
<button class="btn btn-outline-secondary" @onclick="args => FlascheReihenfolge(args, cf ,2)">
<button class="btn btn-outline-primary" @onclick="args => FlascheReihenfolge(args, cf ,2)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-caret-down-fill" viewBox="0 0 16 16">
<path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z" />
</svg>
@ -72,6 +85,12 @@
</td>
</tr>
}
<tr>
<th></th>
<th>Gesamt</th>
<td>@EditCocktail.Cocktailflaschen.Sum(cf => cf.Menge)</td>
<td colspan="2"></td>
</tr>
}
</tbody>
</table>
@ -92,7 +111,7 @@
{
@foreach (Flasche fl in FlaschenListe)
{
<li class="list-group-item list-group-item-action align-middle" @onclick="args => FlascheHinzufuegen(args,fl)">
<li class="list-group-item list-group-item-action align-middle z-0" @onclick="args => FlascheHinzufuegen(args,fl)">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-circle text-success" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16" />
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4" />

View File

@ -6,13 +6,13 @@ using Microsoft.EntityFrameworkCore;
namespace CocktailWeb.Pages.Settings
{
public partial class CocktailHinzufuegen
public partial class CocktailEdit
{
[Parameter]
public string? id { get; set; }
public List<Flasche> FlaschenListe { get; set; } = new();
public Cocktail? EditCocktail;
public Cocktail EditCocktail = null!;
private IBrowserFile? CocktaiLBildDatei;
private DbDataContext? _DataContext;
@ -104,7 +104,7 @@ namespace CocktailWeb.Pages.Settings
try
{
// Bild hochladen
var relativeuploadpath = Path.Join(Config.Value.ImageUploadDir, $"{EditCocktail.Id}{Path.GetExtension(CocktaiLBildDatei.Name)}");
var relativeuploadpath = Path.Join(Config.Value.ImageUploadDir, $"cocktail_{EditCocktail.Id}{Path.GetExtension(CocktaiLBildDatei.Name)}");
var fullpath = Path.Join(env.WebRootPath, relativeuploadpath);
string? folder = Path.GetDirectoryName(fullpath);
if (folder != null && !Path.Exists(folder)) Directory.CreateDirectory(folder);

View File

@ -1,4 +1,4 @@
@page "/settings/glaeser"
@page "/settings/glasses"
@using Microsoft.AspNetCore.Components.Sections
<SectionContent SectionId="TopRow.Title">

View File

@ -1,4 +1,4 @@
@page "/settings/maschine";
@page "/settings/machine";
@using Microsoft.EntityFrameworkCore
@using CocktailWeb.Data
@using Microsoft.AspNetCore.Components.Sections

View File

@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Components.Web;
using Microsoft.EntityFrameworkCore;
namespace CocktailWeb.Pages.Settings
{
partial class Maschine
partial class Machine
{
private DbDataContext? _DataContext;
private List<Filler> Fillers { get; set; } = new();