mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
a60c55c6df
* Transactions: Improve TX ID display * Elastic fix * Test and behaviour fix
50 lines
2.5 KiB
Plaintext
50 lines
2.5 KiB
Plaintext
@using BTCPayServer.Services
|
|
@using BTCPayServer.Components.LabelManager
|
|
@model ListTransactionsViewModel
|
|
@{
|
|
var walletId = Context.GetRouteValue("walletId").ToString();
|
|
}
|
|
@foreach (var transaction in Model.Transactions)
|
|
{
|
|
<tr class="mass-action-row">
|
|
<td class="only-for-js mass-action-select-col">
|
|
<input name="selectedTransactions" type="checkbox" class="form-check-input mass-action-select" form="WalletActions" value="@transaction.Id" />
|
|
</td>
|
|
<td class="date-col">
|
|
@transaction.Timestamp.ToBrowserDate()
|
|
</td>
|
|
<td class="text-start">
|
|
<vc:label-manager
|
|
wallet-object-id="new WalletObjectId(WalletId.Parse(walletId), WalletObjectData.Types.Tx, transaction.Id)"
|
|
selected-labels="transaction.Tags.Select(t => t.Text).ToArray()"
|
|
rich-label-info="transaction.Tags.Where(t=> !string.IsNullOrEmpty(t.Link)).ToDictionary(t => t.Text, t => new RichLabelInfo { Link = t.Link, Tooltip = t.Tooltip })"
|
|
exclude-types="false"
|
|
display-inline="true"/>
|
|
</td>
|
|
<td>
|
|
<vc:truncate-center text="@transaction.Id" link="@transaction.Link" classes="truncate-center-id" />
|
|
</td>
|
|
<td class="amount-col">
|
|
<span data-sensitive class="text-@(transaction.Positive ? "success" : "danger")">@transaction.Balance</span>
|
|
</td>
|
|
<td class="text-end">
|
|
<div class="d-inline-block">
|
|
<button class="btn btn-link p-0 @(!string.IsNullOrEmpty(transaction.Comment) ? "text-primary" : "text-secondary")" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<vc:icon symbol="actions-comment" />
|
|
</button>
|
|
<div class="dropdown-menu">
|
|
<form asp-action="ModifyTransaction" method="post" style="width:260px;" asp-route-walletId="@Context.GetRouteValue("walletId")">
|
|
<input type="hidden" name="transactionId" value="@transaction.Id" />
|
|
<div class="input-group p-2">
|
|
<textarea name="addcomment" maxlength="200" rows="2" cols="20" class="form-control form-control-sm p-1">@transaction.Comment</textarea>
|
|
</div>
|
|
<div class="p-2">
|
|
<button type="submit" class="btn btn-primary btn-sm w-100">Save comment</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|