Commit 02da780e authored by Gisle Hannemyr's avatar Gisle Hannemyr Committed by Gisle Hannemyr
Browse files

Issue #3249281 by gisle: Fixed display of README.txt.

parent edd216d3
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@ CONTENTS OF THIS FILE

* Introduction
* Requirements
* Recommended modules
* Installation
* Configuration
* Maintainers
@@ -18,7 +17,8 @@ framework that allows module and theme developers to integrate help texts in a
Drupal site, as well as exposing help to site administrators through the
administrative interface.

* For a full description of the module visit https://www.drupal.org/node/2461741
* For a full description of the module visit
  https://www.drupal.org/project/advanced_help

* To submit bug reports and feature suggestions, or to track changes visit
  https://www.drupal.org/project/issues/advanced_help
@@ -27,23 +27,15 @@ administrative interface.
REQUIREMENTS
------------

This module has no required dependencies outside of Drupal core.


RECOMMENDED MODULES
-------------------

* Advanced Help Hint (https://www.drupal.org/project/advanced_help_hint):
  If Advanced Help is not enabled, this module will generate a hint string that
  can be used in the project's hook_help to hint that Advanced Help should be
  enabled.
The project's requirements can be found in the project's composer.json.


INSTALLATION
------------

Install the Advanced Help module as you would normally install a contributed
Drupal module. Visit https://www.drupal.org/node/895232 for more information.
You must use composer to install the 8.x-1.x branch of the
project. The exact command line is displayed on the project page,
along with the release.


CONFIGURATION
@@ -58,4 +50,5 @@ README.md or README.txt.
MAINTAINERS
-----------

* Gisle Hannemyr - https://www.drupal.org/u/gisle
* David Valdez - https://www.drupal.org/u/gnuget
+7 −2
Original line number Diff line number Diff line
@@ -2,9 +2,14 @@
  "name": "drupal/advanced_help",
  "description": "Provide extended help and documentation.",
  "type": "drupal-module",
  "license": "GPL-2.0+",
  "license": "GPL-2.0-or-later",
  "minimum-stability": "dev",
  "authors": [
    {
      "name": "Gisle Hannemyr",
      "homepage": "https://www.drupal.org/u/gisle",
      "role": "Owner"
    },
    {
      "name": "David Valdez (gnuget)",
      "homepage": "https://www.drupal.org/u/gnuget",
@@ -17,7 +22,7 @@
    "source": "https://cgit.drupalcode.org/advanced_help"
  },
  "require": {
    "drupal/core": "^8 || ^9",
    "drupal/core": "^8.8 || ^9",
    "michelf/php-markdown": "^1.7"
  }
}
+12 −36
Original line number Diff line number Diff line
@@ -51,50 +51,26 @@ comes with a small companion demo module named
For more extensive example of use of the advanced help features, see
the <strong>Views</strong> project.</p>

<!--
<h2 id="project-recommended">Recommended modules</h2>

<ul>
<li><a href="https://www.drupal.org/project/markdown">Markdown filter</a>:<br>
When this module is enabled, display of any <code>README.md</code> the
module shows will be rendered with markdown.</li>
<li><a href="https://www.drupal.org/project/attributions">Attributions</a>:<br>
When this module is enabled, attributions of third party content used
by the project (i.e. some text from Wikipedia) will be available in an
attribution block and on an attribution page.</li>
</ul>
-->

<h2 id="support-status">Support status</h2>

<p>Reported bugs for the Drupal 7 branch will be fixed in a timely
manner.  Bugs in the issue queue for the Drupal 6 branch will only be
fixed if accompanied with a patch, after the patch has been reviewed
and tested by the community.  No Drupal 8 version is currently under
development.  Post a message in
the <a href="https://www.drupal.org/node/1928218">issue queue</a> if
you're interested in managing a port of the project to to Drupal
8. Older versions are no longer supported.</p>
<p>Reported bugs for all supported versions of the project will be
fixed in a timely manner (provided the bug report describes how to
reproduce the problem at will). Branches compatible with deprecated
versions of Drupal core are not supported.</p>

<p>Community support in the form of patches are very welcome for all
supported versions, and will be given priority. For QA, the project
needs community support in the form of reviews of patches, development
versions and releases.</p>

<p>Community support in the form of patches are very welcome for both
Drupal 6 and Drupal 7 versions, and will be given priority. For QA,
the project needs community support in the form of reviews of patches,
development versions and releases.</p>
<p>The team hopes that the community is willing to help out by
answering &amp; closing support requests.</p>

<p>The primary goal of the module is to remain <strong>light-weight
and simple</strong>.  This means that not all feature requests will be
implemented, even if they are a good idea.  Feature requests
accompanied by patches are more likely to make it into a release.</p>

<p>The maintainer hopes that the community is willing to help out by
answering &amp; closing support requests.</p>

<!--
<h2 id="project-problems">Known problems</h2>
-->



<h2 id="project-maintainers">Credits</h2>

<ul>
@@ -102,6 +78,6 @@ answering &amp; closing support requests.</p>
<li><a href="https://www.drupal.org/u/redndahead">redndahead</a> (8 commits)</li>
<li><a href="https://www.drupal.org/u/dmitrig01">dmitrig01</a> (3 commits)</li>
<li><a href="https://www.drupal.org/u/amitgoyal">amitgoyal </a> (5 commits)</li>
<li><a href="https://www.drupal.org/u/gisle">gisle</a> (current maintainer, D7)</li>
<li><a href="https://www.drupal.org/u/gisle">gisle</a> (current maintainer, D7, D9)</li>
<li><a href="https://www.drupal.org/u/gnuget">gnuget</a> (current maintainer, D8)</li>
</ul>
+7 −2
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ class AdvancedHelpController extends ControllerBase {
  }

  /**
   *
   * Load and render an README.md or README.txt help topic.
   */
  public function topicPage(Request $request, $module, $topic) {
    $is_modal = ($request->query->get(MainContentViewSubscriber::WRAPPER_FORMAT) === 'drupal_modal');
@@ -263,11 +263,16 @@ class AdvancedHelpController extends ControllerBase {
      $build['#markup'] = $this->t('Missing help topic.');
    }
    $build['#attached']['library'][] = 'advanced_help/help';
    $topicfile =$request->attributes->get('topic');
    $txt = strpos($topicfile, 'txt');
    if ($txt) {
      $build['#markup'] = '<pre>' .$build['#markup'] . '</pre>';
    }
    return $build;
  }

  /**
   * Load and render a help topic.
   * Load and render an Advanced Help help topic.
   *
   * @param string $module
   *   Name of the module.