From 2eaf5eabd1cc45e9d4306891a6d5bebfcd8d2005 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 30 Jan 2023 14:06:12 +0800 Subject: [PATCH] improve medal display page --- public/medal.php | 25 +++++++++++-------------- resources/lang/en/medal.php | 2 ++ resources/lang/zh_CN/medal.php | 2 ++ resources/lang/zh_TW/medal.php | 2 ++ 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/public/medal.php b/public/medal.php index d9a801e3..b53b50f7 100644 --- a/public/medal.php +++ b/public/medal.php @@ -21,9 +21,9 @@ $columnDescriptionLabel = nexus_trans('medal.fields.description'); $columnBuyLabel = nexus_trans('medal.buy_btn'); $columnSaleBeginEndTimeLabel = nexus_trans('medal.fields.sale_begin_end_time'); $columnInventoryLabel = nexus_trans('medal.fields.inventory'); -$columnBonusAdditionFactorLabel = nexus_trans('medal.fields.bonus_addition_factor'); +$columnBonusAdditionLabel = nexus_trans('medal.fields.bonus_addition'); $columnGiftLabel = nexus_trans('medal.gift_btn'); -$columnGiftFeeFactorLabel = nexus_trans('medal.fields.gift_fee_factor'); +$columnGiftFeeLabel = nexus_trans('medal.fields.gift_fee'); $header = '

'.$title.'

'; $filterForm = <<
@@ -40,16 +40,13 @@ $table = << - - - - - - - - + + + + + @@ -91,12 +88,12 @@ foreach ($rows as $row) { $buyClass, $row->id, $buyBtnText, $buyDisabled ); $giftAction = sprintf( - '', - $giftDisabled, $giftClass, $row->id, $giftBtnText, $giftDisabled + '%s: %s', + $giftDisabled, $giftClass, $row->id, $giftBtnText, $giftDisabled, $columnGiftFeeLabel, (($row->gift_fee_factor ?? 0) * 100).'%' ); $table .= sprintf( - '', - $row->id, $row->name, $row->image_large, $row->sale_begin_time ?? '--', $row->sale_end_time ?? '--', $row->bonus_addition_factor, $row->gift_fee_factor ?? 0, number_format($row->price), $row->durationText, $row->inventory ?? nexus_trans('label.infinite'), $row->description, $buyAction, $giftAction + '', + $row->image_large, $row->name, $row->description, $row->sale_begin_time ?? '--', $row->sale_end_time ?? '--', $row->durationText, (($row->bonus_addition_factor ?? 0) * 100).'%', number_format($row->price), $row->inventory ?? nexus_trans('label.infinite'), $buyAction, $giftAction ); } $table .= '
ID$columnNameLabel $columnImageLargeLabel$columnSaleBeginEndTimeLabel$columnBonusAdditionFactorLabel$columnGiftFeeFactorLabel$columnPriceLabel$columnDurationLabel$columnInventoryLabel $columnDescriptionLabel$columnSaleBeginEndTimeLabel$columnDurationLabel$columnBonusAdditionLabel$columnPriceLabel$columnInventoryLabel $columnBuyLabel $columnGiftLabel
%s%s%s ~
%s
%s%s%s%s%s%s%s%s

%s

%s
%s ~
%s
%s%s%s%s%s%s
'; diff --git a/resources/lang/en/medal.php b/resources/lang/en/medal.php index 50fccded..7ee1b9dc 100644 --- a/resources/lang/en/medal.php +++ b/resources/lang/en/medal.php @@ -27,8 +27,10 @@ return [ 'sale_begin_end_time' => 'Available for sale', 'users_count' => 'Sold counts', 'bonus_addition_factor' => 'Bonus addition factor', + 'bonus_addition' => 'Bonus addition', 'bonus_addition_factor_help' => 'For example: 0.01 means 1% addition, leave blank no addition', 'gift_fee_factor' => 'Gift fee factor', + 'gift_fee' => 'Gift fee', 'gift_fee_factor_help' => 'The additional fee charged for gifts to other users is equal to the price multiplied by this factor', ], 'buy_already' => 'Already buy', diff --git a/resources/lang/zh_CN/medal.php b/resources/lang/zh_CN/medal.php index 3ec6cd16..dd14434e 100644 --- a/resources/lang/zh_CN/medal.php +++ b/resources/lang/zh_CN/medal.php @@ -27,8 +27,10 @@ return [ 'sale_begin_end_time' => '可购买时间', 'users_count' => '已售数量', 'bonus_addition_factor' => '魔力加成系数', + 'bonus_addition' => '魔力加成', 'bonus_addition_factor_help' => '如:0.01 表示 1% 的加成,留空无加成', 'gift_fee_factor' => '赠送手续费系数', + 'gift_fee' => '手续费', 'gift_fee_factor_help' => '赠送给其他用户时额外收取手续费等于价格乘以此系数', ], 'buy_already' => '已经购买', diff --git a/resources/lang/zh_TW/medal.php b/resources/lang/zh_TW/medal.php index 710684e5..a164298b 100644 --- a/resources/lang/zh_TW/medal.php +++ b/resources/lang/zh_TW/medal.php @@ -27,8 +27,10 @@ return [ 'sale_begin_end_time' => '可購買時間', 'users_count' => '已售數量', 'bonus_addition_factor' => '魔力加成系數', + 'bonus_addition' => '魔力加成', 'bonus_addition_factor_help' => '如:0.01 表示 1% 的加成,留空無加成', 'gift_fee_factor' => '贈送手續費系數', + 'gift_fee' => '手續費', 'gift_fee_factor_help' => '贈送給其他用戶時額外收取手續費等於價格乘以此系數', ], 'buy_already' => '已經購買',