Commit 72b2a980 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3202967 by Gábor Hojtsy: Make upgrade status target version clear in title

parent 36b257a1
......@@ -1192,4 +1192,11 @@ MARKUP
return [$error, $message, $data];
}
/**
* Dynamic page title for the form to make the status target clear.
*/
public function getTitle() {
return $this->t('Drupal @version upgrade status', ['@version' => $this->nextMajor]);
}
}
......@@ -2,15 +2,16 @@
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Extension\Extension;
use Drupal\upgrade_status\ProjectCollector;
/**
* Implements hook_help().
*/
function upgrade_status_help($route_name, RouteMatchInterface $route_match) {
if ($route_name == 'upgrade_status.report') {
$help = '<p>' . t('Analyze your site\'s readiness for the next major Drupal version. Run the report to find out if there are detectable compatibility errors with the modules and themes installed on your site.');
$help = '<p>' . t('Run the report to find out if there are detectable compatibility errors with the modules and themes installed on your site.');
// @todo Link to a relevant page for the Drupal 9 to 10 process when available.
if ((int) \Drupal::VERSION < 9) {
if (ProjectCollector::getDrupalCoreMajorVersion() < 9) {
$help .= t('<a href=":prepare">Read more about preparing your site for Drupal 9</a>.', [':prepare' => 'https://www.drupal.org/docs/9/how-to-prepare-your-drupal-7-or-8-site-for-drupal-9/prepare-a-drupal-8-site-for-drupal-9']);
}
$help .= '</p>';
......
......@@ -2,7 +2,7 @@ upgrade_status.report:
path: '/admin/reports/upgrade-status'
defaults:
_form: '\Drupal\upgrade_status\Form\UpgradeStatusForm'
_title: 'Upgrade status'
_title_callback: '\Drupal\upgrade_status\Form\UpgradeStatusForm::getTitle'
requirements:
_permission: 'administer software updates'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment