Commit 26e6e986 authored by Narendra Singh Rathore's avatar Narendra Singh Rathore Committed by Tim Plunkett
Browse files

Issue #3296264 by ressa, omkar-pd, narendraR, aarti zikre, tim.plunkett: Use...

Issue #3296264 by ressa, omkar-pd, narendraR, aarti zikre, tim.plunkett: Use drush pm:install in Download instructions
parent 529663bc
Loading
Loading
Loading
Loading
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+8 −8
Original line number Diff line number Diff line
@@ -21,14 +21,14 @@
  }

  /**
   * Determine if a project is enabled/installed in the local Drupal codebase.
   * Determine if a project is installed in the local Drupal codebase.
   *
   * @param {string} projectName
   *   The project name.
   * @return {boolean}
   *   True if the project is enabled.
   *   True if the project is installed.
   */
  function projectIsEnabled(projectName) {
  function projectIsInstalled(projectName) {
    return (
      typeof drupalSettings !== 'undefined' &&
      projectName in MODULE_STATUS &&
@@ -94,14 +94,14 @@
    );
    const install = Drupal.t('Install');
    const installText = Drupal.t(
      'To use the module you must next install/enable it. Visit the !module_page_open modules page !close to install the module using your web browser!close',
      'To use the module you must next install it. Visit the !module_page_open modules page!close to install the module using your web browser!close',
      {
        '!module_page_open': `<a href="${ORIGIN_URL}/admin/modules#module-${project.field_project_machine_name}" target="_blank" rel="noreferrer">`,
        '!close': '</a>',
      },
    );
    const drushText = Drupal.t(
      'Alternatively, you can use !drush_openDrush!close to enable it via the command line.',
      'Alternatively, you can use !drush_openDrush!close to install it via the command line',
      {
        '!drush_open':
          '<a href="https://www.drush.org/latest/" target="_blank">',
@@ -126,7 +126,7 @@
              <p>${installText}.</p>
              <p>${drushText}:</p>
              <div id="install-cmd">
                <input id="${project.field_project_machine_name}-install-command" value="drush pm-enable ${project.field_project_machine_name}"/>
                <input id="${project.field_project_machine_name}-install-command" value="drush pm:install ${project.field_project_machine_name}"/>
                <button id="install-btn"><img src="${FULL_MODULE_PATH}/images/copy-icon.svg" alt={Drupal.t('Copy the install command')}/></button>
                <div id="${project.field_project_machine_name}-copied-install" class="copied-install">${copied}</div>
              </div>`;
@@ -158,7 +158,7 @@
      ><button class="button is-disabled">{Drupal.t('Not compatible')}</button
      ></span
    >
  {:else if projectIsEnabled(project.field_project_machine_name)}
  {:else if projectIsInstalled(project.field_project_machine_name)}
    <span
      ><a
        href="{ORIGIN_URL}/admin/modules#module-{project.field_project_machine_name}"