btcpayserver/BTCPayServer/Views/AppsPublic/ViewPointOfSale.cshtml

57 lines
2.4 KiB
Plaintext
Raw Normal View History

@inject BTCPayServer.HostedServices.CssThemeManager themeManager
@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel
2018-04-03 04:50:41 +02:00
@{
ViewData["Title"] = Model.Title;
Layout = null;
}
<!DOCTYPE html>
<html class="h-100">
<head>
<title>@Model.Title</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="@this.Context.Request.GetAbsoluteUri(themeManager.BootstrapUri)" rel="stylesheet" />
2018-04-03 04:50:41 +02:00
</head>
<body class="h-100">
<div class="container d-flex h-100">
2018-04-18 14:52:13 +02:00
<div class="justify-content-center align-self-center text-center mx-auto" style="margin: auto;">
2018-04-03 04:50:41 +02:00
<h1 class="mb-4">@Model.Title</h1>
2018-05-11 15:41:11 +02:00
<form method="post" asp-antiforgery="false">
2018-04-03 04:50:41 +02:00
<div class="row">
@for (int i = 0; i < Model.Items.Length; i++)
2018-04-03 04:50:41 +02:00
{
2018-04-26 17:00:32 +02:00
var className = (Model.Items.Length - i) > (Model.Items.Length % 3) ? "col-sm-4 mb-3" : "col align-self-center";
var item = Model.Items[i];
<div class="@className">
2018-04-03 04:50:41 +02:00
<h3>@item.Title</h3>
2018-04-08 07:28:39 +02:00
<button type="submit" name="choiceKey" class="btn btn-primary" value="@item.Id">Buy for @item.Price.Formatted</button>
2018-04-03 04:50:41 +02:00
</div>
}
</div>
</form>
@if (Model.ShowCustomAmount)
2018-04-26 15:09:18 +02:00
{
<div class="row mt-4">
<div class="col-sm-3">&nbsp;</div>
<div class="col-sm-6">
2018-05-11 15:41:11 +02:00
<form method="post" asp-antiforgery="false" data-buy>
2018-04-03 04:50:41 +02:00
<div class="input-group">
2018-04-26 15:09:18 +02:00
<input class="form-control" type="number" min="0" step="@Model.Step" name="amount" placeholder="amount"><div class="input-group-append">
2018-04-03 04:50:41 +02:00
<button class="btn btn-primary" type="submit">Pay</button>
</div>
</div>
</form>
</div>
<div class="col-sm-3">&nbsp;</div>
2018-04-26 15:09:18 +02:00
</div>
}
2018-04-03 04:50:41 +02:00
</div>
</div>
<script src="~/vendor/jquery/jquery.js"></script>
2018-04-08 07:28:39 +02:00
<script src="~/vendor/bootstrap4/js/bootstrap.js"></script>
2018-04-03 04:50:41 +02:00
</body>
</html>