feat(credits): free points tasks matrix, day cap, and tasks tab
Add AKSRT_Points_Free for catalog/day-max/daily detail, wire the full earn matrix (login, post, like, favorite, follow, comment, forum), expose 积分任务 + 每日详情 tabs, and expand admin free-task settings.
This commit is contained in:
1 parent
4da003663d
commit
15a883eb54
13 files changed
+728
-232
No files matched your search
@@ -48,9 +48,10 @@ if ($show_credits) {
|
||||
// Tabbed ledgers (Zibll record tabs).
|
||||
if ($show_wallet || $show_credits) :
|
||||
$active_record = isset($_GET['asset_tab']) ? sanitize_key(wp_unslash($_GET['asset_tab'])) : '';
|
||||
if ($active_record === '' || !in_array($active_record, ['balance', 'points'], true)) {
|
||||
if ($active_record === '' || !in_array($active_record, ['balance', 'points', 'points_free', 'points_date'], true)) {
|
||||
$active_record = $show_wallet ? 'balance' : 'points';
|
||||
}
|
||||
$show_tasks = $show_credits && class_exists('AKSRT_Points_Free') && AKSRT_Points_Free::enabled();
|
||||
?>
|
||||
<div class="uc-asset-tabs zib-widget">
|
||||
<ul class="uc-asset-tabs__nav list-inline tab-nav-theme font-bold">
|
||||
@@ -64,6 +65,11 @@ if ($show_wallet || $show_credits) :
|
||||
<a href="#record_tab_points" data-aksrt-asset-tab="points"><?php esc_html_e('积分记录', 'aksrt'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($show_tasks)) : ?>
|
||||
<li class="<?php echo in_array($active_record, ['points_free', 'points_date'], true) ? 'active' : ''; ?>">
|
||||
<a href="#record_tab_points_free" data-aksrt-asset-tab="points_free"><?php esc_html_e('积分任务', 'aksrt'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="uc-asset-tabs__content tab-content">
|
||||
<?php if ($show_wallet) : ?>
|
||||
@@ -100,6 +106,10 @@ if ($show_wallet || $show_credits) :
|
||||
</div>
|
||||
<div class="uc-transactions__amount">
|
||||
<span class="uc-transactions__delta <?php echo esc_attr($delta_class); ?>"><?php echo esc_html($delta_txt); ?></span>
|
||||
<span class="uc-transactions__balance"><?php printf(esc_html__('余额 %s', 'aksrt'), esc_html(class_exists('AKSRT_Balance') ? AKSRT_Balance::format((float) ($row['balance_after'] ?? 0)) : number_format_i18n((float) ($row['balance_after'] ?? 0), 2))); ?></span>
|
||||
<?php if (!empty($row['ref_id'])) : ?>
|
||||
<span class="uc-transactions__ref muted-2-color em09"><?php printf(esc_html__('单号 %s', 'aksrt'), esc_html((string) $row['ref_id'])); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
@@ -123,6 +133,14 @@ if ($show_wallet || $show_credits) :
|
||||
<?php require $dir . '/credits-transactions.php'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($show_tasks)) : ?>
|
||||
<div class="tab-pane<?php echo $active_record === 'points_free' ? ' is-active' : ''; ?>" id="record_tab_points_free" data-aksrt-asset-pane="points_free"<?php echo $active_record === 'points_free' ? '' : ' hidden'; ?>>
|
||||
<?php $points_tasks_pane = 'tasks'; require $dir . '/credits-points-tasks.php'; ?>
|
||||
</div>
|
||||
<div class="tab-pane<?php echo $active_record === 'points_date' ? ' is-active' : ''; ?>" id="tab_points_date" data-aksrt-asset-pane="points_date"<?php echo $active_record === 'points_date' ? '' : ' hidden'; ?>>
|
||||
<?php $points_tasks_pane = 'date'; require $dir . '/credits-points-tasks.php'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Reference in new issue
Block a user