diff --git a/targets/Readme.txt b/modules/Readme.txt similarity index 100% rename from targets/Readme.txt rename to modules/Readme.txt diff --git a/targets/evergreen/css/roblib_search_evergreen.css b/modules/evergreen/css/roblib_search_evergreen.css similarity index 100% rename from targets/evergreen/css/roblib_search_evergreen.css rename to modules/evergreen/css/roblib_search_evergreen.css diff --git a/targets/evergreen/js/evergreen_results.js b/modules/evergreen/js/evergreen_results.js similarity index 100% rename from targets/evergreen/js/evergreen_results.js rename to modules/evergreen/js/evergreen_results.js diff --git a/targets/evergreen/roblib_search_evergreen.info b/modules/evergreen/roblib_search_evergreen.info similarity index 100% rename from targets/evergreen/roblib_search_evergreen.info rename to modules/evergreen/roblib_search_evergreen.info diff --git a/targets/evergreen/roblib_search_evergreen.install b/modules/evergreen/roblib_search_evergreen.install similarity index 100% rename from targets/evergreen/roblib_search_evergreen.install rename to modules/evergreen/roblib_search_evergreen.install diff --git a/targets/evergreen/roblib_search_evergreen.module b/modules/evergreen/roblib_search_evergreen.module similarity index 100% rename from targets/evergreen/roblib_search_evergreen.module rename to modules/evergreen/roblib_search_evergreen.module diff --git a/targets/evergreen/theme/roblib-search-evergreen.tpl.php b/modules/evergreen/theme/roblib-search-evergreen.tpl.php similarity index 100% rename from targets/evergreen/theme/roblib-search-evergreen.tpl.php rename to modules/evergreen/theme/roblib-search-evergreen.tpl.php diff --git a/targets/evergreen/theme/theme.inc b/modules/evergreen/theme/theme.inc similarity index 100% rename from targets/evergreen/theme/theme.inc rename to modules/evergreen/theme/theme.inc diff --git a/targets/islandscholar/css/roblib_search_islandscholar.css b/modules/islandscholar/css/roblib_search_islandscholar.css similarity index 100% rename from targets/islandscholar/css/roblib_search_islandscholar.css rename to modules/islandscholar/css/roblib_search_islandscholar.css diff --git a/targets/islandscholar/js/islandscholar_results.js b/modules/islandscholar/js/islandscholar_results.js similarity index 100% rename from targets/islandscholar/js/islandscholar_results.js rename to modules/islandscholar/js/islandscholar_results.js diff --git a/targets/islandscholar/roblib_search_islandscholar.info b/modules/islandscholar/roblib_search_islandscholar.info similarity index 100% rename from targets/islandscholar/roblib_search_islandscholar.info rename to modules/islandscholar/roblib_search_islandscholar.info diff --git a/targets/islandscholar/roblib_search_islandscholar.install b/modules/islandscholar/roblib_search_islandscholar.install similarity index 100% rename from targets/islandscholar/roblib_search_islandscholar.install rename to modules/islandscholar/roblib_search_islandscholar.install diff --git a/targets/islandscholar/roblib_search_islandscholar.module b/modules/islandscholar/roblib_search_islandscholar.module similarity index 100% rename from targets/islandscholar/roblib_search_islandscholar.module rename to modules/islandscholar/roblib_search_islandscholar.module diff --git a/targets/islandscholar/theme/roblib-search-islandscholar.tpl.php b/modules/islandscholar/theme/roblib-search-islandscholar.tpl.php similarity index 100% rename from targets/islandscholar/theme/roblib-search-islandscholar.tpl.php rename to modules/islandscholar/theme/roblib-search-islandscholar.tpl.php diff --git a/targets/islandscholar/theme/theme.inc b/modules/islandscholar/theme/theme.inc similarity index 100% rename from targets/islandscholar/theme/theme.inc rename to modules/islandscholar/theme/theme.inc diff --git a/targets/passthru_results/css/roblib_search_passthru.css b/modules/passthru_results/css/roblib_search_passthru.css similarity index 100% rename from targets/passthru_results/css/roblib_search_passthru.css rename to modules/passthru_results/css/roblib_search_passthru.css diff --git a/targets/passthru_results/js/passthru_results.js b/modules/passthru_results/js/passthru_results.js similarity index 100% rename from targets/passthru_results/js/passthru_results.js rename to modules/passthru_results/js/passthru_results.js diff --git a/targets/passthru_results/roblib_search_passthru.info b/modules/passthru_results/roblib_search_passthru.info similarity index 100% rename from targets/passthru_results/roblib_search_passthru.info rename to modules/passthru_results/roblib_search_passthru.info diff --git a/targets/passthru_results/roblib_search_passthru.install b/modules/passthru_results/roblib_search_passthru.install similarity index 100% rename from targets/passthru_results/roblib_search_passthru.install rename to modules/passthru_results/roblib_search_passthru.install diff --git a/targets/passthru_results/roblib_search_passthru.module b/modules/passthru_results/roblib_search_passthru.module similarity index 100% rename from targets/passthru_results/roblib_search_passthru.module rename to modules/passthru_results/roblib_search_passthru.module diff --git a/targets/passthru_results/theme/roblib-search-passthru.tpl.php b/modules/passthru_results/theme/roblib-search-passthru.tpl.php similarity index 100% rename from targets/passthru_results/theme/roblib-search-passthru.tpl.php rename to modules/passthru_results/theme/roblib-search-passthru.tpl.php diff --git a/targets/passthru_results/theme/theme.inc b/modules/passthru_results/theme/theme.inc similarity index 100% rename from targets/passthru_results/theme/theme.inc rename to modules/passthru_results/theme/theme.inc diff --git a/targets/eds/css/roblib_search_eds.css b/modules/roblib_search_eds/css/roblib_search_eds.css similarity index 100% rename from targets/eds/css/roblib_search_eds.css rename to modules/roblib_search_eds/css/roblib_search_eds.css diff --git a/targets/eds/js/eds_results.js b/modules/roblib_search_eds/js/eds_results.js similarity index 100% rename from targets/eds/js/eds_results.js rename to modules/roblib_search_eds/js/eds_results.js diff --git a/targets/eds/js/eds_results_article.js b/modules/roblib_search_eds/js/eds_results_article.js similarity index 100% rename from targets/eds/js/eds_results_article.js rename to modules/roblib_search_eds/js/eds_results_article.js diff --git a/modules/roblib_search_eds/roblib_search_eds.info.yml b/modules/roblib_search_eds/roblib_search_eds.info.yml new file mode 100644 index 0000000..160efee --- /dev/null +++ b/modules/roblib_search_eds/roblib_search_eds.info.yml @@ -0,0 +1,9 @@ +name: Roblib Search EDS +type: module +configure: roblib_search_eds.settings +description: Implements the Roblib Search EDS book and article results +package: Roblib Search +core_version_requirement: ^8.9 || ^9 +dependancies: + - roblib_search + - ebsco \ No newline at end of file diff --git a/targets/eds/roblib_search_eds.module b/modules/roblib_search_eds/roblib_search_eds.module similarity index 90% rename from targets/eds/roblib_search_eds.module rename to modules/roblib_search_eds/roblib_search_eds.module index 93c5c86..4cd19f2 100644 --- a/targets/eds/roblib_search_eds.module +++ b/modules/roblib_search_eds/roblib_search_eds.module @@ -60,7 +60,7 @@ function roblib_search_eds_info($type = 'Articles') { /** * Implements hook_permission(). */ -function roblib_search_eds_permission() { +/*function roblib_search_eds_permission() { return array( 'search roblib eds' => array( 'title' => t('Search the eds target'), @@ -71,36 +71,26 @@ function roblib_search_eds_permission() { 'description' => t('Administer settings for the Roblib eds search client.'), ), ); -} +}*/ + /** * Implements hook_theme(). */ -function roblib_search_eds_theme() { - // set path - $path = drupal_get_path('module', 'roblib_search_eds'); - $file = 'theme.inc'; - - return array( - // results page - 'roblib_search_eds' => array( - 'path' => $path . '/theme', - 'file' => $file, - 'template' => 'roblib-search-eds', - 'variables' => array('results' => NULL), - ), - 'roblib_search_eds_articles' => array( - 'path' => $path . '/theme', - 'file' => $file, - 'template' => 'roblib-search-eds-articles', - 'variables' => array('results' => NULL), - ), - ); +function roblib_search_eds_theme($existing, $type, $theme, $path) { + return [ + 'roblib_search_eds_books' => [ + 'variables' => ['query' => NULL], + ], + 'roblib_search_eds_articles' => [ + 'variables' => ['query' => NULL], + ], + ]; } -function roblib_search_eds_block_info() { +/*function roblib_search_eds_block_info() { $blocks['roblib_search_eds_results'] = array( // info: The name of the block. @@ -113,9 +103,9 @@ function roblib_search_eds_block_info() { 'cache' => DRUPAL_CACHE_PER_ROLE, ); return $blocks; -} +}*/ -function roblib_search_eds_block_view($delta = '') { +/*function roblib_search_eds_block_view($delta = '') { switch ($delta) { case 'roblib_search_eds_results': $block['subject'] = t('Books & Media'); @@ -129,9 +119,9 @@ function roblib_search_eds_block_view($delta = '') { } return $block; -} +}*/ -function roblib_search_eds_ajax($query) { +/*function roblib_search_eds_ajax($query) { print roblib_search_eds_get_results($query, 'Books'); exit(); } @@ -139,7 +129,7 @@ function roblib_search_eds_ajax($query) { function roblib_search_eds_articles($query) { print roblib_search_eds_get_results($query, 'Articles'); exit(); -} +}*/ /** * diff --git a/modules/roblib_search_eds/roblib_search_eds.routing.yml b/modules/roblib_search_eds/roblib_search_eds.routing.yml new file mode 100644 index 0000000..a8825c1 --- /dev/null +++ b/modules/roblib_search_eds/roblib_search_eds.routing.yml @@ -0,0 +1,8 @@ +roblib_search_eds.settings: + path: '/admin/config/system/roblib_search_eds_settings' + defaults: + _form: '\Drupal\roblib_search_eds\Form\EdsSettingsForm' + _title: 'Roblib Search EDS Settings Form' + requirements: + _permission: 'administer site configuration' + \ No newline at end of file diff --git a/targets/eds/Controller/RoblibSearchEdsController.php b/modules/roblib_search_eds/src/Controller/RoblibSearchEdsController.php similarity index 79% rename from targets/eds/Controller/RoblibSearchEdsController.php rename to modules/roblib_search_eds/src/Controller/RoblibSearchEdsController.php index 044b62f..e95a8bf 100644 --- a/targets/eds/Controller/RoblibSearchEdsController.php +++ b/modules/roblib_search_eds/src/Controller/RoblibSearchEdsController.php @@ -16,10 +16,7 @@ class RoblibSearchEdsController extends ControllerBase { * A renderable array. */ public function articleResults($query = NULL) { - return [ - '#theme' => 'roblib_search_results', - '#query' => $query, - ]; + } /** @@ -30,7 +27,7 @@ class RoblibSearchEdsController extends ControllerBase { */ public function bookResults($query = NULL) { return [ - '#theme' => 'roblib_search_results', + '#theme' => 'roblib_search_eds_books', '#query' => $query, ]; } diff --git a/modules/roblib_search_eds/src/Form/EdsSettingsForm.php b/modules/roblib_search_eds/src/Form/EdsSettingsForm.php new file mode 100644 index 0000000..f0c0b52 --- /dev/null +++ b/modules/roblib_search_eds/src/Form/EdsSettingsForm.php @@ -0,0 +1,137 @@ + 'textfield', + '#title' => t('EDS Rest endpoint'), + '#default_value' => $config->get('eds_rest_url'), + '#description' => t('The base EDS URL, for example https://eds-api.ebscohost.com/edsapi/rest'), + '#required' => TRUE, + ); + $form['eds_auth_url'] = array( + '#type' => 'textfield', + '#title' => t('EDS Auth endpoint'), + '#default_value' => $config->get('eds_auth_url'), + '#description' => t('The EDS Auth endpoint, for example https://eds-api.ebscohost.com/Authservice/rest'), + '#required' => TRUE, + ); + + $form['eds_user'] = array( + '#type' => 'textfield', + '#title' => t('EDS user'), + '#default_value' => $config->get('eds_user'), + '#description' => t('EDS user, for example username'), + '#required' => TRUE, + ); + + $form['eds_pass'] = array( + '#type' => 'textfield', + '#title' => t('EDS password'), + '#default_value' => $config->get('eds_pass'), + '#description' => t('EDS password, for example password'), + '#required' => TRUE, + ); + + $form['eds_guest'] = array( + '#type' => 'textfield', + '#title' => t('EDS Guest access'), + '#default_value' => $config->get('eds_guest'), + '#description' => t('EDS Guest access, y = guest access, n = not a guest'), + '#required' => TRUE, + ); + + $form['eds_article_profile'] = array( + '#type' => 'textfield', + '#title' => t('EDS Article profile'), + '#default_value' => $config->get('eds_article_profile'), + '#description' => t('EDS profile, for example edsapi'), + '#required' => TRUE, + ); + + $form['eds_book_profile'] = array( + '#type' => 'textfield', + '#title' => t('EDS Book profile'), + '#default_value' => $config->get('eds_book_profile'), + '#description' => t('EDS Book profile, for example apilite'), + '#required' => TRUE, + ); + + $form['eds_num_results'] = array( + '#type' => 'textfield', + '#title' => t('Number of results to return'), + '#default_value' => $config->get('eds_num_results'), + '#description' => t('The number of results to display in the Bento box, usurally 5'), + '#required' => TRUE, + ); + $form['eds_article_limiters'] = array( + '#type' => 'textarea', + '#title' => t('The limiters for Article searches'), + '#default_value' => $config->get('eds_article_limiters'), + '#description' => t('Specify the Publication Types to use as limiters for Article searches. Formatted similar to + AND (PT Article OR PT Magazines OR PT News OR PT Academic Journals OR PT Conference Materials)'), + '#required' => TRUE, + ); + $form['eds_book_limiters'] = array( + '#type' => 'textarea', + '#title' => t('The limiters for Books and Media searches'), + '#default_value' => $config->get('eds_book_limiters'), + '#description' => t('Specify the Publication Types to use as limiters for Article searches. Formatted similar to + AND (PT Book OR PT Video OR PT Audio'), + '#required' => TRUE, + ); + $form['actions']['submit'] = [ + '#type' => 'submit', + '#value' => t('Save'), + '#button_type' => 'primary', + ]; + return $form; + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + $config = \Drupal::configFactory()->getEditable('roblib_search_eds.settings'); + $config->set('eds_rest_url', $form_state->getValue('eds_rest_url'))->save(); + $config->set('eds_auth_url', $form_state->getValue('eds_auth_url'))->save(); + $config->set('eds_user', $form_state->getValue('eds_user'))->save(); + $config->set('eds_pass', $form_state->getValue('eds_pass'))->save(); + $config->set('eds_guest', $form_state->getValue('eds_guest'))->save(); + $config->set('eds_article_profile', $form_state->getValue('eds_article_profile'))->save(); + $config->set('eds_book_profile', $form_state->getValue('eds_book_profile'))->save(); + $config->set('eds_num_results', $form_state->getValue('eds_num_results'))->save(); + $config->set('eds_article_limiters', $form_state->getValue('eds_article_limiters'))->save(); + $config->set('eds_book_limiters', $form_state->getValue('eds_book_limiters'))->save(); + } + +} diff --git a/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php new file mode 100644 index 0000000..a3dd6dc --- /dev/null +++ b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsArticles.php @@ -0,0 +1,27 @@ + 'roblib_search_eds_articles', + '#query' => $query, + ]; + } +} diff --git a/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php new file mode 100644 index 0000000..febfa3e --- /dev/null +++ b/modules/roblib_search_eds/src/Plugin/Block/RoblibSearchEdsBooks.php @@ -0,0 +1,27 @@ + 'roblib_search_eds_books', + '#query' => $query, + ]; + } +} diff --git a/modules/roblib_search_eds/templates/roblib-search-eds-articles.html.twig b/modules/roblib_search_eds/templates/roblib-search-eds-articles.html.twig new file mode 100644 index 0000000..b24bb89 --- /dev/null +++ b/modules/roblib_search_eds/templates/roblib-search-eds-articles.html.twig @@ -0,0 +1,12 @@ + +
+
+ + +
+ +
+
+ + + diff --git a/targets/eds/theme/roblib-search-eds.tpl.php b/modules/roblib_search_eds/templates/roblib-search-eds-books.html.twig similarity index 70% rename from targets/eds/theme/roblib-search-eds.tpl.php rename to modules/roblib_search_eds/templates/roblib-search-eds-books.html.twig index 775629a..27573e0 100644 --- a/targets/eds/theme/roblib-search-eds.tpl.php +++ b/modules/roblib_search_eds/templates/roblib-search-eds-books.html.twig @@ -1,13 +1,6 @@ -
- +
diff --git a/targets/eds/theme/theme.inc b/modules/roblib_search_eds/templates/theme.inc similarity index 100% rename from targets/eds/theme/theme.inc rename to modules/roblib_search_eds/templates/theme.inc diff --git a/targets/solr_site/css/roblib_search_solr_site.css b/modules/solr_site/css/roblib_search_solr_site.css similarity index 100% rename from targets/solr_site/css/roblib_search_solr_site.css rename to modules/solr_site/css/roblib_search_solr_site.css diff --git a/targets/solr_site/js/solr_site_bestbet.js b/modules/solr_site/js/solr_site_bestbet.js similarity index 100% rename from targets/solr_site/js/solr_site_bestbet.js rename to modules/solr_site/js/solr_site_bestbet.js diff --git a/targets/solr_site/js/solr_site_databases.js b/modules/solr_site/js/solr_site_databases.js similarity index 100% rename from targets/solr_site/js/solr_site_databases.js rename to modules/solr_site/js/solr_site_databases.js diff --git a/targets/solr_site/js/solr_site_guides.js b/modules/solr_site/js/solr_site_guides.js similarity index 100% rename from targets/solr_site/js/solr_site_guides.js rename to modules/solr_site/js/solr_site_guides.js diff --git a/targets/solr_site/js/solr_site_reserves.js b/modules/solr_site/js/solr_site_reserves.js similarity index 100% rename from targets/solr_site/js/solr_site_reserves.js rename to modules/solr_site/js/solr_site_reserves.js diff --git a/targets/solr_site/js/solr_site_results.js b/modules/solr_site/js/solr_site_results.js similarity index 100% rename from targets/solr_site/js/solr_site_results.js rename to modules/solr_site/js/solr_site_results.js diff --git a/targets/solr_site/roblib_search_solr_site.info b/modules/solr_site/roblib_search_solr_site.info similarity index 100% rename from targets/solr_site/roblib_search_solr_site.info rename to modules/solr_site/roblib_search_solr_site.info diff --git a/targets/solr_site/roblib_search_solr_site.install b/modules/solr_site/roblib_search_solr_site.install similarity index 100% rename from targets/solr_site/roblib_search_solr_site.install rename to modules/solr_site/roblib_search_solr_site.install diff --git a/targets/solr_site/roblib_search_solr_site.module b/modules/solr_site/roblib_search_solr_site.module similarity index 100% rename from targets/solr_site/roblib_search_solr_site.module rename to modules/solr_site/roblib_search_solr_site.module diff --git a/targets/solr_site/theme/roblib-search-solr-site-results.tpl.php b/modules/solr_site/theme/roblib-search-solr-site-results.tpl.php similarity index 100% rename from targets/solr_site/theme/roblib-search-solr-site-results.tpl.php rename to modules/solr_site/theme/roblib-search-solr-site-results.tpl.php diff --git a/targets/solr_site/theme/theme.inc b/modules/solr_site/theme/theme.inc similarity index 100% rename from targets/solr_site/theme/theme.inc rename to modules/solr_site/theme/theme.inc diff --git a/roblib_search.module b/roblib_search.module index 0da927b..80e5794 100644 --- a/roblib_search.module +++ b/roblib_search.module @@ -5,46 +5,6 @@ * Implementation of Roblib search for searching several targets. */ - -/** - * Implements hook_menu(). - */ -function roblib_search_menu() { - - $items['admin/roblib_search'] = array( - 'title' => 'Roblib search', - 'description' => 'Configure global Roblib search settings.', - 'access arguments' => array('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, - ); - $items['admin/roblib_search/configure'] = array( - 'title' => 'Global Configuration', - 'description' => 'Configure global Roblib search settings.', - 'access arguments' => array('administer site configuration'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('roblib_search_config_form'), - 'type' => MENU_NORMAL_ITEM, - ); - return $items; -} - -/** - * Implements hook_block_info(). - */ -function roblib_search_block_info() { - - $blocks['roblib_search_form'] = array( - 'info' => t('Roblib Global Search Form'), - 'cache' => DRUPAL_CACHE_PER_ROLE, - ); - $blocks['roblib_search_other'] = array( - 'info' => t('Roblib Search Other Sources'), - 'cache' => DRUPAL_CACHE_PER_ROLE, - ); - - return $blocks; -} - /** * Implements hook_theme(). */ @@ -67,22 +27,6 @@ function roblib_search_theme($existing, $type, $theme, $path) { drupal_add_css(drupal_get_path('module', 'roblib_search') . '/css/jquery.qtip.min.css'); }*/ -/** - * Implements hook_block_view(). - */ -function roblib_search_block_view($delta = '') { - switch ($delta) { - case 'roblib_search_form': - $block['subject'] = t('Bento Search'); - $block['content'] = drupal_get_form('roblib_search_simple_form'); - break; - - case 'roblib_search_other': - $block['subject'] = t('Other Sources'); - $block['content'] = theme('roblib_search_other_sources', array('results' => NULL)); - } - return $block; -} /** * Implements hook_help(). diff --git a/src/Plugin/Block/RoblibSearchBoxBlock.php b/src/Plugin/Block/RoblibSearchBoxBlock.php index 334f12f..32396ef 100644 --- a/src/Plugin/Block/RoblibSearchBoxBlock.php +++ b/src/Plugin/Block/RoblibSearchBoxBlock.php @@ -5,7 +5,7 @@ namespace Drupal\roblib_search\Plugin\Block; use Drupal\Core\Block\BlockBase; /** - * Provides a 'Hello' Block. + * Provides a search form. * * @Block( * id = "roblib_search_box", diff --git a/targets/eds/Form/RoblibSearchEdsSettingsForm.php b/targets/eds/Form/RoblibSearchEdsSettingsForm.php deleted file mode 100644 index 6371a71..0000000 --- a/targets/eds/Form/RoblibSearchEdsSettingsForm.php +++ /dev/null @@ -1,133 +0,0 @@ - 'textfield', - '#title' => t('EDS Rest endpoint'), - '#default_value' => $config->get('eds_rest_url'), - '#description' => t('The base EDS URL, for example https://eds-api.ebscohost.com/edsapi/rest'), - '#required' => TRUE, - ); - $form['eds_auth_url'] = array( - '#type' => 'textfield', - '#title' => t('EDS Auth endpoint'), - '#default_value' => $config->get('eds_auth_url'), - '#description' => t('The EDS Auth endpoint, for example https://eds-api.ebscohost.com/Authservice/rest'), - '#required' => TRUE, - ); - - $form['eds_user'] = array( - '#type' => 'textfield', - '#title' => t('EDS user'), - '#default_value' => $config->get('eds_user'), - '#description' => t('EDS user, for example username'), - '#required' => TRUE, - ); - - $form['eds_pass'] = array( - '#type' => 'textfield', - '#title' => t('EDS password'), - '#default_value' => $config->get('eds_pass'), - '#description' => t('EDS password, for example password'), - '#required' => TRUE, - ); - - $form['eds_guest'] = array( - '#type' => 'textfield', - '#title' => t('EDS Guest access'), - '#default_value' => $config->get('eds_guest'), - '#description' => t('EDS Guest access, y = guest access, n = not a guest'), - '#required' => TRUE, - ); - - $form['eds_article_profile'] = array( - '#type' => 'textfield', - '#title' => t('EDS Article profile'), - '#default_value' => $config->get('eds_article_profile'), - '#description' => t('EDS profile, for example edsapi'), - '#required' => TRUE, - ); - - $form['eds_book_profile'] = array( - '#type' => 'textfield', - '#title' => t('EDS Book profile'), - '#default_value' => $config->get('eds_book_profile'), - '#description' => t('EDS Book profile, for example apilite'), - '#required' => TRUE, - ); - - $form['eds_num_results'] = array( - '#type' => 'textfield', - '#title' => t('Number of results to return'), - '#default_value' => $config->get('eds_num_results'), - '#description' => t('The number of results to display in the Bento box, usurally 5'), - '#required' => TRUE, - ); - $form['eds_article_limiters'] = array( - '#type' => 'textarea', - '#title' => t('The limiters for Article searches'), - '#default_value' => $config->get('eds_article_limiters'), - '#description' => t('Specify the Publication Types to use as limiters for Article searches. Formatted similar to - AND (PT Article OR PT Magazines OR PT News OR PT Academic Journals OR PT Conference Materials)'), - '#required' => TRUE, - ); - $form['eds_book_limiters'] = array( - '#type' => 'textarea', - '#title' => t('The limiters for Books and Media searches'), - '#default_value' => $config->get('eds_book_limiters'), - '#description' => t('Specify the Publication Types to use as limiters for Article searches. Formatted similar to - AND (PT Book OR PT Video OR PT Audio'), - '#required' => TRUE, - ); - return $form; - } - - /** - * {@inheritdoc} - */ - public function validateForm(array &$form, FormStateInterface $form_state) { - - } - - /** - * {@inheritdoc} - */ - public function submitForm(array &$form, FormStateInterface $form_state) { - $config = \Drupal::configFactory()->getEditable('roblib_search_eds.settings'); - $config->set('eds_rest_url', $form_state->getValue('eds_rest_url'))->save(); - $config->set('eds_auth_url', $form_state->getValue('eds_auth_url'))->save(); - $config->set('eds_user', $form_state->getValue('eds_user'))->save(); - $config->set('eds_pass', $form_state->getValue('eds_pass'))->save(); - $config->set('eds_guest', $form_state->getValue('eds_guest'))->save(); - $config->set('eds_article_profile', $form_state->getValue('eds_article_profile'))->save(); - $config->set('eds_book_profile', $form_state->getValue('eds_book_profile'))->save(); - $config->set('eds_num_results', $form_state->getValue('eds_num_results'))->save(); - $config->set('eds_article_limiters', $form_state->getValue('eds_article_limiters'))->save(); - $config->set('eds_book_limiters', $form_state->getValue('eds_book_limiters'))->save(); - - } - -} diff --git a/targets/eds/roblib_search_eds.info.yml b/targets/eds/roblib_search_eds.info.yml deleted file mode 100644 index 9a46963..0000000 --- a/targets/eds/roblib_search_eds.info.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: Roblib Search EDS -configure: admin/roblib_search/eds_search -description: Implements the Roblib Search modules _roblib_search hook -package: Roblib Search -core_version_requirement: ^8.9 || ^9 -dependancies: - - roblib_search - - ebsco \ No newline at end of file diff --git a/targets/eds/roblib_search_eds.routing.yml b/targets/eds/roblib_search_eds.routing.yml deleted file mode 100644 index 9af4772..0000000 --- a/targets/eds/roblib_search_eds.routing.yml +++ /dev/null @@ -1,25 +0,0 @@ -roblib_search_eds.settings: - path: '/admin/config/system/roblib_search' - defaults: - _form: '\Drupal\roblib_search_eds\Form\RoblibSearchEdsSettingsForm' - _title: 'Roblib Search EDS Settings Form' - requirements: - _permission: 'administer site configuration' - -roblib_search_eds.article_search: - path: '/roblib_search/eds/articles/{query}' - defaults: - _controller: '\Drupal\roblib_search_eds\Controller\RoblibSearchEdsController::articleResults' - _title: 'Roblib Search EDS Articles' - query: '[a-zA-Z\s]+' - requirements: - _permission: 'access content' - -roblib_search_eds.book_search: - path: '/roblib_search/eds/book/{query}' - defaults: - _controller: '\Drupal\roblib_search_eds\Controller\RoblibSearchEdsController::bookResults' - _title: 'Roblib Search EDS Articles' - query: '[a-zA-Z\s]+' - requirements: - _permission: 'access content' \ No newline at end of file diff --git a/targets/eds/theme/roblib-search-eds-articles.tpl.php b/targets/eds/theme/roblib-search-eds-articles.tpl.php deleted file mode 100644 index 26b1dbe..0000000 --- a/targets/eds/theme/roblib-search-eds-articles.tpl.php +++ /dev/null @@ -1,35 +0,0 @@ - -
-
- - -
- -
-
- - - - -
- - - -*/ -?> - -