refactor(site-subscriptions): reuse blocked hint component for batch mark expired
This commit is contained in:
@@ -427,17 +427,18 @@
|
||||
<div>
|
||||
<button class="btn btn-danger btn-sm" type="submit" @disabled(! $batchMarkExpiredEnabled) title="{{ $batchMarkExpiredReason }}">批量标记已过期(当前集合)</button>
|
||||
@if(! $batchMarkExpiredEnabled)
|
||||
<div class="adm-tool-blocked-hint" data-role="batch-mark-expired-blocked-hint">
|
||||
<div>提示:{{ $batchMarkExpiredReason }}</div>
|
||||
@php
|
||||
// 提效:被阻断时给一键跳转到「已过期(expiry=expired)」集合,避免运营来回找入口。
|
||||
// 说明:这里选择保留当前 ends_from/ends_to 区间(若有),避免运营还要重新输入到期范围。
|
||||
$goExpiredUrl = $buildSelfUrl(['status' => null, 'expiry' => 'expired', 'page' => null]);
|
||||
@endphp
|
||||
<div class="mt-6 actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $goExpiredUrl !!}">切到已过期集合</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
// 提效:被阻断时给一键跳转到「已过期(expiry=expired)」集合,避免运营来回找入口。
|
||||
// 说明:这里选择保留当前 ends_from/ends_to 区间(若有),避免运营还要重新输入到期范围。
|
||||
$goExpiredUrl = $buildSelfUrl(['status' => null, 'expiry' => 'expired', 'page' => null]);
|
||||
@endphp
|
||||
@include('admin.components.tool_blocked_hint', [
|
||||
'dataRole' => 'batch-mark-expired-blocked-hint',
|
||||
'reason' => $batchMarkExpiredReason,
|
||||
'actions' => [
|
||||
['label' => '切到已过期集合', 'url' => $goExpiredUrl],
|
||||
],
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user