Skip to content

Commit

Permalink
adapt counter vue page
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Aug 26, 2024
1 parent 2a5d9f5 commit 8054d27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
10 changes: 7 additions & 3 deletions pages/stats/PKPStatsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,17 @@ public function counterR5(array $args, Request $request): void
$lastDate = CounterR5Report::getLastDate();

$templateMgr->setState([
'components' => [
'pageInitConfig' => [
$counterReportsListPanel->id => $counterReportsListPanel->getConfig(),
'usageNotPossible' => $lastDate <= $earliestDate,
'title' => __('manager.statistics.counterR5Reports'),
'description' => __('manager.statistics.counterR5Reports.description'),
],
]);
$templateMgr->assign([
'pageComponent' => 'CounterReportsPage',
'usagePossible' => $lastDate > $earliestDate,
'pageComponent' => 'Page',
'pageTitle' => __('manager.statistics.counterR5Reports'),
'pageWidth' => TemplateManager::PAGE_WIDTH_FULL,
]);
$templateMgr->display('stats/counterReports.tpl');
}
Expand Down
16 changes: 1 addition & 15 deletions templates/stats/counterReports.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,5 @@
{extends file="layouts/backend.tpl"}

{block name="page"}
<h1 class="app__pageHeading">
{translate key="manager.statistics.counterR5Reports"}
</h1>
<p>{translate key="manager.statistics.counterR5Reports.description"}</p>
{if !$usagePossible}
<notification class="pkpNotification--backendPage__header" type="warning">{translate key="manager.statistics.counterR5Reports.usageNotPossible"}</notification>
{/if}
<panel>
<panel-section>
<counter-reports-list-panel
v-bind="components.counterReportsListPanel"
@set="set"
/>
</panel-section>
</panel>
<counter-reports-page v-bind="pageInitConfig" />
{/block}

0 comments on commit 8054d27

Please sign in to comment.