Skip to content

Commit

Permalink
Merge pull request #29 from Islandora/26-local-library-path
Browse files Browse the repository at this point in the history
Issue #26: Fix 'Use local library' option.
  • Loading branch information
rosiel committed Aug 9, 2023
2 parents 7cdcf80 + f215ad9 commit 5aa8802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions islandora_mirador.module
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function islandora_mirador_library_info_alter(&$libraries, $extension) {
if ($config->get('mirador_library_installation_type') == 'local') {
unset($libraries['mirador']['remote']);
unset($libraries['mirador']['license']);
unset($libraries['mirador']['js']);
$libraries['mirador']['js']['/libraries/mirador/dist/main.js'] = [];
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/Form/MiradorConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

namespace Drupal\islandora_mirador\Form;

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\islandora_mirador\Annotation\IslandoraMiradorPlugin;
use Drupal\islandora_mirador\IslandoraMiradorPluginManager;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
* Mirador Settings Form.
*/
class MiradorConfigForm extends ConfigFormBase {

/**
* @var \Drupal\islandora_mirador\IslandoraMiradorPluginManager
*/
Expand Down Expand Up @@ -40,6 +42,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'local'=> $this->t('Local library placed in /libraries inside your webroot.'),
'remote' => $this->t('Default remote location'),
],
'#description' => $this->t("For local, put the output of 'npm run webpack' of <a href=\"https://github.com/roblib/mirador-integration-islandora\">Mirador Integration Islandora</a> into web/library/mirador/dist/ and ensure it's named main.js."),
'#default_value' => $config->get('mirador_library_installation_type'),
];

Expand Down

0 comments on commit 5aa8802

Please sign in to comment.