Skip to content

Commit 485ba26

Browse files
committed
Merge branch 'develop'
2 parents 71dfb95 + 7f99062 commit 485ba26

10 files changed

+165
-39
lines changed

Dashboard.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dashboard.module

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Dashboard extends Process implements Module
105105
{
106106
$this->version = self::getModuleInfo()['version'];
107107
$this->texts = (object) [
108-
'title' => $this->_('Dashboard'),
108+
'title' => $this->_x('Dashboard', 'title'),
109109
'usernav' => $this->_('Dashboard'),
110110
'headline' => $this->_('Welcome, %s'),
111111
'headline_without_user' => $this->_('Welcome'),
@@ -233,17 +233,20 @@ class Dashboard extends Process implements Module
233233
return $this->renderInstanceByKey($key, $panel);
234234
}
235235

236-
// Set headline and browser title
236+
// Set browser title
237+
$title = $this->getBrowserTitle();
238+
$this->browserTitle($title);
239+
240+
// Set headline
237241
if ($headline = $this->getHeadline()) {
238242
$this->headline($headline);
239243
} else {
240-
$this->headline($this->texts->title);
244+
$this->headline($title);
241245
// Add custom body class to hide empty headline
242246
$this->addHookAfter('AdminTheme::getExtraMarkup', function ($event) {
243247
$event->object->addBodyClass('DashboardNoHeadline');
244248
});
245249
}
246-
$this->browserTitle($this->texts->title);
247250

248251
// Render main view
249252
return $this->view('dashboard', [
@@ -447,6 +450,16 @@ class Dashboard extends Process implements Module
447450
return sprintf($text, $userLabel);
448451
}
449452

453+
/**
454+
* Hook to set browser title.
455+
*
456+
* @return string
457+
*/
458+
protected function ___getBrowserTitle()
459+
{
460+
return $this->texts->title;
461+
}
462+
450463
/**
451464
* Render user label.
452465
*

DashboardPanel.class.php

100755100644
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ final protected function renderIcon($icon)
283283
*/
284284
protected function renderTable($rows, $options = [])
285285
{
286+
/** @var \ProcessWire\MarkupAdminDataTable $table */
286287
$table = $this->modules->get('MarkupAdminDataTable');
287288

288289
$table->setSortable($options['sortable'] ?? false);

DashboardPanelCollection.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DashboardPanelCollection.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)