Skip to content

Commit

Permalink
Added "<currency> per <mass>" to views for prices
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterZydra committed Feb 20, 2024
1 parent a650cc9 commit 786ec23
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions resources/Lang/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
'Value' => 'Wert',
'VolumeDistribution' => 'Mengenverteilung',
'WelcomeToMemberArea' => 'Willkommen im Mitgliederbereich',
'XPerY' => '%s pro %s',
'Year' => 'Jahr',
'Yes' => 'Ja',
];
1 change: 1 addition & 0 deletions resources/Lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
'Value' => 'Value',
'VolumeDistribution' => 'Volume distribution',
'WelcomeToMemberArea' => 'Welcome to member area',
'XPerY' => '%s per %s',
'Year' => 'Year',
'Yes' => 'Yes',
];
6 changes: 2 additions & 4 deletions resources/Views/entities/price/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@

<?= component('recipientSelect') ?><br>

<!-- Preis (pro getSetting('volumeUnit');) -->
<label for="price" class="required"><?= __('Price') ?>:</label><br>
<label for="price" class="required"><?= __('Price') ?> (<?= sprintf(__('XPerY'), setting('currencyUnit'), setting('massUnit')) ?>):</label><br>
<input id="price" name="price" type="number" step="0.01" required><br>

<!-- Preis (pro getSetting('volumeUnit');) -->
<label for="pricePayout" class="required"><?= __('Payout') ?>:</label><br>
<label for="pricePayout" class="required"><?= __('Payout') ?> (<?= sprintf(__('XPerY'), setting('currencyUnit'), setting('massUnit')) ?>):</label><br>
<input id="pricePayout" name="pricePayout" type="number" step="0.01" required><br>

<button><?= __('Create') ?></button>
Expand Down
8 changes: 4 additions & 4 deletions resources/Views/entities/price/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

<?= component('recipientSelect', ['selected' => $price->getRecipientId()]) ?><br>

<!-- Preis (pro getSetting('volumeUnit');) -->
<label for="price" class="required"><?= __('Price') ?>:</label><br>
<!-- Preis (pro getSetting('massUnit');) -->
<label for="price" class="required"><?= __('Price') ?> (<?= sprintf(__('XPerY'), setting('currencyUnit'), setting('massUnit')) ?>):</label><br>
<input id="price" name="price" type="number" step="0.01" value="<?= $price->getPrice() ?>" required><br>

<!-- Preis (pro getSetting('volumeUnit');) -->
<label for="pricePayout" class="required"><?= __('Payout') ?>:</label><br>
<!-- Preis (pro getSetting('massUnit');) -->
<label for="pricePayout" class="required"><?= __('Payout') ?> (<?= sprintf(__('XPerY'), setting('currencyUnit'), setting('massUnit')) ?>):</label><br>
<input id="pricePayout" name="pricePayout" type="number" step="0.01" value="<?= $price->getPricePayout() ?>" required><br>

<button><?= __('Save') ?></button>
Expand Down
4 changes: 2 additions & 2 deletions resources/Views/entities/price/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<th class="center"><?= __('Product') ?></th>
<th class="center"><?= __('Recipient') ?></th>
<th class="center"><?= __('Year') ?></th>
<th class="center"><?= __('Price') ?></th>
<th class="center"><?= __('Payout') ?></th>
<th class="center"><?= __('Price') ?> (<?= sprintf(__('XPerY'), setting('currencyUnit'), setting('massUnit')) ?>)</th>
<th class="center"><?= __('Payout') ?> (<?= sprintf(__('XPerY'), setting('currencyUnit'), setting('massUnit')) ?>)</th>
<th class="center"><?= __('Actions') ?></th>
</tr>
<?php /** @var \App\Models\Price $price */
Expand Down

0 comments on commit 786ec23

Please sign in to comment.