+ + charan {% if cms_nav %}
+ {% endblock %} + \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig new file mode 100644 index 000000000..e47d54d77 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig @@ -0,0 +1,108 @@ +{# +/** +* @file +* Theme override to display a node. +* +* Available variables: +* - node: The node entity with limited access to object properties and methods. Only "getter" methods (method names starting with "get", "has", or "is") and a few common methods such as "id" and "label" are available. Calling other methods (such as node.delete) will result in an exception. +* - label: The title of the node. +* - content: All node items. Use {{ content }} to print them all, +* or print a subset such as {{ content.field_example }}. Use +* {{ content|without('field_example') }} to temporarily suppress the printing +* of a given child element. +* - author_picture: The node author user entity, rendered using the "compact" +* view mode. +* - metadata: Metadata for this node. +* - date: Themed creation date field. +* - author_name: Themed author name field. +* - url: Direct URL of the current node. +* - display_submitted: Whether submission information should be displayed. +* - attributes: HTML attributes for the containing element. +* The attributes.class element may contain one or more of the following +* classes: +* - node: The current template type (also known as a "theming hook"). +* - node--type-[type]: The current node type. For example, if the node is an +* "Article" it would result in "node--type-article". Note that the machine +* name will often be in a short form of the human readable label. +* - node--view-mode-[view_mode]: The View Mode of the node; for example, a +* teaser would result in: "node--view-mode-teaser", and +* full: "node--view-mode-full". +* The following are controlled through the node publishing options. +* - node--promoted: Appears on nodes promoted to the front page. +* - node--sticky: Appears on nodes ordered above other non-sticky nodes in +* teaser listings. +* - node--unpublished: Appears on unpublished nodes visible only to site +* admins. +* - title_attributes: Same as attributes, except applied to the main title +* tag that appears in the template. +* - content_attributes: Same as attributes, except applied to the main +* content tag that appears in the template. +* - author_attributes: Same as attributes, except applied to the author of +* the node tag that appears in the template. +* - title_prefix: Additional output populated by modules, intended to be +* displayed in front of the main title tag that appears in the template. +* - title_suffix: Additional output populated by modules, intended to be +* displayed after the main title tag that appears in the template. +* - view_mode: View mode; for example, "teaser" or "full". +* - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. +* - page: Flag for the full page state. Will be true if view_mode is 'full'. +* - readmore: Flag for more state. Will be true if the teaser content of the +* node cannot hold the main body content. +* - logged_in: Flag for authenticated user status. Will be true when the +* current user is a logged-in member. +* - is_admin: Flag for admin user status. Will be true when the current user +* is an administrator. +* +* @ingroup templates +* +* @see template_preprocess_node() +* +* @todo Remove the id attribute (or make it a class), because if that gets +* rendered twice on a page this is invalid CSS for example: two lists +* in different view modes. +*/ +#} +{% + set classes = [ + node.bundle|clean_class, + node.isPromoted() ? 'is-promoted', + node.isSticky() ? 'is-sticky', + not node.isPublished() ? 'is-unpublished', + view_mode ? view_mode|clean_class, + 'clearfix', + 'article-section' + ] +%} +
+ {% include "@components/card/_card-lr-column.twig" with { + card_lr_column: { + item:{ + card_heading: { + item :{ + heading: { + level: 6, + class: 'article-section__sub-heading', + text: node.article_type.0.value|striptags, + }, + }, + }, + card_heading_link: { + item: { + anchorHead: { + level: 5, + class: 'article-section__heading', + button: { + text: label, + href: url, + } + }, + } + }, + card_description: content.author_names, + card_link: content.action_links, + card_download_pdf: content.variant_full_text_pdf, + card_toggle: content.article_abstract + } + } + } only %} +
\ No newline at end of file From 2765c7784eea8fbcac9df3f06f0d6a49a14822a7 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:23:52 +0530 Subject: [PATCH 015/174] toc file --- .../hwjma_theme/templates/block/hwjma-toc-pager.html.twig | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig new file mode 100644 index 000000000..5ced0cd47 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig @@ -0,0 +1,7 @@ + + {% spaceless %} + {{ previous }} + {{ next }} + {% endspaceless %} +
+ From ad21f4012f16e2adaf1cb2b27e315c4aeba5cf4c Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:24:49 +0530 Subject: [PATCH 016/174] variant file --- .../field--node--variant-full-text-pdf.html.twig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/field/field--node--variant-full-text-pdf.html.twig diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/field/field--node--variant-full-text-pdf.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/field/field--node--variant-full-text-pdf.html.twig new file mode 100644 index 000000000..132a74604 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/field/field--node--variant-full-text-pdf.html.twig @@ -0,0 +1,14 @@ +{% + set classes = [ + 'field', + 'field--name-' ~ field_name|clean_class, + 'field--type-' ~ field_type|clean_class, + 'field--label-' ~ label_display, + 'download-pdf', + ] +%} +
+ {% for item in items %} + {{ "Download PDF"|t }} + {% endfor %} +
\ No newline at end of file From 65dcf82abe953d45a556a98f31205e83ebde9532 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:27:21 +0530 Subject: [PATCH 017/174] node inc --- .../hwjma_theme/includes/node.theme.inc | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index 07b5dcf01..4afefb7ce 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -4,3 +4,153 @@ * @file * Functions to support theming media entities in the Particle theme. */ + +/** + * Implements hook_preprocess_node(). + */ +function hwjma_preprocess_node__journal_article__content_details(array &$variables) { + + $node = $variables['node']; + + // Journal Heading variables + $article_type = $node->get('article_type')->getValue(); + $article_title = $node->get('title_plain')->getValue(); + $variables['main_title'] = ['text' => $article_title['0']['value'], 'class' => 'article__title']; + $variables['prefix_title'] = ['text' => $article_type['0']['value'], 'class' => 'article__subtitle']; + $variables['journal_title'] = ['label' => 'Journal Title:', 'text' => $node->get('journal_title')->getValue()['0']['value']]; + + // Journal author variables + $authors = $node->get('authors_full_name')->getValue(); + $author_names = []; + foreach ($authors as $key => $value) { + $author_names[$key] = ['text'=>$value['value'], 'class'=> 'article__fullname']; + } + $variables['authors'] = $author_names; + + // Journal description variables + $doi = $node->get('doi')->getString(); + //New way to display DOI + if (!empty($doi)) { + $doi_link = 'https://doi.org/' . $doi; + $variables['journal_doi'] = ['label' => 'DOI:', 'href' => $doi_link, 'title' => $doi, 'text' => $doi_link, 'target' => '_blank']; + } + + // Action tools + $highwire_citations_download = $variables['elements']['highwire_citations_download']; + $addtoany = $variables['elements']['addtoany']; + $ccc_permissions_link = $variables['elements']['ccc_permissions_link']; + + $hw_marker_sign_up = $variables['elements']['hw_marker_sign_up']; + $hw_tag_sign_up = $variables['elements']['hw_tag_sign_up']; + $hw_alerts_sign_up = $variables['elements']['hw_alerts_sign_up']; + if (!empty($variables['elements']['variant_full_text_pdf']['#items']) && count($variables['elements']['variant_full_text_pdf']['#items']) > 0) { + $pdf_summary = $variables['elements']['variant_full_text_pdf']['#items']->getValue('uri'); + } + $variables['hwjma_citations_download'] = $highwire_citations_download; + $variables['addtoany'] = $addtoany; + $variables['ccc_permissions_link'] = $ccc_permissions_link; + $variables['hw_marker_sign_up'] = $hw_marker_sign_up; + $variables['hw_alerts_sign_up'] = $hw_alerts_sign_up; + $variables['hw_tag_sign_up'] = $hw_tag_sign_up; + if (!empty($pdf_summary[0]['uri'])) { + $variables['variant_full_text_pdf'] = '/' . str_replace('sass://', 'content/', $pdf_summary[0]['uri']); + } +} + + +/** + * Implements hook_preprocess_node(). + */ +function hwjma_preprocess_node__journal_article__toc_list(array &$variables) { + // Default to turning off byline/submitted. + $variables['display_submitted'] = FALSE; + $node = $variables['node']; + $apath = $node->get('apath')->getValue()['0']['value']; + $journal_title = !$node->get('journal_title')->isEmpty() ? $node->get('journal_title')->getString() : ''; + $journal_title = htmlspecialchars($journal_title); + $volume = !$node->get('volume')->isEmpty() ? $node->get('volume')->getString() : ''; + $issue_number = !$node->get('issue')->isEmpty() ? $node->get('issue')->getString() : ''; + $first_page = !$node->get('fpage')->isEmpty() ? $node->get('fpage')->getString() : ''; + $last_page = !$node->get('lpage')->isEmpty() ? $node->get('lpage')->getString() : ''; + $journal_article_citation = $journal_title . ' ' . $volume . '(' . $issue_number . '): ' . $first_page . '-' . $last_page; + $node_journal = \Drupal::routeMatch()->getParameter('node'); + if (!empty($node_journal)) { + if ($node_journal->hasField('children') && $node_journal->bundle() == "journal") { + $children = !$node_journal->get('children')->isEmpty() ? $node_journal->get('children')->getValue() : ''; + if (isset($children) && count($children) == 1) { + $journal_article_citation = $journal_title . ' ' . $issue_number . ': ' . $first_page . '-' . $last_page; + } + } + elseif ($node_journal->bundle() == "journal_issue") { + $parent_journal = $node->get('parent_journal')->getString(); + //get parent journal nid + if ($parent_journal) { + $node_issue = Node::load($parent_journal); + if ($node_issue->hasField('children')) { + $children = !$node_issue->get('children')->isEmpty() ? $node_issue->get('children')->getValue() : ''; + // Get the total number of child volume for a Periodical + if (isset($children) && count($children) == 1) { + $journal_article_citation = $journal_title . ' ' . $issue_number . ': ' . $first_page . '-' . $last_page; + } + } + } + } + } + else { + // condition applied for most read tab as node_journal is coming empty for most read tab. + $parent_journal_most_read = $node->get('parent_journal')->getString(); + //get parent journal nid + if ($parent_journal_most_read) { + $node_issue = Node::load($parent_journal_most_read); + if ($node_issue->hasField('children')) { + $children = !$node_issue->get('children')->isEmpty() ? $node_issue->get('children')->getValue() : ''; + // Get the total number of child volume for a Periodical + if (isset($children) && count($children) == 1) { + $journal_article_citation = $journal_title . ' ' . $issue_number . ': ' . $first_page . '-' . $last_page; + } + } + } + } + // Fetching author names according to pattern lab array + $authors = $node->get('authors_full_name')->getValue(); + $author_names = []; + if (!empty($authors)) { + foreach ($authors as $key => $value) { + if ($key != (count($authors)-1)) { + $author_names[$key] = ['paragraph' => ['text'=>$value['value'], 'class'=> 'article-section__author-name']]; + } else { + $author_names[$key] = ['paragraph' => ['text'=>$value['value'], 'class'=> 'article-section__author-sub']]; + } + } + } + array_push($author_names,['paragraph' => ['text'=> $journal_article_citation, 'class'=> 'article-section__author-description']]); + $variables['content']['author_names'] = $author_names; + + // Fetching show abstract according to pattern lab array + $action_links = []; + $hwmd_abstract = $variables['content']['hwmd_abstract_article_toc_']; + $abstract_markup = $hwmd_abstract['0']['markup'][$apath]['content']['#markup']; + if ($abstract_markup != null ) { + array_push($action_links, ['href' => '#','class' => 'article-section__abstract-btn show-click-toggle','text' => 'Show abstract']); + $variables['content']['article_abstract'] = $abstract_markup; + } + + // Fetching view content links according to pattern lab array + $view_content_link = $variables['content']['view_content_link']; + $view_content_link_url = $view_content_link['#url']; + array_push($action_links, ['href' => $view_content_link_url->toString(),'class' => 'article-section__view-article-btn','text' => $view_content_link['#title']]); + if (!empty($variables['elements']['variant_full_text_pdf']['#items']) && count($variables['elements']['variant_full_text_pdf']['#items']) > 0) { + $variant_full_text_pdf = $variables['elements']['variant_full_text_pdf']['#items']->getValue('uri'); + } else { + $variant_full_text_pdf['0']['uri'] = '#'; + } + if (!empty($variant_full_text_pdf[0]['uri'])) { + $variant_full_text_pdf_url = '/' . str_replace('sass://', 'content/', $variant_full_text_pdf[0]['uri']); + } else { + $variant_full_text_pdf_url = '#'; + } + $variables['content']['action_links'] = $action_links; + + // code written to parse the title to avoid issue mentioned in hwjmaSCOL-736 + $variables['label'] = html_entity_decode($node->get('title_plain')->getString()); +} From 1d23bd4f239db4a57bf7f50fd995b7b2d12ef932 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:28:20 +0530 Subject: [PATCH 018/174] node inc From 6a94eebfc5cc3a1c82e6a9651ef4fd65f19a16d5 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:31:37 +0530 Subject: [PATCH 019/174] core module --- .../highwire/hwjma_core/hwjma_core.module | 378 ++++++++++++++++++ 1 file changed, 378 insertions(+) diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index b6c5a6754..9126d8c53 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -4,3 +4,381 @@ * @file * Core HWJMA Site module */ +use Drupal\node\Entity\NodeType; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\node\Entity\Node; +use Drupal\Core\Database\Database; +use Drupal\Core\Mail\MailFormatHelper; +use Drupal\Core\Url; +use HighWire\Utility\Str; +use Drupal\Core\Block\BlockPluginInterface; +use Drupal\highwire_content\HighWireContent; +use Drupal\views\Element\View; +use Drupal\views\Views; +use Drupal\Core\Cache\Cache; + +define('HW_NODE_TYPE_TOC', ['item_toc_chapter', 'item_toc_part', 'item_toc_section']); +define('HW_NODE_TYPE_JOURNAL', 'journal'); +define('HW_NODE_TYPE_VOLUME', 'journal_volume'); +define('HW_NODE_TYPE_ISSUE', 'journal_issue'); +define('HW_NODE_TYPE_ARTICLE', 'journal_article'); +define('HW_NODE_TYPE_FRAGMENT', 'journal_fragment'); +define('HW_NODE_TYPE_CHAPTER', 'item_chapter'); +define('HW_NODE_TYPE_MONOGRAPH', 'item_monograph'); +define('HW_NODE_TYPE_REPORT_GUIDELINE', 'item_report_guideline'); +define('HW_NODE_TYPE_TEST_REVIEW', 'item_test_review'); + +/** +* Implements hook_entity_extra_field_info(). +*/ +function hwjma_core_entity_extra_field_info() { + $fields = []; + //$hw_content_types = hwjma_core_get_hw_content_types(); + // Display-only fields for HighWire content types. + foreach (NodeType::loadMultiple() as $bundle) { + $node_type = $bundle->Id(); + if ($node_type == HW_NODE_TYPE_JOURNAL) { + $fields['node'][$node_type]['display']['about'] = [ + 'label' => t('About'), + 'description' => t('About this journal.'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['cover_image'] = [ + 'label' => t('Cover Image'), + 'description' => t('Cover Image of journal'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['submit_article'] = [ + 'label' => t('Submit article'), + 'description' => t('How to submit an article to this journal.'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['editorial_brd'] = [ + 'label' => t('Editorial Board'), + 'description' => t('Information about the journal\'s editorial board.'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['latest_articles'] = [ + 'label' => t('Latest articles'), + 'description' => t('Displays the latest journal articles.'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['all_issues'] = [ + 'label' => t('All issues'), + 'description' => t('Displays all journal issues.'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['most_read'] = [ + 'label' => t('Most Read'), + 'description' => t('Displays most read articles.'), + 'weight' => 100, + 'visible' => FALSE, + ]; + } + if ($node_type == HW_NODE_TYPE_ARTICLE) { + $fields['node'][$node_type]['display']['usage_stats_table_block'] = [ + 'label' => t('Usage Stats Table'), + 'description' => t('Ustage Statistics Table'), + 'weight' => 100, + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['cited_by_block'] = [ + 'label' => t('Cited-By'), + 'description' => t('Google Scholar and Crossref links'), + 'weight' => 100, + 'visible' => FALSE, + ]; + } + // Add focus view link. + $fields['node'][$node_type]['display']['hwjma_focus_view'] = [ + 'label' => t('Focus view link'), + 'description' => t('Show / exit focus view.'), + 'visible' => FALSE, + ]; + $fields['node'][$node_type]['display']['hwjma_toc_pager'] = [ + 'label' => t('Toc pager'), + 'description' => t('Previous and next links based on toc structure.'), + 'visible' => FALSE, + ]; + // Content navigation. + $fields['node'][$node_type]['display']['prev_next_pager'] = [ + 'label' => t('Prev/Next pager'), + 'description' => t('Previous and next links based on atom order.'), + 'visible' => FALSE, + ]; + // Add permissions link. + $fields['node'][$node_type]['display']['ccc_permissions_link'] = [ + 'label' => t('CCC Permissions Link'), + 'description' => t('OpenURL link for ccc'), + 'visible' => FALSE, + ]; + } + return $fields; +} + + +/** +* Implements hook_ENTITY_TYPE_view(). +*/ +function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { + if (!HighWireContent::isHighWire($entity)) { + return; + } + $corpus = $entity->hasField('corpus') && !$entity->get('corpus')->isEmpty() ? $entity->get('corpus')->getString() : ''; + $content_type = $entity->bundle(); + // Add focus view link. + if ($display->getComponent('hwjma_focus_view')) { + $build['hwjma_focus_view'] = [ + '#type' => 'link', + '#title' => [ + 'icon' => ['#type' => 'hwjma_icon', '#icon' => 'expand'], + 'title' => ['#type' => 'html_tag', '#tag' => 'span', '#value' => t('Focus'), '#prefix' => ' '], + ], + '#attributes' => [ + 'class' => ['article__focus_link'] + ], + ]; + if (\Drupal::routeMatch()->getRouteName() == 'highwire_entity_view') { + $build['hwjma_focus_view']['#url'] = $entity->toUrl(); + $build['hwjma_focus_view']['#title']['title']['#value'] = t('Exit focus'); + $build['hwjma_focus_view']['#title']['icon']['#icon'] = 'compress'; + } else { + $build['hwjma_focus_view']['#url'] = Url::fromRoute('highwire_entity_view', ['entity_type_id' => 'node', 'entity_id' => $entity->id(), 'view_mode_id' => ($view_mode == 'focus_view' ? 'full' : $view_mode)]); + } + } + // Add toc pager. + if ($display->getComponent('hwjma_toc_pager')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_toc_pager', []); + $plugin_block->setContextValue('node', $entity); + $render = $plugin_block->build(); + dump($render); + if (!empty($render)) { + $build['hwjma_toc_pager'] = $render; + } + } + // Add prev/next pager. + // if ($display->getComponent('prev_next_pager')) { + // $plugin_block = $block_manager->createInstance('prev_next_block', ['global_walk' => TRUE]); + // $plugin_block->setContextValue('node', $entity); + // $render = $plugin_block->build(); + // if (!empty($render)) { + // // Add previous & next urls to custom toc pager template. + // $build['prev_next_pager'] = [ + // '#theme' => 'hwjma_toc_pager', + // '#previous_url' => Url::fromRoute(''), + // '#next_url' => Url::fromRoute(''), + // ]; + // if (!empty($render['prev_atom']['#url'])) { + // $build['prev_next_pager']['#previous_url'] = $render['prev_atom']['#url']; + // } + // if (!empty($render['next_atom']['#url'])) { + // $build['prev_next_pager']['#next_url'] = $render['next_atom']['#url']; + // } + // } + // } + // Add permissions link. + if ($display->getComponent('ccc_permissions_link')) { + $build['ccc_permissions_link'] = [ + '#type' => 'link', + '#title' => 'Permissions', + '#url' => '/permissions', + '#attributes' => ['class' => ['btn', 'btn-secondary']], + ]; + } + // Pseudofields for articles + if ($content_type == HW_NODE_TYPE_ARTICLE) { + // Add the usage-stats pseudofield + if ($display->getComponent('usage_stats_table_block')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('usage_stats_table_block', [ + 'query_type' => 'monthly', + 'views' => ['abstract', 'full', 'pdf', 'total'], + 'date_format' => 'custom', + 'custom_date_format' => 'M Y', + 'limit' => '', + ]); + $plugin_block->setContextValue('node', $entity); + $build['usage_stats_table_block'] = [ + '#type' => 'fieldset', + '#title' => 'Article usage', + '#attributes' => ['class' => ['usage-stats-container']], + 'usage_stats' => $plugin_block->build() + ]; + } + // Add the cited-by pseudofield + if ($display->getComponent('cited_by_block')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('cited_by_block', [ + 'external_links' => ['crossref', 'google'], + 'crossref_title' => 'Crossref', + 'google_title' => 'Google Scholar', + ]); + $plugin_block->setContextValue('node', $entity); + $build['cited_by_block'] = [ + '#type' => 'fieldset', + '#title' => 'Cited by', + '#attributes' => ['class' => ['cited-by-container']], + 'cited_by' => $plugin_block->build() + ]; + } + // Add the supplementary material pseudofield + if ($display->getComponent('supplementary_material')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('supplementary_material', []); + $plugin_block->setContextValue('node', $entity); + if (!empty($plugin_block->build())) { + $build['supplementary_material'] = [ + '#type' => 'fieldset', + '#title' => 'Supplementary files for this article', + '#attributes' => ['class' => ['supplementary-material-container']], + 'supplementary_material' => $plugin_block->build() + ]; + } + } + } + if (!empty($corpus) && ($content_type == HW_NODE_TYPE_JOURNAL || $content_type == HW_NODE_TYPE_ISSUE)) { + // Get display info based on view mode. + $journal_info = []; + $journal_info_display = \Drupal::entityTypeManager()->getStorage('entity_view_display')->load('node.journal_info.' . $view_mode); + // Fetch the journal information based on the corpus id. + if (!empty($journal_info_display)) { + $journal_info = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'journal_info', 'corpus' => $corpus]); + $journal_info = array_pop($journal_info); + } + if (!empty($journal_info)) { + // Add cache tag for journal info node. + $build['#cache']['tags'][] = 'node:' . $journal_info->id(); + // Add "Edit Info" contextual link. + $build['#contextual_links']['node_info'] = [ + 'route_parameters' => ['node' => $journal_info->id()], + 'metadata' => ['changed' => time()], + ]; + } + if (!empty($journal_info)) { + $view_builder = \Drupal::entityTypeManager()->getViewBuilder('node'); + $info_ids = ['about', 'cover_image', 'description', 'submit_article', 'society', 'editors', 'editorial_brd']; + foreach ($info_ids as $id) { + $journal_info_id = 'field_journal_' . $id; + // Skip if field doesn't exist or is not displayed. + if (!$display->getComponent($id) || !$journal_info_display->getComponent($journal_info_id) || !$journal_info->hasField($journal_info_id)) { + continue; + } + // Build field render array and add to journal display. + $field = $journal_info->get($journal_info_id); + $field_ele = $field->getValue(); + $field_ele_value = $field_ele[0]['value']; + $field_ele_value = str_replace(['',''], ['',''], $field_ele_value); + $field->value = $field_ele_value; + $field_render_ary = $view_builder->viewField($field, $journal_info_display->getComponent($journal_info_id)); + if (!empty($field_render_ary['#items'])) { + $build[$id] = $field_render_ary; + } + } + // Add the sample-issue link + if ($display->getComponent('sample_issue_link') && $journal_info->hasField('field_journal_sample_issue')) { + $sample_issue = $journal_info->get('field_journal_sample_issue'); + if (!$sample_issue->isEmpty()) { + $sample_doi = $sample_issue->getString(); + $build['sample_issue_link'] = [ + '#type' => 'link', + '#title' => 'Sample issue', + '#url' => Url::fromRoute('highwire_content.lookup.doi', ['doi' => $sample_doi], []), + '#attributes' => ['class' => ['btn', 'btn-primary', 'journal-sample-issue-link']], + ]; + } + } + // Add the impact factor text + if ($display->getComponent('impact_factor') && $journal_info->hasField('field_journal_impact_factor')) { + $impact_factor = $journal_info->get('field_journal_impact_factor'); + if (!$impact_factor->isEmpty()) { + $impact_text = $impact_factor->getString(); + if ($impact_text) { + $build['impact_factor'] = [ + '#type' => 'html_tag', + '#tag' => 'span', + '#value' => $impact_text, + '#attributes' => ['class' => ['impact-factor-text']], + ]; + } + } + } + } + } + // Pseudo fields for journals. + if ($content_type == HW_NODE_TYPE_JOURNAL) { + // Add current issue link. + if ($display->getComponent('current_issue_link') && $entity->hasField('journal_current_issue')) { + $current_issue = $entity->get('journal_current_issue'); + if (!$current_issue->isEmpty()) { + $current_issue_nid = $current_issue->getString(); + $build['current_issue_link'] = [ + '#type' => 'link', + '#title' => t('Latest issue'), + '#url' => Url::fromRoute('entity.node.canonical', ['node' => $current_issue_nid], []), + '#attributes' => ['class' => ['btn', 'btn-primary']], + ]; + $build['#cache']['tags'][] = 'node:' . $entity->id(); + } + } + // Add submit an article link. + if ($display->getComponent('submit_article_link') && !empty($build['submit_article'])) { + $build['submit_article_link'] = [ + '#type' => 'link', + '#title' => t('Submit an article'), + '#url' => Url::fromRoute('entity.node.canonical', ['node' => $entity->id()], ['fragment' => 'submit-article']), + '#attributes' => ['class' => ['btn', 'btn-secondary']], + ]; + } + // Add the most-read pseudofield + if ($display->getComponent('most_read')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('most_read_cited_block', [ + 'read_cited' => 'most-read', + 'view_mode' => 'toc_list', + 'limit' => 10, + 'label' => '', + ]); + $plugin_block->setContextValue('node', $entity); + $build['most_read'] = $plugin_block->build(); + } + // These views depend on corpus. + if (!empty($corpus)) { + // Add each Journal view to the render array. + $view_ids = ['latest_articles', 'all_issues']; + $view_args = ['corpus' => $corpus]; + foreach ($view_ids as $id) { + if ($display->getComponent($id)) { + $view = Views::getView($id); + // Set corpus as contextual filter. + $view->setArguments($view_args); + // Build render array like ViewsBlock would. + $output = $view->buildRenderable('block_1', array_values($view_args)); + $output = View::preRenderViewElement($output); + if (empty($output['view_build'])) { + $output = ['#cache' => $output['#cache']]; + } + $build[$id] = $output; + } + } + } + } + // Add 'view [node_type]' link. + if ($display->getComponent('view_content_link')) { + $build['view_content_link'] = [ + '#type' => 'link', + '#title' => \Drupal::token()->replace('View [node:type_display]', ['node' => $entity]), + '#url' => $entity->toUrl(), + '#attributes' => ['class' => ['btn', 'btn-secondary']], + ]; + } +} + From b049391b20da2d8518bbc8fa228b041dff634cc8 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:33:34 +0530 Subject: [PATCH 020/174] toc block --- .../src/Plugin/Block/TOCPager.php | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php diff --git a/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php b/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php new file mode 100644 index 000000000..8ff3b0cab --- /dev/null +++ b/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php @@ -0,0 +1,200 @@ +hwContentLookup = $hw_content_lookup; + $this->hwTocLookup = $hw_toc_lookup; + $this->routeMatch = $route_match; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('highwire_content.lookup'), + $container->get('highwire_content.toc_lookup'), + $container->get('current_route_match') + ); + } + + /** + * {@inheritdoc} + */ + public function build() { + // Get the node from context data. + $node = $this->getContextValue('node'); + $build = []; + + // Check for required fields we need to get the prev/next item. + // if we don't have any one of these, return an empty render array. + $req_fields = ['apath', 'parent']; + foreach ($req_fields as $field) { + if (!$node->hasField($field) || $node->get($field)->isEmpty()) { + return $build; + } + } + + // Get apath of context node. + $current_apath = $node->get('apath')->getString(); + + // Get parent apath from parent nid. + $parent_nid = $node->get('parent')->getString(); + $parent_node = \Drupal::entityTypeManager()->getStorage('node')->load($parent_nid); + + $children = []; + + foreach ($parent_node->get('children')->getValue() as $child) { + // SF01154128 - do not include covers in pagination + $type = $this->hwContentLookup->getTypeFromNID($child['target_id']); + if ($type !== 'item_cover') { + $children[] = $child['apath']; + } + } + + $prev_nid = FALSE; + $next_nid = FALSE; + + foreach ($children as $key => $apath) { + if ($apath == $current_apath) { + if ($key != 0) { + try { + $prev_nid = $this->hwContentLookup->nidFromApath($children[$key - 1]); + } + catch (ApathNotFoundException $e) { + } + } + if (array_key_exists($key + 1, $children)) { + try { + $next_nid = $this->hwContentLookup->nidFromApath($children[$key + 1]); + } + catch (ApathNotFoundException $e) { + } + } + break; + } + } + + // Build render array with empty links as default values. + $build += [ + '#theme' => 'hwjma_toc_pager', + '#previous_url' => Url::fromRoute(''), + '#next_url' => Url::fromRoute(''), + ]; + + // Add url for previous node. + if ($prev_nid) { + $build['#previous_url'] = $this->getItemUrl($prev_nid); + } + + // Add url for next node. + if ($next_nid) { + $build['#next_url'] = $this->getItemUrl($next_nid); + } + + $route_name = $this->routeMatch->getRouteName(); + return $build; + } + + /** + * Get the url for a pager item. + * + * @param string $nid + * The node id of the item for which to get the Url. + * + * @return \Drupal\Core\Url + * A Url object for the given item nid. + */ + protected function getItemUrl($nid) { + if ($this->routeMatch->getRouteName() == 'highwire_entity_view') { + $route_name = $this->routeMatch->getRouteName(); + $route_params = $this->routeMatch->getParameters()->all(); + $route_params['entity_id'] = $nid; + } + else { + $route_name = 'entity.node.canonical'; + $route_params = ['node' => $nid]; + } + return Url::fromRoute($route_name, $route_params); + } +} \ No newline at end of file From 0cd85c98d7818378299a9b56973ce2c770fb09c5 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:34:57 +0530 Subject: [PATCH 021/174] toc template --- .../templates/hwjma-toc-pager.html.twig | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig diff --git a/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig b/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig new file mode 100644 index 000000000..5ced0cd47 --- /dev/null +++ b/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig @@ -0,0 +1,7 @@ + + {% spaceless %} + {{ previous }} + {{ next }} + {% endspaceless %} +
+ From 3bc706f8fbc8071774f89082461a003d336031dc Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:36:43 +0530 Subject: [PATCH 022/174] top content --- .../_patterns/03-components/site/_journal-top-content.twig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig b/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig index 1e3e31f95..b429c4cd6 100755 --- a/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig +++ b/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig @@ -142,6 +142,12 @@ paragraph: journal_description.paragraph|raw } only %} {% endif %} +{% if journal_title.text %} +
+ {{ journal_title.label }} + {{ journal_title.text | raw }} +
+{% endif %} {% if journal_doi.text %}
{{ journal_doi.label }} From 903e9d416892d7b6aa9833d85134c9859c7e0b60 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:40:57 +0530 Subject: [PATCH 023/174] Update block.theme.inc --- .../hwjma_theme/includes/block.theme.inc | 253 ++++++++++++++++++ 1 file changed, 253 insertions(+) diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc index 0dde5f594..aa1d76ce8 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc @@ -1,7 +1,20 @@ id() . '--page--full'); + } +} + +/** + * Process block content + */ +function hwjma_preprocess_block(&$variables) { + $node = \Drupal::routeMatch()->getParameter('node'); + if ($node instanceof \Drupal\node\NodeInterface) { + $typeName = $node->bundle(); + + //check if the page belongs to content type journal or journal issue + if ($typeName == 'journal' || $typeName == 'journal_issue') { + $nid = $node->id(); + + //Get node ids of pages that has reference of currunt journal page + $query = \Drupal::entityQuery('node') + ->condition('status', 1) + ->condition('type', 'news_article') + ->condition('field_news_article_content_ref', $nid, '='); + $nids = $query->execute(); + foreach ($nids as $nid) { + $node = Node::load($nid); + $options = ['absolute' => TRUE]; + $url_object = URL::fromRoute('entity.node.canonical', ['node' => $nid], $options); + $news_url = $url_object->toString(); + $title = $node->title->value; + $imagefield = $node->get('field_news_article_image')->getValue(); + $img_alt = $node->field_news_article_image->alt; + $img_title = $node->field_news_article_image->title; + $fileid = $imagefield[0]['target_id']; + $media_url = null; + + //check if node has image + if (!empty($fileid)) { + $file = File::load($fileid); + if (!empty($file)) { + $path = $file->getFileUri(); + $media_url = ImageStyle::load('news_block')->buildUrl($file->getFileUri()); + } + } + + //Add the gathered data in array + $news_listing_items[] = [ + 'url' => $news_url, + 'title' => $title, + 'image' => [ + 'title' => $img_title, + 'alt' => $img_alt, + 'src' => $media_url, + ], + ]; + } + + //set theme variable and pass values + $variables['news_listing_items'] = $news_listing_items; + } + } + $content_types_urls = ['/reports-guidelines', '/monographs', '/test-reviews']; + $current_path = \Drupal::service('path.current')->getPath(); + if (in_array($current_path, $content_types_urls)) { + switch ($current_path) { + case '/reports-guidelines': + $item_report_guideline = 'report-guideline-item-report-guideline'; + $url_options['query']['f'][] = 'chapter_type:' . $item_report_guideline; + break; + case '/monographs': + $item_monograph = 'monograph-item-monograph'; + $url_options['query']['f'][] = 'chapter_type:' . $item_monograph; + break; + case '/test-reviews': + $item_test_review = 'test-review-item-test-review'; + $url_options['query']['f'][] = 'chapter_type:' . $item_test_review; + break; + } + } + $url_object = Url::fromUri('internal:/search'); + $url_object->setOptions($url_options); + $variables['show_all_link_href'] = '/search'; + switch ($variables['plugin_id']) { + // Reports and guidelines browse page - show all link + case 'block_content:f152d477-434b-4706-a189-e87da271026e': + $variables['show_all_link_href'] = $url_object->toString(); + break; + // Monographs browse page - show all link + case 'block_content:1238c276-aaeb-4981-ac97-c0362f874e8e': + $variables['show_all_link_href'] = $url_object->toString(); + break; + // Test Review browse page - show all link + case 'block_content:d48403a2-d47c-4592-9fc0-be7b91420422': + $variables['show_all_link_href'] = $url_object->toString(); + break; + } +} + +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_block__system_menu_block(&$variables) { + $current_path = \Drupal::service('path.current')->getPath(); + $result = \Drupal::service('path.alias_manager')->getAliasByPath($current_path); + + $temp_menu_list = TRUE; + foreach ($variables['content']['#items'] as &$item) { + if ($item['url']->toString() == $result) { + $temp_menu_list = FALSE; + } + } + + if ($temp_menu_list) { + unset($variables['label']); + } +} +/** + * Process related block right sidebar content + */ +function hwjma_preprocess_block__views_block__related_content_block_related_content(&$variables) { + $journals_sidebar['items']['block_heading'] = $variables['label']; + $journals_sidebar['items']['show_related_block'] = TRUE; + $data_arr = $variables['elements']['content']['#view']->result; + $journals_sidebar['items']['related_article'] = array(); + if (!empty($data_arr)) { + foreach ($data_arr as $dataKey => $data) { + $node = $data->_object->getEntity(); + $node_id = $node->get('nid')->getValue()[0]['value']; + $node_link = \Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$node_id); + $title = $node->get('title_plain')->getValue()[0]['value']; + $node_type = $node->bundle(); + switch ($node_type) { + case HW_NODE_TYPE_ARTICLE: + $item_type = 'Article'; + break; + case HW_NODE_TYPE_CHAPTER: + $item_type = 'Book chapter'; + break; + case HW_NODE_TYPE_MONOGRAPH: + $item_type = 'Monograph'; + break; + case HW_NODE_TYPE_REPORT_GUIDELINE: + $item_type = 'Report & Guideline'; + break; + case HW_NODE_TYPE_TEST_REVIEW: + $item_type = 'Test Review'; + break; + default: + $item_type = $item_type; + break; + } + $journals_sidebar['items']['related_article'][$dataKey]['node_type'] = $item_type; + $journals_sidebar['items']['related_article'][$dataKey]['node_title'] = $title; + $journals_sidebar['items']['related_article'][$dataKey]['node_link'] = $node_link; + } + } else { + $journals_sidebar['items']['show_related_block'] = FALSE; + } + $variables['journals_sidebar'] = $journals_sidebar; +} +/** + * Process Keywords right sidebar block content + */ +function hwjma_preprocess_block__entity_field__node__keywords(&$variables) { + $journals_sidebar['items']['block_heading'] = $variables['label']; + $journals_sidebar['items']['show_keyword_block'] = TRUE; + $data_arr = $variables['content']['field']['#items']; + $journals_sidebar['items']['listing_items'] = array(); + if (!empty($data_arr)) { + foreach ($data_arr as $dataKey => $data) { + $url_object = Url::fromUri('internal:/search'); + $url_options['query'] = ['query' => ""]; + $url_options['query']['f'][] = 'keywords:' . $data->getValue()['display']; + $url_object->setOptions($url_options); + $path = $url_object->toString(); + $journals_sidebar['items']['listing_items'][$dataKey]['url'] = $path; + $journals_sidebar['items']['listing_items'][$dataKey]['title'] = $data->getValue()['display']; + } + } else { + $journals_sidebar['items']['show_keyword_block'] = FALSE; + } + $variables['journals_sidebar'] = $journals_sidebar; +} + +/** + * Process Table of contents right sidebar block content + */ +function hwjma_preprocess_block__highwire_content_nav_block(&$variables) { + $toc_sidebar_block['items']['block_heading'] = $variables['label']; + $contents = $variables['content']; + foreach ($contents as $k => $v) { + $items = $v['#items']; + foreach ($items as $items_key => $item) { + $item_title = $item['#title']->__toString(); + $title_url = $item['#url']->toString(); + $toc_sidebar_block['items']['listing_items'][$items_key]['title'] = html_entity_decode($item_title); + $toc_sidebar_block['items']['listing_items'][$items_key]['url'] = $title_url; + } + } + if ($toc_sidebar_block['items']['listing_items'] == NULL) { + $variables['toc_sidebar_block'] = false; + } else { + $variables['toc_sidebar_block'] = $toc_sidebar_block; + } +} + +/** + * Process Table of contents right sidebar block content + */ +function hwjma_preprocess_block__mainpagecontent(&$variables) { + $temp_markup = ($variables['content']['#markup'])->__toString(); + $temp_markup = str_replace('

Manage your alerts.

', '

Manage your alerts

', $temp_markup); + $temp_markup = str_replace('

Manage your favourites.

', '

Manage your favourites

', $temp_markup); + $temp_markup = str_replace('

Manage your saved searches.

', '

Manage your saved searches

', $temp_markup); + $temp_markup = str_replace('No favourites found.', '

No favourites found.

', $temp_markup); + $variables['content']['#markup'] = t($temp_markup); +} From 9379da0ea60fb5ee78c46736fcfe40fe592d2689 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:42:11 +0530 Subject: [PATCH 024/174] Update layout.theme.inc --- .../hwjma_theme/includes/layout.theme.inc | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc index 2e655842d..869b2573d 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc @@ -224,6 +224,40 @@ function hwjma_theme_suggestions_highwire_tabs_alter(array &$suggestions, array } } +/** + * Implements hook_preprocess_hwjma_toc_pager(). + */ +function hwjma_preprocess_hwjma_toc_pager(&$variables) { + if (!empty($variables['previous_url'])) { + $variables['previous'] = [ + '#type' => 'link', + '#url' => $variables['previous_url'], + '#title' => [ + ['#type' => 'bps_icon', '#icon' => 'arrow-circle-left', '#attributes' => ['class' => ['fa-lg']]], + ['#markup' => 'Previous'], + ], + '#attributes' => ['class' => ['article__previous_link']], + ]; + if ($variables['previous_url']->isRouted() && $variables['previous_url']->getRouteName() == '') { + $variables['previous']['#attributes']['class'][] = 'disabled'; + } + } + if (!empty($variables['next_url'])) { + $variables['next'] = [ + '#type' => 'link', + '#url' => $variables['next_url'], + '#title' => [ + ['#type' => 'bps_icon', '#icon' => 'arrow-circle-right', '#attributes' => ['class' => ['fa-lg']]], + ['#markup' => 'Next'], + ], + '#attributes' => ['class' => ['article__next_link']], + ]; + if ($variables['next_url']->isRouted() && $variables['next_url']->getRouteName() == '') { + $variables['next']['#attributes']['class'][] = 'disabled'; + } + } + dump($variables); +} From eeb0facc04ad9d8bd404832b9d0ad6ab97c58cb9 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Wed, 28 Jun 2023 07:16:27 -0400 Subject: [PATCH 025/174] mapping manage display --- ...manager.page_variant.node_view-panels_variant-0.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-0.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-0.yml index bec3e395c..e0f25dbb7 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-0.yml @@ -7,6 +7,7 @@ dependencies: - system.menu.information module: - ctools + - node - panels - system id: node_view-panels_variant-0 @@ -69,6 +70,13 @@ variant_settings: builder: standard page: node_view weight: 0 -selection_criteria: { } +selection_criteria: + - + id: node_type + bundles: + page: page + negate: false + context_mapping: + node: node selection_logic: and static_context: { } From cd74b9cb5840f89d17dacb52837db9d4a84de2ad Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 29 Jun 2023 02:32:49 -0400 Subject: [PATCH 026/174] Chages Homepage --- config/sync/block.block.footersocialicon.yml | 25 ------------------- ...play.block_content.image_block.default.yml | 14 +---------- ...tity_view_display.node.article.default.yml | 4 +++ ...ntity_view_display.node.article.teaser.yml | 4 +++ ...y.node.journal_article.abstract_search.yml | 6 +++++ ...l_article.collection_detail_short_desc.yml | 6 +++++ ....node.journal_article.full_text_markup.yml | 6 +++++ ..._view_display.node.journal_article.rss.yml | 6 +++++ ...lay.node.journal_article.search_result.yml | 6 +++++ ...urnal_article.search_short_description.yml | 6 +++++ ...ew_display.node.journal_article.teaser.yml | 6 +++++ ..._display.node.journal_article.toc_list.yml | 6 +++++ ...splay.node.journal_issue.carousel_item.yml | 5 ++++ ...iew_display.node.journal_issue.default.yml | 5 ++++ ....entity_view_display.node.page.default.yml | 4 +++ ...e.entity_view_display.node.page.teaser.yml | 4 +++ config/sync/hwjma_basic_config.settings.yml | 1 + 17 files changed, 76 insertions(+), 38 deletions(-) delete mode 100644 config/sync/block.block.footersocialicon.yml diff --git a/config/sync/block.block.footersocialicon.yml b/config/sync/block.block.footersocialicon.yml deleted file mode 100644 index afd8c06f4..000000000 --- a/config/sync/block.block.footersocialicon.yml +++ /dev/null @@ -1,25 +0,0 @@ -uuid: 36cdba08-d7b7-4564-bd1a-1dd921105b09 -langcode: en -status: true -dependencies: - content: - - 'block_content:basic:5e70a744-8b8a-4176-a1ff-a0cd3da8e401' - module: - - block_content - theme: - - hwjma -id: footersocialicon -theme: hwjma -region: footer_1 -weight: -3 -provider: null -plugin: 'block_content:5e70a744-8b8a-4176-a1ff-a0cd3da8e401' -settings: - id: 'block_content:5e70a744-8b8a-4176-a1ff-a0cd3da8e401' - label: 'Footer Social icon' - provider: block_content - label_display: '0' - status: true - info: '' - view_mode: full -visibility: { } diff --git a/config/sync/core.entity_view_display.block_content.image_block.default.yml b/config/sync/core.entity_view_display.block_content.image_block.default.yml index c2368c90f..667ca0b73 100644 --- a/config/sync/core.entity_view_display.block_content.image_block.default.yml +++ b/config/sync/core.entity_view_display.block_content.image_block.default.yml @@ -8,7 +8,6 @@ dependencies: - field.field.block_content.image_block.field_url module: - image - - link id: block_content.image_block.default targetEntityType: block_content bundle: image_block @@ -23,17 +22,6 @@ content: third_party_settings: { } type: image region: content - field_url: - type: link - weight: 1 - region: content - label: hidden - settings: - trim_length: 80 - url_only: false - url_plain: false - rel: '' - target: '' - third_party_settings: { } hidden: + field_url: true langcode: true diff --git a/config/sync/core.entity_view_display.node.article.default.yml b/config/sync/core.entity_view_display.node.article.default.yml index 952b4f531..9e070d472 100755 --- a/config/sync/core.entity_view_display.node.article.default.yml +++ b/config/sync/core.entity_view_display.node.article.default.yml @@ -66,4 +66,8 @@ content: settings: { } third_party_settings: { } hidden: + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.article.teaser.yml b/config/sync/core.entity_view_display.node.article.teaser.yml index 68626a0ee..3fc9cfc1f 100755 --- a/config/sync/core.entity_view_display.node.article.teaser.yml +++ b/config/sync/core.entity_view_display.node.article.teaser.yml @@ -55,7 +55,11 @@ content: weight: 100 region: content hidden: + ccc_permissions_link: true comment: true field_image: true field_tags: true + hwjma_focus_view: true + hwjma_toc_pager: true langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_article.abstract_search.yml b/config/sync/core.entity_view_display.node.journal_article.abstract_search.yml index d3bc87a48..f939d3869 100644 --- a/config/sync/core.entity_view_display.node.journal_article.abstract_search.yml +++ b/config/sync/core.entity_view_display.node.journal_article.abstract_search.yml @@ -143,8 +143,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -184,6 +186,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search_index_: true @@ -224,6 +228,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -236,6 +241,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_article.collection_detail_short_desc.yml b/config/sync/core.entity_view_display.node.journal_article.collection_detail_short_desc.yml index 5439c3cc6..15db3dfa8 100644 --- a/config/sync/core.entity_view_display.node.journal_article.collection_detail_short_desc.yml +++ b/config/sync/core.entity_view_display.node.journal_article.collection_detail_short_desc.yml @@ -143,8 +143,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -184,6 +186,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search: true @@ -224,6 +228,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -236,6 +241,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_article.full_text_markup.yml b/config/sync/core.entity_view_display.node.journal_article.full_text_markup.yml index 839cbed8a..827302a41 100644 --- a/config/sync/core.entity_view_display.node.journal_article.full_text_markup.yml +++ b/config/sync/core.entity_view_display.node.journal_article.full_text_markup.yml @@ -140,8 +140,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -181,6 +183,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search: true @@ -221,6 +225,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -233,6 +238,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_article.rss.yml b/config/sync/core.entity_view_display.node.journal_article.rss.yml index 20a298182..9f8daa39a 100644 --- a/config/sync/core.entity_view_display.node.journal_article.rss.yml +++ b/config/sync/core.entity_view_display.node.journal_article.rss.yml @@ -135,8 +135,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -176,6 +178,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search: true @@ -216,6 +220,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -228,6 +233,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_article.search_result.yml b/config/sync/core.entity_view_display.node.journal_article.search_result.yml index 9696a762b..1bba2c9c6 100644 --- a/config/sync/core.entity_view_display.node.journal_article.search_result.yml +++ b/config/sync/core.entity_view_display.node.journal_article.search_result.yml @@ -153,8 +153,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -194,6 +196,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search: true @@ -234,6 +238,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -245,6 +250,7 @@ hidden: subtype: true summary: true title_short: true + usage_stats_table_block: true variant_cover_pdf: true variant_cover_source_image: true variant_full_text_pdf: true diff --git a/config/sync/core.entity_view_display.node.journal_article.search_short_description.yml b/config/sync/core.entity_view_display.node.journal_article.search_short_description.yml index 8592f36c1..0fa1809ac 100644 --- a/config/sync/core.entity_view_display.node.journal_article.search_short_description.yml +++ b/config/sync/core.entity_view_display.node.journal_article.search_short_description.yml @@ -148,8 +148,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -189,6 +191,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search: true @@ -228,6 +232,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -240,6 +245,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_article.teaser.yml b/config/sync/core.entity_view_display.node.journal_article.teaser.yml index 425572087..22baaa616 100644 --- a/config/sync/core.entity_view_display.node.journal_article.teaser.yml +++ b/config/sync/core.entity_view_display.node.journal_article.teaser.yml @@ -135,8 +135,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -176,6 +178,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_article_toc_: true hwmd_abstract_search: true @@ -216,6 +220,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -228,6 +233,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml index a167dd58d..0935d9ca6 100644 --- a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml +++ b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml @@ -228,8 +228,10 @@ hidden: atom_type: true authors_full_name: true authors_only_full_name: true + ccc_permissions_link: true chapter_type: true children: true + cited_by_block: true col_url: true contributors: true corpus: true @@ -267,6 +269,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_abstract_article_: true hwmd_abstract_search: true hwmd_abstract_search_index_: true @@ -303,6 +307,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true @@ -315,6 +320,7 @@ hidden: summary: true title_plain: true title_short: true + usage_stats_table_block: true variant_cover_image: true variant_cover_pdf: true variant_cover_source_image: true diff --git a/config/sync/core.entity_view_display.node.journal_issue.carousel_item.yml b/config/sync/core.entity_view_display.node.journal_issue.carousel_item.yml index 27d61c335..f8f2eb034 100644 --- a/config/sync/core.entity_view_display.node.journal_issue.carousel_item.yml +++ b/config/sync/core.entity_view_display.node.journal_issue.carousel_item.yml @@ -127,6 +127,7 @@ content: image_link: '' third_party_settings: { } hidden: + addtoany: true adjuncts: true apath: true article_open_access: true @@ -134,6 +135,7 @@ hidden: article_type: true atom_type: true authors_full_name: true + ccc_permissions_link: true chapter_type: true children: true col_url: true @@ -175,6 +177,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_table_of_contents_journals_: true issue: true issue_id: true @@ -208,6 +212,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true diff --git a/config/sync/core.entity_view_display.node.journal_issue.default.yml b/config/sync/core.entity_view_display.node.journal_issue.default.yml index 55b88173e..170bb0834 100644 --- a/config/sync/core.entity_view_display.node.journal_issue.default.yml +++ b/config/sync/core.entity_view_display.node.journal_issue.default.yml @@ -126,6 +126,7 @@ content: image_link: '' third_party_settings: { } hidden: + addtoany: true adjuncts: true apath: true article_open_access: true @@ -133,6 +134,7 @@ hidden: article_type: true atom_type: true authors_full_name: true + ccc_permissions_link: true chapter_type: true children: true col_url: true @@ -174,6 +176,8 @@ hidden: hw_alerts_sign_up: true hw_marker_sign_up: true hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true hwmd_table_of_contents_journals_: true issue: true issue_id: true @@ -206,6 +210,7 @@ hidden: pdf_extract_img: true pisa_version: true prev_atom: true + prev_next_pager: true publisher_id: true publisher_unique_id: true pubmed_id: true diff --git a/config/sync/core.entity_view_display.node.page.default.yml b/config/sync/core.entity_view_display.node.page.default.yml index 0e240f6e5..3c8995d4c 100755 --- a/config/sync/core.entity_view_display.node.page.default.yml +++ b/config/sync/core.entity_view_display.node.page.default.yml @@ -31,4 +31,8 @@ content: weight: 101 region: content hidden: + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.page.teaser.yml b/config/sync/core.entity_view_display.node.page.teaser.yml index 1b2bc3ae9..b3ee2deaf 100755 --- a/config/sync/core.entity_view_display.node.page.teaser.yml +++ b/config/sync/core.entity_view_display.node.page.teaser.yml @@ -33,4 +33,8 @@ content: weight: 101 region: content hidden: + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true langcode: true + prev_next_pager: true diff --git a/config/sync/hwjma_basic_config.settings.yml b/config/sync/hwjma_basic_config.settings.yml index 117a3c92a..09faa9e21 100644 --- a/config/sync/hwjma_basic_config.settings.yml +++ b/config/sync/hwjma_basic_config.settings.yml @@ -1,3 +1,4 @@ footer_twitter: '#' footer_youtube: '#' footer_linkedin: '#' +footer_facebook: '#' From 7e54a86a5139878a41b4d2d2defb3e2fd089bc9b Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Thu, 29 Jun 2023 03:32:39 -0400 Subject: [PATCH 027/174] change download pdf config --- ...view_display.node.journal_article.content_details.yml | 9 ++++++--- ...entity_view_display.node.journal_article.toc_list.yml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/config/sync/core.entity_view_display.node.journal_article.content_details.yml b/config/sync/core.entity_view_display.node.journal_article.content_details.yml index 85671467e..9287620e9 100644 --- a/config/sync/core.entity_view_display.node.journal_article.content_details.yml +++ b/config/sync/core.entity_view_display.node.journal_article.content_details.yml @@ -115,7 +115,7 @@ dependencies: - node.type.journal_article module: - field_group - - file + - highwire_access_control - layout_builder - text - user @@ -210,12 +210,15 @@ content: link: true third_party_settings: { } variant_full_text_pdf: - type: file_default + type: access_aware_file_url_plain weight: 4 region: content label: above settings: - use_description_as_link_text: true + access_rules: { } + access_denied_behavior: '' + access_denied_html: '' + access_link_hide: false third_party_settings: { } hidden: adjuncts: true diff --git a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml index 0935d9ca6..27949bb70 100644 --- a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml +++ b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml @@ -116,7 +116,7 @@ dependencies: module: - datetime_range - field_group - - file + - highwire_access_control - highwire_markup_display - text - user @@ -206,12 +206,15 @@ content: settings: { } third_party_settings: { } variant_full_text_pdf: - type: file_default + type: access_aware_file_url_plain weight: 8 region: content label: above settings: - use_description_as_link_text: true + access_rules: { } + access_denied_behavior: '' + access_denied_html: '' + access_link_hide: false third_party_settings: { } volume: type: text_default From ffb66dd164c4e633f9566dd542f26db3595691dd Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Thu, 29 Jun 2023 04:54:48 -0400 Subject: [PATCH 028/174] place block TOC --- ...age_variant.node_view-panels_variant-1.yml | 35 +++++++++++++++++ .../highwire/hwjma_core/hwjma_core.module | 39 +++++++++---------- 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index 104a34ea0..6a190d1ef 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -4,9 +4,12 @@ status: true dependencies: config: - page_manager.page.node_view + - views.view.comments_recent module: - ctools + - highwire_display - panels + - views id: node_view-panels_variant-1 label: Article variant: panels_variant @@ -45,6 +48,38 @@ variant_settings: uuid: 60499b3b-a317-4a2a-bc0e-0795495b43f8 context_mapping: entity: node + 1852e18f-fea2-4304-9dda-f8a7c4f53273: + id: highwire_content_nav_block + label: 'Table of Contents' + provider: highwire_display + label_display: visible + markup: content_sections_nav + access_control_rule: '' + include_abstract: 1 + abstract_settings: + markup: abstract_search + title: Abstract + id: abstract + include_content_top: 0 + content_top_settings: + title: Top + id: content-top + region: bottom_right + weight: 0 + uuid: 1852e18f-fea2-4304-9dda-f8a7c4f53273 + context_mapping: + node: node + f0f61524-e999-4bda-b43b-fa92ff59aae0: + id: 'views_block:comments_recent-block_1' + label: '' + provider: views + label_display: visible + views_label: '' + items_per_page: '5' + region: bottom_right + weight: 0 + uuid: f0f61524-e999-4bda-b43b-fa92ff59aae0 + context_mapping: { } id: panels_variant uuid: 913cdc11-eec4-463b-af89-51b8f40e5a98 label: null diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index 9126d8c53..d63900ce8 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -160,31 +160,30 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView $plugin_block = $block_manager->createInstance('hwjma_toc_pager', []); $plugin_block->setContextValue('node', $entity); $render = $plugin_block->build(); - dump($render); if (!empty($render)) { $build['hwjma_toc_pager'] = $render; } } // Add prev/next pager. - // if ($display->getComponent('prev_next_pager')) { - // $plugin_block = $block_manager->createInstance('prev_next_block', ['global_walk' => TRUE]); - // $plugin_block->setContextValue('node', $entity); - // $render = $plugin_block->build(); - // if (!empty($render)) { - // // Add previous & next urls to custom toc pager template. - // $build['prev_next_pager'] = [ - // '#theme' => 'hwjma_toc_pager', - // '#previous_url' => Url::fromRoute(''), - // '#next_url' => Url::fromRoute(''), - // ]; - // if (!empty($render['prev_atom']['#url'])) { - // $build['prev_next_pager']['#previous_url'] = $render['prev_atom']['#url']; - // } - // if (!empty($render['next_atom']['#url'])) { - // $build['prev_next_pager']['#next_url'] = $render['next_atom']['#url']; - // } - // } - // } + if ($display->getComponent('prev_next_pager')) { + $plugin_block = $block_manager->createInstance('prev_next_block', ['global_walk' => TRUE]); + $plugin_block->setContextValue('node', $entity); + $render = $plugin_block->build(); + if (!empty($render)) { + // Add previous & next urls to custom toc pager template. + $build['prev_next_pager'] = [ + '#theme' => 'hwjma_toc_pager', + '#previous_url' => Url::fromRoute(''), + '#next_url' => Url::fromRoute(''), + ]; + if (!empty($render['prev_atom']['#url'])) { + $build['prev_next_pager']['#previous_url'] = $render['prev_atom']['#url']; + } + if (!empty($render['next_atom']['#url'])) { + $build['prev_next_pager']['#next_url'] = $render['next_atom']['#url']; + } + } + } // Add permissions link. if ($display->getComponent('ccc_permissions_link')) { $build['ccc_permissions_link'] = [ From 66b5a09db2b49574819d9446202f5cff00857d6e Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 29 Jun 2023 04:59:52 -0400 Subject: [PATCH 029/174] Add full content and content details mode in journal --- ...w_display.node.journal.content_details.yml | 350 ++++++++++++++++ ...tity_view_display.node.journal.default.yml | 236 +++++++++++ ....entity_view_display.node.journal.full.yml | 384 ++++++++++++++++++ ...ity_view_display.node.journal.toc_list.yml | 242 +++++++++++ .../hwjma_theme/includes/block.theme.inc | 4 +- 5 files changed, 1214 insertions(+), 2 deletions(-) create mode 100644 config/sync/core.entity_view_display.node.journal.content_details.yml create mode 100644 config/sync/core.entity_view_display.node.journal.default.yml create mode 100644 config/sync/core.entity_view_display.node.journal.full.yml create mode 100644 config/sync/core.entity_view_display.node.journal.toc_list.yml diff --git a/config/sync/core.entity_view_display.node.journal.content_details.yml b/config/sync/core.entity_view_display.node.journal.content_details.yml new file mode 100644 index 000000000..cf14b7506 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.content_details.yml @@ -0,0 +1,350 @@ +uuid: 1fa03011-d752-4ffd-9819-cf4a906ee789 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.content_details + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - double_field + - field_group + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_action_tools: + children: + - hw_alerts_sign_up + - group_share_popup + - hw_marker_sign_up + parent_name: '' + weight: 8 + format_type: highwire_html_list + format_settings: + id: '' + classes: '' + list_type: ul + label: 'Action Tools' + region: content + group_share_popup: + children: + - addtoany + parent_name: group_action_tools + weight: 1 + format_type: highwire_bootstrap_modal_popup + format_settings: + id: '' + classes: modal--height-auto + trigger_options: + trigger_type: button + title: ' Share' + classes: 'btn btn-tertiary content-action-button' + icon: share + modal_options: + title: 'Share this [node:type_display]' + height: '' + width: '' + hide_field_display: 1 + footer: 1 + separate_toggle_button: 0 + separate_toggle_button_settings: + button_weight: '' + button_parent: default + label: 'share popup' + region: content +id: node.journal.content_details +targetEntityType: node +bundle: journal +mode: content_details +content: + about: + weight: 6 + region: content + settings: { } + third_party_settings: { } + addtoany: + weight: 0 + region: content + settings: { } + third_party_settings: { } + custom_meta: + type: double_field_unformatted_list + weight: 3 + region: content + label: above + settings: + inline: true + first: + hidden: false + prefix: '' + suffix: '' + link: false + format_type: medium + second: + hidden: false + prefix: '' + suffix: '' + link: false + format_type: medium + third_party_settings: { } + doi: + type: text_default + weight: 2 + region: content + label: hidden + settings: { } + third_party_settings: { } + editorial_brd: + weight: 7 + region: content + settings: { } + third_party_settings: { } + hw_alerts_sign_up: + weight: 0 + region: content + settings: { } + third_party_settings: { } + hw_marker_sign_up: + weight: 2 + region: content + settings: { } + third_party_settings: { } + journal_current_issue: + type: entity_reference_label + weight: 0 + region: content + label: above + settings: + link: true + third_party_settings: { } + journal_eissn: + type: text_default + weight: 1 + region: content + label: above + settings: { } + third_party_settings: { } + journal_pissn: + type: text_default + weight: 5 + region: content + label: above + settings: { } + third_party_settings: { } + submit_article: + weight: 4 + region: content + settings: { } + third_party_settings: { } +hidden: + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.default.yml b/config/sync/core.entity_view_display.node.journal.default.yml new file mode 100644 index 000000000..7ed77b168 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.default.yml @@ -0,0 +1,236 @@ +uuid: 6617c460-2d42-4ac5-aed5-e63c85c280c5 +langcode: en +status: true +dependencies: + config: + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - user +id: node.journal.default +targetEntityType: node +bundle: journal +mode: default +content: + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml new file mode 100644 index 000000000..59e1b6ea9 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.full.yml @@ -0,0 +1,384 @@ +uuid: 8d9ac4af-4818-4e09-9317-97d69d8bbd23 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - field_group + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_search_within: + children: { } + parent_name: '' + weight: 0 + format_type: html_element + format_settings: + id: '' + classes: 'toc-head mainpane' + element: div + show_label: false + label_element: h3 + attributes: '' + effect: none + speed: fast + label: 'search within' + region: content + group_journal_tabs: + children: + - group_latest_articles + - group_all_issues + - group_submit_an_article + - group_about_this_periodical + - group_editorial_board + - group_most_read + parent_name: '' + weight: 1 + format_type: highwire_tabs + format_settings: + id: '' + classes: '' + direction: vertical + ajax_markup: + ajax_markup_enabled: 1 + active_tab_ajax_enabled: 0 + label: 'Journal tabs' + region: content + group_latest_articles: + children: + - latest_articles + parent_name: group_journal_tabs + weight: 120 + format_type: highwire_tab + format_settings: + id: '' + classes: mainpanel + description: '' + active: 1 + formatter: closed + label: 'Latest Articles' + region: content + group_all_issues: + children: + - all_issues + parent_name: group_journal_tabs + weight: 121 + format_type: highwire_tab + format_settings: + id: issues + classes: mainpanel + description: '' + active: 0 + formatter: closed + label: 'All issues' + region: content + group_submit_an_article: + children: + - submit_article + parent_name: group_journal_tabs + weight: 122 + format_type: highwire_tab + format_settings: + id: submit-an-article + classes: 'mainpanel book-content' + description: '' + active: 0 + formatter: closed + label: 'Submit an article' + region: content + group_about_this_periodical: + children: + - about + parent_name: group_journal_tabs + weight: 123 + format_type: highwire_tab + format_settings: + id: about + classes: 'mainpanel book-content' + description: '' + active: 0 + formatter: closed + label: 'About this periodical' + region: content + group_editorial_board: + children: + - editorial_brd + parent_name: group_journal_tabs + weight: 124 + format_type: highwire_tab + format_settings: + id: editorial-board + classes: 'mainpanel book-content' + description: '' + active: 0 + formatter: closed + label: 'Editorial Board' + region: content + group_most_read: + children: + - most_read + parent_name: group_journal_tabs + weight: 125 + format_type: highwire_tab + format_settings: + id: most-read + classes: mainpanel + description: '' + active: 0 + formatter: closed + label: 'Most Read' + region: content +id: node.journal.full +targetEntityType: node +bundle: journal +mode: full +content: + about: + weight: 2 + region: content + settings: { } + third_party_settings: { } + all_issues: + weight: 39 + region: content + settings: { } + third_party_settings: { } + editorial_brd: + weight: 0 + region: content + settings: { } + third_party_settings: { } + latest_articles: + weight: 40 + region: content + settings: { } + third_party_settings: { } + most_read: + weight: 0 + region: content + settings: { } + third_party_settings: { } + submit_article: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + addtoany: true + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + links: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.toc_list.yml b/config/sync/core.entity_view_display.node.journal.toc_list.yml new file mode 100644 index 000000000..899d187ab --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.toc_list.yml @@ -0,0 +1,242 @@ +uuid: 8d2a2d16-7ef0-4887-b302-66f156ceb839 +langcode: en +status: false +dependencies: + config: + - core.entity_view_mode.node.toc_list + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.toc_list +targetEntityType: node +bundle: journal +mode: toc_list +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc index aa1d76ce8..7605a9065 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc @@ -117,7 +117,7 @@ function hwjma_preprocess_block(&$variables) { $nid = $node->id(); //Get node ids of pages that has reference of currunt journal page - $query = \Drupal::entityQuery('node') + /* $query = \Drupal::entityQuery('node') ->condition('status', 1) ->condition('type', 'news_article') ->condition('field_news_article_content_ref', $nid, '='); @@ -153,7 +153,7 @@ function hwjma_preprocess_block(&$variables) { 'src' => $media_url, ], ]; - } + } */ //set theme variable and pass values $variables['news_listing_items'] = $news_listing_items; From f2b21b2dde5a2b644b93c8f37743810ea643777e Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 29 Jun 2023 07:29:00 -0400 Subject: [PATCH 030/174] Journal page panel create --- ...y.node.journal_article.content_details.yml | 9 +- ..._display.node.journal_article.toc_list.yml | 9 +- config/sync/core.extension.yml | 2 +- ...age_variant.node_view-panels_variant-1.yml | 45 +- ...age_variant.node_view-panels_variant-2.yml | 87 ++++ config/sync/search_api.index.hwjma.yml | 77 ++- config/sync/search_api_solr.settings.yml | 2 +- config/sync/views.view.all_issues.yml | 438 ++++++++++++++++++ config/sync/views.view.latest_articles.yml | 309 ++++++++++++ 9 files changed, 926 insertions(+), 52 deletions(-) create mode 100644 config/sync/page_manager.page_variant.node_view-panels_variant-2.yml create mode 100644 config/sync/views.view.all_issues.yml create mode 100644 config/sync/views.view.latest_articles.yml diff --git a/config/sync/core.entity_view_display.node.journal_article.content_details.yml b/config/sync/core.entity_view_display.node.journal_article.content_details.yml index 9287620e9..85671467e 100644 --- a/config/sync/core.entity_view_display.node.journal_article.content_details.yml +++ b/config/sync/core.entity_view_display.node.journal_article.content_details.yml @@ -115,7 +115,7 @@ dependencies: - node.type.journal_article module: - field_group - - highwire_access_control + - file - layout_builder - text - user @@ -210,15 +210,12 @@ content: link: true third_party_settings: { } variant_full_text_pdf: - type: access_aware_file_url_plain + type: file_default weight: 4 region: content label: above settings: - access_rules: { } - access_denied_behavior: '' - access_denied_html: '' - access_link_hide: false + use_description_as_link_text: true third_party_settings: { } hidden: adjuncts: true diff --git a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml index 27949bb70..0935d9ca6 100644 --- a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml +++ b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml @@ -116,7 +116,7 @@ dependencies: module: - datetime_range - field_group - - highwire_access_control + - file - highwire_markup_display - text - user @@ -206,15 +206,12 @@ content: settings: { } third_party_settings: { } variant_full_text_pdf: - type: access_aware_file_url_plain + type: file_default weight: 8 region: content label: above settings: - access_rules: { } - access_denied_behavior: '' - access_denied_html: '' - access_link_hide: false + use_description_as_link_text: true third_party_settings: { } volume: type: text_default diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 7f3e6ff15..a78134f23 100755 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -2,6 +2,7 @@ module: addtoany: 0 admin_toolbar: 0 admin_toolbar_tools: 0 + adnuntius: 0 anchor_link: 0 automated_cron: 0 block: 0 @@ -83,7 +84,6 @@ module: openid_connect: 0 openid_connect_sams_sigma: 0 options: 0 - page_cache: 0 page_manager: 0 page_manager_ui: 0 panels: 0 diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index 6a190d1ef..8b9b08d6d 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -4,12 +4,10 @@ status: true dependencies: config: - page_manager.page.node_view - - views.view.comments_recent module: - ctools - - highwire_display + - node - panels - - views id: node_view-panels_variant-1 label: Article variant: panels_variant @@ -48,38 +46,6 @@ variant_settings: uuid: 60499b3b-a317-4a2a-bc0e-0795495b43f8 context_mapping: entity: node - 1852e18f-fea2-4304-9dda-f8a7c4f53273: - id: highwire_content_nav_block - label: 'Table of Contents' - provider: highwire_display - label_display: visible - markup: content_sections_nav - access_control_rule: '' - include_abstract: 1 - abstract_settings: - markup: abstract_search - title: Abstract - id: abstract - include_content_top: 0 - content_top_settings: - title: Top - id: content-top - region: bottom_right - weight: 0 - uuid: 1852e18f-fea2-4304-9dda-f8a7c4f53273 - context_mapping: - node: node - f0f61524-e999-4bda-b43b-fa92ff59aae0: - id: 'views_block:comments_recent-block_1' - label: '' - provider: views - label_display: visible - views_label: '' - items_per_page: '5' - region: bottom_right - weight: 0 - uuid: f0f61524-e999-4bda-b43b-fa92ff59aae0 - context_mapping: { } id: panels_variant uuid: 913cdc11-eec4-463b-af89-51b8f40e5a98 label: null @@ -142,6 +108,13 @@ variant_settings: builder: standard page: node_view weight: 0 -selection_criteria: { } +selection_criteria: + - + id: node_type + bundles: + journal_article: journal_article + negate: false + context_mapping: + node: node selection_logic: and static_context: { } diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml new file mode 100644 index 000000000..3ce06050a --- /dev/null +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml @@ -0,0 +1,87 @@ +uuid: 72d5b44b-ee59-4ddf-9609-bd725da70be8 +langcode: en +status: true +dependencies: + config: + - page_manager.page.node_view + module: + - ctools + - panels +id: node_view-panels_variant-2 +label: Journal +variant: panels_variant +variant_settings: + blocks: + a7abfc2e-30ff-44da-9866-315be43d858c: + id: 'entity_view:node' + label: 'Entity view (Content)' + provider: ctools + label_display: '0' + view_mode: content_details + region: top + weight: 0 + uuid: a7abfc2e-30ff-44da-9866-315be43d858c + context_mapping: + entity: node + 57ddebac-28b4-4a83-b296-4ba88914dfdc: + id: 'entity_view:node' + label: 'Entity view (Content)' + provider: ctools + label_display: '0' + view_mode: full + region: left + weight: 0 + uuid: 57ddebac-28b4-4a83-b296-4ba88914dfdc + context_mapping: + entity: node + id: panels_variant + uuid: 9959ed8c-0ea0-4063-8de1-e06f7b1a5780 + label: null + weight: 0 + layout: bs_2col_stacked + layout_settings: + label: '' + layout: + wrapper: div + classes: { } + add_layout_class: 0 + attributes: 'class|journal-page journal-article row journals-articles-middle' + regions: + top: + wrapper: div + classes: + col-sm-12: col-sm-12 + add_region_classes: 1 + attributes: '' + left: + wrapper: div + classes: { } + add_region_classes: 0 + attributes: 'class|col-12 col-large-tablet-9' + right: + wrapper: div + classes: { } + add_region_classes: 0 + attributes: 'class|col-12 col-large-tablet-3 article__rightbar' + bottom: + wrapper: div + classes: + col-sm-12: col-sm-12 + add_region_classes: 1 + attributes: '' + page_title: '[node:title]' + storage_type: page_manager + storage_id: node_view-panels_variant-2 + builder: standard +page: node_view +weight: 0 +selection_criteria: + - + id: 'entity_bundle:node' + bundles: + journal: journal + negate: false + context_mapping: + node: node +selection_logic: and +static_context: { } diff --git a/config/sync/search_api.index.hwjma.yml b/config/sync/search_api.index.hwjma.yml index 06946e667..274a2d54f 100644 --- a/config/sync/search_api.index.hwjma.yml +++ b/config/sync/search_api.index.hwjma.yml @@ -4,10 +4,16 @@ status: true dependencies: module: - search_api_solr - - search_api - node + - search_api config: + - field.storage.node.corpus + - field.storage.node.issue + - field.storage.node.date_ppub + - field.storage.node.version_current + - field.storage.node.volume - search_api.server.hwjma_solr + - core.entity_view_mode.node.full_text_markup third_party_settings: search_api_solr: finalize: false @@ -34,7 +40,74 @@ id: hwjma name: HWJMA description: '' read_only: false -field_settings: { } +field_settings: + corpus: + label: Corpus + datasource_id: 'entity:node' + property_path: corpus + type: string + dependencies: + config: + - field.storage.node.corpus + date_ppub_facet: + label: 'Published Date (Facets)' + datasource_id: 'entity:node' + property_path: date_ppub + type: date + dependencies: + config: + - field.storage.node.date_ppub + fulltext_search: + label: 'Full Text Search' + property_path: rendered_item + type: text + configuration: + roles: + administrator: administrator + view_mode: + 'entity:node': + journal_article: full_text_markup + journal_issue: '' + issue: + label: issue + datasource_id: 'entity:node' + property_path: issue + type: text + dependencies: + config: + - field.storage.node.issue + status: + label: Published + datasource_id: 'entity:node' + property_path: status + type: boolean + dependencies: + module: + - node + type: + label: 'Content type' + datasource_id: 'entity:node' + property_path: type + type: string + dependencies: + module: + - node + version_current: + label: version-current + datasource_id: 'entity:node' + property_path: version_current + type: boolean + dependencies: + config: + - field.storage.node.version_current + volume: + label: volume + datasource_id: 'entity:node' + property_path: volume + type: text + dependencies: + config: + - field.storage.node.volume datasource_settings: 'entity:node': bundles: diff --git a/config/sync/search_api_solr.settings.yml b/config/sync/search_api_solr.settings.yml index 5142a2d38..228b2c797 100644 --- a/config/sync/search_api_solr.settings.yml +++ b/config/sync/search_api_solr.settings.yml @@ -1,5 +1,5 @@ last_optimize: 0 cron_action: spellcheck -site_hash: '' +site_hash: a22dj7 _core: default_config_hash: 1MJyy2P_BD9P8QcEjeSNaD1FpcTQBZoiXlOvlKb0518 diff --git a/config/sync/views.view.all_issues.yml b/config/sync/views.view.all_issues.yml new file mode 100644 index 000000000..ad6cd580b --- /dev/null +++ b/config/sync/views.view.all_issues.yml @@ -0,0 +1,438 @@ +uuid: 51e40419-20c0-496c-a297-d4455b456231 +langcode: en +status: true +dependencies: + config: + - field.storage.node.date_epub + - field.storage.node.issue + - field.storage.node.volume + - search_api.index.hwjma + module: + - datetime_range + - search_api + - text +id: all_issues +label: 'All Issues' +module: views +description: '' +tag: '' +base_table: search_api_index_hwjma +base_field: search_api_id +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: none + options: { } + cache: + type: tag + options: { } + query: + type: views_query + options: + bypass_access: false + skip_access: false + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: full + options: + items_per_page: 36 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: '‹ Previous' + next: 'Next ›' + first: '« First' + last: 'Last »' + quantity: 9 + style: + type: html_list + options: + grouping: + - + field: volume + rendered: true + rendered_strip: true + row_class: '' + default_row_class: true + type: ul + wrapper_class: item-list + class: 'list-unstyled issues-list list--no-space' + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: true + fields: + issue: + id: issue + table: search_api_datasource_hwjma_entity_node + field: issue + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: true + text: 'Issue {{ issue__value }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: true + trim: false + preserve_tags: '' + html: false + element_type: '0' + element_class: '' + element_label_type: '0' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '0' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field + date_epub: + id: date_epub + table: search_api_datasource_hwjma_entity_node + field: date_epub + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: true + text: '{{ date_ppub__value|date("Y") }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '0' + element_class: '' + element_label_type: '0' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '0' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: daterange_default + settings: + timezone_override: '' + format_type: html_year + separator: '-' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field + volume: + id: volume + table: search_api_datasource_hwjma_entity_node + field: volume + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: true + alter: + alter_text: true + text: 'Volume {{ volume }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field + filters: + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal_issue: journal_issue + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + sorts: + volume: + id: volume + table: search_api_index_hwjma + field: volume + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api + issue: + id: issue + table: search_api_index_hwjma + field: issue + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api + title: 'All Issues' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: + corpus: + id: corpus + table: search_api_index_hwjma + field: corpus + relationship: none + group_type: group + admin_label: '' + default_action: empty + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: { } + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + plugin_id: search_api + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + tags: + - 'config:field.storage.node.date_epub' + - 'config:field.storage.node.issue' + - 'config:field.storage.node.volume' + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: 1 + display_options: + display_extenders: + simple_sitemap_display_extender: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + tags: + - 'config:field.storage.node.date_epub' + - 'config:field.storage.node.issue' + - 'config:field.storage.node.volume' diff --git a/config/sync/views.view.latest_articles.yml b/config/sync/views.view.latest_articles.yml new file mode 100644 index 000000000..bf848e8af --- /dev/null +++ b/config/sync/views.view.latest_articles.yml @@ -0,0 +1,309 @@ +uuid: 20d1d5ec-367d-4b73-8d98-18168e35853c +langcode: en +status: true +dependencies: + config: + - search_api.index.hwjma + module: + - search_api +id: latest_articles +label: 'Latest articles' +module: views +description: '' +tag: '' +base_table: search_api_index_hwjma +base_field: search_api_id +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: none + options: { } + cache: + type: time + options: + results_lifespan: 300 + results_lifespan_custom: 0 + output_lifespan: 300 + output_lifespan_custom: 0 + query: + type: views_query + options: + bypass_access: false + skip_access: false + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: some + options: + items_per_page: 10 + offset: 0 + style: + type: html_list + options: + row_class: '' + default_row_class: true + uses_fields: false + type: ul + wrapper_class: '' + class: 'list-unstyled latest-articles' + row: + type: search_api + options: + view_modes: + 'entity:node': + journal_article: toc_list + journal_issue: default + fields: + search_api_id: + table: search_api_index_hwjma + field: search_api_id + id: search_api_id + entity_type: null + entity_field: null + plugin_id: standard + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + filters: + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal_article: journal_article + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + status: + id: status + table: search_api_index_hwjma + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + version_current: + id: version_current + table: search_api_index_hwjma + field: version_current + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + sorts: + date_ppub_facet: + id: date_ppub_facet + table: search_api_index_hwjma + field: date_ppub_facet + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api + title: 'Latest articles' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: + corpus: + id: corpus + table: search_api_index_hwjma + field: corpus + relationship: none + group_type: group + admin_label: '' + default_action: empty + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: { } + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + plugin_id: search_api + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + tags: { } + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: 1 + display_options: + display_extenders: + simple_sitemap_display_extender: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + tags: { } From 09523090d4993f15a13472644a243e25fdeb6f54 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 29 Jun 2023 07:58:50 -0400 Subject: [PATCH 031/174] journal layout content detail --- .../hwjma_theme/includes/node.theme.inc | 87 +++++++++++ .../node--journal--content-details.html.twig | 146 ++++++++++++++++++ .../node/node--journal--full.html.twig | 70 +++++++++ 3 files changed, 303 insertions(+) create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index 4afefb7ce..0c9d889e1 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -1,5 +1,19 @@ get('title_plain')->getString()); } + +/* +* Implements hook_preprocess_node(). +*/ +function hwjma_preprocess_node__journal__content_details(&$variables) { + $node = $variables['node']; + $addtoany = $variables['elements']['addtoany']; + $hw_marker_sign_up = $variables['elements']['hw_marker_sign_up']; + $hw_alerts_sign_up = $variables['elements']['hw_alerts_sign_up']; + $sample_issue_link_nid = $node->get('journal_first_issue')->getString(); + if ($sample_issue_link_nid){ + $sample_issue_link = [ + '#type' => 'link', + '#url' => Url::fromRoute('entity.node.canonical', ['node' => $sample_issue_link_nid], []), + '#attributes' => ['class' => ['btn', 'btn-primary']], + ]; + if (!empty($sample_issue_link['#url'])) { + $sample_issue_link['#title'] = t('Sample issue'); + } + } + $current_issue_link = $variables['elements']['current_issue_link']; + $title = $variables['elements']['title']; + + // creating variables for node template + $variables['addtoany'] = $addtoany; + $variables['hw_marker_sign_up'] = $hw_marker_sign_up; + $variables['hw_alerts_sign_up'] = $hw_alerts_sign_up; + $variables['sample_issue_link'] = $sample_issue_link; + $variables['current_issue_link'] = $current_issue_link; + //load journal_info content type + $info_nodes = '';//\Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'journal_info', 'field_journal' => $node->id() ]); + $variables['title'] = $node->get('title')->getString(); + $variables['eissn'] = $node->get('journal_eissn')->getString(); + $variables['pissn'] = $node->get('journal_pissn')->getString(); + $variables['journal_coverimage'] = '/themes/highwire/bps_theme/dist/app-drupal/assets/images/250X350.png'; + //load data from journal_info node + if (!empty($info_nodes)) { + $journal_info = reset($info_nodes); + $variables['journal_description'] = ($journal_info->get('field_journal_description')->getvalue()[0]['value']); + $variables['journal_editors'] = $journal_info->get('field_journal_editors')->getvalue()[0]['value']; + if (!$journal_info->get('field_journal_cover_image')->isEmpty()) { + $node_cover_image = $journal_info->get('field_journal_cover_image')->getValue(); + $image_tid = $node_cover_image[0]['target_id']; + if (!empty($image_tid)) { + $file = File::load($image_tid); + $path = $file->getFileUri(); + $variables['journal_coverimage'] = file_create_url($path); + } + } + //load society field and check if the journal_society is not empty + $journal_society = $journal_info->get('field_journal_society')->getString(); + if (!empty($journal_society)) { + $node_society = \Drupal::entityTypeManager()->getStorage('node')->load($journal_society); + $journal_society_title = $node_society->title->getString(); + if (!$node_society->get('field_society_log')->isEmpty()) { + $journal_society_image = $node_society->get('field_society_log')->getValue(); + $image_tid = $journal_society_image[0]['target_id']; + if (!empty($image_tid)) { + $file = File::load($image_tid); + $path = $file->getFileUri(); + $journal_society_imageUrl = file_create_url($path); + } + } + $variables['society'] = [ + 'src'=> $journal_society_imageUrl, + 'alt'=> $journal_society_title, + 'title'=> $journal_society_title, + 'class'=> 'article__top_left-card-img' + ]; + } + } + +} \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig new file mode 100644 index 000000000..20d1d327a --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig @@ -0,0 +1,146 @@ +{# +/** + * @file + * Theme override to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + Only "getter" methods (method names starting with "get", "has", or "is") + and a few common methods such as "id" and "label" are available. Calling + other methods (such as node.delete) will result in an exception. + * - label: The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: Themed creation date field. + * - author_name: Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * @ingroup templates + * + * @see template_preprocess_node() + * + * @todo Remove the id attribute (or make it a class), because if that gets + * rendered twice on a page this is invalid CSS for example: two lists + * in different view modes. + */ +#} +
+
+
+ {% if journal_coverimage %} +
+ + {% include "@atoms/images/_image.twig" with { + image: { + src: journal_coverimage, + alt: 'Card Image', + title: 'Card Image' + } + } only %} + +
+ {% endif %} +
+ {% include "@components/site/_journal-top-content.twig" with { + main_title: { + class: "article__title", + text: title + }, + book_type_item: [{ + label: "Edited by", + class: "article__editedby", + value: journal_editors + }], + issue_list: [{ + label: "Online ISSN", + value: eissn + },{ + label: "Print ISSN", + value: pissn + }], + journal_description: { + paragraph: { + text: journal_description + } + }, + action_tools: [{ + title_withoutpopup: hw_marker_sign_up, + class: 'action-favorites' + }, { + href: addtoany['#link_url'], + title: 'Share', + text: 'Share', + popupdata: addtoany, + class: 'action-share', + modelPopup: 'bps-share-popup' + }, { + title_withoutpopup: hw_alerts_sign_up, + class: 'action-alerts' + }, { + href: sample_issue_link['#url'], + title: 'Sample Issue', + text: 'Sample Issue' + }, { + href: current_issue_link['#url'], + title: 'Latest Issue', + text: 'Latest Issue' + }] + } only %} +
+ {% if society %} + + {% endif %} +
+
+
\ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig new file mode 100644 index 000000000..b97ff42d9 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig @@ -0,0 +1,70 @@ +{# +/** + * @file + * Theme override to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + Only "getter" methods (method names starting with "get", "has", or "is") + and a few common methods such as "id" and "label" are available. Calling + other methods (such as node.delete) will result in an exception. + * - label: The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: Themed creation date field. + * - author_name: Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * @ingroup templates + * + * @see template_preprocess_node() + * + * @todo Remove the id attribute (or make it a class), because if that gets + * rendered twice on a page this is invalid CSS for example: two lists + * in different view modes. + */ + #} +
+ {{ content }} +
\ No newline at end of file From 8e8ea9062ef7036c1ddadf292ebcf4934afeebf1 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Thu, 29 Jun 2023 08:01:45 -0400 Subject: [PATCH 032/174] change bps custom files --- ...ge_manager.page_variant.node_view-panels_variant-1.yml | 8 ++++---- .../drupal-default/hwjma_theme/includes/node.theme.inc | 2 +- ...ccess-panel.html.twig => hwjma-access-panel.html.twig} | 0 .../custom/{bps-icon.html.twig => hwjma-icon.html.twig} | 0 ...{bps-toc-pager.html.twig => hwjma-toc-pager.html.twig} | 0 5 files changed, 5 insertions(+), 5 deletions(-) rename web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/{bps-access-panel.html.twig => hwjma-access-panel.html.twig} (100%) mode change 100755 => 100644 rename web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/{bps-icon.html.twig => hwjma-icon.html.twig} (100%) mode change 100755 => 100644 rename web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/{bps-toc-pager.html.twig => hwjma-toc-pager.html.twig} (100%) mode change 100755 => 100644 diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index 6a190d1ef..d94472d63 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -4,7 +4,7 @@ status: true dependencies: config: - page_manager.page.node_view - - views.view.comments_recent + - views.view.content_recent module: - ctools - highwire_display @@ -69,8 +69,8 @@ variant_settings: uuid: 1852e18f-fea2-4304-9dda-f8a7c4f53273 context_mapping: node: node - f0f61524-e999-4bda-b43b-fa92ff59aae0: - id: 'views_block:comments_recent-block_1' + aa849171-bad2-440c-8b0c-6f5f9fe81c37: + id: 'views_block:content_recent-block_1' label: '' provider: views label_display: visible @@ -78,7 +78,7 @@ variant_settings: items_per_page: '5' region: bottom_right weight: 0 - uuid: f0f61524-e999-4bda-b43b-fa92ff59aae0 + uuid: aa849171-bad2-440c-8b0c-6f5f9fe81c37 context_mapping: { } id: panels_variant uuid: 913cdc11-eec4-463b-af89-51b8f40e5a98 diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index 4afefb7ce..35bcc7057 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -61,7 +61,7 @@ function hwjma_preprocess_node__journal_article__content_details(array &$variabl /** * Implements hook_preprocess_node(). */ -function hwjma_preprocess_node__journal_article__toc_list(array &$variables) { +function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { // Default to turning off byline/submitted. $variables['display_submitted'] = FALSE; $node = $variables['node']; diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/bps-access-panel.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/hwjma-access-panel.html.twig old mode 100755 new mode 100644 similarity index 100% rename from web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/bps-access-panel.html.twig rename to web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/hwjma-access-panel.html.twig diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/bps-icon.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/hwjma-icon.html.twig old mode 100755 new mode 100644 similarity index 100% rename from web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/bps-icon.html.twig rename to web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/hwjma-icon.html.twig diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/bps-toc-pager.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/hwjma-toc-pager.html.twig old mode 100755 new mode 100644 similarity index 100% rename from web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/bps-toc-pager.html.twig rename to web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/hwjma-toc-pager.html.twig From 85c2e515773d0c14e6b25109a9c2a63b66309699 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Mon, 3 Jul 2023 01:35:51 -0400 Subject: [PATCH 033/174] Add to Favorites Tab config --- .../highwire_personalization.settings.yml | 19 ++++++++-- .../highwire/hwjma_core/hwjma_core.module | 38 +++++++++---------- ...> highwire-tabs--hwjma-tabs-lhs.html.twig} | 0 3 files changed, 35 insertions(+), 22 deletions(-) rename web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/{highwire-tabs--bps-tabs-lhs.html.twig => highwire-tabs--hwjma-tabs-lhs.html.twig} (100%) mode change 100755 => 100644 diff --git a/config/sync/highwire_personalization.settings.yml b/config/sync/highwire_personalization.settings.yml index 2199391d5..88d3b756c 100755 --- a/config/sync/highwire_personalization.settings.yml +++ b/config/sync/highwire_personalization.settings.yml @@ -1,10 +1,23 @@ -context: '' +context: hwjma saved_search_api_base_path: '' alert_type_config: null -markers_content_type_filters: { } -markers_admin_citations_view_mode: { } +markers_content_type_filters: + journal: 1 + journal_article: 1 + journal_issue: 1 +markers_admin_citations_view_mode: + journal: search_result + journal_article: search_result + journal_issue: search_result profile_and_privacy_form_class: '' profile_and_privacy_pop_welcome_message: 'You are registered for a personal account.' tags_admin_citations_view_mode: { } _core: default_config_hash: Pxth7sNsS5mshjiXLFyUNe2Ky1kkQd6BqF23xLmp9rI +reports_enabled: + alerts: 1 + captures: 1 + preferences: 1 +remove_alert_tab_title: 'Saved searches' +default_empty_alert_message: '' +empty_alert_message: '' diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index d63900ce8..55612964a 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -165,25 +165,25 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView } } // Add prev/next pager. - if ($display->getComponent('prev_next_pager')) { - $plugin_block = $block_manager->createInstance('prev_next_block', ['global_walk' => TRUE]); - $plugin_block->setContextValue('node', $entity); - $render = $plugin_block->build(); - if (!empty($render)) { - // Add previous & next urls to custom toc pager template. - $build['prev_next_pager'] = [ - '#theme' => 'hwjma_toc_pager', - '#previous_url' => Url::fromRoute(''), - '#next_url' => Url::fromRoute(''), - ]; - if (!empty($render['prev_atom']['#url'])) { - $build['prev_next_pager']['#previous_url'] = $render['prev_atom']['#url']; - } - if (!empty($render['next_atom']['#url'])) { - $build['prev_next_pager']['#next_url'] = $render['next_atom']['#url']; - } - } - } + // if ($display->getComponent('prev_next_pager')) { + // $plugin_block = $block_manager->createInstance('prev_next_block', ['global_walk' => TRUE]); + // $plugin_block->setContextValue('node', $entity); + // $render = $plugin_block->build(); + // if (!empty($render)) { + // // Add previous & next urls to custom toc pager template. + // $build['prev_next_pager'] = [ + // '#theme' => 'hwjma_toc_pager', + // '#previous_url' => Url::fromRoute(''), + // '#next_url' => Url::fromRoute(''), + // ]; + // if (!empty($render['prev_atom']['#url'])) { + // $build['prev_next_pager']['#previous_url'] = $render['prev_atom']['#url']; + // } + // if (!empty($render['next_atom']['#url'])) { + // $build['prev_next_pager']['#next_url'] = $render['next_atom']['#url']; + // } + // } + // } // Add permissions link. if ($display->getComponent('ccc_permissions_link')) { $build['ccc_permissions_link'] = [ diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/highwire-tabs--bps-tabs-lhs.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/highwire-tabs--hwjma-tabs-lhs.html.twig old mode 100755 new mode 100644 similarity index 100% rename from web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/highwire-tabs--bps-tabs-lhs.html.twig rename to web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/custom/highwire-tabs--hwjma-tabs-lhs.html.twig From d166bdf9327337ee00840eb8ca8ed4fa4106ba1f Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Mon, 3 Jul 2023 02:41:24 -0400 Subject: [PATCH 034/174] Merge pull changes --- ...w_display.node.journal.content_details.yml | 350 -------- ...tity_view_display.node.journal.default.yml | 236 ----- ....entity_view_display.node.journal.full.yml | 384 -------- ...ity_view_display.node.journal.toc_list.yml | 242 ------ ...y.node.journal_article.content_details.yml | 9 +- ..._display.node.journal_article.toc_list.yml | 9 +- config/sync/core.extension.yml | 2 +- ...age_variant.node_view-panels_variant-1.yml | 12 +- ...age_variant.node_view-panels_variant-2.yml | 87 -- config/sync/search_api.index.hwjma.yml | 77 +- config/sync/search_api_solr.settings.yml | 2 +- config/sync/views.view.all_issues.yml | 438 ---------- config/sync/views.view.latest_articles.yml | 309 ------- .../highwire/hwjma_core/src/ContentExport.php | 818 ++++++++++++++++++ 14 files changed, 837 insertions(+), 2138 deletions(-) delete mode 100644 config/sync/core.entity_view_display.node.journal.content_details.yml delete mode 100644 config/sync/core.entity_view_display.node.journal.default.yml delete mode 100644 config/sync/core.entity_view_display.node.journal.full.yml delete mode 100644 config/sync/core.entity_view_display.node.journal.toc_list.yml delete mode 100644 config/sync/page_manager.page_variant.node_view-panels_variant-2.yml delete mode 100644 config/sync/views.view.all_issues.yml delete mode 100644 config/sync/views.view.latest_articles.yml create mode 100644 web/modules/highwire/hwjma_core/src/ContentExport.php diff --git a/config/sync/core.entity_view_display.node.journal.content_details.yml b/config/sync/core.entity_view_display.node.journal.content_details.yml deleted file mode 100644 index cf14b7506..000000000 --- a/config/sync/core.entity_view_display.node.journal.content_details.yml +++ /dev/null @@ -1,350 +0,0 @@ -uuid: 1fa03011-d752-4ffd-9819-cf4a906ee789 -langcode: en -status: true -dependencies: - config: - - core.entity_view_mode.node.content_details - - field.field.node.journal.adjuncts - - field.field.node.journal.apath - - field.field.node.journal.article_open_access - - field.field.node.journal.article_series_title - - field.field.node.journal.article_type - - field.field.node.journal.atom_type - - field.field.node.journal.authors_full_name - - field.field.node.journal.chapter_type - - field.field.node.journal.children - - field.field.node.journal.col_url - - field.field.node.journal.contributors - - field.field.node.journal.corpus - - field.field.node.journal.cover_date - - field.field.node.journal.custom_meta - - field.field.node.journal.date_accepted - - field.field.node.journal.date_epreprint - - field.field.node.journal.date_epub - - field.field.node.journal.date_epub_or_ppub - - field.field.node.journal.date_epub_original - - field.field.node.journal.date_epub_ppub - - field.field.node.journal.date_epub_version - - field.field.node.journal.date_ppub - - field.field.node.journal.date_received - - field.field.node.journal.date_released - - field.field.node.journal.date_revision - - field.field.node.journal.doi - - field.field.node.journal.early_release - - field.field.node.journal.elocation_id - - field.field.node.journal.enclosures - - field.field.node.journal.extract_policy - - field.field.node.journal.final_published - - field.field.node.journal.fpage - - field.field.node.journal.georef_id - - field.field.node.journal.has_abstract - - field.field.node.journal.has_early_release - - field.field.node.journal.has_figures - - field.field.node.journal.has_figures_or_tables - - field.field.node.journal.has_full_text - - field.field.node.journal.has_full_text_pdf - - field.field.node.journal.has_ref_links - - field.field.node.journal.has_ref_stub - - field.field.node.journal.has_source - - field.field.node.journal.has_tables - - field.field.node.journal.has_videos - - field.field.node.journal.hwmd_abstract_search - - field.field.node.journal.hwmd_abstract_search_index_ - - field.field.node.journal.issue - - field.field.node.journal.issue_id - - field.field.node.journal.issue_is_open - - field.field.node.journal.issue_page_range - - field.field.node.journal.issue_supplemental - - field.field.node.journal.issue_title - - field.field.node.journal.issue_toc - - field.field.node.journal.journal_abbrv_title - - field.field.node.journal.journal_current_issue - - field.field.node.journal.journal_eissn - - field.field.node.journal.journal_eissn_compact - - field.field.node.journal.journal_first_issue - - field.field.node.journal.journal_pissn - - field.field.node.journal.journal_pissn_compact - - field.field.node.journal.journal_publisher - - field.field.node.journal.journal_publisher_id - - field.field.node.journal.journal_title - - field.field.node.journal.keywords - - field.field.node.journal.lpage - - field.field.node.journal.member_network - - field.field.node.journal.next_atom - - field.field.node.journal.overline - - field.field.node.journal.page_count - - field.field.node.journal.parent - - field.field.node.journal.parent_issue - - field.field.node.journal.parent_journal - - field.field.node.journal.parent_volume - - field.field.node.journal.pdf_extract_img - - field.field.node.journal.pisa_version - - field.field.node.journal.prev_atom - - field.field.node.journal.publisher_id - - field.field.node.journal.publisher_unique_id - - field.field.node.journal.pubmed_id - - field.field.node.journal.related - - field.field.node.journal.secondary - - field.field.node.journal.sibling_order - - field.field.node.journal.slug - - field.field.node.journal.subtitle - - field.field.node.journal.subtype - - field.field.node.journal.summary - - field.field.node.journal.title_plain - - field.field.node.journal.title_short - - field.field.node.journal.variant_cover_image - - field.field.node.journal.variant_cover_pdf - - field.field.node.journal.variant_cover_source_image - - field.field.node.journal.variant_full_text_pdf - - field.field.node.journal.variant_full_text_stamped_pdf - - field.field.node.journal.variant_large_image - - field.field.node.journal.variant_medium_image - - field.field.node.journal.variant_small_image - - field.field.node.journal.variant_table_of_contents_pdf - - field.field.node.journal.version_current - - field.field.node.journal.video_id - - field.field.node.journal.volume - - node.type.journal - module: - - double_field - - field_group - - layout_builder - - text - - user -third_party_settings: - layout_builder: - allow_custom: false - enabled: false - field_group: - group_action_tools: - children: - - hw_alerts_sign_up - - group_share_popup - - hw_marker_sign_up - parent_name: '' - weight: 8 - format_type: highwire_html_list - format_settings: - id: '' - classes: '' - list_type: ul - label: 'Action Tools' - region: content - group_share_popup: - children: - - addtoany - parent_name: group_action_tools - weight: 1 - format_type: highwire_bootstrap_modal_popup - format_settings: - id: '' - classes: modal--height-auto - trigger_options: - trigger_type: button - title: ' Share' - classes: 'btn btn-tertiary content-action-button' - icon: share - modal_options: - title: 'Share this [node:type_display]' - height: '' - width: '' - hide_field_display: 1 - footer: 1 - separate_toggle_button: 0 - separate_toggle_button_settings: - button_weight: '' - button_parent: default - label: 'share popup' - region: content -id: node.journal.content_details -targetEntityType: node -bundle: journal -mode: content_details -content: - about: - weight: 6 - region: content - settings: { } - third_party_settings: { } - addtoany: - weight: 0 - region: content - settings: { } - third_party_settings: { } - custom_meta: - type: double_field_unformatted_list - weight: 3 - region: content - label: above - settings: - inline: true - first: - hidden: false - prefix: '' - suffix: '' - link: false - format_type: medium - second: - hidden: false - prefix: '' - suffix: '' - link: false - format_type: medium - third_party_settings: { } - doi: - type: text_default - weight: 2 - region: content - label: hidden - settings: { } - third_party_settings: { } - editorial_brd: - weight: 7 - region: content - settings: { } - third_party_settings: { } - hw_alerts_sign_up: - weight: 0 - region: content - settings: { } - third_party_settings: { } - hw_marker_sign_up: - weight: 2 - region: content - settings: { } - third_party_settings: { } - journal_current_issue: - type: entity_reference_label - weight: 0 - region: content - label: above - settings: - link: true - third_party_settings: { } - journal_eissn: - type: text_default - weight: 1 - region: content - label: above - settings: { } - third_party_settings: { } - journal_pissn: - type: text_default - weight: 5 - region: content - label: above - settings: { } - third_party_settings: { } - submit_article: - weight: 4 - region: content - settings: { } - third_party_settings: { } -hidden: - adjuncts: true - all_issues: true - apath: true - article_open_access: true - article_series_title: true - article_type: true - atom_type: true - authors_full_name: true - ccc_permissions_link: true - chapter_type: true - children: true - col_url: true - contributors: true - corpus: true - cover_date: true - cover_image: true - date_accepted: true - date_epreprint: true - date_epub: true - date_epub_or_ppub: true - date_epub_original: true - date_epub_ppub: true - date_epub_version: true - date_ppub: true - date_received: true - date_released: true - date_revision: true - early_release: true - elocation_id: true - enclosures: true - extract_policy: true - final_published: true - fpage: true - georef_id: true - has_abstract: true - has_early_release: true - has_figures: true - has_figures_or_tables: true - has_full_text: true - has_full_text_pdf: true - has_ref_links: true - has_ref_stub: true - has_source: true - has_tables: true - has_videos: true - highwire_citations_download: true - hw_tag_sign_up: true - hwjma_focus_view: true - hwjma_toc_pager: true - hwmd_abstract_search: true - hwmd_abstract_search_index_: true - issue: true - issue_id: true - issue_is_open: true - issue_page_range: true - issue_supplemental: true - issue_title: true - issue_toc: true - journal_abbrv_title: true - journal_eissn_compact: true - journal_first_issue: true - journal_pissn_compact: true - journal_publisher: true - journal_publisher_id: true - journal_title: true - keywords: true - langcode: true - latest_articles: true - links: true - lpage: true - member_network: true - most_read: true - next_atom: true - overline: true - page_count: true - parent: true - parent_issue: true - parent_journal: true - parent_volume: true - pdf_extract_img: true - pisa_version: true - prev_atom: true - prev_next_pager: true - publisher_id: true - publisher_unique_id: true - pubmed_id: true - related: true - secondary: true - sibling_order: true - slug: true - subtitle: true - subtype: true - summary: true - title_plain: true - title_short: true - variant_cover_image: true - variant_cover_pdf: true - variant_cover_source_image: true - variant_full_text_pdf: true - variant_full_text_stamped_pdf: true - variant_large_image: true - variant_medium_image: true - variant_small_image: true - variant_table_of_contents_pdf: true - version_current: true - video_id: true - volume: true diff --git a/config/sync/core.entity_view_display.node.journal.default.yml b/config/sync/core.entity_view_display.node.journal.default.yml deleted file mode 100644 index 7ed77b168..000000000 --- a/config/sync/core.entity_view_display.node.journal.default.yml +++ /dev/null @@ -1,236 +0,0 @@ -uuid: 6617c460-2d42-4ac5-aed5-e63c85c280c5 -langcode: en -status: true -dependencies: - config: - - field.field.node.journal.adjuncts - - field.field.node.journal.apath - - field.field.node.journal.article_open_access - - field.field.node.journal.article_series_title - - field.field.node.journal.article_type - - field.field.node.journal.atom_type - - field.field.node.journal.authors_full_name - - field.field.node.journal.chapter_type - - field.field.node.journal.children - - field.field.node.journal.col_url - - field.field.node.journal.contributors - - field.field.node.journal.corpus - - field.field.node.journal.cover_date - - field.field.node.journal.custom_meta - - field.field.node.journal.date_accepted - - field.field.node.journal.date_epreprint - - field.field.node.journal.date_epub - - field.field.node.journal.date_epub_or_ppub - - field.field.node.journal.date_epub_original - - field.field.node.journal.date_epub_ppub - - field.field.node.journal.date_epub_version - - field.field.node.journal.date_ppub - - field.field.node.journal.date_received - - field.field.node.journal.date_released - - field.field.node.journal.date_revision - - field.field.node.journal.doi - - field.field.node.journal.early_release - - field.field.node.journal.elocation_id - - field.field.node.journal.enclosures - - field.field.node.journal.extract_policy - - field.field.node.journal.final_published - - field.field.node.journal.fpage - - field.field.node.journal.georef_id - - field.field.node.journal.has_abstract - - field.field.node.journal.has_early_release - - field.field.node.journal.has_figures - - field.field.node.journal.has_figures_or_tables - - field.field.node.journal.has_full_text - - field.field.node.journal.has_full_text_pdf - - field.field.node.journal.has_ref_links - - field.field.node.journal.has_ref_stub - - field.field.node.journal.has_source - - field.field.node.journal.has_tables - - field.field.node.journal.has_videos - - field.field.node.journal.hwmd_abstract_search - - field.field.node.journal.hwmd_abstract_search_index_ - - field.field.node.journal.issue - - field.field.node.journal.issue_id - - field.field.node.journal.issue_is_open - - field.field.node.journal.issue_page_range - - field.field.node.journal.issue_supplemental - - field.field.node.journal.issue_title - - field.field.node.journal.issue_toc - - field.field.node.journal.journal_abbrv_title - - field.field.node.journal.journal_current_issue - - field.field.node.journal.journal_eissn - - field.field.node.journal.journal_eissn_compact - - field.field.node.journal.journal_first_issue - - field.field.node.journal.journal_pissn - - field.field.node.journal.journal_pissn_compact - - field.field.node.journal.journal_publisher - - field.field.node.journal.journal_publisher_id - - field.field.node.journal.journal_title - - field.field.node.journal.keywords - - field.field.node.journal.lpage - - field.field.node.journal.member_network - - field.field.node.journal.next_atom - - field.field.node.journal.overline - - field.field.node.journal.page_count - - field.field.node.journal.parent - - field.field.node.journal.parent_issue - - field.field.node.journal.parent_journal - - field.field.node.journal.parent_volume - - field.field.node.journal.pdf_extract_img - - field.field.node.journal.pisa_version - - field.field.node.journal.prev_atom - - field.field.node.journal.publisher_id - - field.field.node.journal.publisher_unique_id - - field.field.node.journal.pubmed_id - - field.field.node.journal.related - - field.field.node.journal.secondary - - field.field.node.journal.sibling_order - - field.field.node.journal.slug - - field.field.node.journal.subtitle - - field.field.node.journal.subtype - - field.field.node.journal.summary - - field.field.node.journal.title_plain - - field.field.node.journal.title_short - - field.field.node.journal.variant_cover_image - - field.field.node.journal.variant_cover_pdf - - field.field.node.journal.variant_cover_source_image - - field.field.node.journal.variant_full_text_pdf - - field.field.node.journal.variant_full_text_stamped_pdf - - field.field.node.journal.variant_large_image - - field.field.node.journal.variant_medium_image - - field.field.node.journal.variant_small_image - - field.field.node.journal.variant_table_of_contents_pdf - - field.field.node.journal.version_current - - field.field.node.journal.video_id - - field.field.node.journal.volume - - node.type.journal - module: - - user -id: node.journal.default -targetEntityType: node -bundle: journal -mode: default -content: - links: - weight: 100 - region: content - settings: { } - third_party_settings: { } -hidden: - about: true - addtoany: true - adjuncts: true - all_issues: true - apath: true - article_open_access: true - article_series_title: true - article_type: true - atom_type: true - authors_full_name: true - ccc_permissions_link: true - chapter_type: true - children: true - col_url: true - contributors: true - corpus: true - cover_date: true - cover_image: true - custom_meta: true - date_accepted: true - date_epreprint: true - date_epub: true - date_epub_or_ppub: true - date_epub_original: true - date_epub_ppub: true - date_epub_version: true - date_ppub: true - date_received: true - date_released: true - date_revision: true - doi: true - early_release: true - editorial_brd: true - elocation_id: true - enclosures: true - extract_policy: true - final_published: true - fpage: true - georef_id: true - has_abstract: true - has_early_release: true - has_figures: true - has_figures_or_tables: true - has_full_text: true - has_full_text_pdf: true - has_ref_links: true - has_ref_stub: true - has_source: true - has_tables: true - has_videos: true - highwire_citations_download: true - hw_alerts_sign_up: true - hw_marker_sign_up: true - hw_tag_sign_up: true - hwjma_focus_view: true - hwjma_toc_pager: true - hwmd_abstract_search: true - hwmd_abstract_search_index_: true - issue: true - issue_id: true - issue_is_open: true - issue_page_range: true - issue_supplemental: true - issue_title: true - issue_toc: true - journal_abbrv_title: true - journal_current_issue: true - journal_eissn: true - journal_eissn_compact: true - journal_first_issue: true - journal_pissn: true - journal_pissn_compact: true - journal_publisher: true - journal_publisher_id: true - journal_title: true - keywords: true - langcode: true - latest_articles: true - lpage: true - member_network: true - most_read: true - next_atom: true - overline: true - page_count: true - parent: true - parent_issue: true - parent_journal: true - parent_volume: true - pdf_extract_img: true - pisa_version: true - prev_atom: true - prev_next_pager: true - publisher_id: true - publisher_unique_id: true - pubmed_id: true - related: true - secondary: true - sibling_order: true - slug: true - submit_article: true - subtitle: true - subtype: true - summary: true - title_plain: true - title_short: true - variant_cover_image: true - variant_cover_pdf: true - variant_cover_source_image: true - variant_full_text_pdf: true - variant_full_text_stamped_pdf: true - variant_large_image: true - variant_medium_image: true - variant_small_image: true - variant_table_of_contents_pdf: true - version_current: true - video_id: true - volume: true diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml deleted file mode 100644 index 59e1b6ea9..000000000 --- a/config/sync/core.entity_view_display.node.journal.full.yml +++ /dev/null @@ -1,384 +0,0 @@ -uuid: 8d9ac4af-4818-4e09-9317-97d69d8bbd23 -langcode: en -status: true -dependencies: - config: - - core.entity_view_mode.node.full - - field.field.node.journal.adjuncts - - field.field.node.journal.apath - - field.field.node.journal.article_open_access - - field.field.node.journal.article_series_title - - field.field.node.journal.article_type - - field.field.node.journal.atom_type - - field.field.node.journal.authors_full_name - - field.field.node.journal.chapter_type - - field.field.node.journal.children - - field.field.node.journal.col_url - - field.field.node.journal.contributors - - field.field.node.journal.corpus - - field.field.node.journal.cover_date - - field.field.node.journal.custom_meta - - field.field.node.journal.date_accepted - - field.field.node.journal.date_epreprint - - field.field.node.journal.date_epub - - field.field.node.journal.date_epub_or_ppub - - field.field.node.journal.date_epub_original - - field.field.node.journal.date_epub_ppub - - field.field.node.journal.date_epub_version - - field.field.node.journal.date_ppub - - field.field.node.journal.date_received - - field.field.node.journal.date_released - - field.field.node.journal.date_revision - - field.field.node.journal.doi - - field.field.node.journal.early_release - - field.field.node.journal.elocation_id - - field.field.node.journal.enclosures - - field.field.node.journal.extract_policy - - field.field.node.journal.final_published - - field.field.node.journal.fpage - - field.field.node.journal.georef_id - - field.field.node.journal.has_abstract - - field.field.node.journal.has_early_release - - field.field.node.journal.has_figures - - field.field.node.journal.has_figures_or_tables - - field.field.node.journal.has_full_text - - field.field.node.journal.has_full_text_pdf - - field.field.node.journal.has_ref_links - - field.field.node.journal.has_ref_stub - - field.field.node.journal.has_source - - field.field.node.journal.has_tables - - field.field.node.journal.has_videos - - field.field.node.journal.hwmd_abstract_search - - field.field.node.journal.hwmd_abstract_search_index_ - - field.field.node.journal.issue - - field.field.node.journal.issue_id - - field.field.node.journal.issue_is_open - - field.field.node.journal.issue_page_range - - field.field.node.journal.issue_supplemental - - field.field.node.journal.issue_title - - field.field.node.journal.issue_toc - - field.field.node.journal.journal_abbrv_title - - field.field.node.journal.journal_current_issue - - field.field.node.journal.journal_eissn - - field.field.node.journal.journal_eissn_compact - - field.field.node.journal.journal_first_issue - - field.field.node.journal.journal_pissn - - field.field.node.journal.journal_pissn_compact - - field.field.node.journal.journal_publisher - - field.field.node.journal.journal_publisher_id - - field.field.node.journal.journal_title - - field.field.node.journal.keywords - - field.field.node.journal.lpage - - field.field.node.journal.member_network - - field.field.node.journal.next_atom - - field.field.node.journal.overline - - field.field.node.journal.page_count - - field.field.node.journal.parent - - field.field.node.journal.parent_issue - - field.field.node.journal.parent_journal - - field.field.node.journal.parent_volume - - field.field.node.journal.pdf_extract_img - - field.field.node.journal.pisa_version - - field.field.node.journal.prev_atom - - field.field.node.journal.publisher_id - - field.field.node.journal.publisher_unique_id - - field.field.node.journal.pubmed_id - - field.field.node.journal.related - - field.field.node.journal.secondary - - field.field.node.journal.sibling_order - - field.field.node.journal.slug - - field.field.node.journal.subtitle - - field.field.node.journal.subtype - - field.field.node.journal.summary - - field.field.node.journal.title_plain - - field.field.node.journal.title_short - - field.field.node.journal.variant_cover_image - - field.field.node.journal.variant_cover_pdf - - field.field.node.journal.variant_cover_source_image - - field.field.node.journal.variant_full_text_pdf - - field.field.node.journal.variant_full_text_stamped_pdf - - field.field.node.journal.variant_large_image - - field.field.node.journal.variant_medium_image - - field.field.node.journal.variant_small_image - - field.field.node.journal.variant_table_of_contents_pdf - - field.field.node.journal.version_current - - field.field.node.journal.video_id - - field.field.node.journal.volume - - node.type.journal - module: - - field_group - - layout_builder - - user -third_party_settings: - layout_builder: - allow_custom: false - enabled: false - field_group: - group_search_within: - children: { } - parent_name: '' - weight: 0 - format_type: html_element - format_settings: - id: '' - classes: 'toc-head mainpane' - element: div - show_label: false - label_element: h3 - attributes: '' - effect: none - speed: fast - label: 'search within' - region: content - group_journal_tabs: - children: - - group_latest_articles - - group_all_issues - - group_submit_an_article - - group_about_this_periodical - - group_editorial_board - - group_most_read - parent_name: '' - weight: 1 - format_type: highwire_tabs - format_settings: - id: '' - classes: '' - direction: vertical - ajax_markup: - ajax_markup_enabled: 1 - active_tab_ajax_enabled: 0 - label: 'Journal tabs' - region: content - group_latest_articles: - children: - - latest_articles - parent_name: group_journal_tabs - weight: 120 - format_type: highwire_tab - format_settings: - id: '' - classes: mainpanel - description: '' - active: 1 - formatter: closed - label: 'Latest Articles' - region: content - group_all_issues: - children: - - all_issues - parent_name: group_journal_tabs - weight: 121 - format_type: highwire_tab - format_settings: - id: issues - classes: mainpanel - description: '' - active: 0 - formatter: closed - label: 'All issues' - region: content - group_submit_an_article: - children: - - submit_article - parent_name: group_journal_tabs - weight: 122 - format_type: highwire_tab - format_settings: - id: submit-an-article - classes: 'mainpanel book-content' - description: '' - active: 0 - formatter: closed - label: 'Submit an article' - region: content - group_about_this_periodical: - children: - - about - parent_name: group_journal_tabs - weight: 123 - format_type: highwire_tab - format_settings: - id: about - classes: 'mainpanel book-content' - description: '' - active: 0 - formatter: closed - label: 'About this periodical' - region: content - group_editorial_board: - children: - - editorial_brd - parent_name: group_journal_tabs - weight: 124 - format_type: highwire_tab - format_settings: - id: editorial-board - classes: 'mainpanel book-content' - description: '' - active: 0 - formatter: closed - label: 'Editorial Board' - region: content - group_most_read: - children: - - most_read - parent_name: group_journal_tabs - weight: 125 - format_type: highwire_tab - format_settings: - id: most-read - classes: mainpanel - description: '' - active: 0 - formatter: closed - label: 'Most Read' - region: content -id: node.journal.full -targetEntityType: node -bundle: journal -mode: full -content: - about: - weight: 2 - region: content - settings: { } - third_party_settings: { } - all_issues: - weight: 39 - region: content - settings: { } - third_party_settings: { } - editorial_brd: - weight: 0 - region: content - settings: { } - third_party_settings: { } - latest_articles: - weight: 40 - region: content - settings: { } - third_party_settings: { } - most_read: - weight: 0 - region: content - settings: { } - third_party_settings: { } - submit_article: - weight: 0 - region: content - settings: { } - third_party_settings: { } -hidden: - addtoany: true - adjuncts: true - apath: true - article_open_access: true - article_series_title: true - article_type: true - atom_type: true - authors_full_name: true - ccc_permissions_link: true - chapter_type: true - children: true - col_url: true - contributors: true - corpus: true - cover_date: true - cover_image: true - custom_meta: true - date_accepted: true - date_epreprint: true - date_epub: true - date_epub_or_ppub: true - date_epub_original: true - date_epub_ppub: true - date_epub_version: true - date_ppub: true - date_received: true - date_released: true - date_revision: true - doi: true - early_release: true - elocation_id: true - enclosures: true - extract_policy: true - final_published: true - fpage: true - georef_id: true - has_abstract: true - has_early_release: true - has_figures: true - has_figures_or_tables: true - has_full_text: true - has_full_text_pdf: true - has_ref_links: true - has_ref_stub: true - has_source: true - has_tables: true - has_videos: true - highwire_citations_download: true - hw_alerts_sign_up: true - hw_marker_sign_up: true - hw_tag_sign_up: true - hwjma_focus_view: true - hwjma_toc_pager: true - hwmd_abstract_search: true - hwmd_abstract_search_index_: true - issue: true - issue_id: true - issue_is_open: true - issue_page_range: true - issue_supplemental: true - issue_title: true - issue_toc: true - journal_abbrv_title: true - journal_current_issue: true - journal_eissn: true - journal_eissn_compact: true - journal_first_issue: true - journal_pissn: true - journal_pissn_compact: true - journal_publisher: true - journal_publisher_id: true - journal_title: true - keywords: true - langcode: true - links: true - lpage: true - member_network: true - next_atom: true - overline: true - page_count: true - parent: true - parent_issue: true - parent_journal: true - parent_volume: true - pdf_extract_img: true - pisa_version: true - prev_atom: true - prev_next_pager: true - publisher_id: true - publisher_unique_id: true - pubmed_id: true - related: true - secondary: true - sibling_order: true - slug: true - subtitle: true - subtype: true - summary: true - title_plain: true - title_short: true - variant_cover_image: true - variant_cover_pdf: true - variant_cover_source_image: true - variant_full_text_pdf: true - variant_full_text_stamped_pdf: true - variant_large_image: true - variant_medium_image: true - variant_small_image: true - variant_table_of_contents_pdf: true - version_current: true - video_id: true - volume: true diff --git a/config/sync/core.entity_view_display.node.journal.toc_list.yml b/config/sync/core.entity_view_display.node.journal.toc_list.yml deleted file mode 100644 index 899d187ab..000000000 --- a/config/sync/core.entity_view_display.node.journal.toc_list.yml +++ /dev/null @@ -1,242 +0,0 @@ -uuid: 8d2a2d16-7ef0-4887-b302-66f156ceb839 -langcode: en -status: false -dependencies: - config: - - core.entity_view_mode.node.toc_list - - field.field.node.journal.adjuncts - - field.field.node.journal.apath - - field.field.node.journal.article_open_access - - field.field.node.journal.article_series_title - - field.field.node.journal.article_type - - field.field.node.journal.atom_type - - field.field.node.journal.authors_full_name - - field.field.node.journal.chapter_type - - field.field.node.journal.children - - field.field.node.journal.col_url - - field.field.node.journal.contributors - - field.field.node.journal.corpus - - field.field.node.journal.cover_date - - field.field.node.journal.custom_meta - - field.field.node.journal.date_accepted - - field.field.node.journal.date_epreprint - - field.field.node.journal.date_epub - - field.field.node.journal.date_epub_or_ppub - - field.field.node.journal.date_epub_original - - field.field.node.journal.date_epub_ppub - - field.field.node.journal.date_epub_version - - field.field.node.journal.date_ppub - - field.field.node.journal.date_received - - field.field.node.journal.date_released - - field.field.node.journal.date_revision - - field.field.node.journal.doi - - field.field.node.journal.early_release - - field.field.node.journal.elocation_id - - field.field.node.journal.enclosures - - field.field.node.journal.extract_policy - - field.field.node.journal.final_published - - field.field.node.journal.fpage - - field.field.node.journal.georef_id - - field.field.node.journal.has_abstract - - field.field.node.journal.has_early_release - - field.field.node.journal.has_figures - - field.field.node.journal.has_figures_or_tables - - field.field.node.journal.has_full_text - - field.field.node.journal.has_full_text_pdf - - field.field.node.journal.has_ref_links - - field.field.node.journal.has_ref_stub - - field.field.node.journal.has_source - - field.field.node.journal.has_tables - - field.field.node.journal.has_videos - - field.field.node.journal.hwmd_abstract_search - - field.field.node.journal.hwmd_abstract_search_index_ - - field.field.node.journal.issue - - field.field.node.journal.issue_id - - field.field.node.journal.issue_is_open - - field.field.node.journal.issue_page_range - - field.field.node.journal.issue_supplemental - - field.field.node.journal.issue_title - - field.field.node.journal.issue_toc - - field.field.node.journal.journal_abbrv_title - - field.field.node.journal.journal_current_issue - - field.field.node.journal.journal_eissn - - field.field.node.journal.journal_eissn_compact - - field.field.node.journal.journal_first_issue - - field.field.node.journal.journal_pissn - - field.field.node.journal.journal_pissn_compact - - field.field.node.journal.journal_publisher - - field.field.node.journal.journal_publisher_id - - field.field.node.journal.journal_title - - field.field.node.journal.keywords - - field.field.node.journal.lpage - - field.field.node.journal.member_network - - field.field.node.journal.next_atom - - field.field.node.journal.overline - - field.field.node.journal.page_count - - field.field.node.journal.parent - - field.field.node.journal.parent_issue - - field.field.node.journal.parent_journal - - field.field.node.journal.parent_volume - - field.field.node.journal.pdf_extract_img - - field.field.node.journal.pisa_version - - field.field.node.journal.prev_atom - - field.field.node.journal.publisher_id - - field.field.node.journal.publisher_unique_id - - field.field.node.journal.pubmed_id - - field.field.node.journal.related - - field.field.node.journal.secondary - - field.field.node.journal.sibling_order - - field.field.node.journal.slug - - field.field.node.journal.subtitle - - field.field.node.journal.subtype - - field.field.node.journal.summary - - field.field.node.journal.title_plain - - field.field.node.journal.title_short - - field.field.node.journal.variant_cover_image - - field.field.node.journal.variant_cover_pdf - - field.field.node.journal.variant_cover_source_image - - field.field.node.journal.variant_full_text_pdf - - field.field.node.journal.variant_full_text_stamped_pdf - - field.field.node.journal.variant_large_image - - field.field.node.journal.variant_medium_image - - field.field.node.journal.variant_small_image - - field.field.node.journal.variant_table_of_contents_pdf - - field.field.node.journal.version_current - - field.field.node.journal.video_id - - field.field.node.journal.volume - - node.type.journal - module: - - layout_builder - - user -third_party_settings: - layout_builder: - allow_custom: false - enabled: false -id: node.journal.toc_list -targetEntityType: node -bundle: journal -mode: toc_list -content: - links: - weight: 100 - settings: { } - third_party_settings: { } - region: content -hidden: - about: true - addtoany: true - adjuncts: true - all_issues: true - apath: true - article_open_access: true - article_series_title: true - article_type: true - atom_type: true - authors_full_name: true - ccc_permissions_link: true - chapter_type: true - children: true - col_url: true - contributors: true - corpus: true - cover_date: true - cover_image: true - custom_meta: true - date_accepted: true - date_epreprint: true - date_epub: true - date_epub_or_ppub: true - date_epub_original: true - date_epub_ppub: true - date_epub_version: true - date_ppub: true - date_received: true - date_released: true - date_revision: true - doi: true - early_release: true - editorial_brd: true - elocation_id: true - enclosures: true - extract_policy: true - final_published: true - fpage: true - georef_id: true - has_abstract: true - has_early_release: true - has_figures: true - has_figures_or_tables: true - has_full_text: true - has_full_text_pdf: true - has_ref_links: true - has_ref_stub: true - has_source: true - has_tables: true - has_videos: true - highwire_citations_download: true - hw_alerts_sign_up: true - hw_marker_sign_up: true - hw_tag_sign_up: true - hwjma_focus_view: true - hwjma_toc_pager: true - hwmd_abstract_search: true - hwmd_abstract_search_index_: true - issue: true - issue_id: true - issue_is_open: true - issue_page_range: true - issue_supplemental: true - issue_title: true - issue_toc: true - journal_abbrv_title: true - journal_current_issue: true - journal_eissn: true - journal_eissn_compact: true - journal_first_issue: true - journal_pissn: true - journal_pissn_compact: true - journal_publisher: true - journal_publisher_id: true - journal_title: true - keywords: true - langcode: true - latest_articles: true - lpage: true - member_network: true - most_read: true - next_atom: true - overline: true - page_count: true - parent: true - parent_issue: true - parent_journal: true - parent_volume: true - pdf_extract_img: true - pisa_version: true - prev_atom: true - prev_next_pager: true - publisher_id: true - publisher_unique_id: true - pubmed_id: true - related: true - secondary: true - sibling_order: true - slug: true - submit_article: true - subtitle: true - subtype: true - summary: true - title_plain: true - title_short: true - variant_cover_image: true - variant_cover_pdf: true - variant_cover_source_image: true - variant_full_text_pdf: true - variant_full_text_stamped_pdf: true - variant_large_image: true - variant_medium_image: true - variant_small_image: true - variant_table_of_contents_pdf: true - version_current: true - video_id: true - volume: true diff --git a/config/sync/core.entity_view_display.node.journal_article.content_details.yml b/config/sync/core.entity_view_display.node.journal_article.content_details.yml index 85671467e..9287620e9 100644 --- a/config/sync/core.entity_view_display.node.journal_article.content_details.yml +++ b/config/sync/core.entity_view_display.node.journal_article.content_details.yml @@ -115,7 +115,7 @@ dependencies: - node.type.journal_article module: - field_group - - file + - highwire_access_control - layout_builder - text - user @@ -210,12 +210,15 @@ content: link: true third_party_settings: { } variant_full_text_pdf: - type: file_default + type: access_aware_file_url_plain weight: 4 region: content label: above settings: - use_description_as_link_text: true + access_rules: { } + access_denied_behavior: '' + access_denied_html: '' + access_link_hide: false third_party_settings: { } hidden: adjuncts: true diff --git a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml index 0935d9ca6..27949bb70 100644 --- a/config/sync/core.entity_view_display.node.journal_article.toc_list.yml +++ b/config/sync/core.entity_view_display.node.journal_article.toc_list.yml @@ -116,7 +116,7 @@ dependencies: module: - datetime_range - field_group - - file + - highwire_access_control - highwire_markup_display - text - user @@ -206,12 +206,15 @@ content: settings: { } third_party_settings: { } variant_full_text_pdf: - type: file_default + type: access_aware_file_url_plain weight: 8 region: content label: above settings: - use_description_as_link_text: true + access_rules: { } + access_denied_behavior: '' + access_denied_html: '' + access_link_hide: false third_party_settings: { } volume: type: text_default diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index a78134f23..7f3e6ff15 100755 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -2,7 +2,6 @@ module: addtoany: 0 admin_toolbar: 0 admin_toolbar_tools: 0 - adnuntius: 0 anchor_link: 0 automated_cron: 0 block: 0 @@ -84,6 +83,7 @@ module: openid_connect: 0 openid_connect_sams_sigma: 0 options: 0 + page_cache: 0 page_manager: 0 page_manager_ui: 0 panels: 0 diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index a4385a8c9..d94472d63 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -7,8 +7,9 @@ dependencies: - views.view.content_recent module: - ctools - - node + - highwire_display - panels + - views id: node_view-panels_variant-1 label: Article variant: panels_variant @@ -141,13 +142,6 @@ variant_settings: builder: standard page: node_view weight: 0 -selection_criteria: - - - id: node_type - bundles: - journal_article: journal_article - negate: false - context_mapping: - node: node +selection_criteria: { } selection_logic: and static_context: { } diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml deleted file mode 100644 index 3ce06050a..000000000 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml +++ /dev/null @@ -1,87 +0,0 @@ -uuid: 72d5b44b-ee59-4ddf-9609-bd725da70be8 -langcode: en -status: true -dependencies: - config: - - page_manager.page.node_view - module: - - ctools - - panels -id: node_view-panels_variant-2 -label: Journal -variant: panels_variant -variant_settings: - blocks: - a7abfc2e-30ff-44da-9866-315be43d858c: - id: 'entity_view:node' - label: 'Entity view (Content)' - provider: ctools - label_display: '0' - view_mode: content_details - region: top - weight: 0 - uuid: a7abfc2e-30ff-44da-9866-315be43d858c - context_mapping: - entity: node - 57ddebac-28b4-4a83-b296-4ba88914dfdc: - id: 'entity_view:node' - label: 'Entity view (Content)' - provider: ctools - label_display: '0' - view_mode: full - region: left - weight: 0 - uuid: 57ddebac-28b4-4a83-b296-4ba88914dfdc - context_mapping: - entity: node - id: panels_variant - uuid: 9959ed8c-0ea0-4063-8de1-e06f7b1a5780 - label: null - weight: 0 - layout: bs_2col_stacked - layout_settings: - label: '' - layout: - wrapper: div - classes: { } - add_layout_class: 0 - attributes: 'class|journal-page journal-article row journals-articles-middle' - regions: - top: - wrapper: div - classes: - col-sm-12: col-sm-12 - add_region_classes: 1 - attributes: '' - left: - wrapper: div - classes: { } - add_region_classes: 0 - attributes: 'class|col-12 col-large-tablet-9' - right: - wrapper: div - classes: { } - add_region_classes: 0 - attributes: 'class|col-12 col-large-tablet-3 article__rightbar' - bottom: - wrapper: div - classes: - col-sm-12: col-sm-12 - add_region_classes: 1 - attributes: '' - page_title: '[node:title]' - storage_type: page_manager - storage_id: node_view-panels_variant-2 - builder: standard -page: node_view -weight: 0 -selection_criteria: - - - id: 'entity_bundle:node' - bundles: - journal: journal - negate: false - context_mapping: - node: node -selection_logic: and -static_context: { } diff --git a/config/sync/search_api.index.hwjma.yml b/config/sync/search_api.index.hwjma.yml index 274a2d54f..06946e667 100644 --- a/config/sync/search_api.index.hwjma.yml +++ b/config/sync/search_api.index.hwjma.yml @@ -4,16 +4,10 @@ status: true dependencies: module: - search_api_solr - - node - search_api + - node config: - - field.storage.node.corpus - - field.storage.node.issue - - field.storage.node.date_ppub - - field.storage.node.version_current - - field.storage.node.volume - search_api.server.hwjma_solr - - core.entity_view_mode.node.full_text_markup third_party_settings: search_api_solr: finalize: false @@ -40,74 +34,7 @@ id: hwjma name: HWJMA description: '' read_only: false -field_settings: - corpus: - label: Corpus - datasource_id: 'entity:node' - property_path: corpus - type: string - dependencies: - config: - - field.storage.node.corpus - date_ppub_facet: - label: 'Published Date (Facets)' - datasource_id: 'entity:node' - property_path: date_ppub - type: date - dependencies: - config: - - field.storage.node.date_ppub - fulltext_search: - label: 'Full Text Search' - property_path: rendered_item - type: text - configuration: - roles: - administrator: administrator - view_mode: - 'entity:node': - journal_article: full_text_markup - journal_issue: '' - issue: - label: issue - datasource_id: 'entity:node' - property_path: issue - type: text - dependencies: - config: - - field.storage.node.issue - status: - label: Published - datasource_id: 'entity:node' - property_path: status - type: boolean - dependencies: - module: - - node - type: - label: 'Content type' - datasource_id: 'entity:node' - property_path: type - type: string - dependencies: - module: - - node - version_current: - label: version-current - datasource_id: 'entity:node' - property_path: version_current - type: boolean - dependencies: - config: - - field.storage.node.version_current - volume: - label: volume - datasource_id: 'entity:node' - property_path: volume - type: text - dependencies: - config: - - field.storage.node.volume +field_settings: { } datasource_settings: 'entity:node': bundles: diff --git a/config/sync/search_api_solr.settings.yml b/config/sync/search_api_solr.settings.yml index 228b2c797..5142a2d38 100644 --- a/config/sync/search_api_solr.settings.yml +++ b/config/sync/search_api_solr.settings.yml @@ -1,5 +1,5 @@ last_optimize: 0 cron_action: spellcheck -site_hash: a22dj7 +site_hash: '' _core: default_config_hash: 1MJyy2P_BD9P8QcEjeSNaD1FpcTQBZoiXlOvlKb0518 diff --git a/config/sync/views.view.all_issues.yml b/config/sync/views.view.all_issues.yml deleted file mode 100644 index ad6cd580b..000000000 --- a/config/sync/views.view.all_issues.yml +++ /dev/null @@ -1,438 +0,0 @@ -uuid: 51e40419-20c0-496c-a297-d4455b456231 -langcode: en -status: true -dependencies: - config: - - field.storage.node.date_epub - - field.storage.node.issue - - field.storage.node.volume - - search_api.index.hwjma - module: - - datetime_range - - search_api - - text -id: all_issues -label: 'All Issues' -module: views -description: '' -tag: '' -base_table: search_api_index_hwjma -base_field: search_api_id -display: - default: - display_plugin: default - id: default - display_title: Master - position: 0 - display_options: - access: - type: none - options: { } - cache: - type: tag - options: { } - query: - type: views_query - options: - bypass_access: false - skip_access: false - exposed_form: - type: basic - options: - submit_button: Apply - reset_button: false - reset_button_label: Reset - exposed_sorts_label: 'Sort by' - expose_sort_order: true - sort_asc_label: Asc - sort_desc_label: Desc - pager: - type: full - options: - items_per_page: 36 - offset: 0 - id: 0 - total_pages: null - expose: - items_per_page: false - items_per_page_label: 'Items per page' - items_per_page_options: '5, 10, 25, 50' - items_per_page_options_all: false - items_per_page_options_all_label: '- All -' - offset: false - offset_label: Offset - tags: - previous: '‹ Previous' - next: 'Next ›' - first: '« First' - last: 'Last »' - quantity: 9 - style: - type: html_list - options: - grouping: - - - field: volume - rendered: true - rendered_strip: true - row_class: '' - default_row_class: true - type: ul - wrapper_class: item-list - class: 'list-unstyled issues-list list--no-space' - row: - type: fields - options: - default_field_elements: true - inline: { } - separator: '' - hide_empty: true - fields: - issue: - id: issue - table: search_api_datasource_hwjma_entity_node - field: issue - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: true - text: 'Issue {{ issue__value }}' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: true - trim: false - preserve_tags: '' - html: false - element_type: '0' - element_class: '' - element_label_type: '0' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '0' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: text_default - settings: { } - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - field_rendering: true - fallback_handler: search_api - fallback_options: - link_to_item: false - use_highlighting: false - multi_type: separator - multi_separator: ', ' - entity_type: node - plugin_id: search_api_field - date_epub: - id: date_epub - table: search_api_datasource_hwjma_entity_node - field: date_epub - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: true - text: '{{ date_ppub__value|date("Y") }}' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '0' - element_class: '' - element_label_type: '0' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '0' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: daterange_default - settings: - timezone_override: '' - format_type: html_year - separator: '-' - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - field_rendering: true - fallback_handler: search_api - fallback_options: - link_to_item: false - use_highlighting: false - multi_type: separator - multi_separator: ', ' - entity_type: node - plugin_id: search_api_field - volume: - id: volume - table: search_api_datasource_hwjma_entity_node - field: volume - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: true - alter: - alter_text: true - text: 'Volume {{ volume }}' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: text_default - settings: { } - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - field_rendering: true - fallback_handler: search_api - fallback_options: - link_to_item: false - use_highlighting: false - multi_type: separator - multi_separator: ', ' - entity_type: node - plugin_id: search_api_field - filters: - type: - id: type - table: search_api_index_hwjma - field: type - relationship: none - group_type: group - admin_label: '' - operator: or - value: - journal_issue: journal_issue - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - operator_limit_selection: false - operator_list: { } - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - reduce: false - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - reduce_duplicates: false - plugin_id: search_api_options - sorts: - volume: - id: volume - table: search_api_index_hwjma - field: volume - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - plugin_id: search_api - issue: - id: issue - table: search_api_index_hwjma - field: issue - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - plugin_id: search_api - title: 'All Issues' - header: { } - footer: { } - empty: { } - relationships: { } - arguments: - corpus: - id: corpus - table: search_api_index_hwjma - field: corpus - relationship: none - group_type: group - admin_label: '' - default_action: empty - exception: - value: all - title_enable: false - title: All - title_enable: false - title: '' - default_argument_type: fixed - default_argument_options: - argument: '' - default_argument_skip_url: false - summary_options: { } - summary: - sort_order: asc - number_of_records: 0 - format: default_summary - specify_validation: false - validate: - type: none - fail: 'not found' - validate_options: { } - break_phrase: false - not: false - plugin_id: search_api - display_extenders: { } - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url - - url.query_args - tags: - - 'config:field.storage.node.date_epub' - - 'config:field.storage.node.issue' - - 'config:field.storage.node.volume' - block_1: - display_plugin: block - id: block_1 - display_title: Block - position: 1 - display_options: - display_extenders: - simple_sitemap_display_extender: { } - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_content' - - 'languages:language_interface' - - url - - url.query_args - tags: - - 'config:field.storage.node.date_epub' - - 'config:field.storage.node.issue' - - 'config:field.storage.node.volume' diff --git a/config/sync/views.view.latest_articles.yml b/config/sync/views.view.latest_articles.yml deleted file mode 100644 index bf848e8af..000000000 --- a/config/sync/views.view.latest_articles.yml +++ /dev/null @@ -1,309 +0,0 @@ -uuid: 20d1d5ec-367d-4b73-8d98-18168e35853c -langcode: en -status: true -dependencies: - config: - - search_api.index.hwjma - module: - - search_api -id: latest_articles -label: 'Latest articles' -module: views -description: '' -tag: '' -base_table: search_api_index_hwjma -base_field: search_api_id -display: - default: - display_plugin: default - id: default - display_title: Master - position: 0 - display_options: - access: - type: none - options: { } - cache: - type: time - options: - results_lifespan: 300 - results_lifespan_custom: 0 - output_lifespan: 300 - output_lifespan_custom: 0 - query: - type: views_query - options: - bypass_access: false - skip_access: false - exposed_form: - type: basic - options: - submit_button: Apply - reset_button: false - reset_button_label: Reset - exposed_sorts_label: 'Sort by' - expose_sort_order: true - sort_asc_label: Asc - sort_desc_label: Desc - pager: - type: some - options: - items_per_page: 10 - offset: 0 - style: - type: html_list - options: - row_class: '' - default_row_class: true - uses_fields: false - type: ul - wrapper_class: '' - class: 'list-unstyled latest-articles' - row: - type: search_api - options: - view_modes: - 'entity:node': - journal_article: toc_list - journal_issue: default - fields: - search_api_id: - table: search_api_index_hwjma - field: search_api_id - id: search_api_id - entity_type: null - entity_field: null - plugin_id: standard - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: false - text: '' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: true - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - filters: - type: - id: type - table: search_api_index_hwjma - field: type - relationship: none - group_type: group - admin_label: '' - operator: or - value: - journal_article: journal_article - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - operator_limit_selection: false - operator_list: { } - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - reduce: false - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - reduce_duplicates: false - plugin_id: search_api_options - status: - id: status - table: search_api_index_hwjma - field: status - relationship: none - group_type: group - admin_label: '' - operator: '=' - value: '1' - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - operator_limit_selection: false - operator_list: { } - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - plugin_id: search_api_boolean - version_current: - id: version_current - table: search_api_index_hwjma - field: version_current - relationship: none - group_type: group - admin_label: '' - operator: '=' - value: '1' - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - operator_limit_selection: false - operator_list: { } - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - plugin_id: search_api_boolean - sorts: - date_ppub_facet: - id: date_ppub_facet - table: search_api_index_hwjma - field: date_ppub_facet - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - plugin_id: search_api - title: 'Latest articles' - header: { } - footer: { } - empty: { } - relationships: { } - arguments: - corpus: - id: corpus - table: search_api_index_hwjma - field: corpus - relationship: none - group_type: group - admin_label: '' - default_action: empty - exception: - value: all - title_enable: false - title: All - title_enable: false - title: '' - default_argument_type: fixed - default_argument_options: - argument: '' - default_argument_skip_url: false - summary_options: { } - summary: - sort_order: asc - number_of_records: 0 - format: default_summary - specify_validation: false - validate: - type: none - fail: 'not found' - validate_options: { } - break_phrase: false - not: false - plugin_id: search_api - display_extenders: { } - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_interface' - - url - tags: { } - block_1: - display_plugin: block - id: block_1 - display_title: Block - position: 1 - display_options: - display_extenders: - simple_sitemap_display_extender: { } - cache_metadata: - max-age: -1 - contexts: - - 'languages:language_interface' - - url - tags: { } diff --git a/web/modules/highwire/hwjma_core/src/ContentExport.php b/web/modules/highwire/hwjma_core/src/ContentExport.php new file mode 100644 index 000000000..9c4c5bfdd --- /dev/null +++ b/web/modules/highwire/hwjma_core/src/ContentExport.php @@ -0,0 +1,818 @@ +entityManager = $entity_manager; + $this->queryFactory = $query_factory; + $this->lookup = $lookup; + $this->contentSettings = $content_settings; + $this->hwjmaLookup = $hwjma_lookup; + $this->payloadFetcher = $payload_fetcher; + } + + /** + * Helper function to get Top Parent of any Taxonomy. + * + * @param array $tid + * => term_id. + * + * @return array + */ + protected function getTopParent($tid) { + $parent_id = $tid; + $parent_term_name = []; + $parent_term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($parent_id); + $parents = $parent_term->get('parent')->getValue(); + foreach ($parents as $value) { + $parent_tid = $value['target_id']; + if ($parent_tid) { + $parent_term_name = array_merge($parent_term_name, $this->getTopParent($parent_tid)); + } + else { + $parent_term_name[] = $parent_term->getName(); + } + } + + return $parent_term_name; + } + + /** + * Get all export meta for given item_type. + * + * @param int $item_type + * A node type. + * + * @return array + * Array of meta for the export data. + */ + public function exportContentByType($item_type) { + // Dynamically get the extract policy... + $policy = $this->hwjmaLookup->getItemExtractPolicy(); + + // Fetch all apaths for item_type... + foreach ($policy as $kpolicy => $corpus) { + $atomlite_payload = $this->lookup->getAtomLitePayloadByItemType($item_type, $kpolicy); + } + + if (empty($atomlite_payload)) { + return; + } + + // Get labels from the highwire content settings. + $type_translation = $this->contentSettings->getContentTypeLabelsPlural(); + + // Book fields to include. + $include_fields = [ + 'Content type' => $type_translation[$item_type], + 'ID' => 'isbn-ebook', + 'Title' => 'title-plain', + 'Parent Book' => 'video-book-title', + 'Parent ISBN' => 'bibliorelation-isbn', + 'Author' => 'authors-full-name', + 'Publisher' => 'McGraw-Hill Professional', + 'Copyright year' => 'copyright-year', + 'Date posted' => 'date-print-publication', + 'Subjects' => 'taxonomy-terms', + 'Archived?' => 'archived', + 'URL' => 'apath', + 'Resource URI' => 'apath', + ]; + + // Non-Book field mods. + if ($item_type != 'item_book') { + $include_fields['ID'] = 'publisher-id'; + } + + // Don't set Parent Book field/value for anything but videos. + if ($item_type != 'item_video') { + unset($include_fields['Parent Book']); + } + + $csv = []; + foreach ($atomlite_payload as $apath => $atomlite_payload_item) { + // If the payload item is empty, skip. + if (empty($atomlite_payload_item)) { + continue; + } + + $subjects = []; + $book_export_data = []; + foreach ($include_fields as $key => $include_field) { + + // Archived field is boolean, csv/xcel doesn't like that + // for properly holding the cell value. + $archived = 'No'; + if ($key == 'Archived?') { + // All items except book should be No. + if ($item_type == 'item_book' && !empty($atomlite_payload_item[$include_field])) { + $archived = 'Yes'; + } + } + // If the payload doesn't have a field, create it and set + // empty string so the csv properly holds the cell value. + if (empty($atomlite_payload_item[$include_field])) { + $atomlite_payload_item[$include_field] = ''; + } + switch ($key) { + case 'ID': + // In order to prevent xcel from autoformatting the id as 9.78E+10, + // we must pass it to the csv as ="9780071753791". + $book_export_data[$key] = '="' . (string) $atomlite_payload_item[$include_field] . '"'; + break; + + case 'Archived?': + $book_export_data[$key] = $archived; + break; + + case 'Content type': + case 'Publisher': + $book_export_data[$key] = $include_field; + break; + + case 'Copyright year': + $copyright_year = ''; + // Books have copyright dates. + if ($item_type == 'item_book') { + $copyright_year = $atomlite_payload_item[$include_field][0]; + } + $book_export_data[$key] = $copyright_year; + break; + + case 'Author': + $book_export_data[$key] = $atomlite_payload_item[$include_field][0]; + break; + + case 'Subjects': + if (!empty($atomlite_payload_item[$include_field]) && is_array($atomlite_payload_item[$include_field])) { + foreach ($atomlite_payload_item[$include_field] as $subject) { + $subjects[] = $subject['label']; + } + $book_export_data[$key] = implode(' | ', $subjects); + } + else { + $book_export_data[$key] = ''; + } + break; + + case 'URL': + $apath = $atomlite_payload_item[$include_field]; + $prefix = '/hwjmaworks'; + $suffix = '.atom'; + $plen = strlen($prefix); + $slen = 0 - strlen($suffix); + // Chop off prefix. + $sub_string = substr($apath, $plen); + // Chop off suffix. + $clean_string = substr($sub_string, 0, $slen); + // Form url. + $host = 'https://www.hwjma.org.uk'; + $uri = '/content' . $clean_string; + $url = $host . $uri; + + $book_export_data[$key] = $url; + break; + + case 'Resource URI': + $apath = $atomlite_payload_item['URL']; + $book_export_data[$key] = $apath; + break; + + case 'Parent Book': + // Need to actually get the title of the book from the isbn. + $books = !empty($atomlite_payload_item[$include_field]) ? $atomlite_payload_item[$include_field] : ''; + $book_export_data[$key] = !empty($books) && is_array($books) ? implode('|', $books) : $books; + break; + + case 'Parent ISBN': + // Set Parent ISBN in CSV. + $books = !empty($atomlite_payload_item[$include_field]) ? $atomlite_payload_item[$include_field] : ''; + $book_export_data[$key] = !empty($books) && is_array($books) ? implode('|', $books) : $books; + break; + + default: + $book_export_data[$key] = $atomlite_payload_item[$include_field]; + + } + } + + $data[] = $book_export_data; + + } + + $file_prefix = 'Bps_title_export-'; + $filename = $file_prefix . $item_type . '.csv'; + $path = 'public://content-export/'; + $file = $path . $filename; + + // Check if directory exists, if not, create it. + if (file_prepare_directory($path, FILE_CREATE_DIRECTORY)) { + + $output = fopen($file, "w"); + $header = array_keys($data[0]); + + fputcsv($output, $header); + + foreach ($data as $row) { + fputcsv($output, $row); + } + + // Write file. + fclose($output); + } + } + + /** + * Helper function to get a Book, Chapter, Section ID. + * + * @param array $apath, + * $prefix. + * + * @return string + * The ID is piece of apath. + */ + protected function extractID($apath, $prefix) { + $suffix = '.atom'; + $plen = strlen($prefix); + $slen = 0 - strlen($suffix); + // Chop off prefix. + $sub_string = substr($apath, $plen); + // Chop off suffix. + $id = substr($sub_string, 0, $slen); + return $id; + } + + /** + * Export all data into csv. + */ + public function exportBooksFull() { + // Setup file info. + $file_prefix = 'Bps_title_export-full-data'; + $filename = $file_prefix . '.csv'; + $path = 'public://content-export/'; + $file = $path . $filename; + + // Dynamically get the extract policy... + $policy = $this->hwjmaLookup->getItemExtractPolicy(); + + $item_type = ['journal', 'journal_article', 'journal_issue']; + foreach ($policy as $kpolicy => $corpus) { + if ($kpolicy == 'item-bits-hwjmaworks') { + $book_item_type = ['item_monograph', 'item_report_guideline', 'item_test_review', 'item_chapter']; + $atomlite_payload = $this->lookup->getAtomLitePayloadByItemTypes($book_item_type, $kpolicy); + } + else { + $atomlite_payload = $this->lookup->getAtomLitePayloadByItemTypes($item_type, $kpolicy); + } + + if (empty($atomlite_payload)) { + return; + } + + $total_items = count($atomlite_payload); + drush_print("Found $total_items atoms for exporting... $kpolicy"); + + // Book fields to include. + $include_fields = [ + 'Content type' => 'item-type', + 'ID' => 'journal-eissn', + 'Publisher ID' => 'journal-publisher-id', + 'Title' => 'title-plain', + 'Author' => 'authors-full-name', + 'Publisher' => 'McGraw-Hill Professional', + 'Copyright year' => 'copyright-year', + 'Date posted' => 'date-print-publication', + 'Subjects' => 'taxonomy-terms', + 'Archived?' => 'archived', + 'URL' => 'apath', + ]; + + // Check if directory exists, if not, create it. + if (file_prepare_directory($path, FILE_CREATE_DIRECTORY)) { + + $output = fopen($file, "w"); + $header = array_keys($include_fields); + + fputcsv($output, $header); + + } + else { + drush_print('[ERROR] Could not prepare file ' . $path); + return []; + } + + // Content type + $content_type = ['journal', 'journal-article', 'journal-issue']; + // Loop through initial payload items for item-type. + $full_book_apaths = []; + $count = 0; + $start_time = time(); + foreach ($atomlite_payload as $apath => $atomlite_payload_item) { + $book_start_time = time(); + // If the payload item is empty, skip. + if (empty($atomlite_payload_item)) { + continue; + } + + $toc_nid = $this->lookup->nidFromApath($apath); + $toc_node = $this->entityManager->getStorage('node')->load($toc_nid); + + // Determine if book is chapter or section split. + // $book_split_at = $toc_node->get('book_split_at')->getString(); + $children = []; + + foreach ($toc_node->get('children')->getValue() as $child) { + // SF01154128 - do not include covers in pagination. + $type = $this->lookup->getTypeFromNID($child['target_id']); + if ($type !== 'item_cover') { + $children[] = $child['apath']; + } + } + + // Done with node, free up some memory. + $toc_node = NULL; + + $toc = $this->getTocFlat($apath, $children, $book_split_at, $toc_nid); + + // Build a truly flat list of only apaths. + $full_book_apaths[] = $apath; + foreach ($toc as $toc_item) { + if (!empty($toc_item['apath'])) { + $full_book_apaths[] = $toc_item['apath']; + } + if (!empty($toc_item['children'])) { + foreach ($toc_item['children'] as $child) { + $full_book_apaths[] = $child; + } + } + } + + // Done with $toc, free up some memory. + $toc = []; + + // Fetch all data for apaths from AtomLite via apaths and policy. + $atomlite_book_payload = $this->payloadFetcher->getMultiple($full_book_apaths, $kpolicy); + + // Done with $full_book_apaths, free up some memory. + $full_book_apaths = []; + + // Put the book apath at the top of the list... obnoxious... + $last_item = end($atomlite_book_payload); + if ($last_item['item-type'] == 'item-book') { + array_pop($atomlite_book_payload); + $reversed = array_reverse($atomlite_book_payload); + $reversed[$last_item['apath']] = $last_item; + $atomlite_book_payload = array_reverse($reversed); + } + + // Go through all the book items and fetch data for csv. + foreach ($atomlite_book_payload as $bapath => $book_payload_item) { + // If the payload item is empty, skip. + if (empty($book_payload_item)) { + continue; + } + + // Lets exclude some item-types we don't need in the report. + if ($book_payload_item['item-type'] == 'item-figure' || + $book_payload_item['item-type'] == 'item-table' || + $book_payload_item['item-type'] == 'item-graph' || + $book_payload_item['item-type'] == 'item-example' || + $book_payload_item['item-type'] == 'item-video-reference') { + continue; + } + + // Handle ID field since it differs based on item type. + $include_fields['ID'] = 'isbn-ebook'; + + // For journal. + if ($book_payload_item['atom-type'] == 'journal') { + $include_fields['ID'] = $book_payload_item['journal-eissn']; + $include_fields['Publisher ID'] = $book_payload_item['journal-publisher-id']; + } + + // For article. + if ($book_payload_item['atom-type'] == 'journal-article') { + $include_fields['Publisher ID'] = $book_payload_item['publisher-unique-id']; + } + + // Book field mods (Monograph / Test-Review / Report Guideline). + $books_type = ['item-monograph', 'item-report-guideline', 'item-test-review', 'item-chapter']; + if (in_array($book_payload_item['item-type'], $books_type)) { + if ($book_payload_item['apath']) { + $apath_array = explode('/', $book_payload_item['apath']); + // Last ID from the URL. + $apath_last_id = count($apath_array) - 1; + } + + $include_fields['ID'] = $apath_array[$apath_last_id]; + $include_fields['Publisher ID'] = ''; + } + + $subjects = []; + $book_export_data = []; + + // Loop through each field we want on the book item. + foreach ($include_fields as $key => $include_field) { + // If the payload doesn't have a field, create it and set + // empty string so the csv properly holds the cell value. + if (empty($book_payload_item[$include_field])) { + $book_payload_item[$include_field] = ''; + } + + switch ($key) { + case 'ID': + // we must pass it to the csv as ="9780071753791". + if ($book_payload_item['atom-type'] == 'journal') { + $book_export_data[$key] = $book_payload_item['journal-eissn']; + } + else { + $book_export_data[$key] = '="' . (string) $book_payload_item[$include_field] . '"'; + } + + // For non-books. + if (in_array($book_payload_item['item-type'], $books_type)) { + $book_export_data[$key] = $include_field; + } + break; + + case 'Publisher ID': + + if ($book_payload_item['atom-type'] == 'journal') { + $book_export_data[$key] = $book_payload_item['journal-publisher-id']; + } + elseif ($book_payload_item['atom-type'] == 'journal-article' || $book_payload_item['atom-type'] == 'journal-issue') { + $book_export_data[$key] = "'" . $book_payload_item['publisher-unique-id']; + } + else { + $book_export_data[$key] = ""; + } + break; + + case 'Archived?': + // Archived field is boolean, csv/xcel doesn't like that + // for properly holding the cell value. + $archived = 'No'; + if ($item_type == 'item_book' && !empty($book_payload_item[$include_field])) { + $archived = 'Yes'; + } + $book_export_data[$key] = $archived; + break; + + case 'Content type': + + $book_export_data[$key] = '="' . (string) $book_payload_item[$include_field] . '"'; + if ($book_payload_item['atom-type']) { + if (in_array($book_payload_item['atom-type'], $content_type)) { + $book_export_data[$key] = $book_payload_item['atom-type']; + } + } + elseif ($book_payload_item['item-type']) { + if (in_array($book_payload_item['item-type'], $books_type)) { + $book_export_data[$key] = $book_payload_item['item-type']; + } + } + + break; + + case 'Publisher': + $book_export_data[$key] = $book_payload_item[$include_field]; + break; + + case 'Copyright year': + $copyright_year = ''; + // Books have copyright dates. + if ($item_type == 'item_book') { + $copyright_year = $book_payload_item[$include_field][0]; + } + $book_export_data[$key] = $copyright_year; + break; + + case 'Author': + $book_export_data[$key] = $book_payload_item[$include_field][0]; + break; + + case 'Subjects': + if (!empty($book_payload_item[$include_field]) && is_array($book_payload_item[$include_field])) { + foreach ($book_payload_item[$include_field] as $subject) { + $subjects[] = $subject['label']; + } + $book_export_data[$key] = implode(' | ', $subjects); + } + else { + $book_export_data[$key] = ''; + } + break; + + case 'URL': + $uri = $this->getContentUrl($book_payload_item); + + if (!empty($uri)) { + $host = 'https://hwjma-prod.highwirestaging.com'; + $url = $host . $uri; + $book_export_data[$key] = $url; + } + break; + + default: + $book_export_data[$key] = $book_payload_item[$include_field]; + + } + } + $data[] = $book_export_data; + + // Write our data to the csv. + // fputcsv($output, $book_export_data);. + // Done with book_export_data, free up some memory. + $book_export_data = []; + + } + + // Done with atomlite_book_payload, free up some memory. + $atomlite_book_payload = []; + + $count++; + drush_print($count . '/' . $total_items . ' atoms processed in ' . (time() - $book_start_time) . ' seconds.'); + + } + } + + // Write our data to the csv. + foreach ($data as $row) { + fputcsv($output, $row); + } + + // Write file. + fclose($output); + + drush_print('Total time elapsed: ' . (time() - $start_time) . ' seconds.'); + } + + /** + * Helper function to get a content url. + * + * @param array $book_payload_item + * + * @return string + * The URI foa the piece of content. + */ + protected function getContentUrl(array $book_payload_item) { + + $type = $book_payload_item['item-type']; + $url = ''; + + // The ancestor field will be a book chunk or the root_item field. + // Note we have to check if parent_book is empty because the book_split_at + // field has a value even for items that are not descendants of books. + $ancestor_field = ''; + $book_split_at = !empty($book_payload_item['book-split-at']) ? $book_payload_item['book-split-at'] : 'chapter'; + if (!empty($book_payload_item['parent-book'])) { + $ancestor_field = 'parent-' . $book_split_at; + } + elseif (!empty($book_payload_item['root-item'])) { + $ancestor_field = 'root-item'; + } + + switch ($type) { + // Case in_array($type, mhe_core_get_book_fragment_types()): + case 'item-search-section': + // For book fragments (i.e. search section, figure, table, graph) return fragment link to parent type. + $url = $this->getContentUrlJumpLink($book_payload_item, $ancestor_field); + break; + + case 'item-section': + // Whether a section has is a jump link or not depends on how the book is split. + if ($type === 'item-' . $book_split_at) { + $url = $this->apathToCpath($book_payload_item['apath'], $kpolicy); + } + else { + $url = $this->getContentUrlJumpLink($book_payload_item, $ancestor_field); + } + break; + + default: + // Return node url. + $url = $this->apathToCpath($book_payload_item['apath'], $kpolicy); + break; + } + + return $url; + } + + /** + * Helper function to get a content url. + * + * @param array $book_payload_item + * @param string $ancestor_field + * + * @return string + * The URI containing the jump link to sub section. + */ + protected function getContentUrlJumpLink(array $book_payload_item, string $ancestor_field) { + $url = ''; + + // Get url for items that should be jump links. + if (!empty($book_payload_item[$ancestor_field])) { + // Check for parent nid. + $ancestor_apath = $book_payload_item[$ancestor_field]; + $ancestor_cpath = $this->apathToCpath($ancestor_apath); + + // Get the publisher id (xml:id in source.xml), this will be the jump link fragment. + $publisher_id = !empty($book_payload_item['publisher-id']) ? $book_payload_item['publisher-id'] : ''; + // Build url. + $url = $ancestor_cpath . '#' . $publisher_id; + } + + return $url; + } + + /** + * Helper function to get a cpath from apath. + * + * @param string $apath + * + * @return string + * Some durty manging of the apath to get cpath... + */ + protected function apathToCpath(string $apath, $policy = NULL) { + if (empty($apath)) { + return ''; + } + + if ($policy == 'scolaris-journal') { + $prefix = ''; + $suffix = '.atom'; + $cpath = str_replace($suffix, '', $apath); + } + else { + $prefix = '/hwjmaworks'; + $suffix = '.atom'; + $cpath = str_replace($suffix, '', $apath); + $cpath = str_replace($prefix, '', $cpath); + } + + return '/content' . $cpath; + + } + + /** + * Helper function for getting a books children. + * + * @param string $book_apath + * @param array $book_children + * @param bool $depth + * + * @return array + */ + protected function getTocFlat(string $book_apath, array $book_children, $depth = FALSE, $toc_nid = NULL) { + try { + $results = $this->hwjmaLookup->getBookTocItemsFromElastic($book_apath, $toc_nid); + } + catch (\Exception $e) { + return []; + } + + $filtered_children = []; + foreach ($book_children as $child_apath) { + if (isset($results['results'][$child_apath])) { + $filtered_children[$child_apath] = $results['results'][$child_apath]; + } + } + + $toc = $this->getTocFlatRecusive($results['results'], $filtered_children); + if ($depth !== FALSE) { + foreach ($toc as $key => $item) { + // Front and back matter items are not nested into chapters for section. + // Split books therefore their level is 0 but we still need to include them. + if ($depth == 1 && ($item['item-type'] == 'item-front-matter' || $item['item-type'] == 'item-back-matter')) { + continue; + } + if ($item['level'] < $depth || empty($item['item-has-body'])) { + unset($toc[$key]); + } + } + $toc = array_values($toc); + } + + return $toc; + } + + /** + * Get toc flat and in order. + * + * @param array $all_results + * An array of all toc items, not in order. + * @param array $children + * An array of children. + * @param int $level + * Max level for toc items. + * + * @return array + * A flattened toc array in the proper order. + */ + protected function getTocFlatRecusive(array &$all_results, array $children, $level = 0) { + $items = []; + foreach ($children as $apath => $child) { + $child['level'] = $level; + $child['apath'] = $apath; + $items[] = $child; + if (!empty($child['children'])) { + $filtered_children = []; + foreach ($child['children'] as $child_apath) { + if (!isset($all_results[$child_apath])) { + continue; + } + $filtered_children[$child_apath] = $all_results[$child_apath]; + } + + if (!empty($filtered_children)) { + $new_level = $level + 1; + if ($child_items = $this->getTocFlatRecusive($all_results, $filtered_children, $new_level)) { + foreach ($child_items as $child_apath => $item) { + $items[] = $item; + } + } + } + } + } + + return $items; + } + +} \ No newline at end of file From 5caf7d81d76bd9362d1b18959c0379ef947ffa0b Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Mon, 3 Jul 2023 08:07:59 -0400 Subject: [PATCH 035/174] fix pre next button issue --- .../hwjma_content_display.module | 63 ++ .../highwire/hwjma_core/src/ContentExport.php | 818 ------------------ .../hwjma_theme/includes/field.theme.inc | 78 ++ .../hwjma_theme/includes/layout.theme.inc | 18 +- .../hwjma_theme/includes/node.theme.inc | 2 +- 5 files changed, 145 insertions(+), 834 deletions(-) delete mode 100644 web/modules/highwire/hwjma_core/src/ContentExport.php diff --git a/web/modules/highwire/hwjma_content_display/hwjma_content_display.module b/web/modules/highwire/hwjma_content_display/hwjma_content_display.module index b10ceeda7..0487fc554 100755 --- a/web/modules/highwire/hwjma_content_display/hwjma_content_display.module +++ b/web/modules/highwire/hwjma_content_display/hwjma_content_display.module @@ -4,3 +4,66 @@ * @file * Contains hwjma_content_display.module. */ + +use Drupal\Component\Utility\Html; +use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Link; +use Drupal\Core\Render\BubbleableMetadata; +use Drupal\Core\Render\Element; +use Drupal\Core\Render\Markup; +use Drupal\Core\Url; +use Drupal\Core\Template\Attribute; +use Drupal\node\Entity\Node; + +/** + * Implements hook_theme(). + */ +function hwjma_content_display_theme() { + return [ + 'hwjma_tabs' => [ + 'render element' => 'element', + ], + 'hwjma_icon' => [ + 'render element' => 'element', + ], + 'hwjma_toc_pager' => [ + 'variables' => ['previous_url' => NULL, 'next_url' => NULL], + ], + ]; +} + +/** + * Prepares variables for Hwjma tabs templates. + * + * Default template: hwjma-tabs.html.twig. + * + * @param array $variables + * An associative array containing: + * - element: An associative array containing the properties and children of + * the details element. Properties used: #children. + * + */ +function template_preprocess_hwjma_tabs(&$variables) { + $element = $variables['element']; + $variables['children'] = (!empty($element['#children'])) ? $element['#children'] : ''; +} + +/** + * Prepares variables for HWJMA icon templates. + * + * Default template: hwjma-icon.html.twig. + * + * @param array $variables + * An associative array containing: + * - element: An associative array containing the properties and children of + * the details element. Properties used: #icon, #icon_prefix. + * + */ +function template_preprocess_hwjma_icon(&$variables) { + foreach(['icon', 'icon_prefix', 'icon_library'] as $key) { + if (!empty($variables['element']['#' . $key])) { + $variables[$key] = $variables['element']['#' . $key]; + } + } +} \ No newline at end of file diff --git a/web/modules/highwire/hwjma_core/src/ContentExport.php b/web/modules/highwire/hwjma_core/src/ContentExport.php deleted file mode 100644 index 9c4c5bfdd..000000000 --- a/web/modules/highwire/hwjma_core/src/ContentExport.php +++ /dev/null @@ -1,818 +0,0 @@ -entityManager = $entity_manager; - $this->queryFactory = $query_factory; - $this->lookup = $lookup; - $this->contentSettings = $content_settings; - $this->hwjmaLookup = $hwjma_lookup; - $this->payloadFetcher = $payload_fetcher; - } - - /** - * Helper function to get Top Parent of any Taxonomy. - * - * @param array $tid - * => term_id. - * - * @return array - */ - protected function getTopParent($tid) { - $parent_id = $tid; - $parent_term_name = []; - $parent_term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($parent_id); - $parents = $parent_term->get('parent')->getValue(); - foreach ($parents as $value) { - $parent_tid = $value['target_id']; - if ($parent_tid) { - $parent_term_name = array_merge($parent_term_name, $this->getTopParent($parent_tid)); - } - else { - $parent_term_name[] = $parent_term->getName(); - } - } - - return $parent_term_name; - } - - /** - * Get all export meta for given item_type. - * - * @param int $item_type - * A node type. - * - * @return array - * Array of meta for the export data. - */ - public function exportContentByType($item_type) { - // Dynamically get the extract policy... - $policy = $this->hwjmaLookup->getItemExtractPolicy(); - - // Fetch all apaths for item_type... - foreach ($policy as $kpolicy => $corpus) { - $atomlite_payload = $this->lookup->getAtomLitePayloadByItemType($item_type, $kpolicy); - } - - if (empty($atomlite_payload)) { - return; - } - - // Get labels from the highwire content settings. - $type_translation = $this->contentSettings->getContentTypeLabelsPlural(); - - // Book fields to include. - $include_fields = [ - 'Content type' => $type_translation[$item_type], - 'ID' => 'isbn-ebook', - 'Title' => 'title-plain', - 'Parent Book' => 'video-book-title', - 'Parent ISBN' => 'bibliorelation-isbn', - 'Author' => 'authors-full-name', - 'Publisher' => 'McGraw-Hill Professional', - 'Copyright year' => 'copyright-year', - 'Date posted' => 'date-print-publication', - 'Subjects' => 'taxonomy-terms', - 'Archived?' => 'archived', - 'URL' => 'apath', - 'Resource URI' => 'apath', - ]; - - // Non-Book field mods. - if ($item_type != 'item_book') { - $include_fields['ID'] = 'publisher-id'; - } - - // Don't set Parent Book field/value for anything but videos. - if ($item_type != 'item_video') { - unset($include_fields['Parent Book']); - } - - $csv = []; - foreach ($atomlite_payload as $apath => $atomlite_payload_item) { - // If the payload item is empty, skip. - if (empty($atomlite_payload_item)) { - continue; - } - - $subjects = []; - $book_export_data = []; - foreach ($include_fields as $key => $include_field) { - - // Archived field is boolean, csv/xcel doesn't like that - // for properly holding the cell value. - $archived = 'No'; - if ($key == 'Archived?') { - // All items except book should be No. - if ($item_type == 'item_book' && !empty($atomlite_payload_item[$include_field])) { - $archived = 'Yes'; - } - } - // If the payload doesn't have a field, create it and set - // empty string so the csv properly holds the cell value. - if (empty($atomlite_payload_item[$include_field])) { - $atomlite_payload_item[$include_field] = ''; - } - switch ($key) { - case 'ID': - // In order to prevent xcel from autoformatting the id as 9.78E+10, - // we must pass it to the csv as ="9780071753791". - $book_export_data[$key] = '="' . (string) $atomlite_payload_item[$include_field] . '"'; - break; - - case 'Archived?': - $book_export_data[$key] = $archived; - break; - - case 'Content type': - case 'Publisher': - $book_export_data[$key] = $include_field; - break; - - case 'Copyright year': - $copyright_year = ''; - // Books have copyright dates. - if ($item_type == 'item_book') { - $copyright_year = $atomlite_payload_item[$include_field][0]; - } - $book_export_data[$key] = $copyright_year; - break; - - case 'Author': - $book_export_data[$key] = $atomlite_payload_item[$include_field][0]; - break; - - case 'Subjects': - if (!empty($atomlite_payload_item[$include_field]) && is_array($atomlite_payload_item[$include_field])) { - foreach ($atomlite_payload_item[$include_field] as $subject) { - $subjects[] = $subject['label']; - } - $book_export_data[$key] = implode(' | ', $subjects); - } - else { - $book_export_data[$key] = ''; - } - break; - - case 'URL': - $apath = $atomlite_payload_item[$include_field]; - $prefix = '/hwjmaworks'; - $suffix = '.atom'; - $plen = strlen($prefix); - $slen = 0 - strlen($suffix); - // Chop off prefix. - $sub_string = substr($apath, $plen); - // Chop off suffix. - $clean_string = substr($sub_string, 0, $slen); - // Form url. - $host = 'https://www.hwjma.org.uk'; - $uri = '/content' . $clean_string; - $url = $host . $uri; - - $book_export_data[$key] = $url; - break; - - case 'Resource URI': - $apath = $atomlite_payload_item['URL']; - $book_export_data[$key] = $apath; - break; - - case 'Parent Book': - // Need to actually get the title of the book from the isbn. - $books = !empty($atomlite_payload_item[$include_field]) ? $atomlite_payload_item[$include_field] : ''; - $book_export_data[$key] = !empty($books) && is_array($books) ? implode('|', $books) : $books; - break; - - case 'Parent ISBN': - // Set Parent ISBN in CSV. - $books = !empty($atomlite_payload_item[$include_field]) ? $atomlite_payload_item[$include_field] : ''; - $book_export_data[$key] = !empty($books) && is_array($books) ? implode('|', $books) : $books; - break; - - default: - $book_export_data[$key] = $atomlite_payload_item[$include_field]; - - } - } - - $data[] = $book_export_data; - - } - - $file_prefix = 'Bps_title_export-'; - $filename = $file_prefix . $item_type . '.csv'; - $path = 'public://content-export/'; - $file = $path . $filename; - - // Check if directory exists, if not, create it. - if (file_prepare_directory($path, FILE_CREATE_DIRECTORY)) { - - $output = fopen($file, "w"); - $header = array_keys($data[0]); - - fputcsv($output, $header); - - foreach ($data as $row) { - fputcsv($output, $row); - } - - // Write file. - fclose($output); - } - } - - /** - * Helper function to get a Book, Chapter, Section ID. - * - * @param array $apath, - * $prefix. - * - * @return string - * The ID is piece of apath. - */ - protected function extractID($apath, $prefix) { - $suffix = '.atom'; - $plen = strlen($prefix); - $slen = 0 - strlen($suffix); - // Chop off prefix. - $sub_string = substr($apath, $plen); - // Chop off suffix. - $id = substr($sub_string, 0, $slen); - return $id; - } - - /** - * Export all data into csv. - */ - public function exportBooksFull() { - // Setup file info. - $file_prefix = 'Bps_title_export-full-data'; - $filename = $file_prefix . '.csv'; - $path = 'public://content-export/'; - $file = $path . $filename; - - // Dynamically get the extract policy... - $policy = $this->hwjmaLookup->getItemExtractPolicy(); - - $item_type = ['journal', 'journal_article', 'journal_issue']; - foreach ($policy as $kpolicy => $corpus) { - if ($kpolicy == 'item-bits-hwjmaworks') { - $book_item_type = ['item_monograph', 'item_report_guideline', 'item_test_review', 'item_chapter']; - $atomlite_payload = $this->lookup->getAtomLitePayloadByItemTypes($book_item_type, $kpolicy); - } - else { - $atomlite_payload = $this->lookup->getAtomLitePayloadByItemTypes($item_type, $kpolicy); - } - - if (empty($atomlite_payload)) { - return; - } - - $total_items = count($atomlite_payload); - drush_print("Found $total_items atoms for exporting... $kpolicy"); - - // Book fields to include. - $include_fields = [ - 'Content type' => 'item-type', - 'ID' => 'journal-eissn', - 'Publisher ID' => 'journal-publisher-id', - 'Title' => 'title-plain', - 'Author' => 'authors-full-name', - 'Publisher' => 'McGraw-Hill Professional', - 'Copyright year' => 'copyright-year', - 'Date posted' => 'date-print-publication', - 'Subjects' => 'taxonomy-terms', - 'Archived?' => 'archived', - 'URL' => 'apath', - ]; - - // Check if directory exists, if not, create it. - if (file_prepare_directory($path, FILE_CREATE_DIRECTORY)) { - - $output = fopen($file, "w"); - $header = array_keys($include_fields); - - fputcsv($output, $header); - - } - else { - drush_print('[ERROR] Could not prepare file ' . $path); - return []; - } - - // Content type - $content_type = ['journal', 'journal-article', 'journal-issue']; - // Loop through initial payload items for item-type. - $full_book_apaths = []; - $count = 0; - $start_time = time(); - foreach ($atomlite_payload as $apath => $atomlite_payload_item) { - $book_start_time = time(); - // If the payload item is empty, skip. - if (empty($atomlite_payload_item)) { - continue; - } - - $toc_nid = $this->lookup->nidFromApath($apath); - $toc_node = $this->entityManager->getStorage('node')->load($toc_nid); - - // Determine if book is chapter or section split. - // $book_split_at = $toc_node->get('book_split_at')->getString(); - $children = []; - - foreach ($toc_node->get('children')->getValue() as $child) { - // SF01154128 - do not include covers in pagination. - $type = $this->lookup->getTypeFromNID($child['target_id']); - if ($type !== 'item_cover') { - $children[] = $child['apath']; - } - } - - // Done with node, free up some memory. - $toc_node = NULL; - - $toc = $this->getTocFlat($apath, $children, $book_split_at, $toc_nid); - - // Build a truly flat list of only apaths. - $full_book_apaths[] = $apath; - foreach ($toc as $toc_item) { - if (!empty($toc_item['apath'])) { - $full_book_apaths[] = $toc_item['apath']; - } - if (!empty($toc_item['children'])) { - foreach ($toc_item['children'] as $child) { - $full_book_apaths[] = $child; - } - } - } - - // Done with $toc, free up some memory. - $toc = []; - - // Fetch all data for apaths from AtomLite via apaths and policy. - $atomlite_book_payload = $this->payloadFetcher->getMultiple($full_book_apaths, $kpolicy); - - // Done with $full_book_apaths, free up some memory. - $full_book_apaths = []; - - // Put the book apath at the top of the list... obnoxious... - $last_item = end($atomlite_book_payload); - if ($last_item['item-type'] == 'item-book') { - array_pop($atomlite_book_payload); - $reversed = array_reverse($atomlite_book_payload); - $reversed[$last_item['apath']] = $last_item; - $atomlite_book_payload = array_reverse($reversed); - } - - // Go through all the book items and fetch data for csv. - foreach ($atomlite_book_payload as $bapath => $book_payload_item) { - // If the payload item is empty, skip. - if (empty($book_payload_item)) { - continue; - } - - // Lets exclude some item-types we don't need in the report. - if ($book_payload_item['item-type'] == 'item-figure' || - $book_payload_item['item-type'] == 'item-table' || - $book_payload_item['item-type'] == 'item-graph' || - $book_payload_item['item-type'] == 'item-example' || - $book_payload_item['item-type'] == 'item-video-reference') { - continue; - } - - // Handle ID field since it differs based on item type. - $include_fields['ID'] = 'isbn-ebook'; - - // For journal. - if ($book_payload_item['atom-type'] == 'journal') { - $include_fields['ID'] = $book_payload_item['journal-eissn']; - $include_fields['Publisher ID'] = $book_payload_item['journal-publisher-id']; - } - - // For article. - if ($book_payload_item['atom-type'] == 'journal-article') { - $include_fields['Publisher ID'] = $book_payload_item['publisher-unique-id']; - } - - // Book field mods (Monograph / Test-Review / Report Guideline). - $books_type = ['item-monograph', 'item-report-guideline', 'item-test-review', 'item-chapter']; - if (in_array($book_payload_item['item-type'], $books_type)) { - if ($book_payload_item['apath']) { - $apath_array = explode('/', $book_payload_item['apath']); - // Last ID from the URL. - $apath_last_id = count($apath_array) - 1; - } - - $include_fields['ID'] = $apath_array[$apath_last_id]; - $include_fields['Publisher ID'] = ''; - } - - $subjects = []; - $book_export_data = []; - - // Loop through each field we want on the book item. - foreach ($include_fields as $key => $include_field) { - // If the payload doesn't have a field, create it and set - // empty string so the csv properly holds the cell value. - if (empty($book_payload_item[$include_field])) { - $book_payload_item[$include_field] = ''; - } - - switch ($key) { - case 'ID': - // we must pass it to the csv as ="9780071753791". - if ($book_payload_item['atom-type'] == 'journal') { - $book_export_data[$key] = $book_payload_item['journal-eissn']; - } - else { - $book_export_data[$key] = '="' . (string) $book_payload_item[$include_field] . '"'; - } - - // For non-books. - if (in_array($book_payload_item['item-type'], $books_type)) { - $book_export_data[$key] = $include_field; - } - break; - - case 'Publisher ID': - - if ($book_payload_item['atom-type'] == 'journal') { - $book_export_data[$key] = $book_payload_item['journal-publisher-id']; - } - elseif ($book_payload_item['atom-type'] == 'journal-article' || $book_payload_item['atom-type'] == 'journal-issue') { - $book_export_data[$key] = "'" . $book_payload_item['publisher-unique-id']; - } - else { - $book_export_data[$key] = ""; - } - break; - - case 'Archived?': - // Archived field is boolean, csv/xcel doesn't like that - // for properly holding the cell value. - $archived = 'No'; - if ($item_type == 'item_book' && !empty($book_payload_item[$include_field])) { - $archived = 'Yes'; - } - $book_export_data[$key] = $archived; - break; - - case 'Content type': - - $book_export_data[$key] = '="' . (string) $book_payload_item[$include_field] . '"'; - if ($book_payload_item['atom-type']) { - if (in_array($book_payload_item['atom-type'], $content_type)) { - $book_export_data[$key] = $book_payload_item['atom-type']; - } - } - elseif ($book_payload_item['item-type']) { - if (in_array($book_payload_item['item-type'], $books_type)) { - $book_export_data[$key] = $book_payload_item['item-type']; - } - } - - break; - - case 'Publisher': - $book_export_data[$key] = $book_payload_item[$include_field]; - break; - - case 'Copyright year': - $copyright_year = ''; - // Books have copyright dates. - if ($item_type == 'item_book') { - $copyright_year = $book_payload_item[$include_field][0]; - } - $book_export_data[$key] = $copyright_year; - break; - - case 'Author': - $book_export_data[$key] = $book_payload_item[$include_field][0]; - break; - - case 'Subjects': - if (!empty($book_payload_item[$include_field]) && is_array($book_payload_item[$include_field])) { - foreach ($book_payload_item[$include_field] as $subject) { - $subjects[] = $subject['label']; - } - $book_export_data[$key] = implode(' | ', $subjects); - } - else { - $book_export_data[$key] = ''; - } - break; - - case 'URL': - $uri = $this->getContentUrl($book_payload_item); - - if (!empty($uri)) { - $host = 'https://hwjma-prod.highwirestaging.com'; - $url = $host . $uri; - $book_export_data[$key] = $url; - } - break; - - default: - $book_export_data[$key] = $book_payload_item[$include_field]; - - } - } - $data[] = $book_export_data; - - // Write our data to the csv. - // fputcsv($output, $book_export_data);. - // Done with book_export_data, free up some memory. - $book_export_data = []; - - } - - // Done with atomlite_book_payload, free up some memory. - $atomlite_book_payload = []; - - $count++; - drush_print($count . '/' . $total_items . ' atoms processed in ' . (time() - $book_start_time) . ' seconds.'); - - } - } - - // Write our data to the csv. - foreach ($data as $row) { - fputcsv($output, $row); - } - - // Write file. - fclose($output); - - drush_print('Total time elapsed: ' . (time() - $start_time) . ' seconds.'); - } - - /** - * Helper function to get a content url. - * - * @param array $book_payload_item - * - * @return string - * The URI foa the piece of content. - */ - protected function getContentUrl(array $book_payload_item) { - - $type = $book_payload_item['item-type']; - $url = ''; - - // The ancestor field will be a book chunk or the root_item field. - // Note we have to check if parent_book is empty because the book_split_at - // field has a value even for items that are not descendants of books. - $ancestor_field = ''; - $book_split_at = !empty($book_payload_item['book-split-at']) ? $book_payload_item['book-split-at'] : 'chapter'; - if (!empty($book_payload_item['parent-book'])) { - $ancestor_field = 'parent-' . $book_split_at; - } - elseif (!empty($book_payload_item['root-item'])) { - $ancestor_field = 'root-item'; - } - - switch ($type) { - // Case in_array($type, mhe_core_get_book_fragment_types()): - case 'item-search-section': - // For book fragments (i.e. search section, figure, table, graph) return fragment link to parent type. - $url = $this->getContentUrlJumpLink($book_payload_item, $ancestor_field); - break; - - case 'item-section': - // Whether a section has is a jump link or not depends on how the book is split. - if ($type === 'item-' . $book_split_at) { - $url = $this->apathToCpath($book_payload_item['apath'], $kpolicy); - } - else { - $url = $this->getContentUrlJumpLink($book_payload_item, $ancestor_field); - } - break; - - default: - // Return node url. - $url = $this->apathToCpath($book_payload_item['apath'], $kpolicy); - break; - } - - return $url; - } - - /** - * Helper function to get a content url. - * - * @param array $book_payload_item - * @param string $ancestor_field - * - * @return string - * The URI containing the jump link to sub section. - */ - protected function getContentUrlJumpLink(array $book_payload_item, string $ancestor_field) { - $url = ''; - - // Get url for items that should be jump links. - if (!empty($book_payload_item[$ancestor_field])) { - // Check for parent nid. - $ancestor_apath = $book_payload_item[$ancestor_field]; - $ancestor_cpath = $this->apathToCpath($ancestor_apath); - - // Get the publisher id (xml:id in source.xml), this will be the jump link fragment. - $publisher_id = !empty($book_payload_item['publisher-id']) ? $book_payload_item['publisher-id'] : ''; - // Build url. - $url = $ancestor_cpath . '#' . $publisher_id; - } - - return $url; - } - - /** - * Helper function to get a cpath from apath. - * - * @param string $apath - * - * @return string - * Some durty manging of the apath to get cpath... - */ - protected function apathToCpath(string $apath, $policy = NULL) { - if (empty($apath)) { - return ''; - } - - if ($policy == 'scolaris-journal') { - $prefix = ''; - $suffix = '.atom'; - $cpath = str_replace($suffix, '', $apath); - } - else { - $prefix = '/hwjmaworks'; - $suffix = '.atom'; - $cpath = str_replace($suffix, '', $apath); - $cpath = str_replace($prefix, '', $cpath); - } - - return '/content' . $cpath; - - } - - /** - * Helper function for getting a books children. - * - * @param string $book_apath - * @param array $book_children - * @param bool $depth - * - * @return array - */ - protected function getTocFlat(string $book_apath, array $book_children, $depth = FALSE, $toc_nid = NULL) { - try { - $results = $this->hwjmaLookup->getBookTocItemsFromElastic($book_apath, $toc_nid); - } - catch (\Exception $e) { - return []; - } - - $filtered_children = []; - foreach ($book_children as $child_apath) { - if (isset($results['results'][$child_apath])) { - $filtered_children[$child_apath] = $results['results'][$child_apath]; - } - } - - $toc = $this->getTocFlatRecusive($results['results'], $filtered_children); - if ($depth !== FALSE) { - foreach ($toc as $key => $item) { - // Front and back matter items are not nested into chapters for section. - // Split books therefore their level is 0 but we still need to include them. - if ($depth == 1 && ($item['item-type'] == 'item-front-matter' || $item['item-type'] == 'item-back-matter')) { - continue; - } - if ($item['level'] < $depth || empty($item['item-has-body'])) { - unset($toc[$key]); - } - } - $toc = array_values($toc); - } - - return $toc; - } - - /** - * Get toc flat and in order. - * - * @param array $all_results - * An array of all toc items, not in order. - * @param array $children - * An array of children. - * @param int $level - * Max level for toc items. - * - * @return array - * A flattened toc array in the proper order. - */ - protected function getTocFlatRecusive(array &$all_results, array $children, $level = 0) { - $items = []; - foreach ($children as $apath => $child) { - $child['level'] = $level; - $child['apath'] = $apath; - $items[] = $child; - if (!empty($child['children'])) { - $filtered_children = []; - foreach ($child['children'] as $child_apath) { - if (!isset($all_results[$child_apath])) { - continue; - } - $filtered_children[$child_apath] = $all_results[$child_apath]; - } - - if (!empty($filtered_children)) { - $new_level = $level + 1; - if ($child_items = $this->getTocFlatRecusive($all_results, $filtered_children, $new_level)) { - foreach ($child_items as $child_apath => $item) { - $items[] = $item; - } - } - } - } - } - - return $items; - } - -} \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/field.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/field.theme.inc index 9f4645f68..c47f44731 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/field.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/field.theme.inc @@ -5,3 +5,81 @@ * Functions to support theming fields in the Particle theme. */ +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_field__highwire_content__title(&$variables) { + if (empty($variables['items'])) { + return; + } + $bundle = !empty($variables['element']['#bundle']) ? $variables['element']['#bundle'] : ''; + $view_mode = !empty($variables['element']['#view_mode']) ? $variables['element']['#view_mode'] : ''; + $prefix = ''; + $prefix_template = ''; + // Add chapter label as prefix for chapter-like types. + if (in_array($bundle, hwjma_core_get_book_chunk_types())) { + $entity = !empty($variables['element']['#object']) ? $variables['element']['#object'] : FALSE; + if ($entity->hasField('chapter_section_label') && !$entity->get('chapter_section_label')->isEmpty()) { + $prefix = $entity->get('chapter_section_label')->getString(); + } + else { + $prefix = $entity->hasField('book_part_label') && !$entity->get('book_part_label')->isEmpty() ? $entity->get('book_part_label')->getString() : ''; + } + $prefix_template = '{{ title_prefix }}'; + if ($view_mode == 'toc_list') { + $prefix_template = '' . $prefix_template . ' '; + } + else { + $prefix_template .= '. '; + } + } + foreach ($variables['items'] as &$item) { + // Alter inline template to allow HTML. + if (empty($item['content']['#type'])) { + continue; + } + $content = []; + switch($item['content']['#type']) { + case 'link': + if (!empty($item['content']['#title']['#type']) && $item['content']['#title']['#type'] == 'inline_template') { + $content = &$item['content']['#title']; + } + break; + + case 'inline_template': + $content = &$item['content']; + break; + } + if (empty($content)) { + continue; + } + $content['#template'] = "{{ value|raw }}"; + // Add prefix label. + if (!empty($prefix)) { + $content['#template'] = $prefix_template . $content['#template']; + $content['#context']['title_prefix'] = $prefix; + } + } +} + +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_field_group_html_element(&$variables) { + $attributes = ($variables['attributes'])->toArray(); + if (isset($attributes['class'][0]) && !empty($attributes['class'][0]) && $attributes['class'][0] == "tab-content__main-heading latest-articles") { + $variables['attributes']->removeClass('tab-content__main-heading latest-articles'); + $variables['attributes']->addClass('latest-articles'); + } +} + +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_field__pdf_button(&$variables) { + $current_user = \Drupal::currentUser(); + $roles = $current_user->getRoles(); + if (in_array("content_editor", $roles)) { + unset($variables['attributes']['data-access-link']); + } +} \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc index 869b2573d..decacd8f4 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc @@ -219,7 +219,7 @@ function hwjma_theme_suggestions_highwire_tabs_alter(array &$suggestions, array // Tabs with a right-hand sidebar. case 'group_journal_tabs': case 'group_hw_item_tabs': - $suggestions[] = 'highwire_tabs__bps_tabs_rhs'; + $suggestions[] = 'highwire_tabs__hwjma_tabs_rhs'; break; } } @@ -233,7 +233,7 @@ function hwjma_preprocess_hwjma_toc_pager(&$variables) { '#type' => 'link', '#url' => $variables['previous_url'], '#title' => [ - ['#type' => 'bps_icon', '#icon' => 'arrow-circle-left', '#attributes' => ['class' => ['fa-lg']]], + ['#type' => 'hwjma_icon', '#icon' => 'arrow-circle-left', '#attributes' => ['class' => ['fa-lg']]], ['#markup' => 'Previous'], ], '#attributes' => ['class' => ['article__previous_link']], @@ -247,7 +247,7 @@ function hwjma_preprocess_hwjma_toc_pager(&$variables) { '#type' => 'link', '#url' => $variables['next_url'], '#title' => [ - ['#type' => 'bps_icon', '#icon' => 'arrow-circle-right', '#attributes' => ['class' => ['fa-lg']]], + ['#type' => 'hwjma_icon', '#icon' => 'arrow-circle-right', '#attributes' => ['class' => ['fa-lg']]], ['#markup' => 'Next'], ], '#attributes' => ['class' => ['article__next_link']], @@ -256,16 +256,4 @@ function hwjma_preprocess_hwjma_toc_pager(&$variables) { $variables['next']['#attributes']['class'][] = 'disabled'; } } - dump($variables); } - - - - - - - - - - - diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index f203c48f3..d6722f7ca 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -202,7 +202,7 @@ function hwjma_preprocess_node__journal__content_details(&$variables) { $variables['title'] = $node->get('title')->getString(); $variables['eissn'] = $node->get('journal_eissn')->getString(); $variables['pissn'] = $node->get('journal_pissn')->getString(); - $variables['journal_coverimage'] = '/themes/highwire/bps_theme/dist/app-drupal/assets/images/250X350.png'; + $variables['journal_coverimage'] = '/themes/highwire/hwjma_theme/dist/app-drupal/assets/images/250X350.png'; //load data from journal_info node if (!empty($info_nodes)) { $journal_info = reset($info_nodes); From ad1f06e281f40e9dd2cd69247f4f164b58d8a02a Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Wed, 5 Jul 2023 01:55:21 -0400 Subject: [PATCH 036/174] article side side journal data --- .../hwjma_theme/includes/node.theme.inc | 82 ++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index d6722f7ca..ad642d180 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -240,4 +240,84 @@ function hwjma_preprocess_node__journal__content_details(&$variables) { } } -} \ No newline at end of file +} + +/** + * Implements hook_preprocess_node(). + */ +function hwjma_preprocess_node(array &$variables) { + // Default to turning off byline/submitted. + $variables['display_submitted'] = FALSE; + $node = \Drupal::routeMatch()->getParameter('node'); + if ($node instanceof \Drupal\node\NodeInterface) { + $typeName = $node->bundle(); + + //get the current node type + $variables['content_type'] = $typeName; + + //check if the page belongs to content type journal article + if ($typeName == 'journal_article') { + $nid = $node->id(); + $options = ['absolute' => TRUE]; + $url_object = Url::fromRoute('entity.node.canonical', ['node' => $nid], $options); + $article_url = $url_object->toString(); + $parent_journal = $node->get('parent_journal')->getValue(); + $parent_issue = $node->get('parent_issue')->getValue(); + $parent_issue_nid = $parent_issue[0]['target_id']; + $parent_issue_url = null; + if (!empty($parent_issue)) { + $node = Node::load($parent_issue_nid); + $url_object = Url::fromRoute('entity.node.canonical', ['node' => $parent_issue_nid], $options); + $parent_issue_url = $url_object->toString(); + } + + //get parent journal nid + $parent_journal_nid = $parent_journal[0]['target_id']; + $issue = $node->get('issue')->getValue(); + $issue = $issue[0]['value']; + $volume = !$node->get('volume')->isEmpty() ? $node->get('volume')->getString() : ''; + //load parent journal + if (!empty($parent_journal_nid)) { + $node = Node::load($parent_journal_nid); + if ($node->hasField('children')) { + $children = !$node->get('children')->isEmpty() ? $node->get('children')->getValue() : ''; + } + // Get the total number of child volume for a Periodical + $num_of_children = count($children); + $url_object = Url::fromRoute('entity.node.canonical', ['node' => $parent_journal_nid], $options); + $nid_journal_info = Drupal::entityQuery('node')->condition('type','journal_info')->condition('field_journal',$parent_journal_nid, '=')->execute(); + $cover_image = null; + foreach ($nid_journal_info as $nid) { + $node = Node::load($nid); + $parent_journal_img = $node->get('field_journal_cover_image')->getValue(); + $image_tid = $parent_journal_img[0]['target_id']; + if (!empty($image_tid)) { + $file = File::load($image_tid); + $path = $file->getFileUri(); + $cover_image = file_create_url($path); + } else { + $cover_image = '/themes/highwire/hwjma_theme/dist/app-drupal/assets/images/128X128.png'; + } + } + } + // The Periodical that have only 1 volume should not display the volume numbers + if ($num_of_children == 1) { + $vol_issue = "Issue ".$issue; + } else { + $vol_issue = "Vol ".$volume." Issue ".$issue; + } + + $periodical_url = $url_object->toString(); + $title = $node->title->value; + $html_entity_decoded_title = html_entity_decode($title); + //set variable + $variables['periodical_items'] = [ + 'periodical_url'=> $periodical_url, + 'cover_img' => $cover_image, + 'title'=> $html_entity_decoded_title , + 'article_url'=> $parent_issue_url, + 'vol_issue'=> $vol_issue + ]; + } + } +} From 297fd7d466ca39e11c73d76971023e9069f7f083 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Wed, 5 Jul 2023 02:03:18 -0400 Subject: [PATCH 037/174] article right side journal data --- .../apps/drupal-default/hwjma_theme/includes/node.theme.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index ad642d180..2979a38a4 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -320,4 +320,4 @@ function hwjma_preprocess_node(array &$variables) { ]; } } -} +} \ No newline at end of file From 0026e449d5b5fecfcbb6365328c025a5560e9ef1 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Wed, 5 Jul 2023 04:36:39 -0400 Subject: [PATCH 038/174] Journal info --- ...form_display.node.journal_info.default.yml | 209 +++++++++++++++ ...tity_form_display.node.society.default.yml | 93 +++++++ ....entity_view_display.node.journal.full.yml | 16 +- ...play.node.journal_info.content_details.yml | 88 ++++++ ...view_display.node.journal_info.default.yml | 122 +++++++++ ..._view_display.node.journal_info.teaser.yml | 48 ++++ ...tity_view_display.node.society.default.yml | 50 ++++ ...ntity_view_display.node.society.teaser.yml | 30 +++ .../field.field.node.journal_info.corpus.yml | 19 ++ ....field.node.journal_info.field_journal.yml | 25 ++ ....node.journal_info.field_journal_about.yml | 21 ++ ...journal_info.field_journal_cover_image.yml | 38 +++ ...journal_info.field_journal_description.yml | 21 ++ ...urnal_info.field_journal_editorial_brd.yml | 21 ++ ...ode.journal_info.field_journal_editors.yml | 21 ++ ...urnal_info.field_journal_impact_factor.yml | 19 ++ ...ournal_info.field_journal_sample_issue.yml | 19 ++ ...ode.journal_info.field_journal_society.yml | 25 ++ ...rnal_info.field_journal_submit_article.yml | 21 ++ ...d.field.node.society.field_society_log.yml | 38 +++ ...eld.node.society.field_society_website.yml | 23 ++ .../sync/field.storage.node.field_journal.yml | 19 ++ ...field.storage.node.field_journal_about.yml | 19 ++ ...storage.node.field_journal_cover_image.yml | 30 +++ ...storage.node.field_journal_description.yml | 19 ++ ...orage.node.field_journal_editorial_brd.yml | 19 ++ ...eld.storage.node.field_journal_editors.yml | 20 ++ ...orage.node.field_journal_impact_factor.yml | 21 ++ ...torage.node.field_journal_sample_issue.yml | 21 ++ ...eld.storage.node.field_journal_society.yml | 19 ++ ...rage.node.field_journal_submit_article.yml | 19 ++ .../field.storage.node.field_society_log.yml | 30 +++ ...eld.storage.node.field_society_website.yml | 19 ++ .../highwire_personalization.settings.yml | 20 +- ...age.content_settings.node.journal_info.yml | 11 + ...language.content_settings.node.society.yml | 11 + config/sync/node.type.journal_info.yml | 17 ++ config/sync/node.type.society.yml | 18 ++ ...age_variant.node_view-panels_variant-1.yml | 2 + .../views.view.attach_to_journal_entity.yml | 250 ++++++++++++++++++ ...view.attach_to_journal_info_entity_ref.yml | 203 ++++++++++++++ config/sync/views.view.search.yml | 126 ++++++++- .../highwire/hwjma_core/hwjma_core.module | 3 + .../hwjma_theme/includes/block.theme.inc | 1 + .../hwjma_theme/includes/node.theme.inc | 3 +- .../node--journal--content-details.html.twig | 1 + .../node/node--journal--full.html.twig | 1 + 47 files changed, 1874 insertions(+), 15 deletions(-) create mode 100644 config/sync/core.entity_form_display.node.journal_info.default.yml create mode 100644 config/sync/core.entity_form_display.node.society.default.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.content_details.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.default.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.teaser.yml create mode 100644 config/sync/core.entity_view_display.node.society.default.yml create mode 100644 config/sync/core.entity_view_display.node.society.teaser.yml create mode 100644 config/sync/field.field.node.journal_info.corpus.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_about.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_cover_image.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_description.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_editors.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_impact_factor.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_sample_issue.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_society.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_submit_article.yml create mode 100644 config/sync/field.field.node.society.field_society_log.yml create mode 100644 config/sync/field.field.node.society.field_society_website.yml create mode 100644 config/sync/field.storage.node.field_journal.yml create mode 100644 config/sync/field.storage.node.field_journal_about.yml create mode 100644 config/sync/field.storage.node.field_journal_cover_image.yml create mode 100644 config/sync/field.storage.node.field_journal_description.yml create mode 100644 config/sync/field.storage.node.field_journal_editorial_brd.yml create mode 100644 config/sync/field.storage.node.field_journal_editors.yml create mode 100644 config/sync/field.storage.node.field_journal_impact_factor.yml create mode 100644 config/sync/field.storage.node.field_journal_sample_issue.yml create mode 100644 config/sync/field.storage.node.field_journal_society.yml create mode 100644 config/sync/field.storage.node.field_journal_submit_article.yml create mode 100644 config/sync/field.storage.node.field_society_log.yml create mode 100644 config/sync/field.storage.node.field_society_website.yml create mode 100644 config/sync/language.content_settings.node.journal_info.yml create mode 100644 config/sync/language.content_settings.node.society.yml create mode 100644 config/sync/node.type.journal_info.yml create mode 100644 config/sync/node.type.society.yml create mode 100644 config/sync/views.view.attach_to_journal_entity.yml create mode 100644 config/sync/views.view.attach_to_journal_info_entity_ref.yml diff --git a/config/sync/core.entity_form_display.node.journal_info.default.yml b/config/sync/core.entity_form_display.node.journal_info.default.yml new file mode 100644 index 000000000..a3a8b77eb --- /dev/null +++ b/config/sync/core.entity_form_display.node.journal_info.default.yml @@ -0,0 +1,209 @@ +uuid: 1d5e2ba0-da37-47b7-a89f-12ed7de8d83f +langcode: en +status: true +dependencies: + config: + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - image.style.thumbnail + - node.type.journal_info + module: + - field_group + - image + - path + - text +third_party_settings: + field_group: + group_editors: + children: + - field_journal_editors + - field_journal_editorial_brd + parent_name: '' + weight: 15 + format_type: details + format_settings: + id: '' + classes: '' + open: false + required_fields: true + label: Editors + region: content + group_additional_content: + children: + - field_journal_about + - field_journal_submit_article + parent_name: '' + weight: 16 + format_type: details + format_settings: + id: '' + classes: '' + open: false + required_fields: true + label: 'Additional Content' + region: content +id: node.journal_info.default +targetEntityType: node +bundle: journal_info +mode: default +content: + corpus: + weight: 9 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_journal: + weight: 8 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_journal_about: + weight: 11 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_journal_cover_image: + weight: 12 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_journal_description: + weight: 13 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_journal_editorial_brd: + weight: 17 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_journal_editors: + weight: 16 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: text_textfield + region: content + field_journal_impact_factor: + weight: 11 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_journal_sample_issue: + weight: 14 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_journal_society: + weight: 10 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_journal_submit_article: + weight: 12 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_form_display.node.society.default.yml b/config/sync/core.entity_form_display.node.society.default.yml new file mode 100644 index 000000000..2737b6412 --- /dev/null +++ b/config/sync/core.entity_form_display.node.society.default.yml @@ -0,0 +1,93 @@ +uuid: bad17ade-893e-4a24-9520-1cd71809fa00 +langcode: en +status: true +dependencies: + config: + - field.field.node.society.field_society_log + - field.field.node.society.field_society_website + - image.style.thumbnail + - node.type.society + module: + - image + - link + - path +id: node.society.default +targetEntityType: node +bundle: society +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_society_log: + weight: 124 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_society_website: + weight: 123 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml index 59e1b6ea9..071bc7173 100644 --- a/config/sync/core.entity_view_display.node.journal.full.yml +++ b/config/sync/core.entity_view_display.node.journal.full.yml @@ -154,7 +154,7 @@ third_party_settings: children: - latest_articles parent_name: group_journal_tabs - weight: 120 + weight: 1 format_type: highwire_tab format_settings: id: '' @@ -168,7 +168,7 @@ third_party_settings: children: - all_issues parent_name: group_journal_tabs - weight: 121 + weight: 2 format_type: highwire_tab format_settings: id: issues @@ -182,7 +182,7 @@ third_party_settings: children: - submit_article parent_name: group_journal_tabs - weight: 122 + weight: 3 format_type: highwire_tab format_settings: id: submit-an-article @@ -196,7 +196,7 @@ third_party_settings: children: - about parent_name: group_journal_tabs - weight: 123 + weight: 4 format_type: highwire_tab format_settings: id: about @@ -210,7 +210,7 @@ third_party_settings: children: - editorial_brd parent_name: group_journal_tabs - weight: 124 + weight: 5 format_type: highwire_tab format_settings: id: editorial-board @@ -224,7 +224,7 @@ third_party_settings: children: - most_read parent_name: group_journal_tabs - weight: 125 + weight: 6 format_type: highwire_tab format_settings: id: most-read @@ -250,7 +250,7 @@ content: settings: { } third_party_settings: { } editorial_brd: - weight: 0 + weight: 3 region: content settings: { } third_party_settings: { } @@ -260,7 +260,7 @@ content: settings: { } third_party_settings: { } most_read: - weight: 0 + weight: 4 region: content settings: { } third_party_settings: { } diff --git a/config/sync/core.entity_view_display.node.journal_info.content_details.yml b/config/sync/core.entity_view_display.node.journal_info.content_details.yml new file mode 100644 index 000000000..3127d34cf --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.content_details.yml @@ -0,0 +1,88 @@ +uuid: 879e580d-5631-432b-9cde-1df2dfa82d3e +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.content_details + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal_info.content_details +targetEntityType: node +bundle: journal_info +mode: content_details +content: + field_journal: + weight: 5 + label: above + settings: { } + third_party_settings: { } + type: entity_reference_entity_id + region: content + field_journal_description: + weight: 0 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editorial_brd: + weight: 4 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editors: + weight: 3 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_society: + weight: 2 + label: hidden + settings: + view_mode: teaser + link: false + third_party_settings: { } + type: entity_reference_entity_view + region: content + field_journal_submit_article: + weight: 1 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content +hidden: + addtoany: true + ccc_permissions_link: true + corpus: true + field_journal_about: true + field_journal_cover_image: true + field_journal_impact_factor: true + field_journal_sample_issue: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + links: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_info.default.yml b/config/sync/core.entity_view_display.node.journal_info.default.yml new file mode 100644 index 000000000..91734587b --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.default.yml @@ -0,0 +1,122 @@ +uuid: 03f90ca4-6938-4549-b89b-23190019e56e +langcode: en +status: true +dependencies: + config: + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - image + - text + - user +id: node.journal_info.default +targetEntityType: node +bundle: journal_info +mode: default +content: + corpus: + weight: 114 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal: + weight: 103 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_about: + weight: 105 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_cover_image: + weight: 108 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_journal_description: + weight: 109 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editorial_brd: + weight: 106 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editors: + weight: 110 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_impact_factor: + weight: 107 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_sample_issue: + weight: 111 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_society: + weight: 113 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_submit_article: + weight: 112 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + addtoany: true + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_info.teaser.yml b/config/sync/core.entity_view_display.node.journal_info.teaser.yml new file mode 100644 index 000000000..1857032ba --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.teaser.yml @@ -0,0 +1,48 @@ +uuid: dad2f14a-4fc6-4662-a1f0-47a2ff2afd4c +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - user +id: node.journal_info.teaser +targetEntityType: node +bundle: journal_info +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + addtoany: true + ccc_permissions_link: true + corpus: true + field_journal: true + field_journal_about: true + field_journal_cover_image: true + field_journal_description: true + field_journal_editorial_brd: true + field_journal_editors: true + field_journal_impact_factor: true + field_journal_sample_issue: true + field_journal_society: true + field_journal_submit_article: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.society.default.yml b/config/sync/core.entity_view_display.node.society.default.yml new file mode 100644 index 000000000..317035f78 --- /dev/null +++ b/config/sync/core.entity_view_display.node.society.default.yml @@ -0,0 +1,50 @@ +uuid: cbeb8bc8-8ed8-48a5-90e1-2e79c19d9db4 +langcode: en +status: true +dependencies: + config: + - field.field.node.society.field_society_log + - field.field.node.society.field_society_website + - node.type.society + module: + - image + - link + - user +id: node.society.default +targetEntityType: node +bundle: society +mode: default +content: + field_society_log: + weight: 104 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_society_website: + weight: 103 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + addtoany: true + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.society.teaser.yml b/config/sync/core.entity_view_display.node.society.teaser.yml new file mode 100644 index 000000000..92897f05d --- /dev/null +++ b/config/sync/core.entity_view_display.node.society.teaser.yml @@ -0,0 +1,30 @@ +uuid: d85a85d2-1ba5-4d39-98e3-410bb8405469 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.society.field_society_log + - field.field.node.society.field_society_website + - node.type.society + module: + - user +id: node.society.teaser +targetEntityType: node +bundle: society +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + addtoany: true + ccc_permissions_link: true + field_society_log: true + field_society_website: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/field.field.node.journal_info.corpus.yml b/config/sync/field.field.node.journal_info.corpus.yml new file mode 100644 index 000000000..d79b3f3e6 --- /dev/null +++ b/config/sync/field.field.node.journal_info.corpus.yml @@ -0,0 +1,19 @@ +uuid: e1b82af6-8ac5-447b-9c6c-f0a5529b7776 +langcode: en +status: true +dependencies: + config: + - field.storage.node.corpus + - node.type.journal_info +id: node.journal_info.corpus +field_name: corpus +entity_type: node +bundle: journal_info +label: Corpus +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.field.node.journal_info.field_journal.yml b/config/sync/field.field.node.journal_info.field_journal.yml new file mode 100644 index 000000000..d2b0cbdc3 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal.yml @@ -0,0 +1,25 @@ +uuid: 8a88465f-b457-469e-ac89-8eafd213d6b8 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal + - node.type.journal_info +id: node.journal_info.field_journal +field_name: field_journal +entity_type: node +bundle: journal_info +label: Journal +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: views + handler_settings: + view: + view_name: attach_to_journal_entity + display_name: entity_reference_1 + arguments: { } +field_type: entity_reference diff --git a/config/sync/field.field.node.journal_info.field_journal_about.yml b/config/sync/field.field.node.journal_info.field_journal_about.yml new file mode 100644 index 000000000..09f78a05d --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_about.yml @@ -0,0 +1,21 @@ +uuid: bede4fed-9b36-41ef-84e3-9176d3403f4d +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_about + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_about +field_name: field_journal_about +entity_type: node +bundle: journal_info +label: 'About this journal' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.journal_info.field_journal_cover_image.yml b/config/sync/field.field.node.journal_info.field_journal_cover_image.yml new file mode 100644 index 000000000..1ec40da0a --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_cover_image.yml @@ -0,0 +1,38 @@ +uuid: 03dac037-a5cc-479d-bfd0-6a8da066da45 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_cover_image + - node.type.journal_info + module: + - image +id: node.journal_info.field_journal_cover_image +field_name: field_journal_cover_image +entity_type: node +bundle: journal_info +label: 'Journal Cover Image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/config/sync/field.field.node.journal_info.field_journal_description.yml b/config/sync/field.field.node.journal_info.field_journal_description.yml new file mode 100644 index 000000000..b6b91df86 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_description.yml @@ -0,0 +1,21 @@ +uuid: 83582e08-c86a-440a-bf82-fd2eb8f3c5a7 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_description + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_description +field_name: field_journal_description +entity_type: node +bundle: journal_info +label: 'Journal description' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml b/config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml new file mode 100644 index 000000000..5d1145fff --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml @@ -0,0 +1,21 @@ +uuid: abbe2541-d2af-41ca-9ded-5ba85178eeaf +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_editorial_brd + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_editorial_brd +field_name: field_journal_editorial_brd +entity_type: node +bundle: journal_info +label: 'Editorial Board' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.journal_info.field_journal_editors.yml b/config/sync/field.field.node.journal_info.field_journal_editors.yml new file mode 100644 index 000000000..f42e7565d --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_editors.yml @@ -0,0 +1,21 @@ +uuid: 0a5e187c-7ef3-47a6-a15f-e646a785365e +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_editors + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_editors +field_name: field_journal_editors +entity_type: node +bundle: journal_info +label: 'Journal Editors' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text diff --git a/config/sync/field.field.node.journal_info.field_journal_impact_factor.yml b/config/sync/field.field.node.journal_info.field_journal_impact_factor.yml new file mode 100644 index 000000000..849b05e50 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_impact_factor.yml @@ -0,0 +1,19 @@ +uuid: 6e5f58ff-0722-4e01-aa87-3a58bf8d6f45 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_impact_factor + - node.type.journal_info +id: node.journal_info.field_journal_impact_factor +field_name: field_journal_impact_factor +entity_type: node +bundle: journal_info +label: 'Impact Factor Text' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.field.node.journal_info.field_journal_sample_issue.yml b/config/sync/field.field.node.journal_info.field_journal_sample_issue.yml new file mode 100644 index 000000000..64cd9fa81 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_sample_issue.yml @@ -0,0 +1,19 @@ +uuid: 55f6dfd8-9135-4c91-9327-a1b26180df1d +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_sample_issue + - node.type.journal_info +id: node.journal_info.field_journal_sample_issue +field_name: field_journal_sample_issue +entity_type: node +bundle: journal_info +label: 'Sample Issue DOI' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.field.node.journal_info.field_journal_society.yml b/config/sync/field.field.node.journal_info.field_journal_society.yml new file mode 100644 index 000000000..5e65ea520 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_society.yml @@ -0,0 +1,25 @@ +uuid: 0e4b823d-75cb-4f9f-8fc4-3cfeaaa6a14c +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_society + - node.type.journal_info +id: node.journal_info.field_journal_society +field_name: field_journal_society +entity_type: node +bundle: journal_info +label: Society +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: views + handler_settings: + view: + view_name: attach_to_journal_info_entity_ref + display_name: entity_reference_1 + arguments: { } +field_type: entity_reference diff --git a/config/sync/field.field.node.journal_info.field_journal_submit_article.yml b/config/sync/field.field.node.journal_info.field_journal_submit_article.yml new file mode 100644 index 000000000..87fbf991d --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_submit_article.yml @@ -0,0 +1,21 @@ +uuid: 9bcd5c62-5316-4f24-8f0e-1759e01764bb +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_submit_article + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_submit_article +field_name: field_journal_submit_article +entity_type: node +bundle: journal_info +label: 'Submit an article' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.society.field_society_log.yml b/config/sync/field.field.node.society.field_society_log.yml new file mode 100644 index 000000000..4d3f4114f --- /dev/null +++ b/config/sync/field.field.node.society.field_society_log.yml @@ -0,0 +1,38 @@ +uuid: 5ddcd4f1-e979-437a-bddb-07f0aba52c1a +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_society_log + - node.type.society + module: + - image +id: node.society.field_society_log +field_name: field_society_log +entity_type: node +bundle: society +label: 'Society logo' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/config/sync/field.field.node.society.field_society_website.yml b/config/sync/field.field.node.society.field_society_website.yml new file mode 100644 index 000000000..a457dcb71 --- /dev/null +++ b/config/sync/field.field.node.society.field_society_website.yml @@ -0,0 +1,23 @@ +uuid: 899e0483-c418-4939-97bd-eb2d8fc513e8 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_society_website + - node.type.society + module: + - link +id: node.society.field_society_website +field_name: field_society_website +entity_type: node +bundle: society +label: Website +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/config/sync/field.storage.node.field_journal.yml b/config/sync/field.storage.node.field_journal.yml new file mode 100644 index 000000000..cb50c4c9e --- /dev/null +++ b/config/sync/field.storage.node.field_journal.yml @@ -0,0 +1,19 @@ +uuid: 485e2a5c-9905-4d89-b533-aff0f014977b +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal +field_name: field_journal +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_about.yml b/config/sync/field.storage.node.field_journal_about.yml new file mode 100644 index 000000000..baf3f8650 --- /dev/null +++ b/config/sync/field.storage.node.field_journal_about.yml @@ -0,0 +1,19 @@ +uuid: 4e25d00e-e874-42f6-89a8-67913dada1b4 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_about +field_name: field_journal_about +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_cover_image.yml b/config/sync/field.storage.node.field_journal_cover_image.yml new file mode 100644 index 000000000..111878ebf --- /dev/null +++ b/config/sync/field.storage.node.field_journal_cover_image.yml @@ -0,0 +1,30 @@ +uuid: f4a90766-c942-41ea-81cd-0212a2bce24e +langcode: en +status: true +dependencies: + module: + - file + - image + - node +id: node.field_journal_cover_image +field_name: field_journal_cover_image +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_description.yml b/config/sync/field.storage.node.field_journal_description.yml new file mode 100644 index 000000000..5ea02820f --- /dev/null +++ b/config/sync/field.storage.node.field_journal_description.yml @@ -0,0 +1,19 @@ +uuid: d68e3317-f0b6-4d0b-b303-f4e169fc206c +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_description +field_name: field_journal_description +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_editorial_brd.yml b/config/sync/field.storage.node.field_journal_editorial_brd.yml new file mode 100644 index 000000000..09857447e --- /dev/null +++ b/config/sync/field.storage.node.field_journal_editorial_brd.yml @@ -0,0 +1,19 @@ +uuid: 658e43c3-ec45-42b0-879c-d730dfbdabd6 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_editorial_brd +field_name: field_journal_editorial_brd +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_editors.yml b/config/sync/field.storage.node.field_journal_editors.yml new file mode 100644 index 000000000..e726e6186 --- /dev/null +++ b/config/sync/field.storage.node.field_journal_editors.yml @@ -0,0 +1,20 @@ +uuid: abf248d7-b9a3-47e7-8ed8-182839435fe2 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_editors +field_name: field_journal_editors +entity_type: node +type: text +settings: + max_length: 255 +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_impact_factor.yml b/config/sync/field.storage.node.field_journal_impact_factor.yml new file mode 100644 index 000000000..2787df02e --- /dev/null +++ b/config/sync/field.storage.node.field_journal_impact_factor.yml @@ -0,0 +1,21 @@ +uuid: f40b90dc-3d2a-4c90-a7d1-8ca5225dfe7b +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal_impact_factor +field_name: field_journal_impact_factor +entity_type: node +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_sample_issue.yml b/config/sync/field.storage.node.field_journal_sample_issue.yml new file mode 100644 index 000000000..8a947c59a --- /dev/null +++ b/config/sync/field.storage.node.field_journal_sample_issue.yml @@ -0,0 +1,21 @@ +uuid: a69a816e-692b-4ae0-8cfd-557239a4b200 +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal_sample_issue +field_name: field_journal_sample_issue +entity_type: node +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_society.yml b/config/sync/field.storage.node.field_journal_society.yml new file mode 100644 index 000000000..33aa71989 --- /dev/null +++ b/config/sync/field.storage.node.field_journal_society.yml @@ -0,0 +1,19 @@ +uuid: d05280fb-2f69-4c56-be16-75a9b9c8e85d +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal_society +field_name: field_journal_society +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_submit_article.yml b/config/sync/field.storage.node.field_journal_submit_article.yml new file mode 100644 index 000000000..c6f9ac6cf --- /dev/null +++ b/config/sync/field.storage.node.field_journal_submit_article.yml @@ -0,0 +1,19 @@ +uuid: c45f6f1e-25d3-4679-b7f5-f16b36084e03 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_submit_article +field_name: field_journal_submit_article +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_society_log.yml b/config/sync/field.storage.node.field_society_log.yml new file mode 100644 index 000000000..9584f8f48 --- /dev/null +++ b/config/sync/field.storage.node.field_society_log.yml @@ -0,0 +1,30 @@ +uuid: a1378879-b834-4990-aa54-20d3d8786577 +langcode: en +status: true +dependencies: + module: + - file + - image + - node +id: node.field_society_log +field_name: field_society_log +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_society_website.yml b/config/sync/field.storage.node.field_society_website.yml new file mode 100644 index 000000000..ec2adb828 --- /dev/null +++ b/config/sync/field.storage.node.field_society_website.yml @@ -0,0 +1,19 @@ +uuid: 4b4d31cb-df94-41b8-a872-e9142a9658bf +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_society_website +field_name: field_society_website +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/highwire_personalization.settings.yml b/config/sync/highwire_personalization.settings.yml index 2199391d5..41461de9c 100755 --- a/config/sync/highwire_personalization.settings.yml +++ b/config/sync/highwire_personalization.settings.yml @@ -1,10 +1,22 @@ -context: '' +context: hwjma saved_search_api_base_path: '' alert_type_config: null -markers_content_type_filters: { } -markers_admin_citations_view_mode: { } +markers_content_type_filters: + journal: 1 +markers_admin_citations_view_mode: + journal: search_result + journal_article: search_result + journal_issue: search_result profile_and_privacy_form_class: '' profile_and_privacy_pop_welcome_message: 'You are registered for a personal account.' -tags_admin_citations_view_mode: { } +tags_admin_citations_view_mode: + journal_article: content_details _core: default_config_hash: Pxth7sNsS5mshjiXLFyUNe2Ky1kkQd6BqF23xLmp9rI +reports_enabled: + alerts: 1 + captures: 1 + preferences: 1 +remove_alert_tab_title: 'Saved searches' +default_empty_alert_message: 'No alerts found.' +empty_alert_message: 'Click here to create alerts for when new books are added to the site.' diff --git a/config/sync/language.content_settings.node.journal_info.yml b/config/sync/language.content_settings.node.journal_info.yml new file mode 100644 index 000000000..8256f901c --- /dev/null +++ b/config/sync/language.content_settings.node.journal_info.yml @@ -0,0 +1,11 @@ +uuid: 78cd35b8-c85d-443f-bb4b-ec8dfee85804 +langcode: en +status: true +dependencies: + config: + - node.type.journal_info +id: node.journal_info +target_entity_type_id: node +target_bundle: journal_info +default_langcode: site_default +language_alterable: false diff --git a/config/sync/language.content_settings.node.society.yml b/config/sync/language.content_settings.node.society.yml new file mode 100644 index 000000000..7db590692 --- /dev/null +++ b/config/sync/language.content_settings.node.society.yml @@ -0,0 +1,11 @@ +uuid: ecdd3aac-7a24-4853-ae4e-2a6f98b61504 +langcode: en +status: true +dependencies: + config: + - node.type.society +id: node.society +target_entity_type_id: node +target_bundle: society +default_langcode: site_default +language_alterable: false diff --git a/config/sync/node.type.journal_info.yml b/config/sync/node.type.journal_info.yml new file mode 100644 index 000000000..2f33b09e1 --- /dev/null +++ b/config/sync/node.type.journal_info.yml @@ -0,0 +1,17 @@ +uuid: 372e692b-be7f-4130-a168-dcce71a9510b +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: { } + parent: '' +name: 'Journal info' +type: journal_info +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/config/sync/node.type.society.yml b/config/sync/node.type.society.yml new file mode 100644 index 000000000..63fedf824 --- /dev/null +++ b/config/sync/node.type.society.yml @@ -0,0 +1,18 @@ +uuid: 467b9d93-147f-4b51-8bc2-51b219b2a403 +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Society +type: society +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index a4385a8c9..8409514e1 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -7,8 +7,10 @@ dependencies: - views.view.content_recent module: - ctools + - highwire_display - node - panels + - views id: node_view-panels_variant-1 label: Article variant: panels_variant diff --git a/config/sync/views.view.attach_to_journal_entity.yml b/config/sync/views.view.attach_to_journal_entity.yml new file mode 100644 index 000000000..31ff007c7 --- /dev/null +++ b/config/sync/views.view.attach_to_journal_entity.yml @@ -0,0 +1,250 @@ +uuid: 48ea8629-dbc6-42f2-8ea4-ad6f7b6ae953 +langcode: en +status: true +dependencies: + config: + - node.type.journal + module: + - node + - search + - user +id: attach_to_journal_entity +label: 'Attach to Journal Entity' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + uses_fields: false + row: + type: search_view + options: + score: true + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: node + entity_field: title + plugin_id: field + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + group: 1 + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + operator: in + value: + journal: journal + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + entity_type: node + entity_field: title + plugin_id: standard + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + entity_reference_1: + display_plugin: entity_reference + id: entity_reference_1 + display_title: 'Entity Reference' + position: 1 + display_options: + display_extenders: { } + style: + type: entity_reference + options: + search_fields: + title: title + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/config/sync/views.view.attach_to_journal_info_entity_ref.yml b/config/sync/views.view.attach_to_journal_info_entity_ref.yml new file mode 100644 index 000000000..d7c6c500a --- /dev/null +++ b/config/sync/views.view.attach_to_journal_info_entity_ref.yml @@ -0,0 +1,203 @@ +uuid: a1298839-bb93-4411-bab0-bb360656e7c3 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.society + module: + - node + - user +id: attach_to_journal_info_entity_ref +label: 'Attach to Journal-Info Entity Ref' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + uses_fields: false + row: + type: 'entity:node' + options: + relationship: none + view_mode: teaser + fields: + title: + id: title + table: node_field_data + field: title + entity_type: node + entity_field: title + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + group: 1 + type: + id: type + table: node_field_data + field: type + value: + society: society + entity_type: node + entity_field: type + plugin_id: bundle + expose: + operator_limit_selection: false + operator_list: { } + sorts: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + entity_type: node + entity_field: title + plugin_id: standard + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + entity_reference_1: + display_plugin: entity_reference + id: entity_reference_1 + display_title: 'Entity Reference' + position: 1 + display_options: + display_extenders: { } + style: + type: entity_reference + options: + search_fields: + title: title + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/config/sync/views.view.search.yml b/config/sync/views.view.search.yml index 454744ffe..efa202854 100644 --- a/config/sync/views.view.search.yml +++ b/config/sync/views.view.search.yml @@ -5,6 +5,7 @@ dependencies: config: - search_api.index.hwjma module: + - highwire_personalization - search_api id: search label: Search @@ -64,6 +65,10 @@ display: quantity: 9 style: type: default + options: + row_class: results-item + default_row_class: true + uses_fields: false row: type: search_api options: @@ -168,9 +173,122 @@ display: min_length: null fields: { } plugin_id: search_api_fulltext - sorts: { } + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal: journal + journal_article: journal_article + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + status: + id: status + table: search_api_index_hwjma + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + sorts: + search_api_relevance: + id: search_api_relevance + table: search_api_index_hwjma + field: search_api_relevance + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + plugin_id: search_api + date_ppub_facet: + id: date_ppub_facet + table: search_api_index_hwjma + field: date_ppub_facet + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: true + expose: + label: Date + plugin_id: search_api title: Search - header: { } + header: + highwire_personalization_save_search: + id: highwire_personalization_save_search + table: views + field: highwire_personalization_save_search + relationship: none + group_type: group + admin_label: '' + empty: true + plugin_id: highwire_personalization_save_search footer: { } empty: { } relationships: { } @@ -182,6 +300,8 @@ display: - 'languages:language_interface' - url - url.query_args + - 'url.query_args:sort_by' + - 'url.query_args:sort_order' tags: { } page_1: display_plugin: page @@ -205,4 +325,6 @@ display: - 'languages:language_interface' - url - url.query_args + - 'url.query_args:sort_by' + - 'url.query_args:sort_order' tags: { } diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index d63900ce8..666a170b8 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -253,6 +253,7 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView $journal_info = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'journal_info', 'corpus' => $corpus]); $journal_info = array_pop($journal_info); } + if (!empty($journal_info)) { // Add cache tag for journal info node. $build['#cache']['tags'][] = 'node:' . $journal_info->id(); @@ -262,6 +263,7 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView 'metadata' => ['changed' => time()], ]; } + if (!empty($journal_info)) { $view_builder = \Drupal::entityTypeManager()->getViewBuilder('node'); $info_ids = ['about', 'cover_image', 'description', 'submit_article', 'society', 'editors', 'editorial_brd']; @@ -379,5 +381,6 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView '#attributes' => ['class' => ['btn', 'btn-secondary']], ]; } + // dd($build); } diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc index 7605a9065..030524c84 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/block.theme.inc @@ -315,3 +315,4 @@ function hwjma_preprocess_block__mainpagecontent(&$variables) { $temp_markup = str_replace('No favourites found.', '

No favourites found.

', $temp_markup); $variables['content']['#markup'] = t($temp_markup); } + diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index f203c48f3..732da0812 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -169,6 +169,7 @@ function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { $variables['label'] = html_entity_decode($node->get('title_plain')->getString()); } + /* * Implements hook_preprocess_node(). */ @@ -198,7 +199,7 @@ function hwjma_preprocess_node__journal__content_details(&$variables) { $variables['sample_issue_link'] = $sample_issue_link; $variables['current_issue_link'] = $current_issue_link; //load journal_info content type - $info_nodes = '';//\Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'journal_info', 'field_journal' => $node->id() ]); + $info_nodes = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'journal_info', 'field_journal' => $node->id() ]); $variables['title'] = $node->get('title')->getString(); $variables['eissn'] = $node->get('journal_eissn')->getString(); $variables['pissn'] = $node->get('journal_pissn')->getString(); diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig index 20d1d327a..3a35261ea 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig @@ -65,6 +65,7 @@ * in different view modes. */ #} +
diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig index b97ff42d9..c5718ebc2 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--full.html.twig @@ -65,6 +65,7 @@ * in different view modes. */ #} +
{{ content }}
\ No newline at end of file From 60434c539a42f09472d8eff59b11fda0bf3689f3 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Wed, 5 Jul 2023 04:54:56 -0400 Subject: [PATCH 039/174] journal info config --- ...form_display.node.journal_info.default.yml | 209 +++++++++++++++ ...tity_form_display.node.society.default.yml | 93 +++++++ ....entity_view_display.node.journal.full.yml | 16 +- ...play.node.journal_info.content_details.yml | 88 ++++++ ...view_display.node.journal_info.default.yml | 122 +++++++++ ..._view_display.node.journal_info.teaser.yml | 48 ++++ ...tity_view_display.node.society.default.yml | 50 ++++ ...ntity_view_display.node.society.teaser.yml | 30 +++ .../field.field.node.journal_info.corpus.yml | 19 ++ ....field.node.journal_info.field_journal.yml | 25 ++ ....node.journal_info.field_journal_about.yml | 21 ++ ...journal_info.field_journal_cover_image.yml | 38 +++ ...journal_info.field_journal_description.yml | 21 ++ ...urnal_info.field_journal_editorial_brd.yml | 21 ++ ...ode.journal_info.field_journal_editors.yml | 21 ++ ...urnal_info.field_journal_impact_factor.yml | 19 ++ ...ournal_info.field_journal_sample_issue.yml | 19 ++ ...ode.journal_info.field_journal_society.yml | 25 ++ ...rnal_info.field_journal_submit_article.yml | 21 ++ ...d.field.node.society.field_society_log.yml | 38 +++ ...eld.node.society.field_society_website.yml | 23 ++ .../sync/field.storage.node.field_journal.yml | 19 ++ ...field.storage.node.field_journal_about.yml | 19 ++ ...storage.node.field_journal_cover_image.yml | 30 +++ ...storage.node.field_journal_description.yml | 19 ++ ...orage.node.field_journal_editorial_brd.yml | 19 ++ ...eld.storage.node.field_journal_editors.yml | 20 ++ ...orage.node.field_journal_impact_factor.yml | 21 ++ ...torage.node.field_journal_sample_issue.yml | 21 ++ ...eld.storage.node.field_journal_society.yml | 19 ++ ...rage.node.field_journal_submit_article.yml | 19 ++ .../field.storage.node.field_society_log.yml | 30 +++ ...eld.storage.node.field_society_website.yml | 19 ++ .../highwire_personalization.settings.yml | 20 +- ...age.content_settings.node.journal_info.yml | 11 + ...language.content_settings.node.society.yml | 11 + config/sync/node.type.journal_info.yml | 17 ++ config/sync/node.type.society.yml | 18 ++ ...age_variant.node_view-panels_variant-1.yml | 2 + .../views.view.attach_to_journal_entity.yml | 250 ++++++++++++++++++ ...view.attach_to_journal_info_entity_ref.yml | 203 ++++++++++++++ config/sync/views.view.search.yml | 126 ++++++++- 42 files changed, 1866 insertions(+), 14 deletions(-) create mode 100644 config/sync/core.entity_form_display.node.journal_info.default.yml create mode 100644 config/sync/core.entity_form_display.node.society.default.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.content_details.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.default.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.teaser.yml create mode 100644 config/sync/core.entity_view_display.node.society.default.yml create mode 100644 config/sync/core.entity_view_display.node.society.teaser.yml create mode 100644 config/sync/field.field.node.journal_info.corpus.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_about.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_cover_image.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_description.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_editors.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_impact_factor.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_sample_issue.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_society.yml create mode 100644 config/sync/field.field.node.journal_info.field_journal_submit_article.yml create mode 100644 config/sync/field.field.node.society.field_society_log.yml create mode 100644 config/sync/field.field.node.society.field_society_website.yml create mode 100644 config/sync/field.storage.node.field_journal.yml create mode 100644 config/sync/field.storage.node.field_journal_about.yml create mode 100644 config/sync/field.storage.node.field_journal_cover_image.yml create mode 100644 config/sync/field.storage.node.field_journal_description.yml create mode 100644 config/sync/field.storage.node.field_journal_editorial_brd.yml create mode 100644 config/sync/field.storage.node.field_journal_editors.yml create mode 100644 config/sync/field.storage.node.field_journal_impact_factor.yml create mode 100644 config/sync/field.storage.node.field_journal_sample_issue.yml create mode 100644 config/sync/field.storage.node.field_journal_society.yml create mode 100644 config/sync/field.storage.node.field_journal_submit_article.yml create mode 100644 config/sync/field.storage.node.field_society_log.yml create mode 100644 config/sync/field.storage.node.field_society_website.yml create mode 100644 config/sync/language.content_settings.node.journal_info.yml create mode 100644 config/sync/language.content_settings.node.society.yml create mode 100644 config/sync/node.type.journal_info.yml create mode 100644 config/sync/node.type.society.yml create mode 100644 config/sync/views.view.attach_to_journal_entity.yml create mode 100644 config/sync/views.view.attach_to_journal_info_entity_ref.yml diff --git a/config/sync/core.entity_form_display.node.journal_info.default.yml b/config/sync/core.entity_form_display.node.journal_info.default.yml new file mode 100644 index 000000000..a3a8b77eb --- /dev/null +++ b/config/sync/core.entity_form_display.node.journal_info.default.yml @@ -0,0 +1,209 @@ +uuid: 1d5e2ba0-da37-47b7-a89f-12ed7de8d83f +langcode: en +status: true +dependencies: + config: + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - image.style.thumbnail + - node.type.journal_info + module: + - field_group + - image + - path + - text +third_party_settings: + field_group: + group_editors: + children: + - field_journal_editors + - field_journal_editorial_brd + parent_name: '' + weight: 15 + format_type: details + format_settings: + id: '' + classes: '' + open: false + required_fields: true + label: Editors + region: content + group_additional_content: + children: + - field_journal_about + - field_journal_submit_article + parent_name: '' + weight: 16 + format_type: details + format_settings: + id: '' + classes: '' + open: false + required_fields: true + label: 'Additional Content' + region: content +id: node.journal_info.default +targetEntityType: node +bundle: journal_info +mode: default +content: + corpus: + weight: 9 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + created: + type: datetime_timestamp + weight: 3 + region: content + settings: { } + third_party_settings: { } + field_journal: + weight: 8 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_journal_about: + weight: 11 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_journal_cover_image: + weight: 12 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_journal_description: + weight: 13 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_journal_editorial_brd: + weight: 17 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + field_journal_editors: + weight: 16 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: text_textfield + region: content + field_journal_impact_factor: + weight: 11 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_journal_sample_issue: + weight: 14 + settings: + size: 60 + placeholder: '' + third_party_settings: { } + type: string_textfield + region: content + field_journal_society: + weight: 10 + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + type: entity_reference_autocomplete + region: content + field_journal_submit_article: + weight: 12 + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + type: text_textarea + region: content + langcode: + type: language_select + weight: 1 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 6 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 4 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 7 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 5 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 2 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_form_display.node.society.default.yml b/config/sync/core.entity_form_display.node.society.default.yml new file mode 100644 index 000000000..2737b6412 --- /dev/null +++ b/config/sync/core.entity_form_display.node.society.default.yml @@ -0,0 +1,93 @@ +uuid: bad17ade-893e-4a24-9520-1cd71809fa00 +langcode: en +status: true +dependencies: + config: + - field.field.node.society.field_society_log + - field.field.node.society.field_society_website + - image.style.thumbnail + - node.type.society + module: + - image + - link + - path +id: node.society.default +targetEntityType: node +bundle: society +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + field_society_log: + weight: 124 + settings: + progress_indicator: throbber + preview_image_style: thumbnail + third_party_settings: { } + type: image_image + region: content + field_society_website: + weight: 123 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: { } diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml index 59e1b6ea9..071bc7173 100644 --- a/config/sync/core.entity_view_display.node.journal.full.yml +++ b/config/sync/core.entity_view_display.node.journal.full.yml @@ -154,7 +154,7 @@ third_party_settings: children: - latest_articles parent_name: group_journal_tabs - weight: 120 + weight: 1 format_type: highwire_tab format_settings: id: '' @@ -168,7 +168,7 @@ third_party_settings: children: - all_issues parent_name: group_journal_tabs - weight: 121 + weight: 2 format_type: highwire_tab format_settings: id: issues @@ -182,7 +182,7 @@ third_party_settings: children: - submit_article parent_name: group_journal_tabs - weight: 122 + weight: 3 format_type: highwire_tab format_settings: id: submit-an-article @@ -196,7 +196,7 @@ third_party_settings: children: - about parent_name: group_journal_tabs - weight: 123 + weight: 4 format_type: highwire_tab format_settings: id: about @@ -210,7 +210,7 @@ third_party_settings: children: - editorial_brd parent_name: group_journal_tabs - weight: 124 + weight: 5 format_type: highwire_tab format_settings: id: editorial-board @@ -224,7 +224,7 @@ third_party_settings: children: - most_read parent_name: group_journal_tabs - weight: 125 + weight: 6 format_type: highwire_tab format_settings: id: most-read @@ -250,7 +250,7 @@ content: settings: { } third_party_settings: { } editorial_brd: - weight: 0 + weight: 3 region: content settings: { } third_party_settings: { } @@ -260,7 +260,7 @@ content: settings: { } third_party_settings: { } most_read: - weight: 0 + weight: 4 region: content settings: { } third_party_settings: { } diff --git a/config/sync/core.entity_view_display.node.journal_info.content_details.yml b/config/sync/core.entity_view_display.node.journal_info.content_details.yml new file mode 100644 index 000000000..3127d34cf --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.content_details.yml @@ -0,0 +1,88 @@ +uuid: 879e580d-5631-432b-9cde-1df2dfa82d3e +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.content_details + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal_info.content_details +targetEntityType: node +bundle: journal_info +mode: content_details +content: + field_journal: + weight: 5 + label: above + settings: { } + third_party_settings: { } + type: entity_reference_entity_id + region: content + field_journal_description: + weight: 0 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editorial_brd: + weight: 4 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editors: + weight: 3 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_society: + weight: 2 + label: hidden + settings: + view_mode: teaser + link: false + third_party_settings: { } + type: entity_reference_entity_view + region: content + field_journal_submit_article: + weight: 1 + label: hidden + settings: { } + third_party_settings: { } + type: text_default + region: content +hidden: + addtoany: true + ccc_permissions_link: true + corpus: true + field_journal_about: true + field_journal_cover_image: true + field_journal_impact_factor: true + field_journal_sample_issue: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + links: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_info.default.yml b/config/sync/core.entity_view_display.node.journal_info.default.yml new file mode 100644 index 000000000..91734587b --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.default.yml @@ -0,0 +1,122 @@ +uuid: 03f90ca4-6938-4549-b89b-23190019e56e +langcode: en +status: true +dependencies: + config: + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - image + - text + - user +id: node.journal_info.default +targetEntityType: node +bundle: journal_info +mode: default +content: + corpus: + weight: 114 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal: + weight: 103 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_about: + weight: 105 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_cover_image: + weight: 108 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_journal_description: + weight: 109 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editorial_brd: + weight: 106 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editors: + weight: 110 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_impact_factor: + weight: 107 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_sample_issue: + weight: 111 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_society: + weight: 113 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_submit_article: + weight: 112 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + addtoany: true + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_info.teaser.yml b/config/sync/core.entity_view_display.node.journal_info.teaser.yml new file mode 100644 index 000000000..1857032ba --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.teaser.yml @@ -0,0 +1,48 @@ +uuid: dad2f14a-4fc6-4662-a1f0-47a2ff2afd4c +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - user +id: node.journal_info.teaser +targetEntityType: node +bundle: journal_info +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + addtoany: true + ccc_permissions_link: true + corpus: true + field_journal: true + field_journal_about: true + field_journal_cover_image: true + field_journal_description: true + field_journal_editorial_brd: true + field_journal_editors: true + field_journal_impact_factor: true + field_journal_sample_issue: true + field_journal_society: true + field_journal_submit_article: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.society.default.yml b/config/sync/core.entity_view_display.node.society.default.yml new file mode 100644 index 000000000..317035f78 --- /dev/null +++ b/config/sync/core.entity_view_display.node.society.default.yml @@ -0,0 +1,50 @@ +uuid: cbeb8bc8-8ed8-48a5-90e1-2e79c19d9db4 +langcode: en +status: true +dependencies: + config: + - field.field.node.society.field_society_log + - field.field.node.society.field_society_website + - node.type.society + module: + - image + - link + - user +id: node.society.default +targetEntityType: node +bundle: society +mode: default +content: + field_society_log: + weight: 104 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_society_website: + weight: 103 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + addtoany: true + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.society.teaser.yml b/config/sync/core.entity_view_display.node.society.teaser.yml new file mode 100644 index 000000000..92897f05d --- /dev/null +++ b/config/sync/core.entity_view_display.node.society.teaser.yml @@ -0,0 +1,30 @@ +uuid: d85a85d2-1ba5-4d39-98e3-410bb8405469 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - field.field.node.society.field_society_log + - field.field.node.society.field_society_website + - node.type.society + module: + - user +id: node.society.teaser +targetEntityType: node +bundle: society +mode: teaser +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + addtoany: true + ccc_permissions_link: true + field_society_log: true + field_society_website: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/field.field.node.journal_info.corpus.yml b/config/sync/field.field.node.journal_info.corpus.yml new file mode 100644 index 000000000..d79b3f3e6 --- /dev/null +++ b/config/sync/field.field.node.journal_info.corpus.yml @@ -0,0 +1,19 @@ +uuid: e1b82af6-8ac5-447b-9c6c-f0a5529b7776 +langcode: en +status: true +dependencies: + config: + - field.storage.node.corpus + - node.type.journal_info +id: node.journal_info.corpus +field_name: corpus +entity_type: node +bundle: journal_info +label: Corpus +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.field.node.journal_info.field_journal.yml b/config/sync/field.field.node.journal_info.field_journal.yml new file mode 100644 index 000000000..d2b0cbdc3 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal.yml @@ -0,0 +1,25 @@ +uuid: 8a88465f-b457-469e-ac89-8eafd213d6b8 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal + - node.type.journal_info +id: node.journal_info.field_journal +field_name: field_journal +entity_type: node +bundle: journal_info +label: Journal +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: views + handler_settings: + view: + view_name: attach_to_journal_entity + display_name: entity_reference_1 + arguments: { } +field_type: entity_reference diff --git a/config/sync/field.field.node.journal_info.field_journal_about.yml b/config/sync/field.field.node.journal_info.field_journal_about.yml new file mode 100644 index 000000000..09f78a05d --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_about.yml @@ -0,0 +1,21 @@ +uuid: bede4fed-9b36-41ef-84e3-9176d3403f4d +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_about + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_about +field_name: field_journal_about +entity_type: node +bundle: journal_info +label: 'About this journal' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.journal_info.field_journal_cover_image.yml b/config/sync/field.field.node.journal_info.field_journal_cover_image.yml new file mode 100644 index 000000000..1ec40da0a --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_cover_image.yml @@ -0,0 +1,38 @@ +uuid: 03dac037-a5cc-479d-bfd0-6a8da066da45 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_cover_image + - node.type.journal_info + module: + - image +id: node.journal_info.field_journal_cover_image +field_name: field_journal_cover_image +entity_type: node +bundle: journal_info +label: 'Journal Cover Image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/config/sync/field.field.node.journal_info.field_journal_description.yml b/config/sync/field.field.node.journal_info.field_journal_description.yml new file mode 100644 index 000000000..b6b91df86 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_description.yml @@ -0,0 +1,21 @@ +uuid: 83582e08-c86a-440a-bf82-fd2eb8f3c5a7 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_description + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_description +field_name: field_journal_description +entity_type: node +bundle: journal_info +label: 'Journal description' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml b/config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml new file mode 100644 index 000000000..5d1145fff --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_editorial_brd.yml @@ -0,0 +1,21 @@ +uuid: abbe2541-d2af-41ca-9ded-5ba85178eeaf +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_editorial_brd + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_editorial_brd +field_name: field_journal_editorial_brd +entity_type: node +bundle: journal_info +label: 'Editorial Board' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.journal_info.field_journal_editors.yml b/config/sync/field.field.node.journal_info.field_journal_editors.yml new file mode 100644 index 000000000..f42e7565d --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_editors.yml @@ -0,0 +1,21 @@ +uuid: 0a5e187c-7ef3-47a6-a15f-e646a785365e +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_editors + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_editors +field_name: field_journal_editors +entity_type: node +bundle: journal_info +label: 'Journal Editors' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text diff --git a/config/sync/field.field.node.journal_info.field_journal_impact_factor.yml b/config/sync/field.field.node.journal_info.field_journal_impact_factor.yml new file mode 100644 index 000000000..849b05e50 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_impact_factor.yml @@ -0,0 +1,19 @@ +uuid: 6e5f58ff-0722-4e01-aa87-3a58bf8d6f45 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_impact_factor + - node.type.journal_info +id: node.journal_info.field_journal_impact_factor +field_name: field_journal_impact_factor +entity_type: node +bundle: journal_info +label: 'Impact Factor Text' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.field.node.journal_info.field_journal_sample_issue.yml b/config/sync/field.field.node.journal_info.field_journal_sample_issue.yml new file mode 100644 index 000000000..64cd9fa81 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_sample_issue.yml @@ -0,0 +1,19 @@ +uuid: 55f6dfd8-9135-4c91-9327-a1b26180df1d +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_sample_issue + - node.type.journal_info +id: node.journal_info.field_journal_sample_issue +field_name: field_journal_sample_issue +entity_type: node +bundle: journal_info +label: 'Sample Issue DOI' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.field.node.journal_info.field_journal_society.yml b/config/sync/field.field.node.journal_info.field_journal_society.yml new file mode 100644 index 000000000..5e65ea520 --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_society.yml @@ -0,0 +1,25 @@ +uuid: 0e4b823d-75cb-4f9f-8fc4-3cfeaaa6a14c +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_society + - node.type.journal_info +id: node.journal_info.field_journal_society +field_name: field_journal_society +entity_type: node +bundle: journal_info +label: Society +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: views + handler_settings: + view: + view_name: attach_to_journal_info_entity_ref + display_name: entity_reference_1 + arguments: { } +field_type: entity_reference diff --git a/config/sync/field.field.node.journal_info.field_journal_submit_article.yml b/config/sync/field.field.node.journal_info.field_journal_submit_article.yml new file mode 100644 index 000000000..87fbf991d --- /dev/null +++ b/config/sync/field.field.node.journal_info.field_journal_submit_article.yml @@ -0,0 +1,21 @@ +uuid: 9bcd5c62-5316-4f24-8f0e-1759e01764bb +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_journal_submit_article + - node.type.journal_info + module: + - text +id: node.journal_info.field_journal_submit_article +field_name: field_journal_submit_article +entity_type: node +bundle: journal_info +label: 'Submit an article' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: text_long diff --git a/config/sync/field.field.node.society.field_society_log.yml b/config/sync/field.field.node.society.field_society_log.yml new file mode 100644 index 000000000..4d3f4114f --- /dev/null +++ b/config/sync/field.field.node.society.field_society_log.yml @@ -0,0 +1,38 @@ +uuid: 5ddcd4f1-e979-437a-bddb-07f0aba52c1a +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_society_log + - node.type.society + module: + - image +id: node.society.field_society_log +field_name: field_society_log +entity_type: node +bundle: society +label: 'Society logo' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + file_directory: '[date:custom:Y]-[date:custom:m]' + file_extensions: 'png gif jpg jpeg' + max_filesize: '' + max_resolution: '' + min_resolution: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + handler: 'default:file' + handler_settings: { } +field_type: image diff --git a/config/sync/field.field.node.society.field_society_website.yml b/config/sync/field.field.node.society.field_society_website.yml new file mode 100644 index 000000000..a457dcb71 --- /dev/null +++ b/config/sync/field.field.node.society.field_society_website.yml @@ -0,0 +1,23 @@ +uuid: 899e0483-c418-4939-97bd-eb2d8fc513e8 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_society_website + - node.type.society + module: + - link +id: node.society.field_society_website +field_name: field_society_website +entity_type: node +bundle: society +label: Website +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 1 +field_type: link diff --git a/config/sync/field.storage.node.field_journal.yml b/config/sync/field.storage.node.field_journal.yml new file mode 100644 index 000000000..cb50c4c9e --- /dev/null +++ b/config/sync/field.storage.node.field_journal.yml @@ -0,0 +1,19 @@ +uuid: 485e2a5c-9905-4d89-b533-aff0f014977b +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal +field_name: field_journal +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_about.yml b/config/sync/field.storage.node.field_journal_about.yml new file mode 100644 index 000000000..baf3f8650 --- /dev/null +++ b/config/sync/field.storage.node.field_journal_about.yml @@ -0,0 +1,19 @@ +uuid: 4e25d00e-e874-42f6-89a8-67913dada1b4 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_about +field_name: field_journal_about +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_cover_image.yml b/config/sync/field.storage.node.field_journal_cover_image.yml new file mode 100644 index 000000000..111878ebf --- /dev/null +++ b/config/sync/field.storage.node.field_journal_cover_image.yml @@ -0,0 +1,30 @@ +uuid: f4a90766-c942-41ea-81cd-0212a2bce24e +langcode: en +status: true +dependencies: + module: + - file + - image + - node +id: node.field_journal_cover_image +field_name: field_journal_cover_image +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_description.yml b/config/sync/field.storage.node.field_journal_description.yml new file mode 100644 index 000000000..5ea02820f --- /dev/null +++ b/config/sync/field.storage.node.field_journal_description.yml @@ -0,0 +1,19 @@ +uuid: d68e3317-f0b6-4d0b-b303-f4e169fc206c +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_description +field_name: field_journal_description +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_editorial_brd.yml b/config/sync/field.storage.node.field_journal_editorial_brd.yml new file mode 100644 index 000000000..09857447e --- /dev/null +++ b/config/sync/field.storage.node.field_journal_editorial_brd.yml @@ -0,0 +1,19 @@ +uuid: 658e43c3-ec45-42b0-879c-d730dfbdabd6 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_editorial_brd +field_name: field_journal_editorial_brd +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_editors.yml b/config/sync/field.storage.node.field_journal_editors.yml new file mode 100644 index 000000000..e726e6186 --- /dev/null +++ b/config/sync/field.storage.node.field_journal_editors.yml @@ -0,0 +1,20 @@ +uuid: abf248d7-b9a3-47e7-8ed8-182839435fe2 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_editors +field_name: field_journal_editors +entity_type: node +type: text +settings: + max_length: 255 +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_impact_factor.yml b/config/sync/field.storage.node.field_journal_impact_factor.yml new file mode 100644 index 000000000..2787df02e --- /dev/null +++ b/config/sync/field.storage.node.field_journal_impact_factor.yml @@ -0,0 +1,21 @@ +uuid: f40b90dc-3d2a-4c90-a7d1-8ca5225dfe7b +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal_impact_factor +field_name: field_journal_impact_factor +entity_type: node +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_sample_issue.yml b/config/sync/field.storage.node.field_journal_sample_issue.yml new file mode 100644 index 000000000..8a947c59a --- /dev/null +++ b/config/sync/field.storage.node.field_journal_sample_issue.yml @@ -0,0 +1,21 @@ +uuid: a69a816e-692b-4ae0-8cfd-557239a4b200 +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal_sample_issue +field_name: field_journal_sample_issue +entity_type: node +type: string +settings: + max_length: 255 + is_ascii: false + case_sensitive: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_society.yml b/config/sync/field.storage.node.field_journal_society.yml new file mode 100644 index 000000000..33aa71989 --- /dev/null +++ b/config/sync/field.storage.node.field_journal_society.yml @@ -0,0 +1,19 @@ +uuid: d05280fb-2f69-4c56-be16-75a9b9c8e85d +langcode: en +status: true +dependencies: + module: + - node +id: node.field_journal_society +field_name: field_journal_society +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_journal_submit_article.yml b/config/sync/field.storage.node.field_journal_submit_article.yml new file mode 100644 index 000000000..c6f9ac6cf --- /dev/null +++ b/config/sync/field.storage.node.field_journal_submit_article.yml @@ -0,0 +1,19 @@ +uuid: c45f6f1e-25d3-4679-b7f5-f16b36084e03 +langcode: en +status: true +dependencies: + module: + - node + - text +id: node.field_journal_submit_article +field_name: field_journal_submit_article +entity_type: node +type: text_long +settings: { } +module: text +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_society_log.yml b/config/sync/field.storage.node.field_society_log.yml new file mode 100644 index 000000000..9584f8f48 --- /dev/null +++ b/config/sync/field.storage.node.field_society_log.yml @@ -0,0 +1,30 @@ +uuid: a1378879-b834-4990-aa54-20d3d8786577 +langcode: en +status: true +dependencies: + module: + - file + - image + - node +id: node.field_society_log +field_name: field_society_log +entity_type: node +type: image +settings: + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' + width: null + height: null + target_type: file + display_field: false + display_default: false +module: image +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.node.field_society_website.yml b/config/sync/field.storage.node.field_society_website.yml new file mode 100644 index 000000000..ec2adb828 --- /dev/null +++ b/config/sync/field.storage.node.field_society_website.yml @@ -0,0 +1,19 @@ +uuid: 4b4d31cb-df94-41b8-a872-e9142a9658bf +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_society_website +field_name: field_society_website +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/highwire_personalization.settings.yml b/config/sync/highwire_personalization.settings.yml index 2199391d5..41461de9c 100755 --- a/config/sync/highwire_personalization.settings.yml +++ b/config/sync/highwire_personalization.settings.yml @@ -1,10 +1,22 @@ -context: '' +context: hwjma saved_search_api_base_path: '' alert_type_config: null -markers_content_type_filters: { } -markers_admin_citations_view_mode: { } +markers_content_type_filters: + journal: 1 +markers_admin_citations_view_mode: + journal: search_result + journal_article: search_result + journal_issue: search_result profile_and_privacy_form_class: '' profile_and_privacy_pop_welcome_message: 'You are registered for a personal account.' -tags_admin_citations_view_mode: { } +tags_admin_citations_view_mode: + journal_article: content_details _core: default_config_hash: Pxth7sNsS5mshjiXLFyUNe2Ky1kkQd6BqF23xLmp9rI +reports_enabled: + alerts: 1 + captures: 1 + preferences: 1 +remove_alert_tab_title: 'Saved searches' +default_empty_alert_message: 'No alerts found.' +empty_alert_message: 'Click here to create alerts for when new books are added to the site.' diff --git a/config/sync/language.content_settings.node.journal_info.yml b/config/sync/language.content_settings.node.journal_info.yml new file mode 100644 index 000000000..8256f901c --- /dev/null +++ b/config/sync/language.content_settings.node.journal_info.yml @@ -0,0 +1,11 @@ +uuid: 78cd35b8-c85d-443f-bb4b-ec8dfee85804 +langcode: en +status: true +dependencies: + config: + - node.type.journal_info +id: node.journal_info +target_entity_type_id: node +target_bundle: journal_info +default_langcode: site_default +language_alterable: false diff --git a/config/sync/language.content_settings.node.society.yml b/config/sync/language.content_settings.node.society.yml new file mode 100644 index 000000000..7db590692 --- /dev/null +++ b/config/sync/language.content_settings.node.society.yml @@ -0,0 +1,11 @@ +uuid: ecdd3aac-7a24-4853-ae4e-2a6f98b61504 +langcode: en +status: true +dependencies: + config: + - node.type.society +id: node.society +target_entity_type_id: node +target_bundle: society +default_langcode: site_default +language_alterable: false diff --git a/config/sync/node.type.journal_info.yml b/config/sync/node.type.journal_info.yml new file mode 100644 index 000000000..2f33b09e1 --- /dev/null +++ b/config/sync/node.type.journal_info.yml @@ -0,0 +1,17 @@ +uuid: 372e692b-be7f-4130-a168-dcce71a9510b +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: { } + parent: '' +name: 'Journal info' +type: journal_info +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/config/sync/node.type.society.yml b/config/sync/node.type.society.yml new file mode 100644 index 000000000..63fedf824 --- /dev/null +++ b/config/sync/node.type.society.yml @@ -0,0 +1,18 @@ +uuid: 467b9d93-147f-4b51-8bc2-51b219b2a403 +langcode: en +status: true +dependencies: + module: + - menu_ui +third_party_settings: + menu_ui: + available_menus: + - main + parent: 'main:' +name: Society +type: society +description: '' +help: '' +new_revision: true +preview_mode: 1 +display_submitted: true diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index a4385a8c9..8409514e1 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -7,8 +7,10 @@ dependencies: - views.view.content_recent module: - ctools + - highwire_display - node - panels + - views id: node_view-panels_variant-1 label: Article variant: panels_variant diff --git a/config/sync/views.view.attach_to_journal_entity.yml b/config/sync/views.view.attach_to_journal_entity.yml new file mode 100644 index 000000000..31ff007c7 --- /dev/null +++ b/config/sync/views.view.attach_to_journal_entity.yml @@ -0,0 +1,250 @@ +uuid: 48ea8629-dbc6-42f2-8ea4-ad6f7b6ae953 +langcode: en +status: true +dependencies: + config: + - node.type.journal + module: + - node + - search + - user +id: attach_to_journal_entity +label: 'Attach to Journal Entity' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + uses_fields: false + row: + type: search_view + options: + score: true + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: node + entity_field: title + plugin_id: field + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + group: 1 + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + operator: in + value: + journal: journal + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + entity_field: type + plugin_id: bundle + sorts: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + entity_type: node + entity_field: title + plugin_id: standard + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + entity_reference_1: + display_plugin: entity_reference + id: entity_reference_1 + display_title: 'Entity Reference' + position: 1 + display_options: + display_extenders: { } + style: + type: entity_reference + options: + search_fields: + title: title + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/config/sync/views.view.attach_to_journal_info_entity_ref.yml b/config/sync/views.view.attach_to_journal_info_entity_ref.yml new file mode 100644 index 000000000..d7c6c500a --- /dev/null +++ b/config/sync/views.view.attach_to_journal_info_entity_ref.yml @@ -0,0 +1,203 @@ +uuid: a1298839-bb93-4411-bab0-bb360656e7c3 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.teaser + - node.type.society + module: + - node + - user +id: attach_to_journal_info_entity_ref +label: 'Attach to Journal-Info Entity Ref' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + uses_fields: false + row: + type: 'entity:node' + options: + relationship: none + view_mode: teaser + fields: + title: + id: title + table: node_field_data + field: title + entity_type: node + entity_field: title + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + group: 1 + type: + id: type + table: node_field_data + field: type + value: + society: society + entity_type: node + entity_field: type + plugin_id: bundle + expose: + operator_limit_selection: false + operator_list: { } + sorts: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + entity_type: node + entity_field: title + plugin_id: standard + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + entity_reference_1: + display_plugin: entity_reference + id: entity_reference_1 + display_title: 'Entity Reference' + position: 1 + display_options: + display_extenders: { } + style: + type: entity_reference + options: + search_fields: + title: title + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/config/sync/views.view.search.yml b/config/sync/views.view.search.yml index 454744ffe..efa202854 100644 --- a/config/sync/views.view.search.yml +++ b/config/sync/views.view.search.yml @@ -5,6 +5,7 @@ dependencies: config: - search_api.index.hwjma module: + - highwire_personalization - search_api id: search label: Search @@ -64,6 +65,10 @@ display: quantity: 9 style: type: default + options: + row_class: results-item + default_row_class: true + uses_fields: false row: type: search_api options: @@ -168,9 +173,122 @@ display: min_length: null fields: { } plugin_id: search_api_fulltext - sorts: { } + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal: journal + journal_article: journal_article + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + status: + id: status + table: search_api_index_hwjma + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + sorts: + search_api_relevance: + id: search_api_relevance + table: search_api_index_hwjma + field: search_api_relevance + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + plugin_id: search_api + date_ppub_facet: + id: date_ppub_facet + table: search_api_index_hwjma + field: date_ppub_facet + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: true + expose: + label: Date + plugin_id: search_api title: Search - header: { } + header: + highwire_personalization_save_search: + id: highwire_personalization_save_search + table: views + field: highwire_personalization_save_search + relationship: none + group_type: group + admin_label: '' + empty: true + plugin_id: highwire_personalization_save_search footer: { } empty: { } relationships: { } @@ -182,6 +300,8 @@ display: - 'languages:language_interface' - url - url.query_args + - 'url.query_args:sort_by' + - 'url.query_args:sort_order' tags: { } page_1: display_plugin: page @@ -205,4 +325,6 @@ display: - 'languages:language_interface' - url - url.query_args + - 'url.query_args:sort_by' + - 'url.query_args:sort_order' tags: { } From 698c7f3887671670bdbcc83aa04deb5fbcf80a7d Mon Sep 17 00:00:00 2001 From: RahulSatija49 <68992375+RahulSatija49@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:42:53 +0530 Subject: [PATCH 040/174] Update page_manager.page_variant.node_view-panels_variant-1.yml TO fix conflict --- ...manager.page_variant.node_view-panels_variant-1.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml index d94472d63..8409514e1 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-1.yml @@ -8,6 +8,7 @@ dependencies: module: - ctools - highwire_display + - node - panels - views id: node_view-panels_variant-1 @@ -142,6 +143,13 @@ variant_settings: builder: standard page: node_view weight: 0 -selection_criteria: { } +selection_criteria: + - + id: node_type + bundles: + journal_article: journal_article + negate: false + context_mapping: + node: node selection_logic: and static_context: { } From 936001bdbef918620031a95fed9a703fde270011 Mon Sep 17 00:00:00 2001 From: RahulSatija49 <68992375+RahulSatija49@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:44:04 +0530 Subject: [PATCH 041/174] Update highwire_personalization.settings.yml To fix conflict --- config/sync/highwire_personalization.settings.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config/sync/highwire_personalization.settings.yml b/config/sync/highwire_personalization.settings.yml index 88d3b756c..41461de9c 100755 --- a/config/sync/highwire_personalization.settings.yml +++ b/config/sync/highwire_personalization.settings.yml @@ -3,15 +3,14 @@ saved_search_api_base_path: '' alert_type_config: null markers_content_type_filters: journal: 1 - journal_article: 1 - journal_issue: 1 markers_admin_citations_view_mode: journal: search_result journal_article: search_result journal_issue: search_result profile_and_privacy_form_class: '' profile_and_privacy_pop_welcome_message: 'You are registered for a personal account.' -tags_admin_citations_view_mode: { } +tags_admin_citations_view_mode: + journal_article: content_details _core: default_config_hash: Pxth7sNsS5mshjiXLFyUNe2Ky1kkQd6BqF23xLmp9rI reports_enabled: @@ -19,5 +18,5 @@ reports_enabled: captures: 1 preferences: 1 remove_alert_tab_title: 'Saved searches' -default_empty_alert_message: '' -empty_alert_message: '' +default_empty_alert_message: 'No alerts found.' +empty_alert_message: 'Click here to create alerts for when new books are added to the site.' From 156a5f79c3f55c12d962c8be624a9aeb0e74de3c Mon Sep 17 00:00:00 2001 From: RahulSatija49 <68992375+RahulSatija49@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:46:54 +0530 Subject: [PATCH 042/174] Create core.entity_view_display.node.journal.full.yml To fix conflict --- ....entity_view_display.node.journal.full.yml | 385 ++++++++++++++++++ 1 file changed, 385 insertions(+) create mode 100644 config/sync/core.entity_view_display.node.journal.full.yml diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml new file mode 100644 index 000000000..74e5de94e --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.full.yml @@ -0,0 +1,385 @@ +uuid: 8d9ac4af-4818-4e09-9317-97d69d8bbd23 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - field_group + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_search_within: + children: { } + parent_name: '' + weight: 0 + format_type: html_element + format_settings: + id: '' + classes: 'toc-head mainpane' + element: div + show_label: false + label_element: h3 + attributes: '' + effect: none + speed: fast + label: 'search within' + region: content + group_journal_tabs: + children: + - group_latest_articles + - group_all_issues + - group_submit_an_article + - group_about_this_periodical + - group_editorial_board + - group_most_read + parent_name: '' + weight: 1 + format_type: highwire_tabs + format_settings: + id: '' + classes: '' + direction: vertical + ajax_markup: + ajax_markup_enabled: 1 + active_tab_ajax_enabled: 0 + label: 'Journal tabs' + region: content + group_latest_articles: + children: + - latest_articles + parent_name: group_journal_tabs + weight: 1 + format_type: highwire_tab + format_settings: + id: '' + classes: mainpanel + description: '' + active: 1 + formatter: closed + label: 'Latest Articles' + region: content + group_all_issues: + children: + - all_issues + parent_name: group_journal_tabs + weight: 2 + format_type: highwire_tab + format_settings: + id: issues + classes: mainpanel + description: '' + active: 0 + formatter: closed + label: 'All issues' + region: content + group_submit_an_article: + children: + - submit_article + parent_name: group_journal_tabs + weight: 3 + format_type: highwire_tab + format_settings: + id: submit-an-article + classes: 'mainpanel book-content' + description: '' + active: 0 + formatter: closed + label: 'Submit an article' + region: content + group_about_this_periodical: + children: + - about + parent_name: group_journal_tabs + weight: 4 + format_type: highwire_tab + format_settings: + id: about + classes: 'mainpanel book-content' + description: '' + active: 0 + formatter: closed + label: 'About this periodical' + region: content + group_editorial_board: + children: + - editorial_brd + parent_name: group_journal_tabs + weight: 5 + format_type: highwire_tab + format_settings: + id: editorial-board + classes: 'mainpanel book-content' + description: '' + active: 0 + formatter: closed + label: 'Editorial Board' + region: content + group_most_read: + children: + - most_read + parent_name: group_journal_tabs + weight: 6 + format_type: highwire_tab + format_settings: + id: most-read + classes: mainpanel + description: '' + active: 0 + formatter: closed + label: 'Most Read' + region: content +id: node.journal.full +targetEntityType: node +bundle: journal +mode: full +content: + about: + weight: 2 + region: content + settings: { } + third_party_settings: { } + all_issues: + weight: 39 + region: content + settings: { } + third_party_settings: { } + editorial_brd: + weight: 3 + region: content + settings: { } + third_party_settings: { } + latest_articles: + weight: 40 + region: content + settings: { } + third_party_settings: { } + most_read: + weight: 4 + region: content + settings: { } + third_party_settings: { } + submit_article: + weight: 0 + region: content + settings: { } + third_party_settings: { } +hidden: + addtoany: true + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + links: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true + From 4e6479f54c013dd155e31178511423264b851544 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:05:17 +0530 Subject: [PATCH 043/174] Create core.entity_view_display.node.journal.content_details.yml To fix commit issue --- ...w_display.node.journal.content_details.yml | 350 ++++++++++++++++++ 1 file changed, 350 insertions(+) create mode 100644 config/sync/core.entity_view_display.node.journal.content_details.yml diff --git a/config/sync/core.entity_view_display.node.journal.content_details.yml b/config/sync/core.entity_view_display.node.journal.content_details.yml new file mode 100644 index 000000000..cf14b7506 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.content_details.yml @@ -0,0 +1,350 @@ +uuid: 1fa03011-d752-4ffd-9819-cf4a906ee789 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.content_details + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - double_field + - field_group + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_action_tools: + children: + - hw_alerts_sign_up + - group_share_popup + - hw_marker_sign_up + parent_name: '' + weight: 8 + format_type: highwire_html_list + format_settings: + id: '' + classes: '' + list_type: ul + label: 'Action Tools' + region: content + group_share_popup: + children: + - addtoany + parent_name: group_action_tools + weight: 1 + format_type: highwire_bootstrap_modal_popup + format_settings: + id: '' + classes: modal--height-auto + trigger_options: + trigger_type: button + title: ' Share' + classes: 'btn btn-tertiary content-action-button' + icon: share + modal_options: + title: 'Share this [node:type_display]' + height: '' + width: '' + hide_field_display: 1 + footer: 1 + separate_toggle_button: 0 + separate_toggle_button_settings: + button_weight: '' + button_parent: default + label: 'share popup' + region: content +id: node.journal.content_details +targetEntityType: node +bundle: journal +mode: content_details +content: + about: + weight: 6 + region: content + settings: { } + third_party_settings: { } + addtoany: + weight: 0 + region: content + settings: { } + third_party_settings: { } + custom_meta: + type: double_field_unformatted_list + weight: 3 + region: content + label: above + settings: + inline: true + first: + hidden: false + prefix: '' + suffix: '' + link: false + format_type: medium + second: + hidden: false + prefix: '' + suffix: '' + link: false + format_type: medium + third_party_settings: { } + doi: + type: text_default + weight: 2 + region: content + label: hidden + settings: { } + third_party_settings: { } + editorial_brd: + weight: 7 + region: content + settings: { } + third_party_settings: { } + hw_alerts_sign_up: + weight: 0 + region: content + settings: { } + third_party_settings: { } + hw_marker_sign_up: + weight: 2 + region: content + settings: { } + third_party_settings: { } + journal_current_issue: + type: entity_reference_label + weight: 0 + region: content + label: above + settings: + link: true + third_party_settings: { } + journal_eissn: + type: text_default + weight: 1 + region: content + label: above + settings: { } + third_party_settings: { } + journal_pissn: + type: text_default + weight: 5 + region: content + label: above + settings: { } + third_party_settings: { } + submit_article: + weight: 4 + region: content + settings: { } + third_party_settings: { } +hidden: + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true From 67ebdba0fa9b684e4891797a0378e201f2994f48 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:06:29 +0530 Subject: [PATCH 044/174] Create core.entity_view_display.node.journal.default.yml To Fix conflict --- ...tity_view_display.node.journal.default.yml | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 config/sync/core.entity_view_display.node.journal.default.yml diff --git a/config/sync/core.entity_view_display.node.journal.default.yml b/config/sync/core.entity_view_display.node.journal.default.yml new file mode 100644 index 000000000..7ed77b168 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.default.yml @@ -0,0 +1,236 @@ +uuid: 6617c460-2d42-4ac5-aed5-e63c85c280c5 +langcode: en +status: true +dependencies: + config: + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - user +id: node.journal.default +targetEntityType: node +bundle: journal +mode: default +content: + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true From 17b4fd8cef8655b3ee1790b5ebea048026b08af4 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:09:31 +0530 Subject: [PATCH 045/174] Create core.entity_view_display.node.journal.toc_list.yml To fix conflict --- ...ity_view_display.node.journal.toc_list.yml | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 config/sync/core.entity_view_display.node.journal.toc_list.yml diff --git a/config/sync/core.entity_view_display.node.journal.toc_list.yml b/config/sync/core.entity_view_display.node.journal.toc_list.yml new file mode 100644 index 000000000..899d187ab --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.toc_list.yml @@ -0,0 +1,242 @@ +uuid: 8d2a2d16-7ef0-4887-b302-66f156ceb839 +langcode: en +status: false +dependencies: + config: + - core.entity_view_mode.node.toc_list + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.toc_list +targetEntityType: node +bundle: journal +mode: toc_list +content: + links: + weight: 100 + settings: { } + third_party_settings: { } + region: content +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true From 7b54c5e20c9375e78a994a31d8cd6b0cdf6f0139 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:12:44 +0530 Subject: [PATCH 046/174] Create views.view.all_issues.yml To fix conflict --- config/sync/views.view.all_issues.yml | 438 ++++++++++++++++++++++++++ 1 file changed, 438 insertions(+) create mode 100644 config/sync/views.view.all_issues.yml diff --git a/config/sync/views.view.all_issues.yml b/config/sync/views.view.all_issues.yml new file mode 100644 index 000000000..ad6cd580b --- /dev/null +++ b/config/sync/views.view.all_issues.yml @@ -0,0 +1,438 @@ +uuid: 51e40419-20c0-496c-a297-d4455b456231 +langcode: en +status: true +dependencies: + config: + - field.storage.node.date_epub + - field.storage.node.issue + - field.storage.node.volume + - search_api.index.hwjma + module: + - datetime_range + - search_api + - text +id: all_issues +label: 'All Issues' +module: views +description: '' +tag: '' +base_table: search_api_index_hwjma +base_field: search_api_id +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: none + options: { } + cache: + type: tag + options: { } + query: + type: views_query + options: + bypass_access: false + skip_access: false + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: full + options: + items_per_page: 36 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: '‹ Previous' + next: 'Next ›' + first: '« First' + last: 'Last »' + quantity: 9 + style: + type: html_list + options: + grouping: + - + field: volume + rendered: true + rendered_strip: true + row_class: '' + default_row_class: true + type: ul + wrapper_class: item-list + class: 'list-unstyled issues-list list--no-space' + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: true + fields: + issue: + id: issue + table: search_api_datasource_hwjma_entity_node + field: issue + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: true + text: 'Issue {{ issue__value }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: true + trim: false + preserve_tags: '' + html: false + element_type: '0' + element_class: '' + element_label_type: '0' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '0' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field + date_epub: + id: date_epub + table: search_api_datasource_hwjma_entity_node + field: date_epub + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: true + text: '{{ date_ppub__value|date("Y") }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '0' + element_class: '' + element_label_type: '0' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '0' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: daterange_default + settings: + timezone_override: '' + format_type: html_year + separator: '-' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field + volume: + id: volume + table: search_api_datasource_hwjma_entity_node + field: volume + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: true + alter: + alter_text: true + text: 'Volume {{ volume }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field + filters: + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal_issue: journal_issue + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + sorts: + volume: + id: volume + table: search_api_index_hwjma + field: volume + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api + issue: + id: issue + table: search_api_index_hwjma + field: issue + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api + title: 'All Issues' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: + corpus: + id: corpus + table: search_api_index_hwjma + field: corpus + relationship: none + group_type: group + admin_label: '' + default_action: empty + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: { } + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + plugin_id: search_api + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + tags: + - 'config:field.storage.node.date_epub' + - 'config:field.storage.node.issue' + - 'config:field.storage.node.volume' + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: 1 + display_options: + display_extenders: + simple_sitemap_display_extender: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + tags: + - 'config:field.storage.node.date_epub' + - 'config:field.storage.node.issue' + - 'config:field.storage.node.volume' From 415d9e7127e5a18101b0ed87d4188b1c8fba1217 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:16:02 +0530 Subject: [PATCH 047/174] Create views.view.latest_articles.yml --- config/sync/views.view.latest_articles.yml | 309 +++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 config/sync/views.view.latest_articles.yml diff --git a/config/sync/views.view.latest_articles.yml b/config/sync/views.view.latest_articles.yml new file mode 100644 index 000000000..bf848e8af --- /dev/null +++ b/config/sync/views.view.latest_articles.yml @@ -0,0 +1,309 @@ +uuid: 20d1d5ec-367d-4b73-8d98-18168e35853c +langcode: en +status: true +dependencies: + config: + - search_api.index.hwjma + module: + - search_api +id: latest_articles +label: 'Latest articles' +module: views +description: '' +tag: '' +base_table: search_api_index_hwjma +base_field: search_api_id +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: none + options: { } + cache: + type: time + options: + results_lifespan: 300 + results_lifespan_custom: 0 + output_lifespan: 300 + output_lifespan_custom: 0 + query: + type: views_query + options: + bypass_access: false + skip_access: false + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: some + options: + items_per_page: 10 + offset: 0 + style: + type: html_list + options: + row_class: '' + default_row_class: true + uses_fields: false + type: ul + wrapper_class: '' + class: 'list-unstyled latest-articles' + row: + type: search_api + options: + view_modes: + 'entity:node': + journal_article: toc_list + journal_issue: default + fields: + search_api_id: + table: search_api_index_hwjma + field: search_api_id + id: search_api_id + entity_type: null + entity_field: null + plugin_id: standard + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + filters: + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal_article: journal_article + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + status: + id: status + table: search_api_index_hwjma + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + version_current: + id: version_current + table: search_api_index_hwjma + field: version_current + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + sorts: + date_ppub_facet: + id: date_ppub_facet + table: search_api_index_hwjma + field: date_ppub_facet + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api + title: 'Latest articles' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: + corpus: + id: corpus + table: search_api_index_hwjma + field: corpus + relationship: none + group_type: group + admin_label: '' + default_action: empty + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: { } + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + plugin_id: search_api + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + tags: { } + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: 1 + display_options: + display_extenders: + simple_sitemap_display_extender: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_interface' + - url + tags: { } From 56b8b7a85c1069417abbc689e454d4744ed53cf7 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:21:38 +0530 Subject: [PATCH 048/174] Create page_manager.page_variant.node_view-panels_variant-2.yml --- ...age_variant.node_view-panels_variant-2.yml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 config/sync/page_manager.page_variant.node_view-panels_variant-2.yml diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml new file mode 100644 index 000000000..3ce06050a --- /dev/null +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml @@ -0,0 +1,87 @@ +uuid: 72d5b44b-ee59-4ddf-9609-bd725da70be8 +langcode: en +status: true +dependencies: + config: + - page_manager.page.node_view + module: + - ctools + - panels +id: node_view-panels_variant-2 +label: Journal +variant: panels_variant +variant_settings: + blocks: + a7abfc2e-30ff-44da-9866-315be43d858c: + id: 'entity_view:node' + label: 'Entity view (Content)' + provider: ctools + label_display: '0' + view_mode: content_details + region: top + weight: 0 + uuid: a7abfc2e-30ff-44da-9866-315be43d858c + context_mapping: + entity: node + 57ddebac-28b4-4a83-b296-4ba88914dfdc: + id: 'entity_view:node' + label: 'Entity view (Content)' + provider: ctools + label_display: '0' + view_mode: full + region: left + weight: 0 + uuid: 57ddebac-28b4-4a83-b296-4ba88914dfdc + context_mapping: + entity: node + id: panels_variant + uuid: 9959ed8c-0ea0-4063-8de1-e06f7b1a5780 + label: null + weight: 0 + layout: bs_2col_stacked + layout_settings: + label: '' + layout: + wrapper: div + classes: { } + add_layout_class: 0 + attributes: 'class|journal-page journal-article row journals-articles-middle' + regions: + top: + wrapper: div + classes: + col-sm-12: col-sm-12 + add_region_classes: 1 + attributes: '' + left: + wrapper: div + classes: { } + add_region_classes: 0 + attributes: 'class|col-12 col-large-tablet-9' + right: + wrapper: div + classes: { } + add_region_classes: 0 + attributes: 'class|col-12 col-large-tablet-3 article__rightbar' + bottom: + wrapper: div + classes: + col-sm-12: col-sm-12 + add_region_classes: 1 + attributes: '' + page_title: '[node:title]' + storage_type: page_manager + storage_id: node_view-panels_variant-2 + builder: standard +page: node_view +weight: 0 +selection_criteria: + - + id: 'entity_bundle:node' + bundles: + journal: journal + negate: false + context_mapping: + node: node +selection_logic: and +static_context: { } From d439d1ff9aaf5837712ed343388f717dfc0d7eb8 Mon Sep 17 00:00:00 2001 From: charanjeetcs <136805811+charanjeetcs@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:23:39 +0530 Subject: [PATCH 049/174] Update search_api.index.hwjma.yml --- config/sync/search_api.index.hwjma.yml | 77 +++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/config/sync/search_api.index.hwjma.yml b/config/sync/search_api.index.hwjma.yml index 06946e667..274a2d54f 100644 --- a/config/sync/search_api.index.hwjma.yml +++ b/config/sync/search_api.index.hwjma.yml @@ -4,10 +4,16 @@ status: true dependencies: module: - search_api_solr - - search_api - node + - search_api config: + - field.storage.node.corpus + - field.storage.node.issue + - field.storage.node.date_ppub + - field.storage.node.version_current + - field.storage.node.volume - search_api.server.hwjma_solr + - core.entity_view_mode.node.full_text_markup third_party_settings: search_api_solr: finalize: false @@ -34,7 +40,74 @@ id: hwjma name: HWJMA description: '' read_only: false -field_settings: { } +field_settings: + corpus: + label: Corpus + datasource_id: 'entity:node' + property_path: corpus + type: string + dependencies: + config: + - field.storage.node.corpus + date_ppub_facet: + label: 'Published Date (Facets)' + datasource_id: 'entity:node' + property_path: date_ppub + type: date + dependencies: + config: + - field.storage.node.date_ppub + fulltext_search: + label: 'Full Text Search' + property_path: rendered_item + type: text + configuration: + roles: + administrator: administrator + view_mode: + 'entity:node': + journal_article: full_text_markup + journal_issue: '' + issue: + label: issue + datasource_id: 'entity:node' + property_path: issue + type: text + dependencies: + config: + - field.storage.node.issue + status: + label: Published + datasource_id: 'entity:node' + property_path: status + type: boolean + dependencies: + module: + - node + type: + label: 'Content type' + datasource_id: 'entity:node' + property_path: type + type: string + dependencies: + module: + - node + version_current: + label: version-current + datasource_id: 'entity:node' + property_path: version_current + type: boolean + dependencies: + config: + - field.storage.node.version_current + volume: + label: volume + datasource_id: 'entity:node' + property_path: volume + type: text + dependencies: + config: + - field.storage.node.volume datasource_settings: 'entity:node': bundles: From 7cc367fcf5218a089b8c7673ed6483cb25042a6d Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 6 Jul 2023 07:23:40 -0400 Subject: [PATCH 050/174] Journal page sub tabs --- ...tity_form_display.node.journal.default.yml | 272 +++++++++++++++++ ...orm_display.node.journal_issue.default.yml | 270 +++++++++++++++++ ...w_display.node.journal.abstract_search.yml | 245 +++++++++++++++ ..._display.node.journal.browse_list_item.yml | 282 ++++++++++++++++++ ...y_view_display.node.journal.cover_only.yml | 255 ++++++++++++++++ ....entity_view_display.node.journal.full.yml | 1 - ..._display.node.journal.full_text_markup.yml | 245 +++++++++++++++ ...iew_display.node.journal.search_result.yml | 242 +++++++++++++++ ....node.journal.search_short_description.yml | 245 +++++++++++++++ ...lay.node.journal_info.browse_list_item.yml | 128 ++++++++ ...ty_view_display.node.journal_info.full.yml | 128 ++++++++ ...iew_display.node.journal_issue.default.yml | 6 +- ...entity_view_mode.node.browse_list_item.yml | 10 + .../core.entity_view_mode.node.cover_only.yml | 10 + ..._api__views_block__all_issues__block_1.yml | 9 + ..._views_block__latest_articles__block_1.yml | 9 + ...age_variant.node_view-panels_variant-2.yml | 10 + config/sync/search_api.index.hwjma.yml | 35 ++- .../search_api_autocomplete.search.search.yml | 25 ++ config/sync/search_api_solr.settings.yml | 2 +- config/sync/views.settings.yml | 2 +- config/sync/views.view.all_issues.yml | 67 +++-- config/sync/views.view.latest_articles.yml | 52 +--- .../highwire/hwjma_core/hwjma_core.module | 5 +- .../hwjma_theme/includes/layout.theme.inc | 27 ++ .../includes/suggestions.theme.inc | 13 +- .../form/form--hwjma-search-browse.html.twig | 3 + 27 files changed, 2501 insertions(+), 97 deletions(-) create mode 100644 config/sync/core.entity_form_display.node.journal.default.yml create mode 100644 config/sync/core.entity_form_display.node.journal_issue.default.yml create mode 100644 config/sync/core.entity_view_display.node.journal.abstract_search.yml create mode 100644 config/sync/core.entity_view_display.node.journal.browse_list_item.yml create mode 100644 config/sync/core.entity_view_display.node.journal.cover_only.yml create mode 100644 config/sync/core.entity_view_display.node.journal.full_text_markup.yml create mode 100644 config/sync/core.entity_view_display.node.journal.search_result.yml create mode 100644 config/sync/core.entity_view_display.node.journal.search_short_description.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.browse_list_item.yml create mode 100644 config/sync/core.entity_view_display.node.journal_info.full.yml create mode 100644 config/sync/core.entity_view_mode.node.browse_list_item.yml create mode 100644 config/sync/core.entity_view_mode.node.cover_only.yml create mode 100644 config/sync/facets.facet_source.search_api__views_block__all_issues__block_1.yml create mode 100644 config/sync/facets.facet_source.search_api__views_block__latest_articles__block_1.yml create mode 100644 config/sync/search_api_autocomplete.search.search.yml create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/form/form--hwjma-search-browse.html.twig diff --git a/config/sync/core.entity_form_display.node.journal.default.yml b/config/sync/core.entity_form_display.node.journal.default.yml new file mode 100644 index 000000000..c4a22ce1b --- /dev/null +++ b/config/sync/core.entity_form_display.node.journal.default.yml @@ -0,0 +1,272 @@ +uuid: 1501e11d-df9b-49ee-b6df-2e8feb5f0b55 +langcode: en +status: true +dependencies: + config: + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - path +id: node.journal.default +targetEntityType: node +bundle: journal +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_form_display.node.journal_issue.default.yml b/config/sync/core.entity_form_display.node.journal_issue.default.yml new file mode 100644 index 000000000..49e559aea --- /dev/null +++ b/config/sync/core.entity_form_display.node.journal_issue.default.yml @@ -0,0 +1,270 @@ +uuid: 3accdfec-685a-4f87-af0b-438e48dc121b +langcode: en +status: true +dependencies: + config: + - field.field.node.journal_issue.adjuncts + - field.field.node.journal_issue.apath + - field.field.node.journal_issue.article_open_access + - field.field.node.journal_issue.article_series_title + - field.field.node.journal_issue.article_type + - field.field.node.journal_issue.atom_type + - field.field.node.journal_issue.authors_full_name + - field.field.node.journal_issue.chapter_type + - field.field.node.journal_issue.children + - field.field.node.journal_issue.col_url + - field.field.node.journal_issue.contributors + - field.field.node.journal_issue.corpus + - field.field.node.journal_issue.cover_date + - field.field.node.journal_issue.custom_meta + - field.field.node.journal_issue.date_accepted + - field.field.node.journal_issue.date_epreprint + - field.field.node.journal_issue.date_epub + - field.field.node.journal_issue.date_epub_or_ppub + - field.field.node.journal_issue.date_epub_original + - field.field.node.journal_issue.date_epub_ppub + - field.field.node.journal_issue.date_epub_version + - field.field.node.journal_issue.date_ppub + - field.field.node.journal_issue.date_received + - field.field.node.journal_issue.date_released + - field.field.node.journal_issue.date_revision + - field.field.node.journal_issue.doi + - field.field.node.journal_issue.early_release + - field.field.node.journal_issue.elocation_id + - field.field.node.journal_issue.enclosures + - field.field.node.journal_issue.extract_policy + - field.field.node.journal_issue.final_published + - field.field.node.journal_issue.fpage + - field.field.node.journal_issue.georef_id + - field.field.node.journal_issue.has_abstract + - field.field.node.journal_issue.has_early_release + - field.field.node.journal_issue.has_figures + - field.field.node.journal_issue.has_figures_or_tables + - field.field.node.journal_issue.has_full_text + - field.field.node.journal_issue.has_full_text_pdf + - field.field.node.journal_issue.has_ref_links + - field.field.node.journal_issue.has_ref_stub + - field.field.node.journal_issue.has_source + - field.field.node.journal_issue.has_tables + - field.field.node.journal_issue.has_videos + - field.field.node.journal_issue.hwmd_table_of_contents_journals_ + - field.field.node.journal_issue.issue + - field.field.node.journal_issue.issue_id + - field.field.node.journal_issue.issue_is_open + - field.field.node.journal_issue.issue_page_range + - field.field.node.journal_issue.issue_supplemental + - field.field.node.journal_issue.issue_title + - field.field.node.journal_issue.issue_toc + - field.field.node.journal_issue.journal_abbrv_title + - field.field.node.journal_issue.journal_current_issue + - field.field.node.journal_issue.journal_eissn + - field.field.node.journal_issue.journal_eissn_compact + - field.field.node.journal_issue.journal_first_issue + - field.field.node.journal_issue.journal_pissn + - field.field.node.journal_issue.journal_pissn_compact + - field.field.node.journal_issue.journal_publisher + - field.field.node.journal_issue.journal_publisher_id + - field.field.node.journal_issue.journal_title + - field.field.node.journal_issue.keywords + - field.field.node.journal_issue.lpage + - field.field.node.journal_issue.member_network + - field.field.node.journal_issue.next_atom + - field.field.node.journal_issue.overline + - field.field.node.journal_issue.page_count + - field.field.node.journal_issue.parent + - field.field.node.journal_issue.parent_issue + - field.field.node.journal_issue.parent_journal + - field.field.node.journal_issue.parent_volume + - field.field.node.journal_issue.pdf_extract_img + - field.field.node.journal_issue.pisa_version + - field.field.node.journal_issue.prev_atom + - field.field.node.journal_issue.publisher_id + - field.field.node.journal_issue.publisher_unique_id + - field.field.node.journal_issue.pubmed_id + - field.field.node.journal_issue.related + - field.field.node.journal_issue.secondary + - field.field.node.journal_issue.sibling_order + - field.field.node.journal_issue.slug + - field.field.node.journal_issue.subtitle + - field.field.node.journal_issue.subtype + - field.field.node.journal_issue.summary + - field.field.node.journal_issue.title_plain + - field.field.node.journal_issue.title_short + - field.field.node.journal_issue.variant_cover_image + - field.field.node.journal_issue.variant_cover_pdf + - field.field.node.journal_issue.variant_cover_source_image + - field.field.node.journal_issue.variant_full_text_pdf + - field.field.node.journal_issue.variant_full_text_stamped_pdf + - field.field.node.journal_issue.variant_large_image + - field.field.node.journal_issue.variant_medium_image + - field.field.node.journal_issue.variant_small_image + - field.field.node.journal_issue.variant_table_of_contents_pdf + - field.field.node.journal_issue.version_current + - field.field.node.journal_issue.video_id + - field.field.node.journal_issue.volume + - node.type.journal_issue + module: + - path +id: node.journal_issue.default +targetEntityType: node +bundle: journal_issue +mode: default +content: + created: + type: datetime_timestamp + weight: 10 + region: content + settings: { } + third_party_settings: { } + langcode: + type: language_select + weight: 2 + region: content + settings: + include_locked: true + third_party_settings: { } + path: + type: path + weight: 30 + region: content + settings: { } + third_party_settings: { } + promote: + type: boolean_checkbox + settings: + display_label: true + weight: 15 + region: content + third_party_settings: { } + status: + type: boolean_checkbox + settings: + display_label: true + weight: 120 + region: content + third_party_settings: { } + sticky: + type: boolean_checkbox + settings: + display_label: true + weight: 16 + region: content + third_party_settings: { } + title: + type: string_textfield + weight: -5 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } + uid: + type: entity_reference_autocomplete + weight: 5 + settings: + match_operator: CONTAINS + size: 60 + placeholder: '' + match_limit: 10 + region: content + third_party_settings: { } +hidden: + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + hwmd_table_of_contents_journals_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.abstract_search.yml b/config/sync/core.entity_view_display.node.journal.abstract_search.yml new file mode 100644 index 000000000..e73103817 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.abstract_search.yml @@ -0,0 +1,245 @@ +uuid: eee3970b-213a-40c2-a5b4-043483cecd58 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.abstract_search + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - highwire_markup_display + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.abstract_search +targetEntityType: node +bundle: journal +mode: abstract_search +content: + hwmd_abstract_search: + type: hwmarkup_display_formatter + weight: 0 + region: content + label: above + settings: { } + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.browse_list_item.yml b/config/sync/core.entity_view_display.node.journal.browse_list_item.yml new file mode 100644 index 000000000..27b1d9b3d --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.browse_list_item.yml @@ -0,0 +1,282 @@ +uuid: 332099d0-c84c-4d40-9e66-19dc367b121f +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.browse_list_item + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - field_group + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_description: + children: { } + parent_name: '' + weight: 2 + format_type: highwire_bootstrap_collapse + format_settings: + label: description + button_classes: btn-secondary + separate_toggle_button: '1' + separate_toggle_button_settings: + button_weight: '-1' + button_parent: group_action_tools + id: '' + classes: abstract-panel--list-item + open: 0 + ajax_markup: + ajax_markup_enabled: 0 + label: description + region: content + group_action_tools: + children: { } + parent_name: '' + weight: 3 + format_type: highwire_html_list + format_settings: + id: '' + classes: '' + list_type: ul + label: 'Action Tools' + region: content +id: node.journal.browse_list_item +targetEntityType: node +bundle: journal +mode: browse_list_item +content: + cover_image: + weight: 1 + region: content + settings: { } + third_party_settings: { } + journal_current_issue: + type: entity_reference_entity_view + weight: 0 + region: content + label: hidden + settings: + view_mode: cover_only + link: false + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.cover_only.yml b/config/sync/core.entity_view_display.node.journal.cover_only.yml new file mode 100644 index 000000000..c4176b106 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.cover_only.yml @@ -0,0 +1,255 @@ +uuid: cd1e1b37-95c8-4399-9699-18a981d8afbf +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.cover_only + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - image + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.cover_only +targetEntityType: node +bundle: journal +mode: cover_only +content: + variant_cover_image: + type: image + weight: 1 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + variant_cover_source_image: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_pdf: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml index 74e5de94e..071bc7173 100644 --- a/config/sync/core.entity_view_display.node.journal.full.yml +++ b/config/sync/core.entity_view_display.node.journal.full.yml @@ -382,4 +382,3 @@ hidden: version_current: true video_id: true volume: true - diff --git a/config/sync/core.entity_view_display.node.journal.full_text_markup.yml b/config/sync/core.entity_view_display.node.journal.full_text_markup.yml new file mode 100644 index 000000000..57d7643c3 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.full_text_markup.yml @@ -0,0 +1,245 @@ +uuid: c713e3cc-dd56-4eae-a54d-b683c2312e27 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full_text_markup + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - highwire_markup_display + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.full_text_markup +targetEntityType: node +bundle: journal +mode: full_text_markup +content: + hwmd_abstract_search_index_: + type: hwmarkup_display_formatter + weight: 0 + region: content + label: hidden + settings: { } + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.search_result.yml b/config/sync/core.entity_view_display.node.journal.search_result.yml new file mode 100644 index 000000000..5f0bc5a38 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.search_result.yml @@ -0,0 +1,242 @@ +uuid: 8905bdc7-feeb-447c-af42-f0814fc40e3b +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.search_result + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.search_result +targetEntityType: node +bundle: journal +mode: search_result +content: + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + hwmd_abstract_search_index_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal.search_short_description.yml b/config/sync/core.entity_view_display.node.journal.search_short_description.yml new file mode 100644 index 000000000..3e41ee5b3 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal.search_short_description.yml @@ -0,0 +1,245 @@ +uuid: 62831fbd-1a35-4d97-ad09-9d76bcff22f8 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.search_short_description + - field.field.node.journal.adjuncts + - field.field.node.journal.apath + - field.field.node.journal.article_open_access + - field.field.node.journal.article_series_title + - field.field.node.journal.article_type + - field.field.node.journal.atom_type + - field.field.node.journal.authors_full_name + - field.field.node.journal.chapter_type + - field.field.node.journal.children + - field.field.node.journal.col_url + - field.field.node.journal.contributors + - field.field.node.journal.corpus + - field.field.node.journal.cover_date + - field.field.node.journal.custom_meta + - field.field.node.journal.date_accepted + - field.field.node.journal.date_epreprint + - field.field.node.journal.date_epub + - field.field.node.journal.date_epub_or_ppub + - field.field.node.journal.date_epub_original + - field.field.node.journal.date_epub_ppub + - field.field.node.journal.date_epub_version + - field.field.node.journal.date_ppub + - field.field.node.journal.date_received + - field.field.node.journal.date_released + - field.field.node.journal.date_revision + - field.field.node.journal.doi + - field.field.node.journal.early_release + - field.field.node.journal.elocation_id + - field.field.node.journal.enclosures + - field.field.node.journal.extract_policy + - field.field.node.journal.final_published + - field.field.node.journal.fpage + - field.field.node.journal.georef_id + - field.field.node.journal.has_abstract + - field.field.node.journal.has_early_release + - field.field.node.journal.has_figures + - field.field.node.journal.has_figures_or_tables + - field.field.node.journal.has_full_text + - field.field.node.journal.has_full_text_pdf + - field.field.node.journal.has_ref_links + - field.field.node.journal.has_ref_stub + - field.field.node.journal.has_source + - field.field.node.journal.has_tables + - field.field.node.journal.has_videos + - field.field.node.journal.hwmd_abstract_search + - field.field.node.journal.hwmd_abstract_search_index_ + - field.field.node.journal.issue + - field.field.node.journal.issue_id + - field.field.node.journal.issue_is_open + - field.field.node.journal.issue_page_range + - field.field.node.journal.issue_supplemental + - field.field.node.journal.issue_title + - field.field.node.journal.issue_toc + - field.field.node.journal.journal_abbrv_title + - field.field.node.journal.journal_current_issue + - field.field.node.journal.journal_eissn + - field.field.node.journal.journal_eissn_compact + - field.field.node.journal.journal_first_issue + - field.field.node.journal.journal_pissn + - field.field.node.journal.journal_pissn_compact + - field.field.node.journal.journal_publisher + - field.field.node.journal.journal_publisher_id + - field.field.node.journal.journal_title + - field.field.node.journal.keywords + - field.field.node.journal.lpage + - field.field.node.journal.member_network + - field.field.node.journal.next_atom + - field.field.node.journal.overline + - field.field.node.journal.page_count + - field.field.node.journal.parent + - field.field.node.journal.parent_issue + - field.field.node.journal.parent_journal + - field.field.node.journal.parent_volume + - field.field.node.journal.pdf_extract_img + - field.field.node.journal.pisa_version + - field.field.node.journal.prev_atom + - field.field.node.journal.publisher_id + - field.field.node.journal.publisher_unique_id + - field.field.node.journal.pubmed_id + - field.field.node.journal.related + - field.field.node.journal.secondary + - field.field.node.journal.sibling_order + - field.field.node.journal.slug + - field.field.node.journal.subtitle + - field.field.node.journal.subtype + - field.field.node.journal.summary + - field.field.node.journal.title_plain + - field.field.node.journal.title_short + - field.field.node.journal.variant_cover_image + - field.field.node.journal.variant_cover_pdf + - field.field.node.journal.variant_cover_source_image + - field.field.node.journal.variant_full_text_pdf + - field.field.node.journal.variant_full_text_stamped_pdf + - field.field.node.journal.variant_large_image + - field.field.node.journal.variant_medium_image + - field.field.node.journal.variant_small_image + - field.field.node.journal.variant_table_of_contents_pdf + - field.field.node.journal.version_current + - field.field.node.journal.video_id + - field.field.node.journal.volume + - node.type.journal + module: + - highwire_markup_display + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal.search_short_description +targetEntityType: node +bundle: journal +mode: search_short_description +content: + hwmd_abstract_search_index_: + type: hwmarkup_display_formatter + weight: 0 + region: content + label: hidden + settings: { } + third_party_settings: { } +hidden: + about: true + addtoany: true + adjuncts: true + all_issues: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + cover_image: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + editorial_brd: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_abstract_search: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + latest_articles: true + links: true + lpage: true + member_network: true + most_read: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + submit_article: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal_info.browse_list_item.yml b/config/sync/core.entity_view_display.node.journal_info.browse_list_item.yml new file mode 100644 index 000000000..5c7be5b1a --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.browse_list_item.yml @@ -0,0 +1,128 @@ +uuid: 5a0f9b6f-f731-4f56-88b1-2b5db0798488 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.browse_list_item + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - image + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal_info.browse_list_item +targetEntityType: node +bundle: journal_info +mode: browse_list_item +content: + corpus: + weight: 114 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal: + weight: 103 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_about: + weight: 105 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_cover_image: + weight: 108 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_journal_description: + weight: 109 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editorial_brd: + weight: 106 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editors: + weight: 110 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_impact_factor: + weight: 107 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_sample_issue: + weight: 111 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_society: + weight: 113 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_submit_article: + weight: 112 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + addtoany: true + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_info.full.yml b/config/sync/core.entity_view_display.node.journal_info.full.yml new file mode 100644 index 000000000..dff95c0d1 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_info.full.yml @@ -0,0 +1,128 @@ +uuid: 64435d64-216d-406d-987d-52153b86b87f +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - field.field.node.journal_info.corpus + - field.field.node.journal_info.field_journal + - field.field.node.journal_info.field_journal_about + - field.field.node.journal_info.field_journal_cover_image + - field.field.node.journal_info.field_journal_description + - field.field.node.journal_info.field_journal_editorial_brd + - field.field.node.journal_info.field_journal_editors + - field.field.node.journal_info.field_journal_impact_factor + - field.field.node.journal_info.field_journal_sample_issue + - field.field.node.journal_info.field_journal_society + - field.field.node.journal_info.field_journal_submit_article + - node.type.journal_info + module: + - image + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal_info.full +targetEntityType: node +bundle: journal_info +mode: full +content: + corpus: + weight: 114 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal: + weight: 103 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_about: + weight: 105 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_cover_image: + weight: 108 + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + type: image + region: content + field_journal_description: + weight: 109 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editorial_brd: + weight: 106 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_editors: + weight: 110 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + field_journal_impact_factor: + weight: 107 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_sample_issue: + weight: 111 + label: above + settings: + link_to_entity: false + third_party_settings: { } + type: string + region: content + field_journal_society: + weight: 113 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content + field_journal_submit_article: + weight: 112 + label: above + settings: { } + third_party_settings: { } + type: text_default + region: content + links: + weight: 100 + region: content + settings: { } + third_party_settings: { } +hidden: + addtoany: true + ccc_permissions_link: true + hwjma_focus_view: true + hwjma_toc_pager: true + langcode: true + prev_next_pager: true diff --git a/config/sync/core.entity_view_display.node.journal_issue.default.yml b/config/sync/core.entity_view_display.node.journal_issue.default.yml index 170bb0834..e6dc64a7a 100644 --- a/config/sync/core.entity_view_display.node.journal_issue.default.yml +++ b/config/sync/core.entity_view_display.node.journal_issue.default.yml @@ -111,11 +111,6 @@ targetEntityType: node bundle: journal_issue mode: default content: - links: - weight: 1 - region: content - settings: { } - third_party_settings: { } variant_cover_image: type: image weight: 0 @@ -198,6 +193,7 @@ hidden: journal_title: true keywords: true langcode: true + links: true lpage: true member_network: true next_atom: true diff --git a/config/sync/core.entity_view_mode.node.browse_list_item.yml b/config/sync/core.entity_view_mode.node.browse_list_item.yml new file mode 100644 index 000000000..b366caede --- /dev/null +++ b/config/sync/core.entity_view_mode.node.browse_list_item.yml @@ -0,0 +1,10 @@ +uuid: ba3d3fe4-00b3-4be5-a915-a62e52144585 +langcode: en +status: true +dependencies: + module: + - node +id: node.browse_list_item +label: 'Browse list item' +targetEntityType: node +cache: true diff --git a/config/sync/core.entity_view_mode.node.cover_only.yml b/config/sync/core.entity_view_mode.node.cover_only.yml new file mode 100644 index 000000000..e1ffeddbb --- /dev/null +++ b/config/sync/core.entity_view_mode.node.cover_only.yml @@ -0,0 +1,10 @@ +uuid: 364b83ae-2aff-4170-aa86-b887af343739 +langcode: en +status: true +dependencies: + module: + - node +id: node.cover_only +label: 'Cover Only' +targetEntityType: node +cache: true diff --git a/config/sync/facets.facet_source.search_api__views_block__all_issues__block_1.yml b/config/sync/facets.facet_source.search_api__views_block__all_issues__block_1.yml new file mode 100644 index 000000000..228e72558 --- /dev/null +++ b/config/sync/facets.facet_source.search_api__views_block__all_issues__block_1.yml @@ -0,0 +1,9 @@ +uuid: 7ed37789-2f9f-447e-a631-55e368d93b5c +langcode: en +status: true +dependencies: { } +id: search_api__views_block__all_issues__block_1 +name: 'search_api:views_block__all_issues__block_1' +filter_key: null +url_processor: query_string +breadcrumb: { } diff --git a/config/sync/facets.facet_source.search_api__views_block__latest_articles__block_1.yml b/config/sync/facets.facet_source.search_api__views_block__latest_articles__block_1.yml new file mode 100644 index 000000000..89dad6e4b --- /dev/null +++ b/config/sync/facets.facet_source.search_api__views_block__latest_articles__block_1.yml @@ -0,0 +1,9 @@ +uuid: 2f6fce94-c0f5-4a11-81bf-8475f2d44983 +langcode: en +status: true +dependencies: { } +id: search_api__views_block__latest_articles__block_1 +name: 'search_api:views_block__latest_articles__block_1' +filter_key: null +url_processor: query_string +breadcrumb: { } diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml index 3ce06050a..82e95a1b3 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml @@ -6,6 +6,7 @@ dependencies: - page_manager.page.node_view module: - ctools + - hwjma_search - panels id: node_view-panels_variant-2 label: Journal @@ -34,6 +35,15 @@ variant_settings: uuid: 57ddebac-28b4-4a83-b296-4ba88914dfdc context_mapping: entity: node + b88b5f0a-9387-42e2-b95a-5505c1703af8: + id: searchBrowse + label: 'Search browse block' + provider: hwjma_search + label_display: '0' + region: left + weight: -1 + uuid: b88b5f0a-9387-42e2-b95a-5505c1703af8 + context_mapping: { } id: panels_variant uuid: 9959ed8c-0ea0-4063-8de1-e06f7b1a5780 label: null diff --git a/config/sync/search_api.index.hwjma.yml b/config/sync/search_api.index.hwjma.yml index 274a2d54f..7c0be2d1c 100644 --- a/config/sync/search_api.index.hwjma.yml +++ b/config/sync/search_api.index.hwjma.yml @@ -6,10 +6,11 @@ dependencies: - search_api_solr - node - search_api + - highwire_search config: - field.storage.node.corpus - - field.storage.node.issue - field.storage.node.date_ppub + - field.storage.node.issue - field.storage.node.version_current - field.storage.node.volume - search_api.server.hwjma_solr @@ -113,16 +114,46 @@ datasource_settings: bundles: default: false selected: + - journal - journal_article + - journal_fragment + - journal_info - journal_issue + - journal_volume languages: default: true selected: { } processor_settings: add_url: { } aggregated_field: { } + freebird_search_substitute_date: + date_ppub_facet: + enabled: 1 + target: journal_article + condition: early_release + substitute: date_epub_original + all_fields: false + weights: + preprocess_index: -15 + html_filter: + all_fields: false + fields: + - fulltext_search + title: true + alt: true + tags: + b: 2 + h1: 5 + h2: 3 + h3: 2 + strong: 2 + weights: + preprocess_index: -15 + preprocess_query: -15 rendered_item: { } - solr_date_range: { } + solr_date_range: + weights: + preprocess_index: 0 tracker_settings: default: indexing_order: fifo diff --git a/config/sync/search_api_autocomplete.search.search.yml b/config/sync/search_api_autocomplete.search.search.yml new file mode 100644 index 000000000..6c61a1883 --- /dev/null +++ b/config/sync/search_api_autocomplete.search.search.yml @@ -0,0 +1,25 @@ +uuid: 48095e15-54d0-4006-b8c3-c9aad098586b +langcode: en +status: true +dependencies: + config: + - search_api.index.hwjma + - views.view.search + module: + - views + - search_api_autocomplete +id: search +label: Search +index_id: hwjma +suggester_settings: + live_results: + fields: { } + view_modes: { } +suggester_weights: { } +suggester_limits: { } +search_settings: + 'views:search': + displays: + default: true + selected: { } +options: { } diff --git a/config/sync/search_api_solr.settings.yml b/config/sync/search_api_solr.settings.yml index 5142a2d38..99a864655 100644 --- a/config/sync/search_api_solr.settings.yml +++ b/config/sync/search_api_solr.settings.yml @@ -1,5 +1,5 @@ last_optimize: 0 cron_action: spellcheck -site_hash: '' +site_hash: l60dwx _core: default_config_hash: 1MJyy2P_BD9P8QcEjeSNaD1FpcTQBZoiXlOvlKb0518 diff --git a/config/sync/views.settings.yml b/config/sync/views.settings.yml index f89c6533c..f3609612c 100755 --- a/config/sync/views.settings.yml +++ b/config/sync/views.settings.yml @@ -10,7 +10,7 @@ ui: performance_statistics: false preview_information: true sql_query: - enabled: false + enabled: true where: above display_embed: false always_live_preview: true diff --git a/config/sync/views.view.all_issues.yml b/config/sync/views.view.all_issues.yml index ad6cd580b..755382a71 100644 --- a/config/sync/views.view.all_issues.yml +++ b/config/sync/views.view.all_issues.yml @@ -1,9 +1,9 @@ -uuid: 51e40419-20c0-496c-a297-d4455b456231 +uuid: 7bb2ba44-76bc-4844-a661-7d0e1460794e langcode: en status: true dependencies: config: - - field.storage.node.date_epub + - field.storage.node.date_ppub - field.storage.node.issue - field.storage.node.volume - search_api.index.hwjma @@ -88,18 +88,18 @@ display: separator: '' hide_empty: true fields: - issue: - id: issue + volume: + id: volume table: search_api_datasource_hwjma_entity_node - field: issue + field: volume relationship: none group_type: group admin_label: '' label: '' - exclude: false + exclude: true alter: alter_text: true - text: 'Issue {{ issue__value }}' + text: 'Volume {{ volume }}' make_link: false path: '' absolute: false @@ -120,16 +120,16 @@ display: more_link: false more_link_text: '' more_link_path: '' - strip_tags: true + strip_tags: false trim: false preserve_tags: '' html: false - element_type: '0' + element_type: '' element_class: '' - element_label_type: '0' + element_label_type: '' element_label_class: '' element_label_colon: false - element_wrapper_type: '0' + element_wrapper_type: '' element_wrapper_class: '' element_default_classes: true empty: '' @@ -158,10 +158,10 @@ display: multi_separator: ', ' entity_type: node plugin_id: search_api_field - date_epub: - id: date_epub + issue: + id: issue table: search_api_datasource_hwjma_entity_node - field: date_epub + field: issue relationship: none group_type: group admin_label: '' @@ -169,7 +169,7 @@ display: exclude: false alter: alter_text: true - text: '{{ date_ppub__value|date("Y") }}' + text: 'Issue {{ issue__value }}' make_link: false path: '' absolute: false @@ -190,7 +190,7 @@ display: more_link: false more_link_text: '' more_link_path: '' - strip_tags: false + strip_tags: true trim: false preserve_tags: '' html: false @@ -207,11 +207,8 @@ display: empty_zero: false hide_alter_empty: true click_sort_column: value - type: daterange_default - settings: - timezone_override: '' - format_type: html_year - separator: '-' + type: text_default + settings: { } group_column: value group_columns: { } group_rows: true @@ -231,18 +228,18 @@ display: multi_separator: ', ' entity_type: node plugin_id: search_api_field - volume: - id: volume + date_ppub: + id: date_ppub table: search_api_datasource_hwjma_entity_node - field: volume + field: date_ppub relationship: none group_type: group admin_label: '' label: '' - exclude: true + exclude: false alter: alter_text: true - text: 'Volume {{ volume }}' + text: '{{ date_ppub__value|date("Y") }}' make_link: false path: '' absolute: false @@ -267,12 +264,12 @@ display: trim: false preserve_tags: '' html: false - element_type: '' + element_type: '0' element_class: '' - element_label_type: '' + element_label_type: '0' element_label_class: '' element_label_colon: false - element_wrapper_type: '' + element_wrapper_type: '0' element_wrapper_class: '' element_default_classes: true empty: '' @@ -280,8 +277,11 @@ display: empty_zero: false hide_alter_empty: true click_sort_column: value - type: text_default - settings: { } + type: daterange_default + settings: + timezone_override: '' + format_type: html_year + separator: '-' group_column: value group_columns: { } group_rows: true @@ -406,6 +406,7 @@ display: not: false plugin_id: search_api display_extenders: { } + use_ajax: true cache_metadata: max-age: -1 contexts: @@ -414,7 +415,7 @@ display: - url - url.query_args tags: - - 'config:field.storage.node.date_epub' + - 'config:field.storage.node.date_ppub' - 'config:field.storage.node.issue' - 'config:field.storage.node.volume' block_1: @@ -433,6 +434,6 @@ display: - url - url.query_args tags: - - 'config:field.storage.node.date_epub' + - 'config:field.storage.node.date_ppub' - 'config:field.storage.node.issue' - 'config:field.storage.node.volume' diff --git a/config/sync/views.view.latest_articles.yml b/config/sync/views.view.latest_articles.yml index bf848e8af..3a084ea65 100644 --- a/config/sync/views.view.latest_articles.yml +++ b/config/sync/views.view.latest_articles.yml @@ -198,57 +198,7 @@ display: default_group_multiple: { } group_items: { } plugin_id: search_api_boolean - version_current: - id: version_current - table: search_api_index_hwjma - field: version_current - relationship: none - group_type: group - admin_label: '' - operator: '=' - value: '1' - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - operator_limit_selection: false - operator_list: { } - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - plugin_id: search_api_boolean - sorts: - date_ppub_facet: - id: date_ppub_facet - table: search_api_index_hwjma - field: date_ppub_facet - relationship: none - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - plugin_id: search_api + sorts: { } title: 'Latest articles' header: { } footer: { } diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index 71391417b..8ccf8954a 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -351,13 +351,14 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView $plugin_block->setContextValue('node', $entity); $build['most_read'] = $plugin_block->build(); } + // dump($corpus); // These views depend on corpus. if (!empty($corpus)) { // Add each Journal view to the render array. $view_ids = ['latest_articles', 'all_issues']; $view_args = ['corpus' => $corpus]; foreach ($view_ids as $id) { - if ($display->getComponent($id)) { + if ($display->getComponent($id)) { $view = Views::getView($id); // Set corpus as contextual filter. $view->setArguments($view_args); @@ -381,6 +382,6 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView '#attributes' => ['class' => ['btn', 'btn-secondary']], ]; } - // dd($build); + //dd($build); } diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc index decacd8f4..27d1dddc3 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc @@ -257,3 +257,30 @@ function hwjma_preprocess_hwjma_toc_pager(&$variables) { } } } + +/** + * Implements hook_theme_suggestions_HOOK_alter(). + */ +function hwjma_theme_suggestions_views_view_fields_alter(array &$suggestions, array $variables) { + if (!empty($variables['view'])) { + switch ($variables['view']->id()) { + case 'all_issues': + $suggestions[] = 'views_view_fields__issue_archive'; + break; + } + } +} + +/** + * Implements hook_preprocess_views_view_fields__ID(). + */ +function hwjma_preprocess_views_view_fields__issue_archive(&$variables) { + if (!empty($variables['row']->_object)) { + $search_api_id = !empty($variables['row']->search_api_id) ? $variables['row']->search_api_id : ''; + $search_api_id_parts = explode(':', $search_api_id); + if ($search_api_id_parts[0] == 'entity') { + $entity_type_id = explode('/', $search_api_id_parts[1]); + $variables['issue_url'] = Url::fromRoute("entity.$entity_type_id[0].canonical", [$entity_type_id[0] => $entity_type_id[1]])->toString(); + } + } +} \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc index a85e47dfe..d16240691 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc @@ -60,4 +60,15 @@ function hwjma_theme_suggestions_block_alter(array &$suggestions, array $variabl break; } } -} \ No newline at end of file +} + + +/** + * Implements hook_theme_suggestions_field_alter(). + */ +function hwjma_theme_suggestions_field_alter(array &$suggestions, array $variables) { + $element = $variables['element']; + $suggestions[] = 'field__' . $element['#view_mode']; + $suggestions[] = 'field__' . $element['#view_mode'] . '__' . $element['#field_name']; +} + diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/form/form--hwjma-search-browse.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/form/form--hwjma-search-browse.html.twig new file mode 100644 index 000000000..76ad933d0 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/form/form--hwjma-search-browse.html.twig @@ -0,0 +1,3 @@ + + {{ children }} + \ No newline at end of file From f57668286daa3fe411dfe4848961ac478afca9d9 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Mon, 10 Jul 2023 03:04:56 -0400 Subject: [PATCH 051/174] Journal Issue --- ...lay.node.journal_issue.content_details.yml | 379 ++++ ..._display.node.journal_issue.cover_only.yml | 246 +++ ...y_view_display.node.journal_issue.full.yml | 255 +++ ..._control.access_control_rule.issue_pdf.yml | 25 + ...age_variant.node_view-panels_variant-3.yml | 100 ++ .../highwire/hwjma_core/hwjma_core.module | 3 +- .../install/hwjma_ecommerce.settings.yml | 5 + .../hwjma_ecommerce/hwjma_ecommerce.info.yml | 9 + .../hwjma_ecommerce.libraries.yml | 3 + .../hwjma_ecommerce/hwjma_ecommerce.module | 97 ++ .../hwjma_ecommerce/js/hwjma_ecommerce.js | 128 ++ .../src/Plugin/Block/DisplayPrice.php | 1550 +++++++++++++++++ .../templates/hwjma-access-panel.html.twig | 14 + .../hwjma-purchase-offer-item.html.twig | 14 + .../templates/hwjma-purchase-offer.html.twig | 12 + .../hwjma_theme/includes/node.theme.inc | 113 ++ ...--journal-issue--content-details.html.twig | 141 ++ 17 files changed, 3093 insertions(+), 1 deletion(-) create mode 100644 config/sync/core.entity_view_display.node.journal_issue.content_details.yml create mode 100644 config/sync/core.entity_view_display.node.journal_issue.cover_only.yml create mode 100644 config/sync/core.entity_view_display.node.journal_issue.full.yml create mode 100644 config/sync/highwire_access_control.access_control_rule.issue_pdf.yml create mode 100644 config/sync/page_manager.page_variant.node_view-panels_variant-3.yml create mode 100644 web/modules/highwire/hwjma_ecommerce/config/install/hwjma_ecommerce.settings.yml create mode 100644 web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.info.yml create mode 100644 web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.libraries.yml create mode 100644 web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.module create mode 100644 web/modules/highwire/hwjma_ecommerce/js/hwjma_ecommerce.js create mode 100644 web/modules/highwire/hwjma_ecommerce/src/Plugin/Block/DisplayPrice.php create mode 100644 web/modules/highwire/hwjma_ecommerce/templates/hwjma-access-panel.html.twig create mode 100644 web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer-item.html.twig create mode 100644 web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer.html.twig create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig diff --git a/config/sync/core.entity_view_display.node.journal_issue.content_details.yml b/config/sync/core.entity_view_display.node.journal_issue.content_details.yml new file mode 100644 index 000000000..ef06240df --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_issue.content_details.yml @@ -0,0 +1,379 @@ +uuid: 52c5fc54-0c48-4bb3-8db3-049f34c0deb0 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.content_details + - field.field.node.journal_issue.adjuncts + - field.field.node.journal_issue.apath + - field.field.node.journal_issue.article_open_access + - field.field.node.journal_issue.article_series_title + - field.field.node.journal_issue.article_type + - field.field.node.journal_issue.atom_type + - field.field.node.journal_issue.authors_full_name + - field.field.node.journal_issue.chapter_type + - field.field.node.journal_issue.children + - field.field.node.journal_issue.col_url + - field.field.node.journal_issue.contributors + - field.field.node.journal_issue.corpus + - field.field.node.journal_issue.cover_date + - field.field.node.journal_issue.custom_meta + - field.field.node.journal_issue.date_accepted + - field.field.node.journal_issue.date_epreprint + - field.field.node.journal_issue.date_epub + - field.field.node.journal_issue.date_epub_or_ppub + - field.field.node.journal_issue.date_epub_original + - field.field.node.journal_issue.date_epub_ppub + - field.field.node.journal_issue.date_epub_version + - field.field.node.journal_issue.date_ppub + - field.field.node.journal_issue.date_received + - field.field.node.journal_issue.date_released + - field.field.node.journal_issue.date_revision + - field.field.node.journal_issue.doi + - field.field.node.journal_issue.early_release + - field.field.node.journal_issue.elocation_id + - field.field.node.journal_issue.enclosures + - field.field.node.journal_issue.extract_policy + - field.field.node.journal_issue.final_published + - field.field.node.journal_issue.fpage + - field.field.node.journal_issue.georef_id + - field.field.node.journal_issue.has_abstract + - field.field.node.journal_issue.has_early_release + - field.field.node.journal_issue.has_figures + - field.field.node.journal_issue.has_figures_or_tables + - field.field.node.journal_issue.has_full_text + - field.field.node.journal_issue.has_full_text_pdf + - field.field.node.journal_issue.has_ref_links + - field.field.node.journal_issue.has_ref_stub + - field.field.node.journal_issue.has_source + - field.field.node.journal_issue.has_tables + - field.field.node.journal_issue.has_videos + - field.field.node.journal_issue.hwmd_table_of_contents_journals_ + - field.field.node.journal_issue.issue + - field.field.node.journal_issue.issue_id + - field.field.node.journal_issue.issue_is_open + - field.field.node.journal_issue.issue_page_range + - field.field.node.journal_issue.issue_supplemental + - field.field.node.journal_issue.issue_title + - field.field.node.journal_issue.issue_toc + - field.field.node.journal_issue.journal_abbrv_title + - field.field.node.journal_issue.journal_current_issue + - field.field.node.journal_issue.journal_eissn + - field.field.node.journal_issue.journal_eissn_compact + - field.field.node.journal_issue.journal_first_issue + - field.field.node.journal_issue.journal_pissn + - field.field.node.journal_issue.journal_pissn_compact + - field.field.node.journal_issue.journal_publisher + - field.field.node.journal_issue.journal_publisher_id + - field.field.node.journal_issue.journal_title + - field.field.node.journal_issue.keywords + - field.field.node.journal_issue.lpage + - field.field.node.journal_issue.member_network + - field.field.node.journal_issue.next_atom + - field.field.node.journal_issue.overline + - field.field.node.journal_issue.page_count + - field.field.node.journal_issue.parent + - field.field.node.journal_issue.parent_issue + - field.field.node.journal_issue.parent_journal + - field.field.node.journal_issue.parent_volume + - field.field.node.journal_issue.pdf_extract_img + - field.field.node.journal_issue.pisa_version + - field.field.node.journal_issue.prev_atom + - field.field.node.journal_issue.publisher_id + - field.field.node.journal_issue.publisher_unique_id + - field.field.node.journal_issue.pubmed_id + - field.field.node.journal_issue.related + - field.field.node.journal_issue.secondary + - field.field.node.journal_issue.sibling_order + - field.field.node.journal_issue.slug + - field.field.node.journal_issue.subtitle + - field.field.node.journal_issue.subtype + - field.field.node.journal_issue.summary + - field.field.node.journal_issue.title_plain + - field.field.node.journal_issue.title_short + - field.field.node.journal_issue.variant_cover_image + - field.field.node.journal_issue.variant_cover_pdf + - field.field.node.journal_issue.variant_cover_source_image + - field.field.node.journal_issue.variant_full_text_pdf + - field.field.node.journal_issue.variant_full_text_stamped_pdf + - field.field.node.journal_issue.variant_large_image + - field.field.node.journal_issue.variant_medium_image + - field.field.node.journal_issue.variant_small_image + - field.field.node.journal_issue.variant_table_of_contents_pdf + - field.field.node.journal_issue.version_current + - field.field.node.journal_issue.video_id + - field.field.node.journal_issue.volume + - node.type.journal_issue + module: + - datetime_range + - field_group + - highwire_access_control + - image + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_action_tools: + children: + - hw_marker_sign_up + - group_share_popup + - hw_alerts_sign_up + parent_name: '' + weight: 13 + format_type: highwire_html_list + format_settings: + id: '' + classes: '' + list_type: ul + label: 'Action Tools' + region: content + group_share_popup: + children: + - addtoany + parent_name: group_action_tools + weight: 4 + format_type: highwire_bootstrap_modal_popup + format_settings: + id: '' + classes: modal--height-auto + trigger_options: + trigger_type: button + title: ' Share' + classes: 'btn btn-tertiary' + icon: share + modal_options: + title: 'Share this [node:type_display]' + height: '' + width: '' + hide_field_display: 1 + footer: 1 + separate_toggle_button: 0 + separate_toggle_button_settings: + button_weight: '' + button_parent: default + label: 'share popup' + region: content +id: node.journal_issue.content_details +targetEntityType: node +bundle: journal_issue +mode: content_details +content: + addtoany: + weight: 14 + region: content + settings: { } + third_party_settings: { } + date_ppub: + type: daterange_default + weight: 8 + region: content + label: above + settings: + separator: '-' + format_type: medium + timezone_override: '' + third_party_settings: { } + doi: + type: text_default + weight: 11 + region: content + label: above + settings: { } + third_party_settings: { } + enclosures: + type: access_aware_file_url_plain + weight: 12 + region: content + label: above + settings: + access_rules: + issue_pdf: issue_pdf + online: 0 + access_denied_behavior: tooltip + access_denied_html: 'Log-in to access free PDF or view purchase options' + access_link_hide: false + third_party_settings: { } + fpage: + type: text_default + weight: 6 + region: content + label: above + settings: { } + third_party_settings: { } + hw_alerts_sign_up: + weight: 5 + region: content + settings: { } + third_party_settings: { } + hw_marker_sign_up: + weight: 3 + region: content + settings: { } + third_party_settings: { } + issue: + type: text_default + weight: 5 + region: content + label: above + settings: { } + third_party_settings: { } + issue_title: + type: text_default + weight: 3 + region: content + label: above + settings: { } + third_party_settings: { } + journal_eissn: + type: text_default + weight: 9 + region: content + label: above + settings: { } + third_party_settings: { } + journal_pissn: + type: text_default + weight: 10 + region: content + label: above + settings: { } + third_party_settings: { } + lpage: + type: text_default + weight: 7 + region: content + label: above + settings: { } + third_party_settings: { } + parent_journal: + type: entity_reference_label + weight: 2 + region: content + label: above + settings: + link: true + third_party_settings: { } + variant_cover_image: + type: image + weight: 1 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + variant_cover_source_image: + type: image + weight: 0 + region: content + label: above + settings: + image_style: '' + image_link: '' + third_party_settings: { } + volume: + type: text_default + weight: 4 + region: content + label: above + settings: { } + third_party_settings: { } +hidden: + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_received: true + date_released: true + date_revision: true + early_release: true + elocation_id: true + extract_policy: true + final_published: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_table_of_contents_journals_: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + links: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_pdf: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true diff --git a/config/sync/core.entity_view_display.node.journal_issue.cover_only.yml b/config/sync/core.entity_view_display.node.journal_issue.cover_only.yml new file mode 100644 index 000000000..3b7c7b3be --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_issue.cover_only.yml @@ -0,0 +1,246 @@ +uuid: 57b7c7a4-54eb-4083-8f63-246ddc0595fb +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.cover_only + - field.field.node.journal_issue.adjuncts + - field.field.node.journal_issue.apath + - field.field.node.journal_issue.article_open_access + - field.field.node.journal_issue.article_series_title + - field.field.node.journal_issue.article_type + - field.field.node.journal_issue.atom_type + - field.field.node.journal_issue.authors_full_name + - field.field.node.journal_issue.chapter_type + - field.field.node.journal_issue.children + - field.field.node.journal_issue.col_url + - field.field.node.journal_issue.contributors + - field.field.node.journal_issue.corpus + - field.field.node.journal_issue.cover_date + - field.field.node.journal_issue.custom_meta + - field.field.node.journal_issue.date_accepted + - field.field.node.journal_issue.date_epreprint + - field.field.node.journal_issue.date_epub + - field.field.node.journal_issue.date_epub_or_ppub + - field.field.node.journal_issue.date_epub_original + - field.field.node.journal_issue.date_epub_ppub + - field.field.node.journal_issue.date_epub_version + - field.field.node.journal_issue.date_ppub + - field.field.node.journal_issue.date_received + - field.field.node.journal_issue.date_released + - field.field.node.journal_issue.date_revision + - field.field.node.journal_issue.doi + - field.field.node.journal_issue.early_release + - field.field.node.journal_issue.elocation_id + - field.field.node.journal_issue.enclosures + - field.field.node.journal_issue.extract_policy + - field.field.node.journal_issue.final_published + - field.field.node.journal_issue.fpage + - field.field.node.journal_issue.georef_id + - field.field.node.journal_issue.has_abstract + - field.field.node.journal_issue.has_early_release + - field.field.node.journal_issue.has_figures + - field.field.node.journal_issue.has_figures_or_tables + - field.field.node.journal_issue.has_full_text + - field.field.node.journal_issue.has_full_text_pdf + - field.field.node.journal_issue.has_ref_links + - field.field.node.journal_issue.has_ref_stub + - field.field.node.journal_issue.has_source + - field.field.node.journal_issue.has_tables + - field.field.node.journal_issue.has_videos + - field.field.node.journal_issue.hwmd_table_of_contents_journals_ + - field.field.node.journal_issue.issue + - field.field.node.journal_issue.issue_id + - field.field.node.journal_issue.issue_is_open + - field.field.node.journal_issue.issue_page_range + - field.field.node.journal_issue.issue_supplemental + - field.field.node.journal_issue.issue_title + - field.field.node.journal_issue.issue_toc + - field.field.node.journal_issue.journal_abbrv_title + - field.field.node.journal_issue.journal_current_issue + - field.field.node.journal_issue.journal_eissn + - field.field.node.journal_issue.journal_eissn_compact + - field.field.node.journal_issue.journal_first_issue + - field.field.node.journal_issue.journal_pissn + - field.field.node.journal_issue.journal_pissn_compact + - field.field.node.journal_issue.journal_publisher + - field.field.node.journal_issue.journal_publisher_id + - field.field.node.journal_issue.journal_title + - field.field.node.journal_issue.keywords + - field.field.node.journal_issue.lpage + - field.field.node.journal_issue.member_network + - field.field.node.journal_issue.next_atom + - field.field.node.journal_issue.overline + - field.field.node.journal_issue.page_count + - field.field.node.journal_issue.parent + - field.field.node.journal_issue.parent_issue + - field.field.node.journal_issue.parent_journal + - field.field.node.journal_issue.parent_volume + - field.field.node.journal_issue.pdf_extract_img + - field.field.node.journal_issue.pisa_version + - field.field.node.journal_issue.prev_atom + - field.field.node.journal_issue.publisher_id + - field.field.node.journal_issue.publisher_unique_id + - field.field.node.journal_issue.pubmed_id + - field.field.node.journal_issue.related + - field.field.node.journal_issue.secondary + - field.field.node.journal_issue.sibling_order + - field.field.node.journal_issue.slug + - field.field.node.journal_issue.subtitle + - field.field.node.journal_issue.subtype + - field.field.node.journal_issue.summary + - field.field.node.journal_issue.title_plain + - field.field.node.journal_issue.title_short + - field.field.node.journal_issue.variant_cover_image + - field.field.node.journal_issue.variant_cover_pdf + - field.field.node.journal_issue.variant_cover_source_image + - field.field.node.journal_issue.variant_full_text_pdf + - field.field.node.journal_issue.variant_full_text_stamped_pdf + - field.field.node.journal_issue.variant_large_image + - field.field.node.journal_issue.variant_medium_image + - field.field.node.journal_issue.variant_small_image + - field.field.node.journal_issue.variant_table_of_contents_pdf + - field.field.node.journal_issue.version_current + - field.field.node.journal_issue.video_id + - field.field.node.journal_issue.volume + - node.type.journal_issue + module: + - image + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal_issue.cover_only +targetEntityType: node +bundle: journal_issue +mode: cover_only +content: + variant_cover_image: + type: image + weight: 1 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } + variant_cover_source_image: + type: image + weight: 0 + region: content + label: hidden + settings: + image_style: '' + image_link: '' + third_party_settings: { } +hidden: + addtoany: true + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_table_of_contents_journals_: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + links: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_pdf: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_display.node.journal_issue.full.yml b/config/sync/core.entity_view_display.node.journal_issue.full.yml new file mode 100644 index 000000000..5c5521a2c --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_issue.full.yml @@ -0,0 +1,255 @@ +uuid: 137d03d6-de38-4729-8f16-c95e4e9bcd63 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - field.field.node.journal_issue.adjuncts + - field.field.node.journal_issue.apath + - field.field.node.journal_issue.article_open_access + - field.field.node.journal_issue.article_series_title + - field.field.node.journal_issue.article_type + - field.field.node.journal_issue.atom_type + - field.field.node.journal_issue.authors_full_name + - field.field.node.journal_issue.chapter_type + - field.field.node.journal_issue.children + - field.field.node.journal_issue.col_url + - field.field.node.journal_issue.contributors + - field.field.node.journal_issue.corpus + - field.field.node.journal_issue.cover_date + - field.field.node.journal_issue.custom_meta + - field.field.node.journal_issue.date_accepted + - field.field.node.journal_issue.date_epreprint + - field.field.node.journal_issue.date_epub + - field.field.node.journal_issue.date_epub_or_ppub + - field.field.node.journal_issue.date_epub_original + - field.field.node.journal_issue.date_epub_ppub + - field.field.node.journal_issue.date_epub_version + - field.field.node.journal_issue.date_ppub + - field.field.node.journal_issue.date_received + - field.field.node.journal_issue.date_released + - field.field.node.journal_issue.date_revision + - field.field.node.journal_issue.doi + - field.field.node.journal_issue.early_release + - field.field.node.journal_issue.elocation_id + - field.field.node.journal_issue.enclosures + - field.field.node.journal_issue.extract_policy + - field.field.node.journal_issue.final_published + - field.field.node.journal_issue.fpage + - field.field.node.journal_issue.georef_id + - field.field.node.journal_issue.has_abstract + - field.field.node.journal_issue.has_early_release + - field.field.node.journal_issue.has_figures + - field.field.node.journal_issue.has_figures_or_tables + - field.field.node.journal_issue.has_full_text + - field.field.node.journal_issue.has_full_text_pdf + - field.field.node.journal_issue.has_ref_links + - field.field.node.journal_issue.has_ref_stub + - field.field.node.journal_issue.has_source + - field.field.node.journal_issue.has_tables + - field.field.node.journal_issue.has_videos + - field.field.node.journal_issue.hwmd_table_of_contents_journals_ + - field.field.node.journal_issue.issue + - field.field.node.journal_issue.issue_id + - field.field.node.journal_issue.issue_is_open + - field.field.node.journal_issue.issue_page_range + - field.field.node.journal_issue.issue_supplemental + - field.field.node.journal_issue.issue_title + - field.field.node.journal_issue.issue_toc + - field.field.node.journal_issue.journal_abbrv_title + - field.field.node.journal_issue.journal_current_issue + - field.field.node.journal_issue.journal_eissn + - field.field.node.journal_issue.journal_eissn_compact + - field.field.node.journal_issue.journal_first_issue + - field.field.node.journal_issue.journal_pissn + - field.field.node.journal_issue.journal_pissn_compact + - field.field.node.journal_issue.journal_publisher + - field.field.node.journal_issue.journal_publisher_id + - field.field.node.journal_issue.journal_title + - field.field.node.journal_issue.keywords + - field.field.node.journal_issue.lpage + - field.field.node.journal_issue.member_network + - field.field.node.journal_issue.next_atom + - field.field.node.journal_issue.overline + - field.field.node.journal_issue.page_count + - field.field.node.journal_issue.parent + - field.field.node.journal_issue.parent_issue + - field.field.node.journal_issue.parent_journal + - field.field.node.journal_issue.parent_volume + - field.field.node.journal_issue.pdf_extract_img + - field.field.node.journal_issue.pisa_version + - field.field.node.journal_issue.prev_atom + - field.field.node.journal_issue.publisher_id + - field.field.node.journal_issue.publisher_unique_id + - field.field.node.journal_issue.pubmed_id + - field.field.node.journal_issue.related + - field.field.node.journal_issue.secondary + - field.field.node.journal_issue.sibling_order + - field.field.node.journal_issue.slug + - field.field.node.journal_issue.subtitle + - field.field.node.journal_issue.subtype + - field.field.node.journal_issue.summary + - field.field.node.journal_issue.title_plain + - field.field.node.journal_issue.title_short + - field.field.node.journal_issue.variant_cover_image + - field.field.node.journal_issue.variant_cover_pdf + - field.field.node.journal_issue.variant_cover_source_image + - field.field.node.journal_issue.variant_full_text_pdf + - field.field.node.journal_issue.variant_full_text_stamped_pdf + - field.field.node.journal_issue.variant_large_image + - field.field.node.journal_issue.variant_medium_image + - field.field.node.journal_issue.variant_small_image + - field.field.node.journal_issue.variant_table_of_contents_pdf + - field.field.node.journal_issue.version_current + - field.field.node.journal_issue.video_id + - field.field.node.journal_issue.volume + - node.type.journal_issue + module: + - field_group + - highwire_markup_display + - layout_builder + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false + field_group: + group_articles_in_this_issue: + children: + - hwmd_table_of_contents_journals_ + parent_name: '' + weight: 0 + format_type: html_element + format_settings: + id: '' + classes: '' + element: div + show_label: true + label_element: h2 + attributes: 'class="tab-content__main-heading latest-articles"' + effect: none + speed: fast + label: 'Articles in this issue' + region: content +id: node.journal_issue.full +targetEntityType: node +bundle: journal_issue +mode: full +content: + hwmd_table_of_contents_journals_: + type: hwmarkup_display_formatter + weight: 0 + region: content + label: above + settings: { } + third_party_settings: { } +hidden: + addtoany: true + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_ppub: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + issue: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + links: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/highwire_access_control.access_control_rule.issue_pdf.yml b/config/sync/highwire_access_control.access_control_rule.issue_pdf.yml new file mode 100644 index 000000000..d3d6930e6 --- /dev/null +++ b/config/sync/highwire_access_control.access_control_rule.issue_pdf.yml @@ -0,0 +1,25 @@ +uuid: ee2c6387-3c21-44f7-be73-36d1b6284e8e +langcode: en +status: true +dependencies: { } +id: issue_pdf +label: 'Issue PDF' +description: 'Access to full text pdf for Journal issue content type' +rule_type: file +role: full-text +scope: download +target: variant +language: en +content_type: application/pdf +file_field: enclosures +file_field_bundles: + journal_issue: journal_issue + journal: 0 + journal_article: 0 + journal_fragment: 0 + journal_volume: 0 + relationship: 0 +ac_denied_action: source_redirect +ac_denied_action_conf: { } +ac_denied_message: 'Log-in to access free PDF or view purchase options.' +concurrency_limit_message: '' diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml new file mode 100644 index 000000000..dabe67e30 --- /dev/null +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml @@ -0,0 +1,100 @@ +uuid: ffade480-8d76-472e-984f-e0b9ce23ba43 +langcode: en +status: true +dependencies: + config: + - page_manager.page.node_view + module: + - ctools + - hwjma_search + - panels +id: node_view-panels_variant-3 +label: issue +variant: panels_variant +variant_settings: + blocks: + c01f57f9-bcc3-4d83-8610-dd23776fcdc5: + id: 'entity_view:node' + label: 'Entity view (Content)' + provider: ctools + label_display: '0' + view_mode: content_details + region: top + weight: 0 + uuid: c01f57f9-bcc3-4d83-8610-dd23776fcdc5 + context_mapping: + entity: node + f1ce0ee6-b53c-4028-85af-3f0cafaca211: + id: searchBrowse + label: 'Search browse block' + provider: hwjma_search + label_display: '0' + region: left + weight: -1 + uuid: f1ce0ee6-b53c-4028-85af-3f0cafaca211 + context_mapping: { } + 1b634706-f02f-4ad1-b03e-6fdc7d9c3409: + id: 'entity_view:node' + label: 'Entity view (Content)' + provider: ctools + label_display: '0' + view_mode: full + region: left + weight: 0 + uuid: 1b634706-f02f-4ad1-b03e-6fdc7d9c3409 + context_mapping: + entity: node + id: panels_variant + uuid: be92a481-5963-4572-a1eb-e8eaad43084c + label: null + weight: 0 + layout: bs_2col_stacked + layout_settings: + label: '' + layout: + wrapper: div + classes: + row: row + add_layout_class: 1 + attributes: 'class|journal-page journal-article' + regions: + top: + wrapper: div + classes: + col-md-12: col-md-12 + add_region_classes: 0 + attributes: class|journals-articles-top + left: + wrapper: div + classes: + col-md-12: col-md-12 + add_region_classes: 0 + attributes: 'class|col-12 col-large-tablet-9' + right: + wrapper: div + classes: + col-md-7: col-md-7 + add_region_classes: 0 + attributes: 'class|col-12 col-large-tablet-3 article__rightbar' + bottom: + wrapper: div + classes: + col-md-12: col-md-12 + add_region_classes: 1 + attributes: '' + page_title: '[node:journal_title] [node:title]' + storage_type: page_manager + storage_id: node_view-panels_variant-3 + builder: standard +page: node_view +weight: 0 +selection_criteria: + - + id: 'entity_bundle:node' + bundles: + journal_issue: journal_issue + negate: false + context_mapping: + node: node +selection_logic: and +static_context: { } diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index 8ccf8954a..1c5a685bf 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -318,7 +318,7 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView if ($content_type == HW_NODE_TYPE_JOURNAL) { // Add current issue link. if ($display->getComponent('current_issue_link') && $entity->hasField('journal_current_issue')) { - $current_issue = $entity->get('journal_current_issue'); + $current_issue = $entity->get('journal_current_issue'); if (!$current_issue->isEmpty()) { $current_issue_nid = $current_issue->getString(); $build['current_issue_link'] = [ @@ -328,6 +328,7 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView '#attributes' => ['class' => ['btn', 'btn-primary']], ]; $build['#cache']['tags'][] = 'node:' . $entity->id(); + } } // Add submit an article link. diff --git a/web/modules/highwire/hwjma_ecommerce/config/install/hwjma_ecommerce.settings.yml b/web/modules/highwire/hwjma_ecommerce/config/install/hwjma_ecommerce.settings.yml new file mode 100644 index 000000000..2a31d9ab7 --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/config/install/hwjma_ecommerce.settings.yml @@ -0,0 +1,5 @@ +form_defaults: + book_user_has_access_heading: 'You already have access to these chapters:' + book_purchase_access_heading: 'Get access to this book:' + chapter_purchase_chapter_heading: 'Get access to this chapter:' + chapter_purchase_book_heading: 'Get access to this chapter:' diff --git a/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.info.yml b/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.info.yml new file mode 100644 index 000000000..31e78b5d3 --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.info.yml @@ -0,0 +1,9 @@ +name: HWJMA Ecommerce +description: Foxycart integration for HWJMA. +package: HWJMA +dependencies: + - highwire_content + - highwire_ecommerce + - highwire_access_control +type: module +core: 8.x diff --git a/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.libraries.yml b/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.libraries.yml new file mode 100644 index 000000000..f218e82ea --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.libraries.yml @@ -0,0 +1,3 @@ +hwjma_ecommerce: + js: + js/hwjma_ecommerce.js: {} diff --git a/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.module b/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.module new file mode 100644 index 000000000..0f5b3e0f8 --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/hwjma_ecommerce.module @@ -0,0 +1,97 @@ + [ + 'template' => 'hwjma-access-panel', + 'variables' => ['user_access' => FALSE, 'user_access_already' => [], 'pricing_items' => [], 'purchase_children' => [], 'access_content_type' => ''], + ], + 'hwjma_purchase_offer' => [ + 'template' => 'hwjma-purchase-offer', + 'variables' => ['product' => [], 'purchase_offers' => [], 'purchase_link' => ''], + ], + 'hwjma_purchase_offer_item' => [ + 'template' => 'hwjma-purchase-offer-item', + 'variables' => ['type' => '', 'duration' => '', 'purchase_link' => ''], + ], + ]; +} + +/** + * Implements template_preprocess_THEME(). + */ +function template_preprocess_hwjma_access_panel(&$variables) { + $variables['attributes']['class'][] = 'hwjma-access-panel'; + $variables['attributes']['class'][] = !empty($variables['user_access']) ? 'user-access' : 'user-no-access'; +} + +/** + * Implements template_preprocess_THEME(). + */ +function template_preprocess_hwjma_purchase_offer(&$variables) { + $variables['attributes']['class'][] = 'hwjma-purchase-offer'; + $variables['attributes']['class'][] = 'product'; +} + +/** + * Implements template_preprocess_THEME(). + */ +function template_preprocess_hwjma_purchase_offer_item(&$variables) { + // Add access label & info text based on type. + if (!empty($variables['type'])) { + switch($variables['type']) { + case 'perpetual': + $variables['label'] = t('Perpetual access'); + $variables['info'] = t('You will have access to this version of the content. Future versions may not be covered.'); + break; + + case 'rental': + $variables['label'] = !empty($variables['duration']) ? $variables['duration'] : t('Rental access'); + $variables['info'] = !empty($variables['duration']) ? t('You will have online access to this content for @duration. You should download the PDF for perpetual usage.', ['@duration' => $variables['duration']]) : t('You will have access to this content for the specified period, including any updates during that period.'); + break; + } + } + if ($variables['logged_in'] == FALSE) { + $current_path = \Drupal::service('path.current')->getPath(); + $target_path = \Drupal::service('path_alias.manager')->getAliasByPath($current_path); + $variables['purchase_link']["#url"] = Url::fromRoute('openid_connect_sams_sigma.wayfless-url', ['target' => $target_path]); + } +} + +/** + * Implements hook_library_info_build(). + */ +function hwjma_ecommerce_library_info_alter(&$libraries, $extension) { + // Add hwjma_ecommerce/hwjma_ecommerce as a dependency of highwire_ecommerce/highwire_ecommerce_foxycart. + if ($extension == 'highwire_ecommerce') { + if (isset($libraries['highwire_ecommerce_foxycart'])) { + // @see hwjma_ecommerce_js_alter(). + $libraries['highwire_ecommerce_foxycart']['dependencies'][] = 'hwjma_ecommerce/hwjma_ecommerce'; + } + } +} + +/** + * Implements hook_js_alter(). + */ +function hwjma_ecommerce_js_alter(&$javascript, $assets) { + // Ensure hwjma_ecommerce/hwjma_ecommerce gets loaded after highwire_ecommerce/highwire_ecommerce_foxycart. + // @TODO: remove when https://www.drupal.org/node/1945262 gets released. + $lib_discovery = \Drupal::service('library.discovery'); + + // Look up paths to js files from library definition. + $hw_ecom_foxycart_lib = $lib_discovery->getLibraryByName('highwire_ecommerce', 'highwire_ecommerce_foxycart'); + $hwjma_ecom_lib = $lib_discovery->getLibraryByName('hwjma_ecommerce', 'hwjma_ecommerce'); + $hw_ecom_foxycart_js = !empty($hw_ecom_foxycart_lib['js'][0]['data']) ? $hw_ecom_foxycart_lib['js'][0]['data'] : ''; + $hwjma_ecom_js = !empty($hwjma_ecom_lib['js'][0]['data']) ? $hwjma_ecom_lib['js'][0]['data'] : ''; + + // Set weight of hwjma_ecommerce/hwjma_ecommerce to just higher than highwire_ecommerce/highwire_ecommerce_foxycart + if (!empty($javascript[$hw_ecom_foxycart_js]) && !empty($javascript[$hwjma_ecom_js])) { + $javascript[$hwjma_ecom_js]['weight'] = $javascript[$hw_ecom_foxycart_js]['weight'] + 0.001; + } +} \ No newline at end of file diff --git a/web/modules/highwire/hwjma_ecommerce/js/hwjma_ecommerce.js b/web/modules/highwire/hwjma_ecommerce/js/hwjma_ecommerce.js new file mode 100644 index 000000000..181e465d6 --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/js/hwjma_ecommerce.js @@ -0,0 +1,128 @@ +/** global: FC */ +var FC = FC || {}; + +(function ($, Drupal, drupalSettings) { + Drupal.behaviors.hwjma_ecommerce = { + attach: function (context, settings) { + FC.onLoadCallbacks.push(function() { + /** + * Collapse access panel when item is added to cart. + */ + FC.client.event("highwire-ecommerce-cart-submitted").override(function (params) { + collapseAccessPanel($(params.element).closest('.access-panel')); + }); + + /* + * Update add to cart link display when item is removed from cart. + */ + FC.client.wrap("highwire-ecommerce-cart-item-removed", function (params) { + // Replace purchase links for items removed from the cart. + if (params.apath && params.interval) { + itemRemovedFromCart(context, params.apath, params.interval); + } + }); + + /** + * Customize display of list items in message. + */ + FC.client.event('highwire-ecommerce-access-items-removed-message-build').override(function (params) { + if (!params.items) { + return; + } + // Build list. + var $list = buildListItems(params.items, 'fc-cart__removed-items-list'); + var count = $list.children().length; + if (count > 0) { + // Add message text and list items. + var removedQuantity = count === 1 ? '1 item has' : count + ' items have'; + $('#fc .fc-cart__custom-messages .fc-alert', context) + .append('

' + removedQuantity + ' been removed from your cart because you already have access:

') + .append($list); + } + }); + }); + + /** + * Collapse access panel. + * + * @param $panel + * The access panel to collapse. + */ + function collapseAccessPanel($panel) { + //var $panel = $link.closest('.access-panel'); + if ($panel.length > 0 && $panel.hasClass('in')) { + var $trigger = $('[data-target="#' + $panel.attr('id') + '"].btn--access-expander', context).first(); + $trigger.trigger('click'); + } + } + + /** + * Update add to cart link when item is removed from cart. + * + * @param context + * A jquery object to use as context. + * @param apath + * Apath of removed item + * @param interval + * Interval of removed item + */ + function itemRemovedFromCart(context, apath, interval) { + var $links = $('a.highwire-ecommerce-item-in-cart[data-apath="' + apath + '"][data-interval="' + interval + '"]', context); + if ($links.length <= 0) { + return; + } + $links.each(function () { + var $link = $(this); + var url = $link.attr('data-purchase-url'); + var text = $link.attr('data-purchase-text'); + if ($link.attr('data-discounted-price')) + { + var discountprice = $link.attr('data-discounted-price'); + var originalprice = $link.attr('data-original-price'); + text = 'Add to cart' + ' ' + originalprice + ' ' + discountprice; + } + $link.removeClass('highwire-ecommerce-item-in-cart').attr('href', url).html(text); + }); + } + + /** + * Build a list of cart item links. + * + * @param items + * A jquery object of cart items. + * @param addClass + * An additional class to add to the list. + * + * @return + * The list as a jquery object. + */ + function buildListItems(items, addClass) { + var $list = $('
    ').addClass(addClass); + var count = 0; + for (var apath in items) { + if (!items.hasOwnProperty(apath)) { + continue; + } + var title = items[apath]['title']; + var type = ''; + if (items[apath]['product_options']) { + type = (items[apath]['product_options']['for'] == 'ebook') ? 'book' : items[apath]['product_options']['for']; + if (title && items[apath]['product_options']['title_suffix']) { + title += ', ' + items[apath]['product_options']['title_suffix']; + } + } + title = '' + title + ''; + if (type) { + title += ' (' + type + ')'; + } + $list.append('
  • ' + title + '
  • '); + count++; + } + if (count > 0) { + return $list; + } + } + } + }; + +})(jQuery, Drupal, drupalSettings); diff --git a/web/modules/highwire/hwjma_ecommerce/src/Plugin/Block/DisplayPrice.php b/web/modules/highwire/hwjma_ecommerce/src/Plugin/Block/DisplayPrice.php new file mode 100644 index 000000000..556e8ff36 --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/src/Plugin/Block/DisplayPrice.php @@ -0,0 +1,1550 @@ +entityTypeManager = $entity_type_manager; + $this->moduleHandler = $module_handler; + $this->entityDisplayRepository = $entity_display_repository; + $this->addToCartLink = $add_to_cart_link; + $this->lookup = $lookup; + $this->catalog = $catalog; + $this->requestStack = $request_stack; + $this->userAccess = FALSE; + $this->logger = $logger; + $this->apikey = $config_factory->get('highwire_ecommerce')->get('apikey'); + $this->atomx = $atomx; + $this->defaultCache = $default_cache; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('entity_type.manager'), + $container->get('module_handler'), + $container->get('entity_display.repository'), + $container->get('highwire_ecommerce.add_to_cart_link'), + $container->get('highwire_content.lookup'), + $container->get('highwire_client.factory')->get('hwhwjmaclient:catalog'), + $container->get('request_stack'), + $container->get('config.factory'), + $container->get('logger.factory')->get('hwjma_ecommerce'), + $container->get('hwhwjma.atomx'), + $container->get('cache.default') + ); + } + + /** + * {@inheritdoc} + */ + public function build(): array { + + // Create block render array. + $build = ['#theme' => 'hwjma_access_panel', '#user_access' => FALSE]; + + // Get the current node data. + $this->contextNode = $this->getContextValue('node'); + + // Check if user has full access to this content. + if ($this->userHasAccess($this->contextNode)) { + + // Return has access panel. + $this->userAccess = TRUE; + $build['#user_access'] = TRUE; + return $build; + } + $this->checkAccessChildren(); + if ($this->userAccess) { + $build['#user_access'] = TRUE; + return $build; + } + + // Temp for p2: add node type + $build['#access_content_type'] = $this->contextNode->getType(); + + // Build display for children the user already has access to. + if ($this->showChildren()) { + $build['#user_access_already'] = $this->buildUserAccessChildren(); + } + + // Build display for children the user already has access to. + if (in_array($this->contextNode->getType(), HW_NODE_TYPE_TOC)) { + $build['#user_access'] = TRUE; + } + + // Get the catalog data for the context data. + $node_apath = isset($this->contextNode->apath) ? $this->contextNode->apath->value : ''; + try { + $offers_response = $this->catalog->getOffer([$node_apath], TRUE, TRUE); + $offers = $offers_response->getData(); + } + catch (\Exception $ex) { + $this->logger->error($ex->getMessage()); + return $build; + } + // Load all the nodes for apaths in the Catalog response. + $apaths = $offers->getAllApaths(); + try { + if ($nids = $this->lookup->nidsFromApaths($apaths)); + } + catch (ApathNotFoundException $ex) { + if (empty($nids)) { + return $build; + } + } + + // Add nodes for lookup later. + $this->nodes = $this->entityTypeManager->getStorage('node')->loadMultiple($nids); + + // Get the User's Currency + try { + $user_ip = $this->requestStack->getCurrentRequest()->getClientIp(); + $user_currency = $this->catalog->getUserCurrency($user_ip)->getData(); + if (empty($user_currency)) { + return $build; + } + } + catch (\Exception $ex) { + $this->logger->error($ex->getMessage()); + return $build; + } + + // Get apaths for products. + $product_apaths = $offers->getAllProductApaths(); + $pricing_items = $offers->getPricingItems(); + + // Loop through offers response. + foreach ($pricing_items as $pricing_item) { + $grouped_products = $this->groupProductsByType($pricing_item); + $types = array_keys($grouped_products); + $container_type = end($types); + + // Build pricing item list per type. + $pricing_item_products = []; + foreach ($grouped_products as $type => $products) { + $title = $this->buildPurchaseOffersTitle($type, $container_type); + $products_list = $this->buildPurchaseOffers($products, $user_currency, !empty($pricing_item_products) ? 'Or ' . lcfirst($title) : $title); + if (!empty($products_list)) { + $pricing_item_products[] = $products_list; + } + } + + // Add pricing item lists to render array. + if (!empty($pricing_item_products)) { + $build['#pricing_items'][] = $pricing_item_products; + } + } + + // Build child offers prompt text. + $child_offers_prompt = $this->buildChildOffersPrompt(); + if (!empty($child_offers_prompt)) { + $build['#purchase_children'] = $child_offers_prompt; + } + $build['#cache']['contexts'][] = 'user'; + return $build; + } + + /** + * {@inheritdoc} + */ + public function defaultConfiguration(): array { + return [ + 'list_titles' => [ + 'user_access_already' => 'You already have access to these :types:', + 'purchase_offers_current' => 'Get access to this :type:', + 'purchase_offers_container' => 'Get access to the entire :type:', + 'purchase_offers_default' => 'Get access to the :type:', + ], + 'child_offers_prompt' => [ + 'title' => 'Get access to individual :types:', + 'text' => 'Open :a :type to see its purchasing options.', + ], + ]; + } + + /** + * {@inheritdoc} + */ + public function blockForm($form, FormStateInterface $form_state): array { + $form = parent::blockForm($form, $form_state); + $form['list_titles'] = [ + '#type' => 'container', + '#tree' => TRUE, + '#suffix' => '

    Note: For the above titles, you may use ":type" and ":types" to represent the singular or plural label of the respective content type.


    ', + ]; + + $form['list_titles']['user_access_already'] = [ + '#type' => 'textfield', + '#title' => $this->t('Title for list of items user already has access to'), + '#description' => $this->t('Displayed when there are children the user has access to (e.g. list of chapters on book page).'), + '#default_value' => isset($this->configuration['list_titles']['user_access_already']) ? $this->configuration['list_titles']['user_access_already'] : '', + ]; + + $form['list_titles']['purchase_offers_current'] = [ + '#type' => 'textfield', + '#title' => $this->t('Title for purchase offers for currently viewed item'), + '#description' => $this->t('Displayed above list of purchase offers for the item being viewed.'), + '#default_value' => isset($this->configuration['list_titles']['purchase_offers_current']) ? $this->configuration['list_titles']['purchase_offers_current'] : '', + ]; + + $form['list_titles']['purchase_offers_container'] = [ + '#type' => 'textfield', + '#title' => $this->t('Title for purchase offers for the currently viewed item\'s root parent element'), + '#description' => $this->t('Displayed when there are purchase offers for the root parent element of the currently viewed item (e.g. the book on a chapter page, or the journal on an article page).'), + '#default_value' => isset($this->configuration['list_titles']['purchase_offers_container']) ? $this->configuration['list_titles']['purchase_offers_container'] : '', + ]; + + $form['list_titles']['purchase_offers_default'] = [ + '#type' => 'textfield', + '#title' => $this->t('Title for purchase offers for other items besides the current and root parent'), + '#description' => $this->t('Displayed when there are purchase offers for other items besides the currently viewed item or its root parent (e.g. issues on an article page).'), + '#default_value' => isset($this->configuration['list_titles']['purchase_offers_default']) ? $this->configuration['list_titles']['purchase_offers_default'] : '', + ]; + + $form['child_offers_prompt'] = [ + '#type' => 'container', + '#tree' => TRUE, + '#suffix' => '

    Note: For the above titles, you may use ":type" and ":types" to represent the singular or plural label of the respective content type.
    You can also use ":a" before the type token to dynamically change based on whether the type string starts with a vowel.


    ', + ]; + + $form['child_offers_prompt']['title'] = [ + '#type' => 'textfield', + '#title' => $this->t('Title of prompt to instruct users how to buy child content'), + '#description' => $this->t('Displayed when there are purchase offers for children of the currently viewed item (e.g. chapters on a book page).'), + '#default_value' => isset($this->configuration['child_offers_prompt']['title']) ? $this->configuration['child_offers_prompt']['title'] : '', + ]; + + $form['child_offers_prompt']['text'] = [ + '#type' => 'textfield', + '#title' => $this->t('Text of prompt to instruct users how to buy child content'), + '#description' => $this->t('Displayed when there are purchase offers for children of the currently viewed item (e.g. chapters on a book page).'), + '#default_value' => isset($this->configuration['child_offers_prompt']['text']) ? $this->configuration['child_offers_prompt']['text'] : '', + ]; + + // Add display mode options per node type. + $form['view_modes'] = [ + '#type' => 'container', + '#tree' => TRUE, + ]; + + // Try to filter the node types based on the selection criteria of a page variant. + $node_types = []; + $storage = $form_state->getStorage(); + if (!empty($storage['machine_name']) && strpos($storage['machine_name'], '--') !== FALSE) { + list($page_id, $page_variant_id) = explode('--', $storage['machine_name']); + try { + $page = $this->entityTypeManager->getStorage('page')->load($page_id); + $page_variant = $page->getVariant($page_variant_id); + $page_variant_config = $page_variant->getSelectionConditions()->getConfiguration(); + } + catch (\Exception $e) { + $page_variant_config = []; + } + + if (!empty($page_variant_config)) { + + // Look for the node type selection criteria. + foreach ($page_variant_config as $variant_config) { + if (in_array($variant_config['id'], ['entity_bundle:node', 'node_type']) && !empty($variant_config['bundles'])) { + $node_types = array_keys($variant_config['bundles']); + } + } + } + } + + // Only display types related to the node type selection criteria + // (i.e. books + book chunks, journals + journal chunks, refbooks + refbook chunks). + foreach ($node_types as $type) { + if (in_array($type, hwjma_core_get_book_chunk_types()) || $type == HW_NODE_TYPE_MONOGRAPH) { + $node_types = hwjma_core_get_book_chunk_types(); + $node_types[] = HW_NODE_TYPE_MONOGRAPH; + break; + } + + if (in_array($type, hwjma_core_get_book_chunk_types()) || $type == HW_NODE_TYPE_REPORT_GUIDELINE) { + $node_types = hwjma_core_get_book_chunk_types(); + $node_types[] = HW_NODE_TYPE_REPORT_GUIDELINE; + break; + } + + if (in_array($type, hwjma_core_get_journal_chunk_types()) || $type == HW_NODE_TYPE_JOURNAL) { + $node_types = hwjma_core_get_journal_chunk_types(); + $node_types[] = HW_NODE_TYPE_JOURNAL; + break; + } + + if ($type == HW_NODE_TYPE_TEST_REVIEW) { + $node_types[] = HW_NODE_TYPE_TEST_REVIEW; + break; + } + } + + // If we weren't able to find a panel page with a node type config, + // default to all highwire node types. + if (empty($node_types)) { + $node_types = $this->lookup->getHighWireContentTypes(); + } + foreach ($node_types as $node_type) { + $view_modes = ['' => t('None')]; + $view_modes += $this->entityDisplayRepository->getViewModeOptionsByBundle('node', $node_type); + $form['view_modes'][$node_type] = [ + '#type' => 'select', + '#title' => $this->t('View mode for bundle %bundle', ['%bundle' => $node_type]), + '#options' => $view_modes, + '#default_value' => !empty($this->configuration['view_modes'][$node_type]) ? $this->configuration['view_modes'][$node_type] : 'default', + ]; + } + + // Add Access Control Rule. + if ($this->moduleHandler->moduleExists('highwire_access_control')) { + $entities = $this->entityTypeManager->getStorage('access_control_rule')->getQuery() + ->execute(); + if (!empty($entities) && is_array($entities)) { + $access_options = []; + $access_options[''] = '--None--'; + foreach ($entities as $entity_id) { + $access_rule = $this->entityTypeManager->getStorage('access_control_rule')->load($entity_id); + $access_options[$entity_id] = $access_rule->get('label'); + } + $form['access_control_rule'] = [ + '#type' => 'select', + '#title' => t('Access Control Rule'), + '#options' => $access_options, + '#default_value' => !empty($this->configuration['access_control_rule']) ? $this->configuration['access_control_rule'] : '', + ]; + } + } + + return $form; + } + + /** + * {@inheritdoc} + */ + public function blockSubmit($form, FormStateInterface $form_state) { + parent::blockSubmit($form, $form_state); + foreach ($form_state->getValues() as $k => $v) { + $this->configuration[$k] = $v; + } + } + + /** + * Build product node display. + * + * @param \Drupal\node\Entity\Node $product_node + * The drupal node for the product. + * + * @return array + * Render array for the product node (as either a view mode or a link). + */ + public function getProductDisplay(Node $product_node): array { + $view_builder = $this->entityTypeManager->getViewBuilder('node'); + $node_type = $product_node->getType(); + $build = []; + + $view_mode = ''; + if (!empty($this->configuration['view_modes']) && !empty($this->configuration['view_modes'][$node_type])) { + $view_mode = $this->configuration['view_modes'][$node_type]; + } + if (!empty($view_mode)) { + $build = $view_builder->view($product_node, $view_mode); + } + else { + $product_link = $product_node->toLink(); + if ($product_link) { + $build = $product_link->toRenderable(); + } + } + return $build; + } + + /** + * Get the node for a product. + * + * @param \HighWire\Clients\Catalog\Product $product + * The product from the Catalog request. + * + * @return \Drupal\node\Entity\Node + * The Drupal node for the product. + */ + public function getProductNode(Product $product) { + $product_id = $product->getId(); + foreach ($this->nodes as $node) { + if ($node->apath->value == $product_id) { + return $node; + } + } + } + + /** + * Get the node by product id. + * + * @param string $id + * Id / apath for the node to be returned. + * + * @return \Drupal\node\Entity\Node + * A drupal node object. + */ + public function getProductNodeById(string $id) { + foreach ($this->nodes as $node) { + if ($node->apath->value == $id) { + return $node; + } + } + } + + /** + * Check whether the current user has access to a given node. + * + * @param Drupal\node\Entity\Node $node + * Node to check access for. + * + * @return bool + * TRUE if the current user has access to the given node, FALSE if not. + */ + public function userHasAccess(Node $node) { + if (!$this->moduleHandler->moduleExists('highwire_access_control') || empty($this->configuration['access_control_rule'])) { + return FALSE; + } + $access_rule = $this->entityTypeManager->getStorage('access_control_rule')->load($this->configuration['access_control_rule']); + if (empty($node->apath) || empty($access_rule)) { + return FALSE; + } + $apath = $node->apath->value; + + // Check user access. + if (empty($apath)) { + return FALSE; + } + $access_apaths = $access_rule->userHasAccess([$apath]); + return !empty($access_apaths[$apath]); + } + + /** + * Function to check user access for all children. + */ + protected function checkAccessChildren() { + if (!$this->showChildren() || !$this->moduleHandler->moduleExists('highwire_access_control') || empty($this->configuration['access_control_rule'])) { + return; + } + $access_rule = $this->entityTypeManager->getStorage('access_control_rule')->load($this->configuration['access_control_rule']); + if (empty($access_rule)) { + return; + } + + // Get children of current node. + $node = !empty($this->contextNode) ? $this->contextNode : $this->getContextValue('node'); + + //$child_apaths = $this->getChildApaths($node); + $apath = $node->get('apath')->value; + + // Check access and group apaths. + $user_access_children = $user_noaccess_children = []; + if (!empty($child_apaths)) { + $access_apaths = $access_rule->userHasAccess([$apath]); + foreach ($access_apaths as $apath => $has_access) { + if ($has_access) { + $user_access_children[$apath] = $apath; + $this->userAccess = TRUE; + } + else { + $user_noaccess_children[$apath] = $apath; + } + } + } + + // Store apaths for later. + $this->userAccessChildren = $user_access_children; + $this->userNoAccessChildren = $user_noaccess_children; + + // If the user has access to all the children, set access to true. + // if (count($child_apaths) !== 0 && count($child_apaths) == count($user_access_children)) { + // $this->userAccess = TRUE; + // } + } + + /** + * Get render array for list of children the current user already has access to. + * + * @return array + * Render array for an item_list of nodes. + */ + protected function buildUserAccessChildren(): array { + $build = []; + + // Check AC for items we have access for. + $user_access = $this->userAccessChildren; + $children_users_have = $this->getChildrenUserHasAccessDisplay($user_access); + if (!empty($children_users_have)) { + $access_items = []; + + // Split children up by content type + foreach ($children_users_have as $child) { + if (isset($child['#node'])) { + + // Group book entry content types. + if (in_array($child['#node']->getType(), ['item_front_matter', 'item_back_matter', 'item_chapter'])) { + $access_items['book_entry'][] = $child; + } + else { + $access_items[$child['#node']->getType()][] = $child; + } + } + } + $build = []; + $title_config = !empty($this->configuration['list_titles']) ? $this->configuration['list_titles'] : []; + foreach (array_keys($access_items) as $item_section) { + $title = ''; + if (!empty($title_config['user_access_already'])) { + $t_values = [':type' => $this->getTypeLabel($item_section), ':types' => $this->getTypeLabelPlural($item_section)]; + $title = $this->t($title_config['user_access_already'], $t_values); + } + + $build[] = [ + '#title' => $title, + '#theme' => 'item_list', + '#items' => $access_items[$item_section], + '#context' => ['list_style' => 'ecommerce_children'], + '#attributes' => ['class' => ['list-unstyled']], + ]; + } + } + return $build; + } + + /** + * Recursive function to check children access. + * + * @param \Drupal\node\Entity\Node $node + * The node to check children. + */ + protected function getChildApaths(Node $node) { + $cid = "hwjma_child_ac_paths:{$node->Id()}"; + $cache = $this->defaultCache->get($cid); + $cache = FALSE; + $results = []; + if (!empty($cache->data)) { + return $cache->data; + } + switch($node->getType()) { + case HW_NODE_TYPE_JOURNAL: + try { + $corpus = $node->get('corpus')->value; + $policy = $node->get('extract_policy')->value; + $search_query = '{ + "size": 5000, + "_source": ["apath"], + "query": { + "bool" : { + "should": [ + {"term": {"has-full-text": true}}, + {"term": {"has-full-text-pdf": true}} + ] + } + } + } + '; + $this->atomx->setIndexes([$policy . ":" . $corpus]); + $results = array_keys($this->atomx->search($search_query)); + $this->defaultCache->set($cid, $results); + return $results; + } + catch (\Exception $e) { + return []; + } + break; + + case HW_NODE_TYPE_ISSUE: + try { + $apath = $node->get('apath')->value; + $corpus = $node->get('corpus')->value; + $policy = $node->get('extract_policy')->value; + $search_query = '{ + "size": 5000, + "_source": ["_type"], + "query": { + "bool" : { + "must": [ + {"term": {"parent-issue": "'. $apath .'"}}, + {"bool": { + "should": [ + {"term": {"has-full-text": true}}, + {"term": {"has-full-text-pdf": true}} + ] + } + } + ] + } + } + } + '; + $this->atomx->setIndexes([$policy . ":" . $corpus]); + $results = array_keys($this->atomx->search($search_query)); + $this->defaultCache->set($cid, $results); + return $results; + } + catch (\Exception $e) { + return []; + } + break; + + default: + return []; + break; + } + + // $children = isset($node->children) && !$node->children->isEmpty() ? $node->children : []; + // if (!isset($node->children) || $node->children->isEmpty()) { + // return; + // } + // foreach ($node->children as $child) { + // $child_node = $child->entity; + // $process_children = FALSE; + + // // Books + // if ($child_node && isset($child_node->book_has_body) && !empty($child_node->book_has_body->value) && isset($child_node->apath)) { + // $process_children = TRUE; + // } + + // // Journal articles + // if ($child_node && isset($child_node->has_full_text) && (!empty($child_node->has_full_text->value) || !empty($child_node->has_full_text_pdf->value)) && isset($child_node->apath)) { + // $process_children = TRUE; + // } + + // // Journal + // if ($child_node->getType() == HW_NODE_TYPE_JOURNAL || $child_node->getType() == HW_NODE_TYPE_ISSUE) { + // $process_children = TRUE; + // } + + // if ($process_children) { + // $child_apath = $child_node->apath->value; + // if (!empty($child_apath) && !in_array($child_apath, $child_apaths)) { + // $child_apaths[] = $child_node->apath->value; + // } + // } + // $this->getChildApathsRecursive($child_node, $child_apaths); + // } + } + + /** + * Get the display for children the user has access to. + * + * @param array $user_access_apaths + * An array of apaths the user has access to. + * + * @return array + * Render array of node links. + */ + public function getChildrenUserHasAccessDisplay(array $user_access_apaths): array { + $access_nids = $this->lookup->nidsFromApaths($user_access_apaths); + $access_nodes = $this->entityTypeManager->getStorage('node')->loadMultiple($access_nids); + $view_builder = $this->entityTypeManager->getViewBuilder('node'); + $purchased_parents = []; + $access_items = []; + foreach ($access_nodes as $access_node) { + $access_node_type = $access_node->getType(); + + // Books + if (in_array($access_node_type, hwjma_core_get_book_chunk_types())) { + $access_items[] = $this->getProductDisplay($access_node); + } + + // Journals + if (in_array($access_node_type, hwjma_core_get_journal_chunk_types())) { + + // Journals and Journal issues. + if ($access_node_type == HW_NODE_TYPE_JOURNAL || $access_node_type == HW_NODE_TYPE_ISSUE) { + $purchased_parents[] = $access_node->apath->value; + } + + // Journal article chunks + if ($access_node->hasField('parent_issue')) { + if (!in_array($access_node->parent_issue->get(0)->apath, $purchased_parents)) { + $access_items[] = $this->getProductDisplay($access_node); + } + } + } + } + return $access_items; + } + + /** + * Get the display for a group of products. + * + * @param array $products + * Array of product objects. + * + * @param string $currency_code + * Three character currency code. + * + * @return array + * Render array. + */ + public function buildPurchaseOffers(array $products, string $currency_code, string $title = ''): array { + + // Build list item display. + $items = []; + foreach ($products as $product) { + $product_item = $this->buildPurchaseOffer($product, $currency_code); + if (!empty($product_item)) { + $items[] = $product_item; + } + } + if (empty($items)) { + return []; + } + + // Build list. + $build = [ + '#theme' => 'item_list', + '#title' => $title, + '#items' => $items, + '#attributes' => ['class' => ['list-unstyled']], + '#context' => ['list_style' => 'ecommerce_purchase_offers'], + ]; + return $build; + } + + /** + * Get render array for a purchase offer item. + * + * @param \HighWire\Clients\Catalog\Product $product + * The product to build render array for. + * @param string $currency_code + * Three character currency code. + * + * @return array + * A render array for a purchase offer item. + */ + public function buildPurchaseOffer(Product $product, string $currency_code): array { + $build = []; + $product_node = $this->getProductNode($product); + $purchase_options = $product->getPurchaseOptions(); + if (empty($product_node) || empty($purchase_options)) { + return $build; + } + + // Build product node display. + $product_display = $this->getProductDisplay($product_node); + + // Get additional product node vars for purchase link. + $product_node_vars = [ + 'image' => $this->getProductImage($product_node), + 'product_source' => html_entity_decode($this->getProductSource($product_node)), + 'title_suffix' => $this->getProductTitleSuffix($product_node), + ]; + + // Build purchase options display. + $purchase_options_build = []; + foreach ($purchase_options as $disposition => $purchase_option) { + if (empty($purchase_option)) { + continue; + } + foreach ($purchase_option as $interval => $prices) { + $price = !empty($prices[$currency_code]) ? $prices[$currency_code] : []; + if (empty($price)) { + continue; + } + + // Build purchase option. + $purchase_link = $this->buildPurchaseLink($product, $product_node, $price, $product_node_vars); + if (!empty($purchase_link)) { + $purchase_options_build[] = [ + '#theme' => 'hwjma_purchase_offer_item', + '#type' => $disposition, + '#duration' => $price->getInterval(IntervalFormatter::hours()) . ' hours', + '#purchase_link' => $purchase_link, + ]; + } + } + } + + if (!empty($product_display) && !empty($purchase_options_build)) { + $build = [ + '#theme' => 'hwjma_purchase_offer', + '#product' => $product_display, + '#purchase_offers' => $purchase_options_build, + ]; + } + return $build; + } + + /** + * Get render array for a purchase link. + * + * @param \HighWire\Clients\Catalog\Product $product + * The product to build purchase link render array for. + * @param \Drupal\node\Entity\Node $product_node + * Drupal node for the product. + * @param \HighWire\Clients\Catalog\Price $price + * The price to build purchase link render array for. + * @param array $add_query_params + * Any additional query paramters to add to the purcahse link. + * + * @return array + * A render array for a purchase link. + */ + public function buildPurchaseLink(Product $product, Node $product_node, Price $price, array $add_query_params = []): array { + $args = []; + + // Update Issue nodes with full journal issue title. + if ($product_node->getType() == HW_NODE_TYPE_ISSUE) { + if ($journal_title_field = $product_node->get('journal_title')->first()) { + $journal_title = $journal_title_field->getString() . ' | '; + } + else { + $journal_title = ''; + } + if ($vol_field = $product_node->get('volume')->first()) { + $vol = 'Volume ' . $vol_field->getString(); + } + else { + $vol = ''; + } + if ($issue_field = $product_node->get('issue')->first()) { + $issue = 'Issue ' . $issue_field->getString(); + } + else { + $issue = ''; + } + $product_node->setTitle($journal_title . $vol . ($vol && $issue ? ', ' : '') . $issue); + } + + // Exclude the apath query parameter from foxycart links for Journal subscriptions. + if ($product_node->getType() == HW_NODE_TYPE_JOURNAL && $price->getDisposition() == 'rental') { + $args['exclude_apath'] = TRUE; + } + + $purchase_link = $this->addToCartLink->getLink($product, $product_node, $price, $args); + if (empty($purchase_link)) { + return []; + } + + // Alter display of purchase link. + $purchase_link['#attributes']['class'][] = 'btn'; + $purchase_link['#attributes']['class'][] = 'btn-primary'; + $user_ip = $this->requestStack->getCurrentRequest()->getClientIp(); + $user_currency = $this->catalog->getUserCurrency($user_ip)->getData(); + $currencysymbol = $this->getCurrencySymbol($user_currency); + + //Check for dicount given + $discountdata = $this->addToCartLink->getDiscountFlag(); + $display_price = $price->getDisplayPrice(); + if (!empty($display_price)) { + if (!empty($discountdata)) { + $purchase_link['#title'] = $this->t('Add to cart (:symbol:discount) (:price)', + [':symbol' => $currencysymbol, + ':price' => $display_price, + ':discount' => $discountdata + ] + ); + $purchase_link['#attributes']['data-original-price'] = '(' . $currencysymbol . $discountdata . ')'; + $purchase_link['#attributes']['data-discounted-price'] = '(' . $display_price . ')'; + } + else { + $purchase_link['#title'] = $this->t('Add to cart (:price)', [':price' => $display_price]); + } + $purchase_link['#attributes']['data-purchase-text'] = $purchase_link['#title']; + } + + // Add extra query parameters. + if (!empty($add_query_params)) { + $purchase_link_query = $purchase_link['#url']->getOption('query'); + $sku = $product->getSku(); + foreach ($add_query_params as $k => $v) { + if (empty($v)) { + continue; + } + $purchase_link_query[$this->addToCartLink->getHmac($k, $v, $sku, $this->apikey)] = $v; + } + $purchase_link['#url']->setOption('query', $purchase_link_query); + $purchase_link['#attributes']['data-purchase-url'] = $purchase_link['#url']->toString(); + } + return $purchase_link; + } + + /** + * Get image for a given product node. + * + * @param \Drupal\node\Entity\Node $product_node + * The product node. + * + * @return string + * The url to the given product's image. + */ + public function getProductImage(Node $product_node): string { + $type = $product_node->getType(); + $img_url = ''; + if (in_array($type, hwjma_core_get_book_chunk_types())) { + $img_url = Url::fromUserInput('/themes/scolaris_hwjma/images/icon-chapter.png', ['absolute' => TRUE])->toString(); + } + elseif ($type == HW_NODE_TYPE_ARTICLE) { + // Get Parent Issue to fetch its image as article dont have its own + $parent_issue_id = $product_node->get('parent_issue')->getString(); + if (!empty($parent_issue_id)) { + $parent_issue_data = Node::load($parent_issue_id); + if (!empty($parent_issue_data) && $parent_issue_data->hasField('variant_cover_image') && !$parent_issue_data->get('variant_cover_image')->isEmpty()) { + $img_field = $parent_issue_data->variant_cover_image->first()->getValue(); + if (!empty($img_field['uri'])) { + $img_url = ImageStyle::load('cover_results_item')->buildUrl($img_field['uri']); + } + } + } + } + else { + $img_field = []; + switch ($type) { + case HW_NODE_TYPE_MONOGRAPH: + case HW_NODE_TYPE_REPORT_GUIDELINE: + case HW_NODE_TYPE_TEST_REVIEW: + if (!empty($product_node) && $product_node->hasField('cover_image') && !$product_node->get('cover_image')->isEmpty()) { + $img_field = $product_node->cover_image->first()->getValue(); + } + break; + + case HW_NODE_TYPE_JOURNAL: + case HW_NODE_TYPE_ISSUE: + if (!empty($product_node) && $product_node->hasField('variant_cover_image') && !$product_node->get('variant_cover_image')->isEmpty()) { + $img_field = $product_node->variant_cover_image->first()->getValue(); + } + break; + + } + if (!empty($img_field['uri'])) { + $img_url = ImageStyle::load('cover_results_item')->buildUrl($img_field['uri']); + } + } + return $img_url; + } + + /** + * Get source title for a given product node. + * + * @param \Drupal\node\Entity\Node $product_node + * The product node. + * + * @return string + * The title of the given product's source content. + */ + public function getProductSource(Node $product_node): string { + $type = $product_node->getType(); + $source = ''; + if ($type == HW_NODE_TYPE_MONOGRAPH || $type == HW_NODE_TYPE_REPORT_GUIDELINE || $type == HW_NODE_TYPE_JOURNAL || $type == HW_NODE_TYPE_TEST_REVIEW) { + return $source; + } + if (in_array($type, hwjma_core_get_book_chunk_types())) { + if ($product_node->hasField('parent_book') && !$product_node->get('parent_book')->isEmpty()) { + $source_node_data = $product_node->parent_book->first()->getValue(); + if (!empty($source_node_data['target_id']) && !empty($this->nodes[$source_node_data['target_id']])) { + $source_node = $this->nodes[$source_node_data['target_id']]; + $source = $source_node->getTitle(); + $title_suffix = $this->getProductTitleSuffix($source_node); + if (!empty($title_suffix)) { + $source .= ', ' . $title_suffix; + } + } + } + } + + // todo: refactor book and journal sources code. + if (in_array($type, hwjma_core_get_journal_chunk_types())) { + if ($product_node->hasField('parent-journal') && !$product_node->get('parent-journal')->isEmpty()) { + $source_node_data = $product_node->journal->first()->getValue(); + if (!empty($source_node_data['target_id']) && !empty($this->nodes[$source_node_data['target_id']])) { + $source_node = $this->nodes[$source_node_data['target_id']]; + $source = $source_node->getTitle(); + $title_suffix = $this->getProductTitleSuffix($source_node); + if (!empty($title_suffix)) { + $source .= ', ' . $title_suffix; + } + } + } + } + + // @TODO: Add support for issue & article types. + return $source; + } + + /** + * Get title suffix for a given product node. + * + * @param \Drupal\node\Entity\Node $product_node + * The product node. + * + * @return string + * The title suffix for the given product. + */ + public function getProductTitleSuffix(Node $product_node): string { + $type = $product_node->getType(); + $title_suffix = ''; + switch ($type) { + case HW_NODE_TYPE_MONOGRAPH: + case HW_NODE_TYPE_REPORT_GUIDELINE: + if ($product_node->hasField('edition') && !$product_node->get('edition')->isEmpty()) { + $edition = $product_node->get('edition')->getString(); + if (is_numeric($edition) && intval($edition) > 1) { + $ordinalFormatter = new \NumberFormatter("en-US", \NumberFormatter::ORDINAL); + $edition = $ordinalFormatter->format($edition); + $title_suffix = $this->t(':edition Edition', [':edition' => $edition]); + } + } + break; + } + return $title_suffix; + } + + /** + * Get product list title based on type and container type. + * + * @param string $type + * The type of product. + * @param string $container_type + * The product's root container product type. + * + * @return string + * Title for purchase offers list. + */ + public function buildPurchaseOffersTitle(string $type, string $container_type = ''): string { + $title = ''; + $display_node_type = ''; + $product_node_types = $this->getProductNodeTypes($type); + $title_config = !empty($this->configuration['list_titles']) ? $this->configuration['list_titles'] : []; + $node_type = !empty($this->contextNode) ? $this->contextNode->getType() : $this->getContextValue('node')->getType(); + if (in_array($node_type, $product_node_types)) { + + // Label for this content type. + $display_node_type = $node_type; + $title = !empty($title_config['purchase_offers_current']) ? $title_config['purchase_offers_current'] : ''; + } + else { + $display_node_type = reset($product_node_types); + if ($type == $container_type) { + + // Label for container type. + $title = !empty($title_config['purchase_offers_container']) ? $title_config['purchase_offers_container'] : ''; + } + else { + + // Label for parent type that is not the root container. + $title = !empty($title_config['purchase_offers_default']) ? $title_config['purchase_offers_default'] : ''; + } + } + $t_values = !empty($display_node_type) ? [':type' => $this->getTypeLabel($display_node_type), ':types' => $this->getTypeLabelPlural($display_node_type)] : []; + if (!empty($title)) { + $title = $this->t($title, $t_values); + } + return $title; + } + + /** + * Build child offer prompt display. + */ + public function buildChildOffersPrompt(): array { + $build = []; + $child_prompt_config = !empty($this->configuration['child_offers_prompt']) ? $this->configuration['child_offers_prompt'] : []; + if (empty($child_prompt_config) || (empty($child_prompt_config['title']) && empty($child_prompt_config['text']))) { + return $build; + } + $node_type = !empty($this->contextNode) ? $this->contextNode->getType() : $this->getContextValue('node')->getType(); + $child_types = $this->getChildTypes($node_type); + if (empty($child_types) || empty($this->userNoAccessChildren)) { + return $build; + } + + // Check if there are purchasable items the user doesn't already have access to. + try { + $offers_response = $this->catalog->getOffer($this->userNoAccessChildren); + $offers = $offers_response->getData(); + } + catch (\Exception $ex) { + return $build; + } + $child_offers = FALSE; + if (!empty($offers->getPricingItems())) { + foreach ($offers->getPricingItems() as $pricing_item) { + if (!empty($pricing_item->getProducts())) { + $child_offers = TRUE; + break; + } + } + } + if (!$child_offers) { + return $build; + } + + // Get string replacements. + $t_values = $child_type_labels = $child_type_labels_plural = []; + foreach ($child_types as $child_type) { + $child_type_labels[] = $this->getTypeLabel($child_type); + $child_type_labels_plural[] = $this->getTypeLabelPlural($child_type); + } + if (!empty($child_type_labels)) { + $t_values[':type'] = implode(' or ', $child_type_labels); + } + if (!empty($child_type_labels_plural)) { + $t_values[':types'] = implode(' or ', $child_type_labels_plural); + } + $starts_with_vowel = in_array(reset($t_values)[0], ['a', 'e', 'i', 'o', 'u']) ? TRUE : FALSE; + $t_values[':a'] = $starts_with_vowel ? 'an' : 'a'; + + // Build display. + $build['title'] = !empty($child_prompt_config['title']) ? $this->t($child_prompt_config['title'], $t_values) : ''; + $build['text'] = !empty($child_prompt_config['text']) ? $this->t($child_prompt_config['text'], $t_values) : ''; + return $build; + } + + /** + * Returns whether to show item children in access panel or not. + * + * @return boolean + */ + public function showChildren(): bool { + $node_type = !empty($this->contextNode) ? $this->contextNode->getType() : $this->getContextValue('node')->getType(); + switch ($node_type) { + case HW_NODE_TYPE_MONOGRAPH: + case HW_NODE_TYPE_REPORT_GUIDELINE: + case HW_NODE_TYPE_JOURNAL: + case HW_NODE_TYPE_ISSUE: + return TRUE; + default: + return FALSE; + } + } + + /** + * Get child content types based on a given node type. + * + * @param string $node_type + * Node type to get child types for. + * + * @return array + * An array of child node types. + */ + public function getChildTypes(string $node_type): array { + switch ($node_type) { + case HW_NODE_TYPE_MONOGRAPH: + case HW_NODE_TYPE_REPORT_GUIDELINE: + $chapter_types = hwjma_core_get_book_chunk_types(); + $types = [reset($chapter_types)]; + break; + + case HW_NODE_TYPE_ISSUE: + $types = [HW_NODE_TYPE_ARTICLE]; + break; + + case HW_NODE_TYPE_JOURNAL: + $types = [HW_NODE_TYPE_ISSUE, HW_NODE_TYPE_ARTICLE]; + break; + + default: + $types = []; + break; + + } + return $types; + } + + /** + * Get display label (singular) for a given node type. + * + * @param string $node_type + * Node type to get the display label for. + * + * @return string + * Display label for the given node type. + */ + public function getTypeLabel(string $node_type): string { + $label = ''; + if (in_array($node_type, hwjma_core_get_book_chunk_types())) { + $label = 'chapter'; + } + else { + switch ($node_type) { + case HW_NODE_TYPE_MONOGRAPH: + $label = 'monograph'; + break; + + case HW_NODE_TYPE_REPORT_GUIDELINE: + $label = 'report-guideline'; + break; + + case HW_NODE_TYPE_ISSUE: + $label = 'whole issue'; + break; + + case HW_NODE_TYPE_ARTICLE: + $label = 'article'; + break; + + case HW_NODE_TYPE_JOURNAL: + $label = 'journal'; + break; + + case HW_NODE_TYPE_TEST_REVIEW: + $label = 'test-review'; + break; + } + } + return $label; + } + + /** + * Get display label (plural) for a given node type. + * + * @param string $node_type + * Node type to get the display label for. + * + * @return string + * Display label for the given node type. + */ + public function getTypeLabelPlural(string $node_type): string { + $label = ''; + if (in_array($node_type, hwjma_core_get_book_chunk_types())) { + $label = 'chapters'; + } + else { + switch ($node_type) { + case HW_NODE_TYPE_MONOGRAPH: + $label = 'monographs'; + break; + + case HW_NODE_TYPE_REPORT_GUIDELINE: + $label = 'report-guidelines'; + break; + + case HW_NODE_TYPE_ISSUE: + $label = 'issues'; + break; + + case HW_NODE_TYPE_ARTICLE: + $label = 'articles'; + break; + + case HW_NODE_TYPE_JOURNAL: + $label = 'journals'; + break; + + case HW_NODE_TYPE_TEST_REVIEW: + $label = 'test-reviews'; + break; + + } + } + return $label; + } + + /** + * Given a purchase item type, get the corresponding node type(s). + * + * @string $product_type + * The product type as returned by the offers service. + * + * @return array + * An array of corresponding node type(s). + */ + public function getProductNodeTypes(string $product_type): array { + $type_map = [ + 'monograph' => [HW_NODE_TYPE_MONOGRAPH], + 'report-guideline' => [HW_NODE_TYPE_REPORT_GUIDELINE], + 'monograph-chapter' => hwjma_core_get_book_chunk_types(), + 'report-guideline-chapter' => hwjma_core_get_book_chunk_types(), + 'journal' => [HW_NODE_TYPE_JOURNAL], + 'issue' => [HW_NODE_TYPE_ISSUE], + 'article' => [HW_NODE_TYPE_ARTICLE], + 'test-review' => [HW_NODE_TYPE_TEST_REVIEW], + ]; + if (!empty($type_map[$product_type])) { + return $type_map[$product_type]; + } + + return []; + } + + /** + * Get products grouped by type for a given pricing item. + * + * @param \HighWire\Clients\Catalog\PricingItem $pricing_item + * The pricing item to get grouped products list for. + * + * @return array + * An array of product objects, keyed by content type. + */ + protected function groupProductsByType(PricingItem $pricing_item): array { + $node_type = $this->contextNode->getType(); + $chapter_type = $this->contextNode->get('chapter_type')->getString(); + $chapter_type_order = ($chapter_type == 'monograph-item-chapter') ? 'monograph' : 'report-guideline'; + $type_order_unit = ($chapter_type == 'monograph-item-chapter') ? 'monograph-chapter' : 'report-guideline-chapter'; + $type_order = []; + if (in_array($node_type, hwjma_core_get_book_chunk_types())) { + $type_order = [$type_order_unit, $chapter_type_order]; + } + else { + switch ($node_type) { + case HW_NODE_TYPE_MONOGRAPH: + $type_order = ['monograph']; + break; + + case HW_NODE_TYPE_REPORT_GUIDELINE: + $type_order = ['report-guideline']; + break; + + case HW_NODE_TYPE_JOURNAL: + $type_order = ['journal']; + break; + + case HW_NODE_TYPE_ISSUE: + $type_order = ['issue', 'journal']; + break; + + case HW_NODE_TYPE_ARTICLE: + $type_order = ['article', 'issue', 'journal']; + break; + + case HW_NODE_TYPE_TEST_REVIEW: + $type_order = ['test-review']; + break; + } + } + if (empty($type_order)) { + return []; + } + $products = []; + foreach ($type_order as $type) { + $products[$type] = $pricing_item->getProductByType($type); + } + return $products; + } + + /** + * Get products currency symbol. + * + */ + public function getCurrencySymbol($cur) { + if (!$cur) { + return false; + } + $currencies = array( + 'USD' => '$', // US Dollar + 'EUR' => '€', // Euro + 'CRC' => '₡', // Costa Rican Colón + 'GBP' => '£', // British Pound Sterling + 'ILS' => '₪', // Israeli New Sheqel + 'INR' => '₹', // Indian Rupee + 'JPY' => '¥', // Japanese Yen + 'KRW' => '₩', // South Korean Won + 'NGN' => '₦', // Nigerian Naira + ); + if (array_key_exists($cur, $currencies)) { + return $currencies[$cur]; + } + else { + return $cur; + } + } +} \ No newline at end of file diff --git a/web/modules/highwire/hwjma_ecommerce/templates/hwjma-access-panel.html.twig b/web/modules/highwire/hwjma_ecommerce/templates/hwjma-access-panel.html.twig new file mode 100644 index 000000000..6ed5eab8a --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/templates/hwjma-access-panel.html.twig @@ -0,0 +1,14 @@ +{% if not user_access %} + + {% block content %} + {{ user_access_already }} + {{ pricing_items }} + {% if purchase_children.title %} +

    {{ purchase_children.title }}

    + {% endif %} + {% if purchase_children.text %} +

    {{ purchase_children.text }}

    + {% endif %} + {% endblock %} +
    +{% endif %} \ No newline at end of file diff --git a/web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer-item.html.twig b/web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer-item.html.twig new file mode 100644 index 000000000..258bf6e06 --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer-item.html.twig @@ -0,0 +1,14 @@ +{% if label or purchase_link %} +
    + + {{ label }} +   + + + {{ info }} + +    + + {{ purchase_link }} +
    +{% endif %} \ No newline at end of file diff --git a/web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer.html.twig b/web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer.html.twig new file mode 100644 index 000000000..d2f5388fb --- /dev/null +++ b/web/modules/highwire/hwjma_ecommerce/templates/hwjma-purchase-offer.html.twig @@ -0,0 +1,12 @@ + + {% if product is not empty %} +
    {{ product }}
    + {% endif %} + {% if purchase_offers is not empty %} +
      + {% for purchase_offer in purchase_offers %} +
    • {{ purchase_offer }}
    • + {% endfor %} +
    + {% endif %} +
    \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index 3d4948d3d..cc5c08a37 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -321,4 +321,117 @@ function hwjma_preprocess_node(array &$variables) { ]; } } +} + + +/* + * Implements hook_preprocess_node(). +*/ +function hwjma_preprocess_node__journal_issue__content_details(&$variables) { + $node = $variables['node']; + + // code to get the download isue pdf button link. + $pdf_link = $node->get('enclosures')->getValue(); + if (basename($pdf_link[0]['uri']) == 'complete-issue.pdf') { + $download_pdf_links = file_create_url($pdf_link[0]['uri']); + } + + //set variable + $node_title = $variables['node']->getTitle(); + $volume = $node->get('volume')->getString(); + $date_ppub = $node->get('date_ppub')->getValue()[0]['value']; + $issue = $node->get('issue')->getString(); + $doi = $node->get('doi')->getString(); + $imagefield = $node->get('variant_cover_image')->getValue(); + $media_url = '/themes/highwire/hwjma_theme/dist/app-drupal/assets/images/250X350.png'; + $media_url_alt='Card Images'; + if (!empty($imagefield)) { + $img_alt = $node->variant_cover_image->alt; + $img_title = empty($img_alt) ? $node->variant_cover_image->title : $img_alt; + $fileid = $imagefield[0]['target_id']; + if (!empty($fileid)) { + $file = File::load($fileid); + if (!empty($file)) { + $path = $file->getFileUri(); + $media_url = file_create_url($path); + $media_url_alt = empty($img_title) ? 'Card Images' : $img_title; + } + } + } + + // get parent_journal value + $parent_journal = $node->get('parent_journal')->getValue(); + $parent_journal = $parent_journal[0]['target_id']; + if (!empty( $parent_journal)) { + $journal_node = Node::load($parent_journal); + $eissn = $journal_node->get('journal_eissn')->getString(); + $pissn = $journal_node->get('journal_pissn')->getString(); + $node_title = $journal_node->title->value; + if ($journal_node->hasField('children')) { + $children = !$journal_node->get('children')->isEmpty() ? $journal_node->get('children')->getValue() : ''; + } + // Get the total number of child volume for a Periodical + $num_of_children = count($children); + + // Get url of parent periodical + $options = ['absolute' => TRUE]; + $periodical_url_object = Url::fromRoute('entity.node.canonical', ['node' => $parent_journal], $options); + $periodical_url = $periodical_url_object->toString(); + } + $info_nodes = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['type' => 'journal_info', 'field_journal' => $parent_journal]); + if (!empty($info_nodes)) { + $journal_info = reset($info_nodes); + $journal_society = $journal_info->get('field_journal_society')->getString(); + if (!empty($journal_society)) { + $node_society = \Drupal::entityTypeManager()->getStorage('node')->load($journal_society); + $imagefield = $node_society->get('field_society_log')->getValue(); + if (!empty($imagefield)) { + $img_alt = $node_society->field_society_log->alt; + $img_title = $node_society->field_society_log->title; + $fileid = $imagefield[0]['target_id']; + if (!empty($fileid)) { + $journalissue_society_imgalt = !empty($img_title) ? $img_title : $img_alt; + $file = File::load($fileid); + if (!empty($file)) { + $path = $file->getFileUri(); + $societymedia_url = file_create_url($path); + $variables['society'] = ['src'=> $societymedia_url, + 'alt'=> $journalissue_society_imgalt, + 'title'=> $journalissue_society_imgalt, + 'class'=> 'article__top_left-card-img' + ]; + } + } + } + } + } + + // The Periodical that have only 1 volume should not display the volume numbers + if ($num_of_children == 1) { + $vol_issue = "Issue ".$issue; + } else { + $vol_issue = "Volume ".$volume.", Issue ".$issue; + } + + // creating variables for node template + $variables['node_title'] = $node_title; + $variables['download_pdf_links'] = $download_pdf_links; + $variables['Journalissue'] = [ + 'eissn'=> $eissn, + 'pissn'=> $pissn, + 'date_ppub'=> $date_ppub , + 'doi'=> $doi, + 'variant_coverimage01'=> $media_url, + 'variant_coverimage01_alt'=> $media_url_alt, + 'vol_issue' => $vol_issue, + 'periodical_url' => $periodical_url, + ]; + $variables['addtoany'] = $variables['elements']['addtoany']; + $variables['hw_marker_sign_up'] = $variables['elements']['hw_marker_sign_up']; + $variables['hw_alerts_sign_up'] = $variables['elements']['hw_alerts_sign_up']; + $variables['main_heading_with_link'] = [ + 'title' => $node_title, + 'href' => $periodical_url, + 'text' => $node_title, + ]; } \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig new file mode 100644 index 000000000..3bf6adc09 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig @@ -0,0 +1,141 @@ +{# + /** + * @file + * Theme override to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + Only "getter" methods (method names starting with "get", "has", or "is") + and a few common methods such as "id" and "label" are available. Calling + other methods (such as node.delete) will result in an exception. + * - label: The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: Themed creation date field. + * - author_name: Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * @ingroup templates + * + * @see template_preprocess_node() + * + * @todo Remove the id attribute (or make it a class), because if that gets + * rendered twice on a page this is invalid CSS for example: two lists + * in different view modes. + */ +#} + +
    +
    +
    + {% if Journalissue %} +
    + + {% include "@atoms/images/_image.twig" with { + image: { + href: Journalissue.periodical_url, + src: Journalissue.variant_coverimage01, + alt: Journalissue.variant_coverimage01_alt, + title:Journalissue.variant_coverimage01_alt + } + } only %} + +
    + {% endif %} +
    + {% include "@components/site/_journal-top-content.twig" with { + main_heading_link: { + level: 1, + class: 'article__title', + button: main_heading_with_link, + }, + suffix_title:[{ + text: Journalissue.vol_issue, + class: 'article__volume-detail' + }], + issue_list: [{ + label: 'Online ISSN', + value: Journalissue.eissn + }, { + label: 'Print ISSN', + value: Journalissue.pissn + }, { + label: 'Published', + value: (Journalissue.date_ppub|date('j F Y')) + }], + action_tools: [{ + title_withoutpopup: content.enclosures, + class: "action-favorites" + }, { + title_withoutpopup: hw_marker_sign_up, + class: 'action-favorites' + }, { + href: addtoany['#link_url'], + title: 'Share', + text: 'Share', + popupdata: addtoany, + class: 'action-share', + modelPopup: 'bps-share-popup' + }, { + title_withoutpopup: hw_alerts_sign_up, + class: 'action-alerts' + }] + } only %} +
    + {% if society %} + + {% endif %} +
    +
    +
    \ No newline at end of file From b879a663487aadd4caa8164613304fb57b3fd87a Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 13 Jul 2023 01:59:01 -0400 Subject: [PATCH 052/174] Add url alias and journal page configration --- config/sync/core.extension.yml | 1 + .../core.menu.static_menu_link_overrides.yml | 30 ++ ...trol.access_control_rule.online_access.yml | 19 ++ config/sync/highwire_content.settings.yml | 1 + .../sync/page_manager.page.all_journals.yml | 12 + ..._variant.all_journals-panels_variant-0.yml | 88 ++++++ config/sync/pathauto.pattern.hw_content.yml | 26 ++ config/sync/pathauto.settings.yml | 53 ++++ ...stem.action.pathauto_update_alias_node.yml | 16 ++ ...stem.action.pathauto_update_alias_user.yml | 16 ++ config/sync/views.view.all_journals.yml | 263 ++++++++++++++++++ .../highwire/hwjma_core/hwjma_core.module | 1 + .../hwjma_theme/includes/layout.theme.inc | 101 ++++++- .../hwjma_theme/includes/node.theme.inc | 123 +++++++- .../node--journal--browse-list-item.html.twig | 44 +++ 15 files changed, 792 insertions(+), 2 deletions(-) create mode 100644 config/sync/highwire_access_control.access_control_rule.online_access.yml create mode 100644 config/sync/page_manager.page.all_journals.yml create mode 100644 config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml create mode 100644 config/sync/pathauto.pattern.hw_content.yml create mode 100644 config/sync/pathauto.settings.yml create mode 100644 config/sync/system.action.pathauto_update_alias_node.yml create mode 100644 config/sync/system.action.pathauto_update_alias_user.yml create mode 100644 config/sync/views.view.all_journals.yml create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--browse-list-item.html.twig diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 7f3e6ff15..bb5a8289a 100755 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -114,6 +114,7 @@ module: update: 0 user: 0 views_ui: 0 + pathauto: 1 views: 10 freebird: 1000 theme: diff --git a/config/sync/core.menu.static_menu_link_overrides.yml b/config/sync/core.menu.static_menu_link_overrides.yml index 55dc4b6e8..d8ba3873a 100755 --- a/config/sync/core.menu.static_menu_link_overrides.yml +++ b/config/sync/core.menu.static_menu_link_overrides.yml @@ -5,5 +5,35 @@ definitions: parent: '' weight: 0 expanded: false + user__page: + enabled: false + menu_name: account + parent: '' + expanded: false + weight: -10 + openid_connect_sams_sigma__manage_access: + enabled: false + menu_name: account + parent: '' + expanded: false + weight: 1 + user__logout: + enabled: false + menu_name: account + parent: '' + weight: 10 + expanded: false + openid_connect_sams_sigma__logout: + menu_name: account + parent: '' + weight: 3 + expanded: false + enabled: true + openid_connect_sams_sigma__login: + menu_name: account + parent: '' + weight: 0 + expanded: false + enabled: true _core: default_config_hash: o4bYR9ZupWb3AsOIizTUG4g-nu1mdJqA59UB7QT-ifQ diff --git a/config/sync/highwire_access_control.access_control_rule.online_access.yml b/config/sync/highwire_access_control.access_control_rule.online_access.yml new file mode 100644 index 000000000..af8e61620 --- /dev/null +++ b/config/sync/highwire_access_control.access_control_rule.online_access.yml @@ -0,0 +1,19 @@ +uuid: c261168e-3323-4fe7-b721-730fb29c1f84 +langcode: en +status: true +dependencies: { } +id: online_access +label: 'Online access' +description: 'AC3 rule to look for "online" scope.' +rule_type: content +role: full-text +scope: online +target: variant +language: '' +content_type: '' +file_field: '' +file_field_bundles: { } +ac_denied_action: default +ac_denied_action_conf: { } +ac_denied_message: '' +concurrency_limit_message: '' diff --git a/config/sync/highwire_content.settings.yml b/config/sync/highwire_content.settings.yml index 63badcf4a..0abb68578 100755 --- a/config/sync/highwire_content.settings.yml +++ b/config/sync/highwire_content.settings.yml @@ -13,6 +13,7 @@ highwire_content_content_type_groupings: { } highwire_corpus_page_redirect: scolaris-journal: hwjma: '' + hwcmj: '' highwire_content_type_policy_field_mapping: journal: - diff --git a/config/sync/page_manager.page.all_journals.yml b/config/sync/page_manager.page.all_journals.yml new file mode 100644 index 000000000..b04c0e097 --- /dev/null +++ b/config/sync/page_manager.page.all_journals.yml @@ -0,0 +1,12 @@ +uuid: 62f10a87-fdaf-4199-aa67-23c327c1612d +langcode: en +status: true +dependencies: { } +id: all_journals +label: 'All Journals' +description: '' +use_admin_theme: false +path: /all-journals +access_logic: and +access_conditions: { } +parameters: { } diff --git a/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml b/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml new file mode 100644 index 000000000..59342bac9 --- /dev/null +++ b/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml @@ -0,0 +1,88 @@ +uuid: 3e70d181-b304-4aec-a20f-7190563b9ec4 +langcode: en +status: true +dependencies: + config: + - page_manager.page.all_journals + - system.menu.resources + - views.view.all_journals + content: + - 'block_content:basic:398ce8d1-2443-4eae-b710-5a3d9d25d57a' + module: + - block_content + - panels + - system + - views +id: all_journals-panels_variant-0 +label: Panels +variant: panels_variant +variant_settings: + blocks: + 44ab9af5-daac-47c2-ada3-825afa142a1e: + id: 'views_block:all_journals-block_1' + label: '' + provider: views + label_display: '0' + views_label: '' + items_per_page: none + region: right + weight: 1 + uuid: 44ab9af5-daac-47c2-ada3-825afa142a1e + context_mapping: { } + b5634ded-ba60-4769-874d-a4440c52b6bf: + id: 'block_content:398ce8d1-2443-4eae-b710-5a3d9d25d57a' + label: 'Journal Listing Page description' + provider: block_content + label_display: '0' + status: true + info: '' + view_mode: full + region: right + weight: 0 + uuid: b5634ded-ba60-4769-874d-a4440c52b6bf + context_mapping: { } + 21f809b7-f63f-42bb-81e5-76c1388757ae: + id: 'system_menu_block:resources' + label: Resources + provider: system + label_display: '0' + level: 1 + depth: 0 + expand_all_items: false + region: left + weight: 0 + uuid: 21f809b7-f63f-42bb-81e5-76c1388757ae + context_mapping: { } + id: panels_variant + uuid: 61c9b81f-6751-47d1-80ae-1fd3b914b194 + label: null + weight: 0 + layout: bs_2col + layout_settings: + label: '' + layout: + wrapper: div + classes: + row: row + add_layout_class: 1 + attributes: '' + regions: + left: + wrapper: div + classes: { } + add_region_classes: 1 + attributes: '' + right: + wrapper: div + classes: { } + add_region_classes: 1 + attributes: '' + page_title: 'All Journals' + storage_type: page_manager + storage_id: all_journals-panels_variant-0 + builder: standard +page: all_journals +weight: 0 +selection_criteria: { } +selection_logic: and +static_context: { } diff --git a/config/sync/pathauto.pattern.hw_content.yml b/config/sync/pathauto.pattern.hw_content.yml new file mode 100644 index 000000000..4523bb106 --- /dev/null +++ b/config/sync/pathauto.pattern.hw_content.yml @@ -0,0 +1,26 @@ +uuid: 7fc3a864-8600-40ba-8856-2be4065dd5c1 +langcode: en +status: true +dependencies: + module: + - node +id: hw_content +label: 'hw content' +type: 'canonical_entities:node' +pattern: '[node:cpath_long]' +selection_criteria: + 0fbf9831-e617-4a1c-8ea5-624a3671fce6: + id: node_type + bundles: + journal: journal + journal_article: journal_article + journal_fragment: journal_fragment + journal_issue: journal_issue + journal_volume: journal_volume + negate: false + context_mapping: + node: node + uuid: 0fbf9831-e617-4a1c-8ea5-624a3671fce6 +selection_logic: and +weight: -5 +relationships: { } diff --git a/config/sync/pathauto.settings.yml b/config/sync/pathauto.settings.yml new file mode 100644 index 000000000..eda0f6973 --- /dev/null +++ b/config/sync/pathauto.settings.yml @@ -0,0 +1,53 @@ +enabled_entity_types: + - user +punctuation: + double_quotes: 0 + quotes: 0 + backtick: 0 + comma: 0 + period: 0 + hyphen: 1 + underscore: 0 + colon: 0 + semicolon: 0 + pipe: 0 + left_curly: 0 + left_square: 0 + right_curly: 0 + right_square: 0 + plus: 0 + equal: 0 + asterisk: 0 + ampersand: 0 + percent: 0 + caret: 0 + dollar: 0 + hash: 0 + at: 0 + exclamation: 0 + tilde: 0 + left_parenthesis: 0 + right_parenthesis: 0 + question_mark: 0 + less_than: 0 + greater_than: 0 + slash: 2 + back_slash: 0 +verbose: false +separator: '-' +max_length: 100 +max_component_length: 100 +transliterate: true +reduce_ascii: false +case: true +ignore_words: 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with' +update_action: 2 +safe_tokens: + - alias + - path + - join-path + - login-url + - url + - url-brief +_core: + default_config_hash: SwvLp8snyPEExF41CaJJYdPUVomofLqtXvwciHc4cPg diff --git a/config/sync/system.action.pathauto_update_alias_node.yml b/config/sync/system.action.pathauto_update_alias_node.yml new file mode 100644 index 000000000..f6b7bcb79 --- /dev/null +++ b/config/sync/system.action.pathauto_update_alias_node.yml @@ -0,0 +1,16 @@ +uuid: 6895d809-8d5d-44ad-932f-972cc210b602 +langcode: en +status: true +dependencies: + enforced: + module: + - node + module: + - pathauto +_core: + default_config_hash: lno8QThS348UX-kaUsagJtCnuPHKLXYnTQiF_9HSDWA +id: pathauto_update_alias_node +label: 'Update URL alias' +type: node +plugin: pathauto_update_alias +configuration: { } diff --git a/config/sync/system.action.pathauto_update_alias_user.yml b/config/sync/system.action.pathauto_update_alias_user.yml new file mode 100644 index 000000000..3fe0723fc --- /dev/null +++ b/config/sync/system.action.pathauto_update_alias_user.yml @@ -0,0 +1,16 @@ +uuid: 55f32974-e333-4656-b23b-2810486f3118 +langcode: en +status: true +dependencies: + enforced: + module: + - user + module: + - pathauto +_core: + default_config_hash: x_ok_ZsfA4Xk4B_hVW3O4-3PcNoK57nXLz_Dlletidg +id: pathauto_update_alias_user +label: 'Update URL alias' +type: user +plugin: pathauto_update_alias +configuration: { } diff --git a/config/sync/views.view.all_journals.yml b/config/sync/views.view.all_journals.yml new file mode 100644 index 000000000..06c4872f6 --- /dev/null +++ b/config/sync/views.view.all_journals.yml @@ -0,0 +1,263 @@ +uuid: 1f26e5d7-81bf-4348-ada5-4483a3540754 +langcode: en +status: true +dependencies: + config: + - field.storage.node.corpus + - search_api.index.hwjma + module: + - search_api +id: all_journals +label: 'All Journals' +module: views +description: '' +tag: '' +base_table: search_api_index_hwjma +base_field: search_api_id +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: none + options: { } + cache: + type: tag + options: { } + query: + type: views_query + options: + bypass_access: false + skip_access: false + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: full + options: + items_per_page: 20 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: '‹ Previous' + next: 'Next ›' + first: '« First' + last: 'Last »' + quantity: 9 + style: + type: html_list + row: + type: search_api + options: + view_modes: + 'entity:node': + journal: browse_list_item + journal_article: default + journal_fragment: default + journal_info: default + journal_issue: default + journal_volume: default + fields: + corpus: + table: search_api_index_hwjma + field: corpus + id: corpus + entity_type: null + entity_field: null + plugin_id: search_api_field + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + filters: + type: + id: type + table: search_api_index_hwjma + field: type + relationship: none + group_type: group + admin_label: '' + operator: or + value: + journal: journal + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + plugin_id: search_api_options + status: + id: status + table: search_api_index_hwjma + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean + sorts: { } + title: 'All Journals' + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + use_ajax: true + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + tags: + - 'config:field.storage.node.corpus' + block_1: + display_plugin: block + id: block_1 + display_title: Block + position: 1 + display_options: + display_extenders: + simple_sitemap_display_extender: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + tags: + - 'config:field.storage.node.corpus' diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index 1c5a685bf..5414dbb44 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -321,6 +321,7 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView $current_issue = $entity->get('journal_current_issue'); if (!$current_issue->isEmpty()) { $current_issue_nid = $current_issue->getString(); + dd($current_issue_nid); $build['current_issue_link'] = [ '#type' => 'link', '#title' => t('Latest issue'), diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc index 27d1dddc3..b6eb12725 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc @@ -96,7 +96,7 @@ function hwjma_preprocess_page(&$variables) { /** * Implements hook_preprocess_region(); */ -function hwjma_preprocess_region(&$variables) { +/* function hwjma_preprocess_region(&$variables) { if (empty($variables['region'])) { return; } @@ -153,6 +153,94 @@ function hwjma_preprocess_region(&$variables) { break; } } +*/ + +function hwjma_preprocess_region(&$variables) { + if (empty($variables['region'])) { + return; + } + switch ($variables['region']) { + case 'header_nav': + case 'header_auth': + // Add variable and class to region if institutional access has been granted. + $inst_access = FALSE; + $datavis_settings = \Drupal::config('scolaris_hwjma_datavis.settings'); + $is_datavis = !empty($datavis_settings->get('datavis_page_route')) && \Drupal::routeMatch()->getRouteName() == $datavis_settings->get('datavis_page_route'); + if ($is_datavis && !empty($datavis_settings->get('datavis_content_identifiers'))) { + $sigma_extra_data = \Drupal::service('request_stack')->getCurrentRequest()->getSession()->get('sigma_extra_data'); + $key = implode('_', $datavis_settings->get('datavis_content_identifiers')); + $inst_access = !empty($sigma_extra_data['highwire_sams_sigma']['org_licensed_profiles'][$key]); + } else { + $inst_access = \Drupal::service('highwire_user.hw_user_manager')->isInstitutionalUser(); + } + if ($inst_access) { + $variables['attributes']['class'][] = 'is-inst-access'; + } + $variables['inst_access'] = $inst_access; + if ($variables['region'] == 'header_auth') { + // Build account menu. + $menu = hwjma_get_menu_render_array('account'); + $sigma_login_link = []; + $custom_message = ''; + // Add message text based on whether user is logged in as + // in individual and/or institutional user. + if (!$variables['logged_in']) { + $variables['attributes']['class'][] = 'menu--account'; + if (!empty($menu['#items']['openid_connect_sams_sigma.wayflesslogin'])) { + $sigma_login_link = &$menu['#items']['openid_connect_sams_sigma.wayflesslogin']; + } + if ($inst_access) { + $custom_message = t("You already have full content access to British Psychological Society through your institution. Some site functionality such as bookmarking and alerts require a personal account in addition to content access. To Sign In or Register for a personal account, select Log in via email/username."); + } else { + $custom_message = t("Registering for a Username and Password only provides access to certain functionality like bookmarking and alerts. It does NOT provide full content access. To see if your institution has a subscription to British Psychological Society, contact your librarian or check your library's database list for access instructions."); + $variables['content'] = array(); + $variables['content']['login_prompt'] = ['#theme' => $is_datavis ? 'hwjma_login_prompt__datavis' : 'hwjma_login_prompt', '#weight' => -1]; + } + } else { + if (!empty($menu['#items']['openid_connect_sams_sigma.manage_access'])) { + $sigma_login_link = &$menu['#items']['openid_connect_sams_sigma.manage_access']; + } + if ($inst_access) { + $custom_message = t("You currently have access to both British Psychological Society content and personal account features such as bookmarking and alerts."); + } else { + $custom_message = t("You are currently signed into an British Psychological Society personal account but do NOT have content access. Personal accounts only provide access to certain features such as bookmarking and alerts. To see if your institution has a subscription to AccessEngineering, contact your librarian or check your library's database list for access instructions."); + } + } + // Add message text to sigma login link. + if (!empty($sigma_login_link) && !empty($custom_message)) { + $link_query = $sigma_login_link['url']->getOption('query'); + //$link_query['custom_message'] = $custom_message; + $sigma_login_link['url']->setOption('query', $link_query); + } + // Add login link / account menu. + if (!$variables['logged_in'] && !empty($sigma_login_link)) { + $variables['content'] = array(); + $variables['content']['login'] = Link::fromTextAndUrl('', $sigma_login_link['url'])->toRenderable(); + $variables['content']['login']['#title'] = [ + ['#markup' => t('Log in')], + ]; + $variables['content']['login']['#attributes']['class'][] = 'dropdown-toggle user__icon'; + } else if ($variables['logged_in'] && !empty($menu['#items'])) { + $variables['content'] = array(); + $variables['content']['menu'] = $menu; + } + + // Add blocks. and Add shopping cart. + /* $block_manager = \Drupal::service('plugin.manager.block'); + $current_user = \Drupal::currentUser(); + $cart_block = $block_manager->createInstance('highwire_ecommerce_shopping_cart', []); + $cart_access = $cart_block->access($current_user); + if (!(is_object($cart_access) && $cart_access->isForbidden() || is_bool($cart_access) && !$cart_access)) { + $shopping_cart = $cart_block->build(); + $shopping_cart['#cache']['contexts'] = $cart_block->getCacheContexts(); + if (!empty($shopping_cart)) { + $variables['shopping_cart'] = $shopping_cart; + } + } */ + } + break; + } +} /** * Implements hook_menu_render_array(); @@ -283,4 +371,15 @@ function hwjma_preprocess_views_view_fields__issue_archive(&$variables) { $variables['issue_url'] = Url::fromRoute("entity.$entity_type_id[0].canonical", [$entity_type_id[0] => $entity_type_id[1]])->toString(); } } +} + +/* +* Implements hook_preprocess_THEME(). +*/ +function hwjma_preprocess_highwire_personalization_user_info(&$variables) { + $current_user = \Drupal::currentUser(); + $username = $current_user->getUsername(); + $useremail = $current_user->getEmail(); + $variables['name'] = ucfirst($username); + $variables['email'] = $useremail; } \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index cc5c08a37..d2ea2f732 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -434,4 +434,125 @@ function hwjma_preprocess_node__journal_issue__content_details(&$variables) { 'href' => $periodical_url, 'text' => $node_title, ]; -} \ No newline at end of file +} + +function hwjma_preprocess_node__journal__browse_list_item(&$variables) { + $node = $variables['node']; + $type = $node->getType(); + if ($type == 'journal') { + $info_nodes = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties([ + 'type' => 'journal_info', + 'field_journal' => $node->id(), + ]); + if (!empty($info_nodes)) { + $journal_info = reset($info_nodes); + $variables['journal_description'] = html_entity_decode(strip_tags($journal_info->get('field_journal_description' )->getvalue()[0]['value'])); + $variables['journal_editors'] = ($journal_info->get('field_journal_editors')->getvalue()[0]['value'] ) ; + } + } + $variables['journal'] = []; + $title = !$node->get('title')->isEmpty() ? $node->get('title')->getString() : ''; + $html_entity_decoded_title = html_entity_decode($title); + $variables['html_entity_decoded_title'] = $html_entity_decoded_title; + $variables['journal'] += hwjma_get_node_fields($variables, ['journal_current_issue' => 'coverimg']); + $variables['journal'] += hwjma_get_node_pseudo_fields($variables, ['editors' => 'editors', 'group_description' => 'description', 'group_action_tools' => 'actionTools']); + $variables['journal'] += hwjma_get_node_fields_as_string($variables, ['journal_pissn' => 'pissn', 'journal_eissn' => 'eissn']); + $current_issue_link = $variables['elements']['current_issue_link']; + $variables['current_issue_link'] = $current_issue_link; + // Add placeholder cover if current issue is missing. + if (empty($variables['journal']['coverimg']) && !empty($variables['cover_placeholder'])) { + $plain_title = strip_tags($variables['node']->getTitle()); + $variables['cover_placeholder']['#sr_text'] = t('Go to @title', ['@title' => $plain_title]); + $variables['journal']['coverimg'] = $variables['cover_placeholder']; + } + $cover_image = $variables['elements']['cover_image']['0']['#item']; + if ($cover_image != null) { + $image_tid = $cover_image->get('target_id')->getValue(); + if (!empty($image_tid)) { + $file = File::load($image_tid); + $path = $file->getFileUri(); + $cover_image_uri = file_create_url($path); + $image_alt = $cover_image->alt; + $image_title = $cover_image->title; + $image_width = '150'; + $image_height = '210'; + } else { + $cover_image_uri = '/themes/highwire/hwjma_theme/dist/app-drupal/assets/images/250X350.png'; + $image_alt = 'journal cover image'; + $image_title = 'journal cover image'; + $image_width = '150'; + $image_height = '210'; + } + $variables['cover_image_uri'] = $cover_image_uri; + $variables['cover_image_alt'] = $image_alt; + $variables['cover_image_title'] = $image_title; + $variables['cover_image_width'] = $image_width; + $variables['cover_image_height'] = $image_height; + } +} + +/** + * Helper function to get node fields for patternlab. + * + * @param Array $variables + * A variables array from a theme preprocess function. + * @param Array $fields + * An array of patternlab fields to return, keyed by the corresponding drupal field name. + * + * @return Array + * A render array + */ +function hwjma_get_node_fields($variables, $fields) { + $render = []; + if (empty($variables['node']) || empty($variables['content'])) { + return $render; + } + foreach ($fields as $drupal => $pl) { + if ($variables['node']->hasField($drupal) && !$variables['node']->get($drupal)->isEmpty() && !empty($variables['content'][$drupal])) { + $render[$pl] = $variables['content'][$drupal]; + } + } + return $render; +} + +function hwjma_get_node_pseudo_fields($variables, $fields) { + $render = []; + if (empty($variables['node']) || empty($variables['content'])) { + return $render; + } + foreach ($fields as $drupal => $pl) { + if (!empty($variables['content'][$drupal])) { + $render[$pl] = $variables['content'][$drupal]; + } + } + // Make group description toggle id to unique. + $hw_html_toggle_id = Html::getUniqueId('description--' . $variables['node']->id()); + $render['description']['#attributes']['id'] = $hw_html_toggle_id; + $render['actionTools']['group_description_toggle']['#attributes']['data-target'] = '#' . $hw_html_toggle_id; + $render['actionTools']['group_description_toggle']['#attributes']['aria-controls'] = $hw_html_toggle_id; + return $render; +} + +/** + * Helper function to get node fields as a string for patternlab. + * + * @param Array $variables + * A variables array from a theme preprocess function. + * @param Array $fields + * An array of patternlab fields to return, keyed by the corresponding drupal field name. + * + * @return Array + * An array of node field values keyed by field name. + */ +function hwjma_get_node_fields_as_string($variables, $fields) { + $return = []; + if (empty($variables['node'])) { + return $return; + } + foreach ($fields as $drupal => $pl) { + if ($variables['node']->hasField($drupal) && !$variables['node']->get($drupal)->isEmpty()) { + $return[$pl] = $variables['node']->get($drupal)->getString(); + } + } + return $return; +} diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--browse-list-item.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--browse-list-item.html.twig new file mode 100644 index 000000000..42fbf556b --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--browse-list-item.html.twig @@ -0,0 +1,44 @@ +{% include "@components/card/_card-lr-column.twig" with { + card_lr_column:[{ + left_col_width: 'article__card-image', + middle_col_width: 'article__card-content', + leftimage:{ + title: cover_image_title, + alt: cover_image_alt, + href: url, + src: cover_image_uri + }, + card_heading_link: [{ + anchorHead: { + level: 5, + class: "article__heading", + button: { + href: url, + text: html_entity_decoded_title + } + } + }], + card_description:[{ + paragraph:{ + class: 'article__authorname', + label:'Edited by: ', + text: journal_editors + } + }], + card_type_item:[{ + label:'ISSN', + value:journal.eissn, + card_status:'(online)' + }], + card_link:[{ + href: '#', + class:'article__btn show-click-toggle', + text:'Show description' + }, { + href: current_issue_link['#url'], + class:'article__btn-calender-icon', + text:'Current issue' + }], + card_toggle: journal_description + }] +} only %} \ No newline at end of file From 65525a55e2008c51c419c8e97e2f507a0c64db11 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 14 Jul 2023 07:30:36 -0400 Subject: [PATCH 053/174] Journal list page and menu link configration --- ..._display.node.journal.browse_list_item.yml | 9 +- ...w_display.node.journal.content_details.yml | 9 +- ..._variant.all_journals-panels_variant-0.yml | 6 +- config/sync/structure_sync.data.yml | 250 +++++++++--------- .../highwire/hwjma_core/hwjma_core.module | 9 +- .../node--journal--content-details.html.twig | 4 +- 6 files changed, 151 insertions(+), 136 deletions(-) diff --git a/config/sync/core.entity_view_display.node.journal.browse_list_item.yml b/config/sync/core.entity_view_display.node.journal.browse_list_item.yml index 27b1d9b3d..1255d2954 100644 --- a/config/sync/core.entity_view_display.node.journal.browse_list_item.yml +++ b/config/sync/core.entity_view_display.node.journal.browse_list_item.yml @@ -117,7 +117,7 @@ third_party_settings: group_description: children: { } parent_name: '' - weight: 2 + weight: 3 format_type: highwire_bootstrap_collapse format_settings: label: description @@ -136,7 +136,7 @@ third_party_settings: group_action_tools: children: { } parent_name: '' - weight: 3 + weight: 4 format_type: highwire_html_list format_settings: id: '' @@ -154,6 +154,11 @@ content: region: content settings: { } third_party_settings: { } + current_issue_link: + weight: 2 + region: content + settings: { } + third_party_settings: { } journal_current_issue: type: entity_reference_entity_view weight: 0 diff --git a/config/sync/core.entity_view_display.node.journal.content_details.yml b/config/sync/core.entity_view_display.node.journal.content_details.yml index cf14b7506..d305c42c1 100644 --- a/config/sync/core.entity_view_display.node.journal.content_details.yml +++ b/config/sync/core.entity_view_display.node.journal.content_details.yml @@ -122,7 +122,7 @@ third_party_settings: - group_share_popup - hw_marker_sign_up parent_name: '' - weight: 8 + weight: 9 format_type: highwire_html_list format_settings: id: '' @@ -171,6 +171,11 @@ content: region: content settings: { } third_party_settings: { } + current_issue_link: + weight: 7 + region: content + settings: { } + third_party_settings: { } custom_meta: type: double_field_unformatted_list weight: 3 @@ -199,7 +204,7 @@ content: settings: { } third_party_settings: { } editorial_brd: - weight: 7 + weight: 8 region: content settings: { } third_party_settings: { } diff --git a/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml b/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml index 59342bac9..bb264b40e 100644 --- a/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml @@ -31,9 +31,9 @@ variant_settings: context_mapping: { } b5634ded-ba60-4769-874d-a4440c52b6bf: id: 'block_content:398ce8d1-2443-4eae-b710-5a3d9d25d57a' - label: 'Journal Listing Page description' + label: Journals provider: block_content - label_display: '0' + label_display: visible status: true info: '' view_mode: full @@ -77,7 +77,7 @@ variant_settings: classes: { } add_region_classes: 1 attributes: '' - page_title: 'All Journals' + page_title: Journals storage_type: page_manager storage_id: all_journals-panels_variant-0 builder: standard diff --git a/config/sync/structure_sync.data.yml b/config/sync/structure_sync.data.yml index ba9299bb2..931dc89a7 100644 --- a/config/sync/structure_sync.data.yml +++ b/config/sync/structure_sync.data.yml @@ -1,115 +1,55 @@ menus: - - menu_name: main - title: Content - parent: null - uri: 'internal:/Content' - link_title: '' - description: null - enabled: true - expanded: false - weight: 0 - langcode: en - uuid: 9ff7d183-852f-4150-b74f-85dcd399a046 - - - menu_name: main - title: Information - parent: null - uri: 'internal:/Information' - link_title: '' - description: null - enabled: true - expanded: true - weight: 0 - langcode: en - uuid: 3c824e60-1612-4dc1-8118-caf24e982ff1 - - - menu_name: main - title: 'About us' + menu_name: browse-content + title: Journals parent: null - uri: 'internal:/about' + uri: 'internal:/all-journals' link_title: '' description: null enabled: true expanded: false - weight: 0 - langcode: en - uuid: 8a964f23-acf0-489a-9838-ed3de2ddc73e - - - menu_name: main - title: Members - parent: 'menu_link_content:3c824e60-1612-4dc1-8118-caf24e982ff1' - uri: 'entity:node/122' - link_title: null - description: null - enabled: true - expanded: false - weight: 0 - langcode: en - uuid: 84377d35-4118-4605-971a-d0d82db0ae44 - - - menu_name: main - title: Institutions - parent: 'menu_link_content:3c824e60-1612-4dc1-8118-caf24e982ff1' - uri: 'entity:node/123' - link_title: null - description: null - enabled: true - expanded: false - weight: 0 - langcode: en - uuid: f6e4eef2-4e39-4f5d-b9eb-619a34dbf773 - - - menu_name: main - title: Authors - parent: 'menu_link_content:3c824e60-1612-4dc1-8118-caf24e982ff1' - uri: 'entity:node/124' - link_title: null - description: null - enabled: true - expanded: false - weight: 0 + weight: -50 langcode: en - uuid: c91decb9-796d-4d43-9b3e-93c29bb86de7 + uuid: 14d49326-49f2-48a9-85f2-2ea335206c6d - - menu_name: legal - title: 'Privacy policy' + menu_name: browse-content + title: 'Reports & Guidelines' parent: null uri: 'internal:#' link_title: '' description: null enabled: true expanded: false - weight: 0 + weight: -49 langcode: en - uuid: 57f726c8-50b7-4ef1-a546-24244e63c0bd + uuid: 95917c2c-64f8-427a-b096-9816e420ff5b - - menu_name: legal - title: 'Cookie information' + menu_name: browse-content + title: Monographs parent: null uri: 'internal:#' link_title: '' description: null enabled: true expanded: false - weight: 0 + weight: -48 langcode: en - uuid: 885e1134-dbc2-42b8-8736-4a567f624d0b + uuid: 017fc05d-f49c-4d83-a270-4364d3a27d1c - - menu_name: legal - title: 'Terms of use' + menu_name: browse-content + title: 'Test Reviews' parent: null uri: 'internal:#' link_title: '' description: null enabled: true expanded: false - weight: 0 + weight: -47 langcode: en - uuid: 3ff29e19-a621-4be1-93c0-fb49c215b64b + uuid: 65183c40-768e-4875-adaf-c295dbfe361e - - menu_name: legal - title: Accessibility + menu_name: content + title: Periodicals parent: null uri: 'internal:#' link_title: '' @@ -118,10 +58,10 @@ menus: expanded: false weight: 0 langcode: en - uuid: 785c7f00-aac7-46d2-8ab7-0469e1055aab + uuid: 567e3c8f-db5d-443c-8cf8-07119eaef766 - - menu_name: resources - title: 'About us' + menu_name: content + title: 'Reports & Guidelines' parent: null uri: 'internal:#' link_title: '' @@ -130,10 +70,10 @@ menus: expanded: false weight: 0 langcode: en - uuid: d6a5379c-9739-4fad-90ec-66d0c1472bab + uuid: 2282fe32-5724-4828-9f12-b6068155c7db - - menu_name: resources - title: FAQs + menu_name: content + title: Monographs parent: null uri: 'internal:#' link_title: '' @@ -142,10 +82,10 @@ menus: expanded: false weight: 0 langcode: en - uuid: f58dc4da-5f14-40ef-88a0-66e1b6e92467 + uuid: 552e3ae8-45bf-4260-8614-384333863162 - - menu_name: resources - title: Permissions + menu_name: content + title: 'Test Reviews' parent: null uri: 'internal:#' link_title: '' @@ -154,7 +94,7 @@ menus: expanded: false weight: 0 langcode: en - uuid: e982997a-e259-40cf-b3d6-d922277819df + uuid: ca25c888-4991-4d70-8fd9-c23dda5516b5 - menu_name: information title: Members @@ -204,8 +144,8 @@ menus: langcode: en uuid: aa705013-4d6b-4220-a589-1e15f69e5fcc - - menu_name: content - title: Periodicals + menu_name: resources + title: 'About us' parent: null uri: 'internal:#' link_title: '' @@ -214,10 +154,10 @@ menus: expanded: false weight: 0 langcode: en - uuid: 567e3c8f-db5d-443c-8cf8-07119eaef766 + uuid: d6a5379c-9739-4fad-90ec-66d0c1472bab - - menu_name: content - title: 'Reports & Guidelines' + menu_name: resources + title: FAQs parent: null uri: 'internal:#' link_title: '' @@ -226,10 +166,10 @@ menus: expanded: false weight: 0 langcode: en - uuid: 2282fe32-5724-4828-9f12-b6068155c7db + uuid: f58dc4da-5f14-40ef-88a0-66e1b6e92467 - - menu_name: content - title: Monographs + menu_name: resources + title: Permissions parent: null uri: 'internal:#' link_title: '' @@ -238,10 +178,10 @@ menus: expanded: false weight: 0 langcode: en - uuid: 552e3ae8-45bf-4260-8614-384333863162 + uuid: e982997a-e259-40cf-b3d6-d922277819df - - menu_name: content - title: 'Test Reviews' + menu_name: legal + title: 'Privacy policy' parent: null uri: 'internal:#' link_title: '' @@ -250,82 +190,142 @@ menus: expanded: false weight: 0 langcode: en - uuid: ca25c888-4991-4d70-8fd9-c23dda5516b5 + uuid: 57f726c8-50b7-4ef1-a546-24244e63c0bd - - menu_name: browse-content - title: Periodicals + menu_name: legal + title: 'Cookie information' parent: null uri: 'internal:#' link_title: '' description: null enabled: true expanded: false - weight: -50 + weight: 0 langcode: en - uuid: 14d49326-49f2-48a9-85f2-2ea335206c6d + uuid: 885e1134-dbc2-42b8-8736-4a567f624d0b - - menu_name: browse-content - title: 'Reports & Guidelines' + menu_name: legal + title: 'Terms of use' parent: null uri: 'internal:#' link_title: '' description: null enabled: true expanded: false - weight: -49 + weight: 0 langcode: en - uuid: 95917c2c-64f8-427a-b096-9816e420ff5b + uuid: 3ff29e19-a621-4be1-93c0-fb49c215b64b - - menu_name: browse-content - title: Monographs + menu_name: legal + title: Accessibility parent: null uri: 'internal:#' link_title: '' description: null enabled: true expanded: false - weight: -48 + weight: 0 langcode: en - uuid: 017fc05d-f49c-4d83-a270-4364d3a27d1c + uuid: 785c7f00-aac7-46d2-8ab7-0469e1055aab - - menu_name: browse-content - title: 'Test Reviews' + menu_name: main + title: Content parent: null - uri: 'internal:#' + uri: 'internal:/Content' link_title: '' description: null enabled: true expanded: false - weight: -47 + weight: 0 langcode: en - uuid: 65183c40-768e-4875-adaf-c295dbfe361e + uuid: 9ff7d183-852f-4150-b74f-85dcd399a046 + - + menu_name: main + title: Information + parent: null + uri: 'internal:/Information' + link_title: '' + description: null + enabled: true + expanded: true + weight: 0 + langcode: en + uuid: 3c824e60-1612-4dc1-8118-caf24e982ff1 + - + menu_name: main + title: 'About us' + parent: null + uri: 'internal:/about' + link_title: '' + description: null + enabled: true + expanded: false + weight: 0 + langcode: en + uuid: 8a964f23-acf0-489a-9838-ed3de2ddc73e + - + menu_name: main + title: Members + parent: 'menu_link_content:3c824e60-1612-4dc1-8118-caf24e982ff1' + uri: 'entity:node/122' + link_title: null + description: null + enabled: true + expanded: false + weight: 0 + langcode: en + uuid: 84377d35-4118-4605-971a-d0d82db0ae44 + - + menu_name: main + title: Institutions + parent: 'menu_link_content:3c824e60-1612-4dc1-8118-caf24e982ff1' + uri: 'entity:node/123' + link_title: null + description: null + enabled: true + expanded: false + weight: 0 + langcode: en + uuid: f6e4eef2-4e39-4f5d-b9eb-619a34dbf773 + - + menu_name: main + title: Authors + parent: 'menu_link_content:3c824e60-1612-4dc1-8118-caf24e982ff1' + uri: 'entity:node/124' + link_title: null + description: null + enabled: true + expanded: false + weight: 0 + langcode: en + uuid: c91decb9-796d-4d43-9b3e-93c29bb86de7 blocks: - - info: Copyright + info: 'All Journals' langcode: en - uuid: 9431861c-4df0-4ea7-a951-a1917dbc1a8c + uuid: 398ce8d1-2443-4eae-b710-5a3d9d25d57a bundle: basic revision_id: null rev_id_current: null fields: body: - - value: "

    © 2023 - Demo Physical Therapy Journal

    \r\n" + value: "

    There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

    \r\n" summary: '' format: basic_html - - info: 'Footer Social icon' + info: Copyright langcode: en - uuid: 5e70a744-8b8a-4176-a1ff-a0cd3da8e401 + uuid: 9431861c-4df0-4ea7-a951-a1917dbc1a8c bundle: basic revision_id: null rev_id_current: null fields: body: - - value: "\r\n" + value: "

    © 2023 - Demo Physical Therapy Journal

    \r\n" summary: '' - format: full_html + format: basic_html - info: 'Footer branding svg' langcode: en diff --git a/web/modules/highwire/hwjma_core/hwjma_core.module b/web/modules/highwire/hwjma_core/hwjma_core.module index 5414dbb44..993813ff6 100755 --- a/web/modules/highwire/hwjma_core/hwjma_core.module +++ b/web/modules/highwire/hwjma_core/hwjma_core.module @@ -46,6 +46,12 @@ function hwjma_core_entity_extra_field_info() { 'weight' => 100, 'visible' => FALSE, ]; + $fields['node'][$node_type]['display']['current_issue_link'] = [ + 'label' => t('Current Issue'), + 'description' => t('Current Issue this journal.'), + 'weight' => 100, + 'visible' => FALSE, + ]; $fields['node'][$node_type]['display']['cover_image'] = [ 'label' => t('Cover Image'), 'description' => t('Cover Image of journal'), @@ -318,10 +324,9 @@ function hwjma_core_node_view(array &$build, EntityInterface $entity, EntityView if ($content_type == HW_NODE_TYPE_JOURNAL) { // Add current issue link. if ($display->getComponent('current_issue_link') && $entity->hasField('journal_current_issue')) { - $current_issue = $entity->get('journal_current_issue'); + $current_issue = $entity->get('journal_current_issue'); if (!$current_issue->isEmpty()) { $current_issue_nid = $current_issue->getString(); - dd($current_issue_nid); $build['current_issue_link'] = [ '#type' => 'link', '#title' => t('Latest issue'), diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig index 3a35261ea..9e21383a3 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal--content-details.html.twig @@ -124,8 +124,8 @@ text: 'Sample Issue' }, { href: current_issue_link['#url'], - title: 'Latest Issue', - text: 'Latest Issue' + title: 'Current Issue', + text: 'Current Issue' }] } only %}
    From fb0430164b0aaa2e211b33a6180eed64b5254e17 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 14 Jul 2023 08:10:08 -0400 Subject: [PATCH 054/174] Journal Page sidebar --- ..._variant.all_journals-panels_variant-0.yml | 10 ++-- .../hwjma_theme/includes/layout.theme.inc | 55 +++++++++++++++++++ .../includes/suggestions.theme.inc | 20 +++++++ 3 files changed, 80 insertions(+), 5 deletions(-) diff --git a/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml b/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml index bb264b40e..2a3f02bc3 100644 --- a/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.all_journals-panels_variant-0.yml @@ -4,7 +4,7 @@ status: true dependencies: config: - page_manager.page.all_journals - - system.menu.resources + - system.menu.main - views.view.all_journals content: - 'block_content:basic:398ce8d1-2443-4eae-b710-5a3d9d25d57a' @@ -41,9 +41,9 @@ variant_settings: weight: 0 uuid: b5634ded-ba60-4769-874d-a4440c52b6bf context_mapping: { } - 21f809b7-f63f-42bb-81e5-76c1388757ae: - id: 'system_menu_block:resources' - label: Resources + 858c3a20-c032-4d15-8d40-b7e696d30f20: + id: 'system_menu_block:main' + label: 'Main navigation' provider: system label_display: '0' level: 1 @@ -51,7 +51,7 @@ variant_settings: expand_all_items: false region: left weight: 0 - uuid: 21f809b7-f63f-42bb-81e5-76c1388757ae + uuid: 858c3a20-c032-4d15-8d40-b7e696d30f20 context_mapping: { } id: panels_variant uuid: 61c9b81f-6751-47d1-80ae-1fd3b914b194 diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc index b6eb12725..9e71ae35d 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/layout.theme.inc @@ -382,4 +382,59 @@ function hwjma_preprocess_highwire_personalization_user_info(&$variables) { $useremail = $current_user->getEmail(); $variables['name'] = ucfirst($username); $variables['email'] = $useremail; +} + +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_menu__sidebar(&$variables) { + if (empty($variables['items'])) { + return; + } + $current_path = \Drupal::service('path.current')->getPath(); + $result = \Drupal::service('path.alias_manager')->getAliasByPath($current_path); + $variables['current_path'] = $result; + $variables['affix_nav'] = TRUE; + $variables['show_menu'] = FALSE; + foreach ($variables['items'] as &$item) { + if (!empty($item['in_active_trail'])) { + // Only show sidebar menu when the current page is part of any link's active trail. + $variables['show_menu'] = TRUE; + // Check if link is active. + if ($item['url']->toString() == $variables['current_path']) { + $item['is_active'] = TRUE; + } + // Check 2 levels of children for active items. + if (!empty($item['below'])) { + foreach ($item['below'] as &$item2) { + if (!empty($item2['in_active_trail'])) { + if ($item2['url']->toString() == $variables['current_path']) { + $item2['is_active'] = TRUE; + } + if (!empty($item2['below'])) { + foreach ($item2['below'] as &$item3) { + if (!empty($item3['in_active_trail']) && $item3['url']->toString() == $variables['current_path']) { + $item3['is_active'] = TRUE; + } + } + } + } + } + } + } + } + if (!$variables['show_menu']) { + unset($variables['items']); + } +} + +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_menu__main__sidebar(&$variables) { + if (empty($variables['items'])) { + return; + } + // Add 'is_active' flag to active links. + hwjma_preprocess_menu__sidebar($variables); } \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc index d16240691..3bd999ec0 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/suggestions.theme.inc @@ -72,3 +72,23 @@ function hwjma_theme_suggestions_field_alter(array &$suggestions, array $variabl $suggestions[] = 'field__' . $element['#view_mode'] . '__' . $element['#field_name']; } +/** + * Implements hook_preprocess__THEME(). + */ +function hwjma_preprocess_block__system_menu_block__sidebar(&$variables) { + if (empty($variables['content']['#items']) || empty($variables['content']['#theme'])) { + return; + } + $variables['content']['#attributes']['data-menu-title'] = $variables['label']; + $variables['content']['#theme'] .= '__sidebar'; +} + +/** + * Implements hook_theme_suggestions_HOOK_alter(). + */ +function hwjma_theme_suggestions_menu_alter(array &$suggestions, array $variables) { + if (strpos($variables['theme_hook_original'], '__sidebar') !== FALSE) { + $suggestions[] = 'menu__sidebar'; + $suggestions[] = 'menu__' . $variables['menu_name'] . '__sidebar'; + } +} \ No newline at end of file From 30726136387beab129a5b4d2713e9d9424bbedc6 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 14 Jul 2023 08:12:20 -0400 Subject: [PATCH 055/174] Journal side menu export --- config/sync/structure_sync.data.yml | 168 +++++++++++++++------------- 1 file changed, 90 insertions(+), 78 deletions(-) diff --git a/config/sync/structure_sync.data.yml b/config/sync/structure_sync.data.yml index 931dc89a7..71deb6412 100644 --- a/config/sync/structure_sync.data.yml +++ b/config/sync/structure_sync.data.yml @@ -1,3 +1,83 @@ +blocks: + - + info: 'All Journals' + langcode: en + uuid: 398ce8d1-2443-4eae-b710-5a3d9d25d57a + bundle: basic + revision_id: null + rev_id_current: null + fields: + body: + - + value: "

    There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

    \r\n" + summary: '' + format: basic_html + - + info: Copyright + langcode: en + uuid: 9431861c-4df0-4ea7-a951-a1917dbc1a8c + bundle: basic + revision_id: null + rev_id_current: null + fields: + body: + - + value: "

    © 2023 - Demo Physical Therapy Journal

    \r\n" + summary: '' + format: basic_html + - + info: 'Footer branding svg' + langcode: en + uuid: 12ba5af4-b66d-433f-a62e-6188e249aaa4 + bundle: basic + revision_id: null + rev_id_current: null + fields: + body: + - + value: "

    \r\n\r\n

    \r\n" + summary: '' + format: full_html + - + info: 'Left Header logo' + langcode: en + uuid: 1db558ed-7814-4cc0-bef5-02b3fee925c5 + bundle: image_block + revision_id: null + rev_id_current: null + fields: + field_image: + - + target_id: '149' + alt: header_logo + title: '' + width: '351' + height: '103' + field_url: + - + uri: 'internal:/' + title: '' + options: { } + - + info: 'Right Header logo' + langcode: en + uuid: 0cd4b1ee-a6ea-4c05-b945-e37faa1e7032 + bundle: image_block + revision_id: null + rev_id_current: null + fields: + field_image: + - + target_id: '152' + alt: Logo + title: '' + width: '120' + height: '46' + field_url: + - + uri: 'internal:/' + title: '' + options: { } menus: - menu_name: browse-content @@ -299,83 +379,15 @@ menus: weight: 0 langcode: en uuid: c91decb9-796d-4d43-9b3e-93c29bb86de7 -blocks: - - - info: 'All Journals' - langcode: en - uuid: 398ce8d1-2443-4eae-b710-5a3d9d25d57a - bundle: basic - revision_id: null - rev_id_current: null - fields: - body: - - - value: "

    There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

    \r\n" - summary: '' - format: basic_html - - - info: Copyright - langcode: en - uuid: 9431861c-4df0-4ea7-a951-a1917dbc1a8c - bundle: basic - revision_id: null - rev_id_current: null - fields: - body: - - - value: "

    © 2023 - Demo Physical Therapy Journal

    \r\n" - summary: '' - format: basic_html - - info: 'Footer branding svg' - langcode: en - uuid: 12ba5af4-b66d-433f-a62e-6188e249aaa4 - bundle: basic - revision_id: null - rev_id_current: null - fields: - body: - - - value: "

    \r\n\r\n

    \r\n" - summary: '' - format: full_html - - - info: 'Left Header logo' - langcode: en - uuid: 1db558ed-7814-4cc0-bef5-02b3fee925c5 - bundle: image_block - revision_id: null - rev_id_current: null - fields: - field_image: - - - target_id: '149' - alt: header_logo - title: '' - width: '351' - height: '103' - field_url: - - - uri: 'internal:/' - title: '' - options: { } - - - info: 'Right Header logo' + menu_name: main + title: Journals + parent: 'menu_link_content:9ff7d183-852f-4150-b74f-85dcd399a046' + uri: 'internal:/all-journals' + link_title: '' + description: null + enabled: true + expanded: false + weight: 0 langcode: en - uuid: 0cd4b1ee-a6ea-4c05-b945-e37faa1e7032 - bundle: image_block - revision_id: null - rev_id_current: null - fields: - field_image: - - - target_id: '152' - alt: Logo - title: '' - width: '120' - height: '46' - field_url: - - - uri: 'internal:/' - title: '' - options: { } + uuid: c20357b9-20ab-4411-bbd2-07b28d84d077 From a9c7ea1a68949a25f0881a0ab6685d5874ecb5f8 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Tue, 18 Jul 2023 03:14:39 -0400 Subject: [PATCH 056/174] Changes All issue tab to archive and its layout update --- ....entity_view_display.node.journal.full.yml | 7 +- ...lay.node.journal_issue.issue_list_item.yml | 246 +++++++++++++++++ ....entity_view_mode.node.issue_list_item.yml | 10 + config/sync/search_api.index.hwjma.yml | 8 + config/sync/views.view.all_issues.yml | 248 ++++++------------ config/sync/views.view.latest_articles.yml | 20 +- .../hwjma_theme/includes/node.theme.inc | 8 + ...--journal-issue--issue-list-item.html.twig | 6 + 8 files changed, 383 insertions(+), 170 deletions(-) create mode 100644 config/sync/core.entity_view_display.node.journal_issue.issue_list_item.yml create mode 100644 config/sync/core.entity_view_mode.node.issue_list_item.yml create mode 100644 web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--issue-list-item.html.twig diff --git a/config/sync/core.entity_view_display.node.journal.full.yml b/config/sync/core.entity_view_display.node.journal.full.yml index 071bc7173..9cc006985 100644 --- a/config/sync/core.entity_view_display.node.journal.full.yml +++ b/config/sync/core.entity_view_display.node.journal.full.yml @@ -171,12 +171,12 @@ third_party_settings: weight: 2 format_type: highwire_tab format_settings: + label: Archive + description: '' id: issues classes: mainpanel - description: '' active: 0 - formatter: closed - label: 'All issues' + label: Archive region: content group_submit_an_article: children: @@ -286,6 +286,7 @@ hidden: corpus: true cover_date: true cover_image: true + current_issue_link: true custom_meta: true date_accepted: true date_epreprint: true diff --git a/config/sync/core.entity_view_display.node.journal_issue.issue_list_item.yml b/config/sync/core.entity_view_display.node.journal_issue.issue_list_item.yml new file mode 100644 index 000000000..0854932e3 --- /dev/null +++ b/config/sync/core.entity_view_display.node.journal_issue.issue_list_item.yml @@ -0,0 +1,246 @@ +uuid: 1dff0e8a-b591-4476-b45a-44289e026fb0 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.node.issue_list_item + - field.field.node.journal_issue.adjuncts + - field.field.node.journal_issue.apath + - field.field.node.journal_issue.article_open_access + - field.field.node.journal_issue.article_series_title + - field.field.node.journal_issue.article_type + - field.field.node.journal_issue.atom_type + - field.field.node.journal_issue.authors_full_name + - field.field.node.journal_issue.chapter_type + - field.field.node.journal_issue.children + - field.field.node.journal_issue.col_url + - field.field.node.journal_issue.contributors + - field.field.node.journal_issue.corpus + - field.field.node.journal_issue.cover_date + - field.field.node.journal_issue.custom_meta + - field.field.node.journal_issue.date_accepted + - field.field.node.journal_issue.date_epreprint + - field.field.node.journal_issue.date_epub + - field.field.node.journal_issue.date_epub_or_ppub + - field.field.node.journal_issue.date_epub_original + - field.field.node.journal_issue.date_epub_ppub + - field.field.node.journal_issue.date_epub_version + - field.field.node.journal_issue.date_ppub + - field.field.node.journal_issue.date_received + - field.field.node.journal_issue.date_released + - field.field.node.journal_issue.date_revision + - field.field.node.journal_issue.doi + - field.field.node.journal_issue.early_release + - field.field.node.journal_issue.elocation_id + - field.field.node.journal_issue.enclosures + - field.field.node.journal_issue.extract_policy + - field.field.node.journal_issue.final_published + - field.field.node.journal_issue.fpage + - field.field.node.journal_issue.georef_id + - field.field.node.journal_issue.has_abstract + - field.field.node.journal_issue.has_early_release + - field.field.node.journal_issue.has_figures + - field.field.node.journal_issue.has_figures_or_tables + - field.field.node.journal_issue.has_full_text + - field.field.node.journal_issue.has_full_text_pdf + - field.field.node.journal_issue.has_ref_links + - field.field.node.journal_issue.has_ref_stub + - field.field.node.journal_issue.has_source + - field.field.node.journal_issue.has_tables + - field.field.node.journal_issue.has_videos + - field.field.node.journal_issue.hwmd_table_of_contents_journals_ + - field.field.node.journal_issue.issue + - field.field.node.journal_issue.issue_id + - field.field.node.journal_issue.issue_is_open + - field.field.node.journal_issue.issue_page_range + - field.field.node.journal_issue.issue_supplemental + - field.field.node.journal_issue.issue_title + - field.field.node.journal_issue.issue_toc + - field.field.node.journal_issue.journal_abbrv_title + - field.field.node.journal_issue.journal_current_issue + - field.field.node.journal_issue.journal_eissn + - field.field.node.journal_issue.journal_eissn_compact + - field.field.node.journal_issue.journal_first_issue + - field.field.node.journal_issue.journal_pissn + - field.field.node.journal_issue.journal_pissn_compact + - field.field.node.journal_issue.journal_publisher + - field.field.node.journal_issue.journal_publisher_id + - field.field.node.journal_issue.journal_title + - field.field.node.journal_issue.keywords + - field.field.node.journal_issue.lpage + - field.field.node.journal_issue.member_network + - field.field.node.journal_issue.next_atom + - field.field.node.journal_issue.overline + - field.field.node.journal_issue.page_count + - field.field.node.journal_issue.parent + - field.field.node.journal_issue.parent_issue + - field.field.node.journal_issue.parent_journal + - field.field.node.journal_issue.parent_volume + - field.field.node.journal_issue.pdf_extract_img + - field.field.node.journal_issue.pisa_version + - field.field.node.journal_issue.prev_atom + - field.field.node.journal_issue.publisher_id + - field.field.node.journal_issue.publisher_unique_id + - field.field.node.journal_issue.pubmed_id + - field.field.node.journal_issue.related + - field.field.node.journal_issue.secondary + - field.field.node.journal_issue.sibling_order + - field.field.node.journal_issue.slug + - field.field.node.journal_issue.subtitle + - field.field.node.journal_issue.subtype + - field.field.node.journal_issue.summary + - field.field.node.journal_issue.title_plain + - field.field.node.journal_issue.title_short + - field.field.node.journal_issue.variant_cover_image + - field.field.node.journal_issue.variant_cover_pdf + - field.field.node.journal_issue.variant_cover_source_image + - field.field.node.journal_issue.variant_full_text_pdf + - field.field.node.journal_issue.variant_full_text_stamped_pdf + - field.field.node.journal_issue.variant_large_image + - field.field.node.journal_issue.variant_medium_image + - field.field.node.journal_issue.variant_small_image + - field.field.node.journal_issue.variant_table_of_contents_pdf + - field.field.node.journal_issue.version_current + - field.field.node.journal_issue.video_id + - field.field.node.journal_issue.volume + - node.type.journal_issue + module: + - datetime_range + - layout_builder + - text + - user +third_party_settings: + layout_builder: + allow_custom: false + enabled: false +id: node.journal_issue.issue_list_item +targetEntityType: node +bundle: journal_issue +mode: issue_list_item +content: + date_ppub: + type: daterange_default + weight: 1 + region: content + label: hidden + settings: + timezone_override: '' + format_type: html_year + separator: '-' + third_party_settings: { } + issue: + type: text_default + weight: 0 + region: content + label: hidden + settings: { } + third_party_settings: { } +hidden: + addtoany: true + adjuncts: true + apath: true + article_open_access: true + article_series_title: true + article_type: true + atom_type: true + authors_full_name: true + ccc_permissions_link: true + chapter_type: true + children: true + col_url: true + contributors: true + corpus: true + cover_date: true + custom_meta: true + date_accepted: true + date_epreprint: true + date_epub: true + date_epub_or_ppub: true + date_epub_original: true + date_epub_ppub: true + date_epub_version: true + date_received: true + date_released: true + date_revision: true + doi: true + early_release: true + elocation_id: true + enclosures: true + extract_policy: true + final_published: true + fpage: true + georef_id: true + has_abstract: true + has_early_release: true + has_figures: true + has_figures_or_tables: true + has_full_text: true + has_full_text_pdf: true + has_ref_links: true + has_ref_stub: true + has_source: true + has_tables: true + has_videos: true + highwire_citations_download: true + hw_alerts_sign_up: true + hw_marker_sign_up: true + hw_tag_sign_up: true + hwjma_focus_view: true + hwjma_toc_pager: true + hwmd_table_of_contents_journals_: true + issue_id: true + issue_is_open: true + issue_page_range: true + issue_supplemental: true + issue_title: true + issue_toc: true + journal_abbrv_title: true + journal_current_issue: true + journal_eissn: true + journal_eissn_compact: true + journal_first_issue: true + journal_pissn: true + journal_pissn_compact: true + journal_publisher: true + journal_publisher_id: true + journal_title: true + keywords: true + langcode: true + links: true + lpage: true + member_network: true + next_atom: true + overline: true + page_count: true + parent: true + parent_issue: true + parent_journal: true + parent_volume: true + pdf_extract_img: true + pisa_version: true + prev_atom: true + prev_next_pager: true + publisher_id: true + publisher_unique_id: true + pubmed_id: true + related: true + secondary: true + sibling_order: true + slug: true + subtitle: true + subtype: true + summary: true + title_plain: true + title_short: true + variant_cover_image: true + variant_cover_pdf: true + variant_cover_source_image: true + variant_full_text_pdf: true + variant_full_text_stamped_pdf: true + variant_large_image: true + variant_medium_image: true + variant_small_image: true + variant_table_of_contents_pdf: true + version_current: true + video_id: true + volume: true diff --git a/config/sync/core.entity_view_mode.node.issue_list_item.yml b/config/sync/core.entity_view_mode.node.issue_list_item.yml new file mode 100644 index 000000000..62be571eb --- /dev/null +++ b/config/sync/core.entity_view_mode.node.issue_list_item.yml @@ -0,0 +1,10 @@ +uuid: 5cd214e7-515f-4e18-bf41-05383bfac252 +langcode: en +status: true +dependencies: + module: + - node +id: node.issue_list_item +label: 'Issue List Item' +targetEntityType: node +cache: true diff --git a/config/sync/search_api.index.hwjma.yml b/config/sync/search_api.index.hwjma.yml index 7c0be2d1c..fae3b7bd5 100644 --- a/config/sync/search_api.index.hwjma.yml +++ b/config/sync/search_api.index.hwjma.yml @@ -50,6 +50,14 @@ field_settings: dependencies: config: - field.storage.node.corpus + date_ppub: + label: PPub + datasource_id: 'entity:node' + property_path: date_ppub + type: date + dependencies: + config: + - field.storage.node.date_ppub date_ppub_facet: label: 'Published Date (Facets)' datasource_id: 'entity:node' diff --git a/config/sync/views.view.all_issues.yml b/config/sync/views.view.all_issues.yml index 755382a71..338f3ceb9 100644 --- a/config/sync/views.view.all_issues.yml +++ b/config/sync/views.view.all_issues.yml @@ -4,13 +4,10 @@ status: true dependencies: config: - field.storage.node.date_ppub - - field.storage.node.issue - - field.storage.node.volume - search_api.index.hwjma module: - datetime_range - search_api - - text id: all_issues label: 'All Issues' module: views @@ -49,10 +46,15 @@ display: pager: type: full options: - items_per_page: 36 + items_per_page: 10 offset: 0 id: 0 total_pages: null + tags: + previous: '‹ Previous' + next: 'Next ›' + first: '« First' + last: 'Last »' expose: items_per_page: false items_per_page_label: 'Items per page' @@ -61,173 +63,30 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset - tags: - previous: '‹ Previous' - next: 'Next ›' - first: '« First' - last: 'Last »' quantity: 9 style: - type: html_list + type: default options: grouping: - - field: volume + field: date_ppub rendered: true - rendered_strip: true + rendered_strip: false row_class: '' default_row_class: true - type: ul - wrapper_class: item-list - class: 'list-unstyled issues-list list--no-space' + uses_fields: true row: - type: fields + type: search_api options: - default_field_elements: true - inline: { } - separator: '' - hide_empty: true + view_modes: + 'entity:node': + journal: default + journal_article: default + journal_fragment: default + journal_info: default + journal_issue: issue_list_item + journal_volume: default fields: - volume: - id: volume - table: search_api_datasource_hwjma_entity_node - field: volume - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: true - alter: - alter_text: true - text: 'Volume {{ volume }}' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: false - trim: false - preserve_tags: '' - html: false - element_type: '' - element_class: '' - element_label_type: '' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: text_default - settings: { } - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - field_rendering: true - fallback_handler: search_api - fallback_options: - link_to_item: false - use_highlighting: false - multi_type: separator - multi_separator: ', ' - entity_type: node - plugin_id: search_api_field - issue: - id: issue - table: search_api_datasource_hwjma_entity_node - field: issue - relationship: none - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: true - text: 'Issue {{ issue__value }}' - make_link: false - path: '' - absolute: false - external: false - replace_spaces: false - path_case: none - trim_whitespace: false - alt: '' - rel: '' - link_class: '' - prefix: '' - suffix: '' - target: '' - nl2br: false - max_length: 0 - word_boundary: true - ellipsis: true - more_link: false - more_link_text: '' - more_link_path: '' - strip_tags: true - trim: false - preserve_tags: '' - html: false - element_type: '0' - element_class: '' - element_label_type: '0' - element_label_class: '' - element_label_colon: false - element_wrapper_type: '0' - element_wrapper_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - click_sort_column: value - type: text_default - settings: { } - group_column: value - group_columns: { } - group_rows: true - delta_limit: 0 - delta_offset: 0 - delta_reversed: false - delta_first_last: false - multi_type: separator - separator: ', ' - field_api_classes: false - field_rendering: true - fallback_handler: search_api - fallback_options: - link_to_item: false - use_highlighting: false - multi_type: separator - multi_separator: ', ' - entity_type: node - plugin_id: search_api_field date_ppub: id: date_ppub table: search_api_datasource_hwjma_entity_node @@ -343,7 +202,57 @@ display: group_items: { } reduce_duplicates: false plugin_id: search_api_options + status: + id: status + table: search_api_index_hwjma + field: status + relationship: none + group_type: group + admin_label: '' + operator: '=' + value: '1' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: search_api_boolean sorts: + date_ppub: + id: date_ppub + table: search_api_index_hwjma + field: date_ppub + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + plugin_id: search_api volume: id: volume table: search_api_index_hwjma @@ -371,7 +280,20 @@ display: title: 'All Issues' header: { } footer: { } - empty: { } + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + empty: true + tokenize: false + content: + value: '

    No articles currently available.

    ' + format: basic_html + plugin_id: text relationships: { } arguments: corpus: @@ -416,8 +338,6 @@ display: - url.query_args tags: - 'config:field.storage.node.date_ppub' - - 'config:field.storage.node.issue' - - 'config:field.storage.node.volume' block_1: display_plugin: block id: block_1 @@ -435,5 +355,3 @@ display: - url.query_args tags: - 'config:field.storage.node.date_ppub' - - 'config:field.storage.node.issue' - - 'config:field.storage.node.volume' diff --git a/config/sync/views.view.latest_articles.yml b/config/sync/views.view.latest_articles.yml index 3a084ea65..35549f16c 100644 --- a/config/sync/views.view.latest_articles.yml +++ b/config/sync/views.view.latest_articles.yml @@ -3,8 +3,10 @@ langcode: en status: true dependencies: config: + - field.storage.node.date_ppub - search_api.index.hwjma module: + - datetime_range - search_api id: latest_articles label: 'Latest articles' @@ -64,8 +66,12 @@ display: options: view_modes: 'entity:node': + journal: default journal_article: toc_list + journal_fragment: default + journal_info: default journal_issue: default + journal_volume: default fields: search_api_id: table: search_api_index_hwjma @@ -118,6 +124,12 @@ display: hide_empty: false empty_zero: false hide_alter_empty: true + date_ppub: + id: date_ppub + table: search_api_datasource_hwjma_entity_node + field: date_ppub + entity_type: node + plugin_id: search_api_field filters: type: id: type @@ -240,9 +252,11 @@ display: cache_metadata: max-age: -1 contexts: + - 'languages:language_content' - 'languages:language_interface' - url - tags: { } + tags: + - 'config:field.storage.node.date_ppub' block_1: display_plugin: block id: block_1 @@ -254,6 +268,8 @@ display: cache_metadata: max-age: -1 contexts: + - 'languages:language_content' - 'languages:language_interface' - url - tags: { } + tags: + - 'config:field.storage.node.date_ppub' diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index d2ea2f732..76a6bcd72 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -556,3 +556,11 @@ function hwjma_get_node_fields_as_string($variables, $fields) { } return $return; } + +function hwjma_preprocess_node__journal_issue__issue_list_item(&$variables) { + $entity = $variables['node']; + // Use lookup to check if the issue has a cover date. + //$hwjma_lookup = \Drupal::service('hwjma_content_display.lookup'); + $cover_date = '';//$hwjma_lookup->getIssueCoverDate($entity); + $variables['cover_date'] = $cover_date; +} \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--issue-list-item.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--issue-list-item.html.twig new file mode 100644 index 000000000..49456f848 --- /dev/null +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--issue-list-item.html.twig @@ -0,0 +1,6 @@ +{% if node.issue.value %} + + : + Vol. {{ node.volume.value }}, Issue {{ node.issue.value }} + +{% endif %} \ No newline at end of file From 296f6989c4a75cea02615d7cc9b3a878a32b7a87 Mon Sep 17 00:00:00 2001 From: Rahul Chauhan Date: Wed, 19 Jul 2023 01:18:02 -0400 Subject: [PATCH 057/174] add metric tab --- ...view_display.node.journal_article.full.yml | 32 ++ config/sync/core.extension.yml | 1 + .../journal_article_detail.info.yml | 5 + .../journal_article_detail.libraries.yml | 16 + .../journal_article_detail.module | 141 ++++++++ .../journal_article_detail.routing.yml | 7 + .../journal_article_detail/js/highchartbar.js | 0 .../js/highwire_altmetrics.js | 51 +++ .../JournalArticleDetailController.php | 55 +++ .../src/Plugin/Block/Altmetrics.php | 98 ++++++ .../src/Plugin/Block/InfoMetricsTab.php | 128 +++++++ .../src/Plugin/Block/UsageStatsData.php | 323 ++++++++++++++++++ .../templates/hwjma-alt-metrics.html.twig | 0 .../hwjma-info-metrics-tab.html.twig | 29 ++ .../hwjma-usage-stats-data.html.twig | 7 + 15 files changed, 893 insertions(+) create mode 100644 web/modules/highwire/journal_article_detail/journal_article_detail.info.yml create mode 100644 web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml create mode 100644 web/modules/highwire/journal_article_detail/journal_article_detail.module create mode 100644 web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml create mode 100644 web/modules/highwire/journal_article_detail/js/highchartbar.js create mode 100644 web/modules/highwire/journal_article_detail/js/highwire_altmetrics.js create mode 100644 web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php create mode 100644 web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php create mode 100644 web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php create mode 100644 web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php create mode 100644 web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig create mode 100644 web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig create mode 100644 web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig diff --git a/config/sync/core.entity_view_display.node.journal_article.full.yml b/config/sync/core.entity_view_display.node.journal_article.full.yml index ce51c365a..b43deb781 100644 --- a/config/sync/core.entity_view_display.node.journal_article.full.yml +++ b/config/sync/core.entity_view_display.node.journal_article.full.yml @@ -159,6 +159,7 @@ third_party_settings: children: - group_article - group_figures_tables + - group_metrics parent_name: group_outer weight: 115 format_type: highwire_tabs @@ -217,21 +218,52 @@ third_party_settings: formatter: closed label: 'Figures & Tables' region: content + group_metrics: + children: + - hwjma_info_metrics_tab + - hwjma_altmetrics + - hwjma_usage_stats + parent_name: group_article_tabs + weight: 118 + format_type: highwire_tab + format_settings: + id: '' + classes: '' + description: '' + active: 0 + formatter: closed + label: Metrics + region: content id: node.journal_article.full targetEntityType: node bundle: journal_article mode: full content: + hwjma_altmetrics: + weight: 1 + region: content + settings: { } + third_party_settings: { } hwjma_focus_view: weight: 1 region: content settings: { } third_party_settings: { } + hwjma_info_metrics_tab: + weight: 0 + region: content + settings: { } + third_party_settings: { } hwjma_toc_pager: weight: 0 region: content settings: { } third_party_settings: { } + hwjma_usage_stats: + weight: 2 + region: content + settings: { } + third_party_settings: { } hwmd_abstract_article_: type: hwmarkup_display_formatter weight: 0 diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index bb5a8289a..fe63041db 100755 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -67,6 +67,7 @@ module: image: 0 imagemagick: 0 imce: 0 + journal_article_detail: 0 kint: 0 language: 0 layout_builder: 0 diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml new file mode 100644 index 000000000..adbf69502 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml @@ -0,0 +1,5 @@ +name: JOURNAL ARTICLE DETAIL +description: All article detail page functionality +package: 'JCOREX' +type: module +core: 8.x diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml new file mode 100644 index 000000000..60b2fff45 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml @@ -0,0 +1,16 @@ +altmetrics: + version: VERSION + js: + https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js: + { type: external, minified: true, attributes: { type: text/javascript } } +highchartjs: + version: VERSION + js: + https://code.highcharts.com/highcharts.js: + { type: external, attributes: { type: text/javascript } } + +usagestatsdata: + version: VERSION + js: + js/highchartbar.js: {} + diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module new file mode 100644 index 000000000..d51a4dfd0 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -0,0 +1,141 @@ +Id(); + if ($node_type == HW_NODE_TYPE_JOURNAL_ARTICLE) { + // JCOREX-101 Info and Metrics tab + $fields['node'][$node_type]['display']['hwjma_info_metrics_tab'] = [ + 'label' => t('Info & Metrics'), + 'description' => t('Info & Metrics tab'), + 'visible' => FALSE, + ]; + // Add Altmetrics. + $fields['node'][$node_type]['display']['hwjma_altmetrics'] = [ + 'label' => t('Altmetrics'), + 'description' => t('Show / altmetrics.'), + 'visible' => FALSE, + ]; + //Usage Stats + $fields['node'][$node_type]['display']['hwjma_usage_stats'] = [ + 'label' => t('HWJMA Usage Stats'), + 'description' => t('Usage Statistics Table'), + 'weight' => 100, + 'visible' => FALSE, + ]; + } + } + return $fields; +} + +/** +* Implements hook_ENTITY_TYPE_view(). +*/ +function journal_article_detail_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { + if (!HighWireContent::isHighWire($entity)) { + return; + } + $corpus = $entity->hasField('corpus') && !$entity->get('corpus')->isEmpty() ? $entity->get('corpus')->getString() : ''; + $content_type = $entity->bundle(); + if ($content_type == HW_NODE_TYPE_JOURNAL_ARTICLE) { + // Add Info & Metrics. + if ($display->getComponent('hwjma_info_metrics_tab')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_info_metrics_tab', []); + $plugin_block->setContextValue('node', $entity); + $render = $plugin_block->build(); + if (!empty($render)) { + $build['hwjma_info_metrics_tab'] = $render; + } + } + // Add the Altmetrics field + if ($display->getComponent('hwjma_altmetrics')) { + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_altmetrics', []); + $plugin_block->setContextValue('node', $entity); + $render = $plugin_block->build(); + if (!empty($render)) { + $build['hwjma_altmetrics'] = $render; + } + } + // Add the usage-stats pseudofield + if ($display->getComponent('hwjma_usage_stats')) { + $filter_tabs = 'ADD'; + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_usage_stats', [ + 'query_type' => 'monthly', + 'views' => ['abstract', 'full', 'pdf', 'total'], + 'date_format' => 'custom', + 'custom_date_format' => 'M Y', + 'limit' => '', + ]); + $plugin_block->setContextValue('node', $entity); + $render = $plugin_block->build(); + if (!empty($render)) { + $build['hwjma_usage_stats'] = $render; + } + /* $block['hwjma_usage_stats'] = [ + '#theme' => 'hwjma_usage_stats_data', + '#filter_tabs' => $filter_tabs, + '#usage_stats_data' => $render, + ]; + + $build['hwjma_usage_stats'] = [ + '#type' => 'fieldset', + '#attributes' => ['class' => ['usage-stats-container']], + 'usage_stats' => $plugin_block->build() + ];*/ + } + } +} + +/** + * Implements hook_theme(). + */ +function journal_article_detail_theme() { + return [ + 'hwjma_info_metrics_tab' => [ + 'variables' => ['journal_title' => NULL, 'authors_name' => NULL, + 'doi' => NULL, + 'doi_link' => NULL, + 'date_released' => NULL, + 'eissn' => NULL, + 'pissn' => NULL, + 'issue' => NULL, + 'volume' => NULL + ], + ], + 'hwjma_alt_metrics' => [ + 'variables' => ['altmetrics_data' => NULL], + ], + 'hwjma_usage_stats_data' => [ + 'variables' => ['filter_tabs' => NULL, 'usage_stats_data' => NULL] + ] + ]; +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml new file mode 100644 index 000000000..5314b127d --- /dev/null +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml @@ -0,0 +1,7 @@ +journal_article_detail.content: + path: '/journal_article_detail' + defaults: + _controller: '\Drupal\journal_article_detail\Controller\JournalArticleDetailController::content' + _title: 'Hello World' + requirements: + _permission: 'access content' \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/js/highchartbar.js b/web/modules/highwire/journal_article_detail/js/highchartbar.js new file mode 100644 index 000000000..e69de29bb diff --git a/web/modules/highwire/journal_article_detail/js/highwire_altmetrics.js b/web/modules/highwire/journal_article_detail/js/highwire_altmetrics.js new file mode 100644 index 000000000..540b0d387 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/js/highwire_altmetrics.js @@ -0,0 +1,51 @@ +/** + * @file + * + * Behaviors for the AltMetrics widget. + */ + +(function ($) { + Drupal.behaviors.HighWire_AltMetrics = { + attach: function (context, settings) { + + // Check MutationObserver has support for IE. + // If no support for IE, then load polyfill MutationObserver. + if (typeof Modernizr != "undefined" && !Modernizr.mutationobserver) { + if(typeof(Drupal.settings.MutationObserver) != "undefined" && Drupal.settings.MutationObserver !== null) { + var mutationObserverJs = Drupal.settings.MutationObserver.js; + // Using $.when to load polyfill before creating MutationObserver object. + $.when( $.getScript( mutationObserverJs ) ).done(function () { + mutationObserverDetect(); + }); + } + } + else { + mutationObserverDetect(); + } + + // Listen to DOM changes on the widget wrapper. The service is a single JS resource, which either fails or succeeds. + // The is no known way of detecting the success so we need this little trick to hide/show pane. + function mutationObserverDetect() { + var target = $('.altmetric-embed'); + var altmetricspane =$('.pane-highwire-altmetrics'); + var observer = new MutationObserver(function(mutations, observer) { + var self = this; + // Fired when a mutation occurs and the widget is present somewhere in the DOM. + if (target[0]) { + mutations.forEach(function(mutation) { + if (mutation.type == 'attributes') { + if (target.hasClass('altmetric-hidden')) { + // If no altmetrics widget returned, hide the pane, next panel-separator sibling and kill the connection. + altmetricspane.hide().next('.panel-separator').hide(); + self.disconnect(); + } + } + }); + } + }); + var config = {attributes: true, subtree: true}; + observer.observe(target[0], config); + } + } + } + })(jQuery); \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php new file mode 100644 index 000000000..fb5d83770 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php @@ -0,0 +1,55 @@ +isXmlHttpRequest()) { + throw new NotFoundHttpException(); + } + + $response = new AjaxResponse(); + + $type = \Drupal::request()->query->get('type'); + $nid = \Drupal::request()->query->get('nid'); + + $build = []; + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_usage_stats', [ + 'query_type' => $type, + 'views' => ['abstract', 'full', 'pdf', 'total'], + 'date_format' => 'custom', + 'custom_date_format' => 'M Y', + 'limit' => '', + ]); + $plugin_block->setContextValue('node', $nid); + $render = $plugin_block->build(); + if (!empty($render)) { + $build = $render; + } + + $Selector = '.ajax-wrapper'; //See: https://www.w3schools.com/cssref/css_selectors.asp + $content = '

    Changed !!!

    '; /*The content that will be replace the matched element(s), either a render array or an HTML string.*/ + $settings = ['my-setting' => 'setting',]; /*An array of JavaScript settings to be passed to any attached behaviors.*/ + $response->addCommand(new ReplaceCommand($Selector, $build, $settings)); + return $response; + } + +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php new file mode 100644 index 000000000..d72d77ee6 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php @@ -0,0 +1,98 @@ +routeMatch = $route_match; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('current_route_match') + ); + } + + /** + * {@inheritdoc} + */ + public function build() { + $build = []; + + try { + $node = $this->getContextValue('node'); + } + catch (\Exception $e) { + return $build; + } + // Get the node from context data. + $doi = $node->get('doi')->getString(); // dd($doi); + $altmetrics_data = '
    '; + //$aa = '
    '; + + $build = [ + '#theme' => 'hwjma_alt_metrics', + '#altmetrics_data' => $altmetrics_data + ]; + $build['#attached']['library'][] = 'journal_article_detail/altmetrics'; + + return $build; + } + +} diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php new file mode 100644 index 000000000..555664f17 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php @@ -0,0 +1,128 @@ +routeMatch = $route_match; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('current_route_match') + ); + } + + /** + * {@inheritdoc} + */ + public function build() { + $build = []; + + try { + $node = $this->getContextValue('node'); + } + catch (\Exception $e) { + return $build; + } + + // Journal author variables + $authors = $node->get('authors_full_name')->getValue(); + $author_names = []; + foreach ($authors as $key => $value) { + $author_names[$key] = $value['value']; + } + $authors_name = $author_names; + + // Journal description variables + $journal_doi = $node->get('doi')->getString(); + //New way to display DOI + if (!empty($journal_doi)) { + $doi_link = 'https://doi.org/' . $journal_doi; + } + $journal_title = $node->get('journal_title')->getValue()['0']['value']; + $eissn = $node->get('journal_eissn')->getString(); + $pissn = $node->get('journal_pissn')->getString(); + $issue = $node->get('issue')->getValue(); + $issue = $issue[0]['value']; + $volume = !$node->get('volume')->isEmpty() ? $node->get('volume')->getString() : ''; + $date_released = $node->get('date_epub_original')->getValue()['0']['original']; + + $build = [ + '#theme' => 'hwjma_info_metrics_tab', + '#journal_title' => $journal_title, + '#authors_name' => $authors_name, + '#doi' => $journal_doi, + '#doi_link' => $doi_link, + '#date_released' => $date_released, + '#eissn' => $eissn, + '#pissn' => $pissn, + '#issue' => $issue, + '#volume' => $volume + ]; + return $build; + } + +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php new file mode 100644 index 000000000..440f3ad9a --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php @@ -0,0 +1,323 @@ + 'Abstract', + 'full' => 'Full', + 'pdf' => 'PDF', + 'powerpoint' => 'PowerPoint', + 'total' => 'Total', + 'grand_total' => 'Grand Total' + ]; + + /** + * Constructs a new UsageStatsData object. + * + * @param array $configuration + * A configuration array containing information about the plugin instance. + * @param string $plugin_id + * The plugin_id for the plugin instance. + * @param string $plugin_definition + * The plugin implementation definition. + * @param \HighWire\Clients\UsageStats\UsageStats $usage_stats + * UsageStats service client. + * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter + * The date formatter service. + * @param \Drupal\Core\Entity\EntityStorageInterface $date_format_storage + * The date format storage. + */ + public function __construct( + array $configuration, + $plugin_id, + $plugin_definition, + UsageStats $usage_stats, + DateFormatterInterface $date_formatter, + EntityStorageInterface $date_format_storage + ) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->usageStats = $usage_stats; + $this->dateFormatter = $date_formatter; + $this->dateFormatStorage = $date_format_storage; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('hwphp.usage-stats'), + $container->get('date.formatter'), + $container->get('entity.manager')->getStorage('date_format') + ); + } + + /** + * {@inheritdoc} + */ + public static function defaultSettings() { + return [ + 'query_type' => 'monthly', + 'source' => 'highwire-pmc', + 'source_total' => 0, + 'views' => ['abstract', 'full', 'pdf', 'total'], + 'date_format' => 'medium', + 'custom_date_format' => '' + ] + parent::defaultSettings(); + } + + /** + * @inheritdoc + */ + public function blockForm($form, FormStateInterface $form_state) { + $form = parent::blockForm($form, $form_state); + $config = $this->getConfiguration(); + + $form['query_type'] = [ + '#type' => 'select', + '#required' => TRUE, + '#multiple' => FALSE, + '#title' => $this->t('Query Type'), + '#description' => $this->t('Display statistics monthly or daily?'), + '#options' => [ + 'monthly' => 'Monthly Summary', + 'daily' => 'Daily (limit one year)', + ], + '#default_value' => isset($config['query_type']) ? $config['query_type'] : 'monthly', + ]; + + $form['views'] = [ + '#type' => 'checkboxes', + '#required' => TRUE, + '#multiple' => TRUE, + '#title' => $this->t('Views'), + '#description' => $this->t('Display statistics for these views'), + '#options' => [ + 'abstract' => 'Abstract', + 'full' => 'Full Text', + 'pdf' => 'PDF', + 'powerpoint' => 'Powerpoint', + 'total' => 'Total', + ], + '#default_value' => isset($config['views']) ? $config['views'] : ['abstract', 'full', 'pdf', 'total'], + ]; + + $date_formats = []; + foreach ($this->dateFormatStorage->loadMultiple() as $machine_name => $value) { + $date_formats[$machine_name] = $this->t('@name format: @date', ['@name' => $value->label(), '@date' => $this->dateFormatter->format(REQUEST_TIME, $machine_name)]); + } + $date_formats['custom'] = $this->t('Custom'); + + $form['date_format'] = [ + '#type' => 'select', + '#title' => $this->t('Date format'), + '#options' => $date_formats, + '#default_value' => isset($config['date_format']) ? $config['date_format'] : 'medium', + ]; + + $form['custom_date_format'] = [ + '#type' => 'textfield', + '#title' => $this->t('Custom date format'), + '#description' => $this->t('See the documentation for PHP date formats.'), + '#default_value' => isset($config['custom_date_format']) ? $config['custom_date_format'] : '', + ]; + $form['custom_date_format']['#states'] = [ + 'visible' => [ + 'select[name="settings[date_format]"]' => ['value' => 'custom'] + ] + ]; + + $form['limit'] = [ + '#type' => 'numeric', + '#title' => $this->t('Limit'), + '#description' => $this->t('Limit to this number of rows'), + '#default_value' => isset($config['limit']) ? $config['limit'] : '', + ]; + + return $form; + } + + /** + * @inheritdoc + */ + public function blockSubmit($form, FormStateInterface $form_state) { + parent::blockSubmit($form, $form_state); + $values = $form_state->getValues(); + foreach (['query_type', 'source', 'source_total', 'views', 'date_format', 'custom_date_format'] as $option) { + if (is_array($values[$option])) { + $values[$option] = array_filter($values[$option]); + } + $this->configuration[$option] = $values[$option]; + } + } + + /** + * {@inheritdoc} + */ + public function build() { + $build = []; + + $node = $this->getContextValue('node'); + $config = $this->getConfiguration(); + + // Date format + if ($config['date_format'] == 'custom') { + $date_format = $config['custom_date_format']; + } + else { + $format_entity = $this->dateFormatStorage->load($config['date_format']); + $date_format = $format_entity->getPattern(); + } + + // Apath + //$apath = $node && $node->hasField('apath') && !$node->get('apath')->isEmpty() ? $node->get('apath')->first()->getString() : ''; + $apath = '/biorxiv/early/2017/03/15/117101.atom'; + if (empty($apath)) { + return $build; + } + + // Get usage Stats + $stats = []; + try { + if ($config['query_type'] == 'monthly') { + $stats = $this->usageStats->singleArticle($apath)->getData(); + } + if ($config['query_type'] == 'daily') { + $stats = $this->usageStats->singleArticleYear($apath)->getData(); + } + } + catch (\Exception $e) { + return $build; + } + if (empty($stats)) { + return $build; + } + + // Render table + $build['usage_stats_data'] = [ + '#type' => 'table', + '#caption' => $this->t('Article Usage Data'), + '#prefix' => '
    ', + '#suffix' => '
    ', + ]; + $build['usage_stats_data']['#header'] = [ + 'date' => 'Period', + ]; + foreach ($config['views'] as $view) { + $build['usage_stats_data']['#header'][$view] = $this->view_labels[$view]; + } + //dump($stats); + foreach ($stats as $i => $row) { + $build['usage_stats_data'][$i] = []; + + $date = $this->renderDate($date_format, $row['year'], $row['month'], $row['day'] ?? NULL); + $build['usage_stats_data'][$i]['date']['#markup'] = $date; + + $total = 0; + foreach ($config['views'] as $view) { + if (isset($row[$view])) { + $build['usage_stats_data'][$i][$view]['#markup'] = $row[$view]; + $total += $row[$view]; + } + } + if (in_array('total', $config['views'])) { + $build['usage_stats_data'][$i]['total']['#markup'] = $total; + } + } + + $build['#attached']['library'][] = 'journal_article_detail/usagestatsdata'; + // $build['#theme'] = 'hwjma_usage_stats_data'; + //dump($build); + return $build; + } + + /** + * Given a format, a year, month and optionally a day, render a date string. + * + * The format may be modified to remove non-applicable placeholders. + * + * @param string $date_format + * A date format. + * @param string $year + * The date year as a string. + * @param string $month + * The date month as an integer string. + * @param string|null $day + * The day of the month as an integer string. + * + * @return string + * The formatted date. + */ + protected function renderDate(string $date_format, string $year, string $month, $day = NULL): string { + // Best-effort fixing of date-formats. Proper formatting of dates without + // days or times may require a new or custom format to be defined. + + // Remove time elements, they are never applicable. + $date_format = strtr($date_format, ['a' => '', 'A' => '', 'B' => '', 'g' => '', 'G' => '', 'h' => '', 'H' => '', 'i' => '', 's' => '']); + + // If day is NULL, then strip out day elements from the date format. + if ($day === NULL) { + $date_format = strtr($date_format, ['d' => '', 'D' => '', 'j' => '', 'l' => '', 'N' => '', 'S' => '', 'z' => '', 'W' => '']); + } + $date_format = trim($date_format, ':/-, '); + + // Render the date + $date = new \DateTime(); + $date->setDate($year, $month, $day ?? 1); + return $date->format($date_format); + } + +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig new file mode 100644 index 000000000..e69de29bb diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig new file mode 100644 index 000000000..cf4006764 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig @@ -0,0 +1,29 @@ +
    +
    +

    Article Information

    +
    +

    + DOI: {{ doi }}
    + Journal Title: {{ journal_title }}
    + DOI Link: {{ doi_link }}
    + Issue: {{ issue }}
    + Volume: {{ volume }}
    + EPUB Date: {{ date_released }} +

    +
    +
    +
    +
    +

    Author Information

    +
    + {% if authors_name %} + {% for item in authors_name %} + {{ item }} + {% endfor %} + {% endif %} +
    +
    +
    +
    +Monthly +Daily \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig new file mode 100644 index 000000000..4b667318c --- /dev/null +++ b/web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig @@ -0,0 +1,7 @@ +
    +

    Usage statistics

    +
    Hello + {{ filter_tabs }} +
    {{ usage_stats_data }} +
    +
    \ No newline at end of file From 20404f3ab9d0dc772254439e849f9cd96cb45cce Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 21 Jul 2023 05:55:48 -0400 Subject: [PATCH 058/174] Journal article Latest article view mode change --- config/sync/addtoany.settings.yml | 14 +- ...y_view_display.node.journal_issue.full.yml | 9 +- config/sync/views.view.latest_articles.yml | 77 +++++++- .../hwjma_theme/includes/node.theme.inc | 70 +++++-- .../node--journal-article--toc-list.html.twig | 9 - ...--journal-issue--content-details.html.twig | 4 +- .../default/css/scss/_custom-style.scss | 176 ++++++++++++++++++ 7 files changed, 323 insertions(+), 36 deletions(-) diff --git a/config/sync/addtoany.settings.yml b/config/sync/addtoany.settings.yml index 4d5909afa..4d66f8540 100644 --- a/config/sync/addtoany.settings.yml +++ b/config/sync/addtoany.settings.yml @@ -1,8 +1,8 @@ buttons_size: 32 -additional_html: "\n\n\n" +additional_html: "\r\n\r\n\r\n" additional_css: '' additional_js: '' -universal_button: default +universal_button: none custom_universal_button: '' universal_button_placement: before no_3p: false @@ -10,5 +10,15 @@ entities: media: 1 node: 1 comment: 1 + block_content: 0 + contact_message: 0 + entity_subqueue: 0 + file: 0 + menu_link_content: 0 + path_alias: 0 + search_api_task: 0 + shortcut: 0 + taxonomy_term: 0 + user: 0 _core: default_config_hash: 9YPlBuinIKLe5jVEf-aIhZvKFn77i18yD4CrNR0BbVQ diff --git a/config/sync/core.entity_view_display.node.journal_issue.full.yml b/config/sync/core.entity_view_display.node.journal_issue.full.yml index 5c5521a2c..af2c046ca 100644 --- a/config/sync/core.entity_view_display.node.journal_issue.full.yml +++ b/config/sync/core.entity_view_display.node.journal_issue.full.yml @@ -121,15 +121,16 @@ third_party_settings: weight: 0 format_type: html_element format_settings: - id: '' - classes: '' + label: 'Table of Contents' element: div show_label: true label_element: h2 attributes: 'class="tab-content__main-heading latest-articles"' effect: none speed: fast - label: 'Articles in this issue' + id: '' + classes: '' + label: 'Table of Contents' region: content id: node.journal_issue.full targetEntityType: node @@ -140,7 +141,7 @@ content: type: hwmarkup_display_formatter weight: 0 region: content - label: above + label: hidden settings: { } third_party_settings: { } hidden: diff --git a/config/sync/views.view.latest_articles.yml b/config/sync/views.view.latest_articles.yml index 35549f16c..238e0d9c1 100644 --- a/config/sync/views.view.latest_articles.yml +++ b/config/sync/views.view.latest_articles.yml @@ -3,11 +3,13 @@ langcode: en status: true dependencies: config: + - field.storage.node.article_type - field.storage.node.date_ppub - search_api.index.hwjma module: - datetime_range - search_api + - text id: latest_articles label: 'Latest articles' module: views @@ -55,9 +57,10 @@ display: style: type: html_list options: + grouping: { } row_class: '' default_row_class: true - uses_fields: false + uses_fields: true type: ul wrapper_class: '' class: 'list-unstyled latest-articles' @@ -130,6 +133,76 @@ display: field: date_ppub entity_type: node plugin_id: search_api_field + article_type: + id: article_type + table: search_api_datasource_hwjma_entity_node + field: article_type + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + entity_type: node + plugin_id: search_api_field filters: type: id: type @@ -256,6 +329,7 @@ display: - 'languages:language_interface' - url tags: + - 'config:field.storage.node.article_type' - 'config:field.storage.node.date_ppub' block_1: display_plugin: block @@ -272,4 +346,5 @@ display: - 'languages:language_interface' - url tags: + - 'config:field.storage.node.article_type' - 'config:field.storage.node.date_ppub' diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index 76a6bcd72..281ddacb1 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -13,6 +13,7 @@ use Drupal\Node\NodeInterface; use Drupal\node\Entity\Node; use Drupal\file\Entity\File; use Drupal\highwire_content\HighWireContent; +use Drupal\Core\Datetime\DrupalDateTime; /** * @file @@ -75,7 +76,7 @@ function hwjma_preprocess_node__journal_article__content_details(array &$variabl /** * Implements hook_preprocess_node(). */ -function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { +function hwjma_preprocess_node__journal_article__toc_list(array &$variables) { // Default to turning off byline/submitted. $variables['display_submitted'] = FALSE; $node = $variables['node']; @@ -86,13 +87,23 @@ function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { $issue_number = !$node->get('issue')->isEmpty() ? $node->get('issue')->getString() : ''; $first_page = !$node->get('fpage')->isEmpty() ? $node->get('fpage')->getString() : ''; $last_page = !$node->get('lpage')->isEmpty() ? $node->get('lpage')->getString() : ''; - $journal_article_citation = $journal_title . ' ' . $volume . '(' . $issue_number . '): ' . $first_page . '-' . $last_page; + $doi = !$node->get('doi')->isEmpty() ? 'https://doi.org/' .$node->get('doi')->getString() : ''; + if (!empty($node->date_ppub->getValue())) { + $date_published = $node->date_ppub->getValue()[0]['original']; + } + else { + $date_published = $node->date_epub_version->getValue()[0]['original']; + } + $date_time = new \DateTime($date_published); + $drupal_date_time = DrupalDateTime::createFromDateTime($date_time); + $pub_date = $drupal_date_time->format('M d, Y'); + $journal_article_citation = $journal_title .' '. $pub_date.' ' . $volume . '(' . $issue_number . '): ' . $first_page . '-' . $last_page.'; DOI: '.$doi; $node_journal = \Drupal::routeMatch()->getParameter('node'); if (!empty($node_journal)) { if ($node_journal->hasField('children') && $node_journal->bundle() == "journal") { $children = !$node_journal->get('children')->isEmpty() ? $node_journal->get('children')->getValue() : ''; if (isset($children) && count($children) == 1) { - $journal_article_citation = $journal_title . ' ' . $issue_number . ': ' . $first_page . '-' . $last_page; + $journal_article_citation = $journal_title .' '. $pub_date. ' ' . $issue_number . ': ' . $first_page . '-' . $last_page.'; DOI: '.$doi; } } elseif ($node_journal->bundle() == "journal_issue") { @@ -104,7 +115,7 @@ function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { $children = !$node_issue->get('children')->isEmpty() ? $node_issue->get('children')->getValue() : ''; // Get the total number of child volume for a Periodical if (isset($children) && count($children) == 1) { - $journal_article_citation = $journal_title . ' ' . $issue_number . ': ' . $first_page . '-' . $last_page; + $journal_article_citation = $journal_title .' '. $pub_date. ' ' . $issue_number . ': ' . $first_page . '-' . $last_page.'; DOI: '.$doi; } } } @@ -120,7 +131,7 @@ function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { $children = !$node_issue->get('children')->isEmpty() ? $node_issue->get('children')->getValue() : ''; // Get the total number of child volume for a Periodical if (isset($children) && count($children) == 1) { - $journal_article_citation = $journal_title . ' ' . $issue_number . ': ' . $first_page . '-' . $last_page; + $journal_article_citation = $journal_title .' '. $pub_date.' ' . $issue_number . ': ' . $first_page . '-' . $last_page.'; DOI: '.$doi; } } } @@ -149,10 +160,8 @@ function hwjma_preprocess_node__journal_article__toc_list_(array &$variables) { $variables['content']['article_abstract'] = $abstract_markup; } - // Fetching view content links according to pattern lab array - $view_content_link = $variables['content']['view_content_link']; - $view_content_link_url = $view_content_link['#url']; - array_push($action_links, ['href' => $view_content_link_url->toString(),'class' => 'article-section__view-article-btn','text' => $view_content_link['#title']]); + $view_content_link_url = \Drupal::service('path_alias.manager')->getAliasByPath('/node/'.$node->id());; + array_push($action_links, ['href' => $view_content_link_url,'class' => 'article-section__view-article-btn','text' => 'View Article']); if (!empty($variables['elements']['variant_full_text_pdf']['#items']) && count($variables['elements']['variant_full_text_pdf']['#items']) > 0) { $variant_full_text_pdf = $variables['elements']['variant_full_text_pdf']['#items']->getValue('uri'); } else { @@ -406,13 +415,27 @@ function hwjma_preprocess_node__journal_issue__content_details(&$variables) { } } - // The Periodical that have only 1 volume should not display the volume numbers - if ($num_of_children == 1) { - $vol_issue = "Issue ".$issue; - } else { - $vol_issue = "Volume ".$volume.", Issue ".$issue; + $custom_datetime = ''; + if(!empty($date_ppub)){ + $date_time = new \DateTime($date_ppub); + $drupal_date_time = DrupalDateTime::createFromDateTime($date_time); + $custom_datetime = $drupal_date_time->format('F, Y'); } + if (!$node->hasField('custom_meta') || $node->get('custom_meta')->isEmpty()) { + $custom_meta_items = $node->get('custom_meta')->getValue(); + + // Get the custom meta value by name. + foreach ($custom_meta_items as $item) { + if ($item['first'] == 'cover-date') { + $custom_datetime = $item['second']; + } + } + } + + // The Periodical that have only 1 volume should not display the volume numbers + $vol_issue = "Volume ".$volume.", Issue ".$issue." - ".$custom_datetime; + // creating variables for node template $variables['node_title'] = $node_title; $variables['download_pdf_links'] = $download_pdf_links; @@ -559,8 +582,19 @@ function hwjma_get_node_fields_as_string($variables, $fields) { function hwjma_preprocess_node__journal_issue__issue_list_item(&$variables) { $entity = $variables['node']; - // Use lookup to check if the issue has a cover date. - //$hwjma_lookup = \Drupal::service('hwjma_content_display.lookup'); - $cover_date = '';//$hwjma_lookup->getIssueCoverDate($entity); - $variables['cover_date'] = $cover_date; + $custom_meta = ''; + + if (!$entity->hasField('custom_meta') || $entity->get('custom_meta')->isEmpty()) { + $variables['cover_date'] = $custom_meta; + } + $custom_meta_items = $entity->get('custom_meta')->getValue(); + + // Get the custom meta value by name. + foreach ($custom_meta_items as $item) { + if ($item['first'] == 'cover-date') { + $custom_meta = $item['second']; + } + } + + $variables['cover_date'] = $custom_meta; } \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig index e47d54d77..8a2113b22 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--toc-list.html.twig @@ -77,15 +77,6 @@ {% include "@components/card/_card-lr-column.twig" with { card_lr_column: { item:{ - card_heading: { - item :{ - heading: { - level: 6, - class: 'article-section__sub-heading', - text: node.article_type.0.value|striptags, - }, - }, - }, card_heading_link: { item: { anchorHead: { diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig index 3bf6adc09..76d129cff 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-issue--content-details.html.twig @@ -90,10 +90,10 @@ class: 'article__title', button: main_heading_with_link, }, - suffix_title:[{ + suffix_title: { text: Journalissue.vol_issue, class: 'article__volume-detail' - }], + }, issue_list: [{ label: 'Online ISSN', value: Journalissue.eissn diff --git a/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss b/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss index b33734a6b..90a7b6fbc 100755 --- a/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss +++ b/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss @@ -863,4 +863,180 @@ ol.order-listing { .block-bps-pdf-only-message { background-color: $light-blue; color: $black; +} + +.path-all-journals .article__btn-calender-icon:before, +.path-all-journals .article__btn:after, +.path-all-journals .subject-browse .article__btn-calender-icon:after{ + vertical-align:middle +} + +.path-all-journals .article__author-info, +.path-all-journals .article__btn-calender-icon{ + display:inline-block +} +.path-all-journals .article__btn-calender-icon:before{ + position:relative +} +.path-all-journals .subject-browse .article__btn-calender-icon{ + border-right:1px solid #e3e3e3 +} +.path-all-journals .article .card-container, +.path-all-journals .item-list ul li, +.path-all-journals .pagination, +.path-all-journals .pagination-large-tablet, +.path-all-journals .pagination-small-tablet{ + margin-top:1.5rem +} +.path-all-journals .article__author-info{ + margin-bottom:0 +} +.path-all-journals .article .card-container, +.path-all-journals .item-list ul li{ + padding-top:1.5rem +} +.path-all-journals .article__card-image{ + padding-right:0 +} +.path-all-journals .article__heading{ + margin-top:0; + margin-bottom:.5rem; + font-family:"DM Serif Display"; + font-weight:500; + color:#06020f +} + +.path-all-journals .article__heading{ + font-size:24px; + line-height:32px +} +@media (max-width:1023.98px){ + .path-all-journals .article__heading{ + font-size:20px; + line-height:28px + } +} + +.path-all-journals .modal-header .article__heading{ + margin-bottom:0!important; + line-height:1.5 +} +.path-all-journals .modal-header .article__heading::first-letter{ + text-transform:capitalize +} +.path-all-journals .subject-browse .article__btn-calender-icon{ + padding-right:.313rem; + margin-right:.313rem +} +.path-all-journals .subject-browse .article__btn-calender-icon:after{ + content:"\e92e"; + font-family:feather; + font-size:1.5rem; + top:-1px +} +.path-all-journals .article .card-container{ + border-top:1px solid #e3e3e3 +} +.path-all-journals .article__card-image{ + max-width:174px +} +@media (max-width:575.98px){ + .path-all-journals .article__card-image{ + padding-right:1.5rem!important; + max-width:100% + } +} +.path-all-journals .article__card-content{ + max-width:calc(100% - 174px) +} +@media (max-width:575.98px){ + .path-all-journals .article__card-content{ + max-width:100%; + margin-top:1.5rem + } +} +.path-all-journals .article__heading{ + margin-bottom:20px +} +.path-all-journals .article__heading .banner__button,.path-all-journals .article__heading a{ + color:#06020f +} +.path-all-journals .article__authorname{ + font-size:1rem; + display:inline-block; + margin-bottom:5px +} +.path-all-journals .article__author-info{ + color:#06020f +} +.path-all-journals .article__author-description{ + margin-bottom:1.125rem +} +.path-all-journals .article__btn{ + border-right:1px solid #85a6ad; + padding-right:30px; + margin-right:10px; + line-height:normal; + display:inline-block; + color:#d4431c; + position:relative +} +.path-all-journals .article__btn:after{ + content:"\e92e"; + font-family:feather; + font-size:1.5rem; + position:absolute; + top:-1px +} +.path-all-journals .article__btn.active:after{ + content:"\e931" +} +.path-all-journals .article__btn-calender-icon{ + border-right:none; + line-height:normal; + color:#d4431c +} +.path-all-journals .article__btn-calender-icon:after{ + content:none +} +.path-all-journals .article__btn-calender-icon:before{ + content:"\e927"; + font-family:feather; + font-size:1.5rem; + top:-2px +} +.path-all-journals .pagination,.path-all-journals .pagination-large-tablet,.path-all-journals .pagination-small-tablet{ + border-top:1px solid #85a6ad; + padding-top:.75rem +} +.path-all-journals .item-list ul{ + list-style:none; + padding:0 +} +.path-all-journals .item-list ul li{ + border-top:1px solid #85a6ad +} +.path-all-journals .search-results-middle .search-middle-right .article__heading{ + margin-bottom:15px +} + +@media (min-width:576px){ + .path-all-journals .block-adnuntius{ + width:49% + } +} +@media (min-width:768px){ + .path-all-journals .block-adnuntius{ + width:100% + } +} +.path-all-journals .article .card-container, +.path-all-journals .item-list ul li, +.path-all-journals .pagination, +.path-all-journals .pagination-large-tablet, +.path-all-journals .pagination-small-tablet{ + margin-top:1.5rem +} +.path-all-journals .favorite-section .favorite-right .article__heading{ + margin-bottom:15px } \ No newline at end of file From 61948c83be445dea9ad91035908a45d7888e16b2 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Mon, 24 Jul 2023 03:30:51 -0400 Subject: [PATCH 059/174] Issue page next prev button --- config/sync/addtoany.settings.yml | 2 +- ...y_view_display.node.journal_issue.full.yml | 7 ++++- .../src/Plugin/Block/TOCPager.php | 30 ++++++++++++++----- .../templates/hwjma-toc-pager.html.twig | 8 +++-- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/config/sync/addtoany.settings.yml b/config/sync/addtoany.settings.yml index 4d66f8540..947721094 100644 --- a/config/sync/addtoany.settings.yml +++ b/config/sync/addtoany.settings.yml @@ -1,5 +1,5 @@ buttons_size: 32 -additional_html: "\r\n\r\n\r\n" +additional_html: "\r\n\r\n\r\n" additional_css: '' additional_js: '' universal_button: none diff --git a/config/sync/core.entity_view_display.node.journal_issue.full.yml b/config/sync/core.entity_view_display.node.journal_issue.full.yml index af2c046ca..b33b9ab64 100644 --- a/config/sync/core.entity_view_display.node.journal_issue.full.yml +++ b/config/sync/core.entity_view_display.node.journal_issue.full.yml @@ -117,6 +117,7 @@ third_party_settings: group_articles_in_this_issue: children: - hwmd_table_of_contents_journals_ + - hwjma_toc_pager parent_name: '' weight: 0 format_type: html_element @@ -137,6 +138,11 @@ targetEntityType: node bundle: journal_issue mode: full content: + hwjma_toc_pager: + weight: 1 + region: content + settings: { } + third_party_settings: { } hwmd_table_of_contents_journals_: type: hwmarkup_display_formatter weight: 0 @@ -196,7 +202,6 @@ hidden: hw_marker_sign_up: true hw_tag_sign_up: true hwjma_focus_view: true - hwjma_toc_pager: true issue: true issue_id: true issue_is_open: true diff --git a/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php b/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php index 8ff3b0cab..5de876567 100644 --- a/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php +++ b/web/modules/highwire/hwjma_content_display/src/Plugin/Block/TOCPager.php @@ -124,11 +124,27 @@ public function build() { $children = []; - foreach ($parent_node->get('children')->getValue() as $child) { - // SF01154128 - do not include covers in pagination - $type = $this->hwContentLookup->getTypeFromNID($child['target_id']); - if ($type !== 'item_cover') { - $children[] = $child['apath']; + if($node->bundle() == 'journal_issue'){ + $journal_nid = $parent_node->get('parent')->getString(); + $journal_node = \Drupal::entityTypeManager()->getStorage('node')->load($journal_nid); + foreach ($journal_node->get('children')->getValue() as $childval) { + + $volume_node = \Drupal::entityTypeManager()->getStorage('node')->load($childval['target_id']); + foreach ($volume_node->get('children')->getValue() as $child) { + $type = $this->hwContentLookup->getTypeFromNID($child['target_id']); + if ($type !== 'item_cover') { + $children[] = $child['apath']; + } + } + } + } + else{ + foreach ($parent_node->get('children')->getValue() as $child) { + // SF01154128 - do not include covers in pagination + $type = $this->hwContentLookup->getTypeFromNID($child['target_id']); + if ($type !== 'item_cover') { + $children[] = $child['apath']; + } } } @@ -158,8 +174,8 @@ public function build() { // Build render array with empty links as default values. $build += [ '#theme' => 'hwjma_toc_pager', - '#previous_url' => Url::fromRoute(''), - '#next_url' => Url::fromRoute(''), + '#previous_url' => '',//Url::fromRoute(''), + '#next_url' => '',//Url::fromRoute(''), ]; // Add url for previous node. diff --git a/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig b/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig index 5ced0cd47..ed7e1d49e 100644 --- a/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig +++ b/web/modules/highwire/hwjma_content_display/templates/hwjma-toc-pager.html.twig @@ -1,7 +1,11 @@ {% spaceless %} - {{ previous }} - {{ next }} + {% if previous %} + {{ previous }} + {% endif %} + {% if next %} + {{ next }} + {% endif %} {% endspaceless %}
    From 2d96ca003a29e4f4d8769f0888bddb27b7506a14 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Tue, 25 Jul 2023 07:20:46 -0400 Subject: [PATCH 060/174] Create About Journal, News and blog section region --- ...page_variant.homepage-panels_variant-0.yml | 39 +++++++++++++++++++ config/sync/structure_sync.data.yml | 26 +++++++++++++ .../hwjma_theme/hwjma.layouts.yml | 12 ++++++ .../default/css/scss/_custom-style.scss | 9 +++++ 4 files changed, 86 insertions(+) diff --git a/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml b/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml index c61e12801..926248495 100644 --- a/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml @@ -6,7 +6,10 @@ dependencies: - page_manager.page.homepage - system.menu.browse-content - views.view.homepage_highlights_carousel + content: + - 'block_content:basic:a60dcac5-a904-4f62-bc50-023efeed4036' module: + - block_content - panels - system - views @@ -38,6 +41,42 @@ variant_settings: weight: -1 uuid: 471e12e4-ae64-463a-9533-e0608fbb29ab context_mapping: { } + 031c65f5-3370-4f4f-a4d1-9f01d229d89b: + id: 'block_content:a60dcac5-a904-4f62-bc50-023efeed4036' + label: 'About Journal Section' + provider: block_content + label_display: '0' + status: true + info: '' + view_mode: full + region: about_journal_section + weight: 0 + uuid: 031c65f5-3370-4f4f-a4d1-9f01d229d89b + context_mapping: { } + 5d39389d-d6ea-45a9-9bfb-10e9af3ab989: + id: 'block_content:a60dcac5-a904-4f62-bc50-023efeed4036' + label: 'About Journal Section' + provider: block_content + label_display: '0' + status: true + info: '' + view_mode: full + region: feeds + weight: 0 + uuid: 5d39389d-d6ea-45a9-9bfb-10e9af3ab989 + context_mapping: { } + cc0ec279-c793-4083-87db-906c2b9d15fa: + id: 'block_content:a60dcac5-a904-4f62-bc50-023efeed4036' + label: 'About Journal Section' + provider: block_content + label_display: '0' + status: true + info: '' + view_mode: full + region: news_blogs + weight: 0 + uuid: cc0ec279-c793-4083-87db-906c2b9d15fa + context_mapping: { } id: panels_variant uuid: 61258e05-3ba6-4019-be28-bc2b42b2717d label: null diff --git a/config/sync/structure_sync.data.yml b/config/sync/structure_sync.data.yml index 71deb6412..a2a1613cd 100644 --- a/config/sync/structure_sync.data.yml +++ b/config/sync/structure_sync.data.yml @@ -1,4 +1,17 @@ blocks: + - + info: 'About Journal Section' + langcode: en + uuid: a60dcac5-a904-4f62-bc50-023efeed4036 + bundle: basic + revision_id: null + rev_id_current: null + fields: + body: + - + value: "

    \"Logo\"

    \r\n\r\n

    It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). Hello

    \r\n" + summary: '' + format: full_html - info: 'All Journals' langcode: en @@ -25,6 +38,19 @@ blocks: value: "

    © 2023 - Demo Physical Therapy Journal

    \r\n" summary: '' format: basic_html + - + info: 'Footer Social icon' + langcode: en + uuid: 5e70a744-8b8a-4176-a1ff-a0cd3da8e401 + bundle: basic + revision_id: null + rev_id_current: null + fields: + body: + - + value: "\r\n" + summary: '' + format: full_html - info: 'Footer branding svg' langcode: en diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml index a75a6113b..2125339c5 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml @@ -184,6 +184,18 @@ hwjma_layout__front: label: Main content class: main-container home row: main + about_journal_section: + label: About Journal Section + class: about_journal_section aj_section + row: about_journal_section + feeds: + label: Feeds Section + class: feeds_section aj_section + row: feeds_section + news_blogs: + label: News Blog Section + class: feeds_section aj_section + row: news_blog_section content_bottom: label: Tools Grid row: bottom diff --git a/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss b/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss index 90a7b6fbc..729043728 100755 --- a/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss +++ b/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss @@ -1039,4 +1039,13 @@ ol.order-listing { } .path-all-journals .favorite-section .favorite-right .article__heading{ margin-bottom:15px +} + + +.page-wrapper--about-journal-section, .page-wrapper--feeds-section, .page-wrapper--news-blog-section { + width: 32%; + margin-left: 1%; + float: left; + position: relative; + z-index: 99; } \ No newline at end of file From 4e9846dbe5c48e07b89feb3e38a6cbe62b3697e1 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Tue, 25 Jul 2023 07:36:44 -0400 Subject: [PATCH 061/174] Add blank space in last line --- .../hwjma_theme/source/default/css/scss/_custom-style.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss b/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss index 729043728..aa0c6b330 100755 --- a/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss +++ b/web/themes/highwire/hwjma_theme/source/default/css/scss/_custom-style.scss @@ -1048,4 +1048,5 @@ ol.order-listing { float: left; position: relative; z-index: 99; -} \ No newline at end of file +} + From 2c35dcb9b8dbae898fbc03184107cad52ebcf82b Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 27 Jul 2023 04:57:12 -0400 Subject: [PATCH 062/174] Altmetric Data --- ...er.page.highwire_altmetric_most_shared.yml | 12 ++ ...altmetric_most_shared-panels_variant-0.yml | 62 ++++++ .../journal_article_detail.module | 3 + .../src/Plugin/Block/AltmetricsData.php | 195 ++++++++++++++++++ .../templates/altmetrics-data.html.twig | 34 +++ 5 files changed, 306 insertions(+) create mode 100644 config/sync/page_manager.page.highwire_altmetric_most_shared.yml create mode 100644 config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml create mode 100644 web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php create mode 100644 web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig diff --git a/config/sync/page_manager.page.highwire_altmetric_most_shared.yml b/config/sync/page_manager.page.highwire_altmetric_most_shared.yml new file mode 100644 index 000000000..d9a8c4ae5 --- /dev/null +++ b/config/sync/page_manager.page.highwire_altmetric_most_shared.yml @@ -0,0 +1,12 @@ +uuid: 9787e4e0-7299-49e3-b7c5-0e7125f75c1a +langcode: en +status: true +dependencies: { } +id: highwire_altmetric_most_shared +label: 'Highwire altmetric most shared' +description: '' +use_admin_theme: false +path: /most-shared-altmetric +access_logic: and +access_conditions: { } +parameters: { } diff --git a/config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml b/config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml new file mode 100644 index 000000000..ebdf76559 --- /dev/null +++ b/config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml @@ -0,0 +1,62 @@ +uuid: c1f558a4-4ff1-4b01-a895-8245ba5daae3 +langcode: en +status: true +dependencies: + config: + - page_manager.page.highwire_altmetric_most_shared + module: + - journal_article_detail + - panels +id: highwire_altmetric_most_shared-panels_variant-0 +label: Panels +variant: panels_variant +variant_settings: + blocks: + 32c956f3-55c3-433e-ac95-697e63d52a58: + id: hwjma_altmetrics_data + label: 'Altmetrics Data' + provider: journal_article_detail + label_display: visible + region: main + weight: 0 + uuid: 32c956f3-55c3-433e-ac95-697e63d52a58 + description: 'Altmetric tracks attention and engagement of scholarly articles.' + month: 3m + issns: 1488-2329 + number_per_page: '25' + api_url: 'https://api.altmetric.com/v1/citations/' + show_pager: 1 + more_link: 0 + more_link_label: 'See more' + more_link_url: /most-shared-altmetric + msg_no_data: 'No Altmetric data available.' + context_mapping: { } + id: panels_variant + uuid: 0e84d9c3-fa2a-43c1-8683-a51a5e167bf3 + label: null + weight: 0 + layout: bs_1col + layout_settings: + label: '' + layout: + wrapper: div + classes: + row: row + add_layout_class: 1 + attributes: '' + regions: + main: + wrapper: div + classes: + col-sm-12: col-sm-12 + add_region_classes: 1 + attributes: '' + page_title: 'Altmetric Data' + storage_type: page_manager + storage_id: highwire_altmetric_most_shared-panels_variant-0 + builder: standard +page: highwire_altmetric_most_shared +weight: 0 +selection_criteria: { } +selection_logic: and +static_context: { } diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module index d51a4dfd0..1a9e63673 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.module +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -136,6 +136,9 @@ function journal_article_detail_theme() { ], 'hwjma_usage_stats_data' => [ 'variables' => ['filter_tabs' => NULL, 'usage_stats_data' => NULL] + ], + 'altmetrics_data' => [ + 'variables' => ['altmetrics_data' => NULL, 'altmetrice_setting' => NULL, 'pager' => NULL] ] ]; } \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php new file mode 100644 index 000000000..75008d15c --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php @@ -0,0 +1,195 @@ +getConfiguration(); + + $page = pager_find_page(); + $num_per_page = $config['number_per_page']; + + $parameters = array( + 'issns' => $config['issns'], + 'page' => !empty($page) ? $page + 1 : 1, + 'num_results' => $config['number_per_page'], + ); + $query = http_build_query($parameters, '', '&'); + + $api_url = isset($config['api_url']) && !empty($config['api_url']) ? $config['api_url'] : 'https://api.altmetric.com/v1/citations/'; + $url = $api_url . $config['month'] . '?' . $query; + + $ch = curl_init(); + // Set url. + curl_setopt($ch, CURLOPT_URL, $url); + // Return the transfer as a string. + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); + // Execute curl and get the info. + $json_string = curl_exec($ch); + $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + // Close curl resource to free up system resources. + curl_close($ch); + + $results = []; + if ($response_code == 200 && !empty($json_string)) { + $altmetrics_data = json_decode($json_string, TRUE); + if(!empty($altmetrics_data)){ + $results = $altmetrics_data['results']; + } + } + + if($config['show_pager'] == 1){ + $offset = $num_per_page * $page; + pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); + $build = [ + '#theme' => 'altmetrics_data', + '#altmetrics_data' => $results, + '#altmetrice_setting' => $config, + '#pager' => [ + '#type' => 'pager', + ], + ]; + } + else{ + $build = [ + '#theme' => 'altmetrics_data', + '#altmetrics_data' => $results, + '#altmetrice_setting' => $config, + ]; + } + + $build['#attached']['library'][] = 'journal_article_detail/altmetrics'; + + //dd($altmetrics_data); + return $build; + } + + /** + * {@inheritdoc} + */ + public function blockForm($form, FormStateInterface $form_state) { + $form = parent::blockForm($form, $form_state); + $config = $this->getConfiguration(); + + $form['description'] = [ + '#type' => 'textarea', + '#title' => t('Description text'), + '#default_value' => isset($config['description']) ? $config['description'] : 'Altmetric tracks attention and engagement of scholarly articles.', + ]; + + $api_months_option = array('1m' => '1 month', '3m' => '3 months', '6m' => '6 months', '1y' => '1 year'); + $form['month'] = [ + '#type' => 'select', + '#title' => t('Select Month'), + '#options' => $api_months_option, + '#default_value' => isset($config['month']) ? $config['month'] : '6m', + ]; + + $form['issns'] = [ + '#type' => 'textfield', + '#title' => t('Enter ISSNs'), + '#description' => t('ISSNs for a Journal site.'), + '#default_value' => !empty($config['issns']) ? $config['issns'] : '', + '#required' => TRUE, + ]; + + $form['number_per_page'] = [ + '#type' => 'textfield', + '#title' => t('Results per page'), + '#default_value' => !empty($config['number_per_page']) ? $config['number_per_page'] : 25, + '#size' => '10', + '#prefix' => '
    ', + '#suffix' => '
    ', + '#description' => t('Altmetric Data to display.'), + ]; + + $form['api_url'] = [ + '#type' => 'textfield', + '#title' => t('Altmetric API URL'), + '#description' => 'Please include http:// or https:// in the URL with trailing slash. ' .t('Official documentation').'', + '#default_value' => !empty($config['api_url']) ? $config['api_url'] : 'https://api.altmetric.com/v1/citations/', + '#required' => TRUE, + ]; + + $form['show_pager'] = [ + '#type' => 'checkbox', + '#title' => t('Show pager'), + '#default_value' => isset($config['show_pager']) ? $config['show_pager'] : 0, + '#description' => t('Displays pager on the list.'), + ]; + + $form['more_link'] = [ + '#type' => 'checkbox', + '#title' => t('Show More Link'), + '#default_value' => isset($config['more_link']) ? $config['more_link'] : 0, + '#prefix' => '
    ', + '#suffix' => '
    ', + ]; + + $form['more_link_label'] = [ + '#type' => 'textfield', + '#title' => t('More Link Label'), + '#default_value' => isset($config['more_link_label']) ? $config['more_link_label'] : 'See more', + '#states' => array( + 'visible' => array( + ':input[name="settings[more_link]"]' => array('checked' => TRUE), + ), + ), + ]; + + $form['more_link_url'] = [ + '#type' => 'textfield', + '#title' => t('More Link URL'), + '#default_value' => isset($config['more_link_url']) ? $config['more_link_url'] : '', + '#states' => array( + 'visible' => array( + ':input[name="settings[more_link]"]' => array('checked' => TRUE), + ), + ), + ]; + + $form['msg_no_data'] = [ + '#type' => 'textfield', + '#title' => t('No Altmetric data'), + '#description' => t('Message to show if there is no Altmetric data.'), + '#default_value' => isset($config['msg_no_data']) ? $config['msg_no_data'] : 'No Altmetric data available.', + ]; + + return $form; + } + + /** + * {@inheritdoc} + */ + public function blockSubmit($form, FormStateInterface $form_state) { + parent::blockSubmit($form, $form_state); + $values = $form_state->getValues(); + $data = ['label', 'label_display', 'description', 'month', 'issns', 'number_per_page', 'api_url', 'show_pager', 'more_link', 'more_link_label', 'more_link_url', 'msg_no_data']; + foreach ($data as $option) { + $this->configuration[$option] = $values[$option]; + } + } +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig new file mode 100644 index 000000000..d9adb5ac2 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig @@ -0,0 +1,34 @@ +{{ altmetrice_setting.description }} + +{% if altmetrics_data is not empty %} +
      + {% for row in altmetrics_data %} +
    • +
      + +
      +
      +
      +
      + +
      + Last mentioned on {{ row.last_updated|date("D M d Y") }} +
      +
      +
    • + {% endfor %} +
    +{% else %} + {{ altmetrics_data.msg_no_data }} +{% endif %} + +{% if altmetrice_setting.more_link == 1 %} + {{ altmetrice_setting.more_link_label }} +{% endif %} +{% if altmetrice_setting.show_pager == 1 %} + {{ pager }} +{% endif %} \ No newline at end of file From d37f9cc16c296ca8786fe012e52bcd14d452e6ed Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 27 Jul 2023 05:44:10 -0400 Subject: [PATCH 063/174] Add blank space --- .../css/altmetrics-style.css | 48 ++++++++++++++++ .../journal_article_detail.libraries.yml | 5 ++ .../journal_article_detail.module | 2 +- .../src/Plugin/Block/AltmetricsData.php | 7 +-- .../templates/altmetrics-data.html.twig | 56 ++++++++++--------- 5 files changed, 85 insertions(+), 33 deletions(-) create mode 100644 web/modules/highwire/journal_article_detail/css/altmetrics-style.css diff --git a/web/modules/highwire/journal_article_detail/css/altmetrics-style.css b/web/modules/highwire/journal_article_detail/css/altmetrics-style.css new file mode 100644 index 000000000..a6b8cb981 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/css/altmetrics-style.css @@ -0,0 +1,48 @@ +.altmetrics-section-list .donut { + float: left; + margin-right: 1rem; +} + +.altmetrics-section-list li { + margin-bottom: 1.4rem +} + +.altmetrics-section-list li.last { + text-align: right +} + +.altmetrics-section-list li { + list-style-type: none; + text-align: left +} + +.altmetrics-section-list li.altmetrics-li { + border-bottom: 1px dotted #dadada; + margin-bottom: 1.4rem; + padding-bottom: 20px; + line-height: 1.5em; + margin-left: 0; + overflow: hidden; +} + +.altmetrics-section-list a{ + color: #006a8a; + text-decoration: none; +} + +.altmetrics-section-list a:hover{ + color: #3d90b7; +} + +p.altmetrics-description { + padding-bottom: 15px; + padding-top: 10px; +} + +.altmetrics-more{ + text-align: right; + color: #006a8a; + padding: 5px 20px 5px 0; +} + + diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml index 60b2fff45..b2da3c05b 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml @@ -3,6 +3,9 @@ altmetrics: js: https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js: { type: external, minified: true, attributes: { type: text/javascript } } + css: + theme: + css/altmetrics-style.css: {} highchartjs: version: VERSION js: @@ -13,4 +16,6 @@ usagestatsdata: version: VERSION js: js/highchartbar.js: {} + + diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module index 1a9e63673..d1ed23a13 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.module +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -141,4 +141,4 @@ function journal_article_detail_theme() { 'variables' => ['altmetrics_data' => NULL, 'altmetrice_setting' => NULL, 'pager' => NULL] ] ]; -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php index 75008d15c..971cad6ce 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php @@ -41,16 +41,12 @@ public function build() { $url = $api_url . $config['month'] . '?' . $query; $ch = curl_init(); - // Set url. curl_setopt($ch, CURLOPT_URL, $url); - // Return the transfer as a string. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); - // Execute curl and get the info. $json_string = curl_exec($ch); $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - // Close curl resource to free up system resources. curl_close($ch); $results = []; @@ -83,7 +79,6 @@ public function build() { $build['#attached']['library'][] = 'journal_article_detail/altmetrics'; - //dd($altmetrics_data); return $build; } @@ -192,4 +187,4 @@ public function blockSubmit($form, FormStateInterface $form_state) { $this->configuration[$option] = $values[$option]; } } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig index d9adb5ac2..8ed9b630b 100644 --- a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig @@ -1,34 +1,38 @@ -{{ altmetrice_setting.description }} +

    {{ altmetrice_setting.description }}

    -{% if altmetrics_data is not empty %} - + {% else %} + {{ altmetrics_data.msg_no_data }} + {% endif %} +
    {% if altmetrice_setting.more_link == 1 %} - {{ altmetrice_setting.more_link_label }} + {% endif %} {% if altmetrice_setting.show_pager == 1 %} - {{ pager }} -{% endif %} \ No newline at end of file +
    {{ pager }} +{% endif %} From 2df49cfc25687705f1d826887939e6be4910279b Mon Sep 17 00:00:00 2001 From: charanjeet Date: Thu, 27 Jul 2023 07:38:37 -0400 Subject: [PATCH 064/174] Altmetric block add home and js --- ...page_variant.homepage-panels_variant-0.yml | 26 ++++++++++++------- .../journal_article_detail.libraries.yml | 10 ++++--- .../src/Plugin/Block/AltmetricsData.php | 6 ++++- .../templates/altmetrics-data.html.twig | 6 ++++- .../hwjma_theme/hwjma.layouts.yml | 8 +++--- 5 files changed, 38 insertions(+), 18 deletions(-) diff --git a/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml b/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml index 926248495..d7d46b71b 100644 --- a/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml @@ -10,6 +10,7 @@ dependencies: - 'block_content:basic:a60dcac5-a904-4f62-bc50-023efeed4036' module: - block_content + - journal_article_detail - panels - system - views @@ -65,17 +66,24 @@ variant_settings: weight: 0 uuid: 5d39389d-d6ea-45a9-9bfb-10e9af3ab989 context_mapping: { } - cc0ec279-c793-4083-87db-906c2b9d15fa: - id: 'block_content:a60dcac5-a904-4f62-bc50-023efeed4036' - label: 'About Journal Section' - provider: block_content - label_display: '0' - status: true - info: '' - view_mode: full + ed44c2a7-ff56-4578-88c4-fee69dbf2660: + id: hwjma_altmetrics_data + label: 'Altmetrics Data' + provider: journal_article_detail + label_display: visible region: news_blogs weight: 0 - uuid: cc0ec279-c793-4083-87db-906c2b9d15fa + uuid: ed44c2a7-ff56-4578-88c4-fee69dbf2660 + description: '' + month: 3m + issns: 1488-2329 + number_per_page: '3' + api_url: 'https://api.altmetric.com/v1/citations/' + show_pager: 0 + more_link: 1 + more_link_label: 'More >>' + more_link_url: /most-shared-altmetric + msg_no_data: 'No Altmetric data available.' context_mapping: { } id: panels_variant uuid: 61258e05-3ba6-4019-be28-bc2b42b2717d diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml index b2da3c05b..c7ba4ec15 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml @@ -3,9 +3,7 @@ altmetrics: js: https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js: { type: external, minified: true, attributes: { type: text/javascript } } - css: - theme: - css/altmetrics-style.css: {} + highchartjs: version: VERSION js: @@ -17,5 +15,11 @@ usagestatsdata: js: js/highchartbar.js: {} +altmetrics_style: + css: + theme: + css/altmetrics-style.css: {} + + diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php index 971cad6ce..43ef41564 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php @@ -53,6 +53,10 @@ public function build() { if ($response_code == 200 && !empty($json_string)) { $altmetrics_data = json_decode($json_string, TRUE); if(!empty($altmetrics_data)){ + $domain = \Drupal::request()->getHost(); + foreach ($altmetrics_data['results'] as $key => $result) { + $altmetrics_data['results'][$key]['details_url'] = $result['details_url'].'&domain=' . $domain; + } $results = $altmetrics_data['results']; } } @@ -77,7 +81,7 @@ public function build() { ]; } - $build['#attached']['library'][] = 'journal_article_detail/altmetrics'; + $build['#attached']['library'][] = 'journal_article_detail/altmetrics_style'; return $build; } diff --git a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig index 8ed9b630b..96646ac11 100644 --- a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig @@ -7,7 +7,11 @@
  • diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml index 2125339c5..5239587d7 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/hwjma.layouts.yml @@ -184,6 +184,10 @@ hwjma_layout__front: label: Main content class: main-container home row: main + content_bottom: + label: Tools Grid + row: bottom + class: col-xs-12 homepage__tools about_journal_section: label: About Journal Section class: about_journal_section aj_section @@ -196,10 +200,6 @@ hwjma_layout__front: label: News Blog Section class: feeds_section aj_section row: news_blog_section - content_bottom: - label: Tools Grid - row: bottom - class: col-xs-12 homepage__tools hwjma_layout: label: HWJMA Single Column category: HWJMA Layouts From 50c8ad302bd14c62607e9e74b4a1c6a8f6810572 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 28 Jul 2023 07:25:09 -0400 Subject: [PATCH 065/174] Altmetric data per journal list --- ...age_manager.page.altmetric_most_shared.yml | 12 ++ ...er.page.highwire_altmetric_most_shared.yml | 12 -- ...ltmetric_most_shared-panels_variant-0.yml} | 17 +- ...page_variant.homepage-panels_variant-0.yml | 9 +- ...age_variant.node_view-panels_variant-2.yml | 20 +++ .../journal_article_detail.routing.yml | 10 +- .../src/Controller/MostSharedAltmetric.php | 25 +++ .../src/Plugin/Block/AltmetricsData.php | 151 ++++++++++-------- .../templates/altmetrics-data.html.twig | 8 +- 9 files changed, 162 insertions(+), 102 deletions(-) create mode 100644 config/sync/page_manager.page.altmetric_most_shared.yml delete mode 100644 config/sync/page_manager.page.highwire_altmetric_most_shared.yml rename config/sync/{page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml => page_manager.page_variant.altmetric_most_shared-panels_variant-0.yml} (73%) create mode 100644 web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php diff --git a/config/sync/page_manager.page.altmetric_most_shared.yml b/config/sync/page_manager.page.altmetric_most_shared.yml new file mode 100644 index 000000000..dd63f51ec --- /dev/null +++ b/config/sync/page_manager.page.altmetric_most_shared.yml @@ -0,0 +1,12 @@ +uuid: d09127ae-69f0-4977-b177-05e000e8b37e +langcode: en +status: true +dependencies: { } +id: altmetric_most_shared +label: 'Altmetric most shared' +description: '' +use_admin_theme: false +path: '/content/{corpus}/most-shared-altmetrics' +access_logic: and +access_conditions: { } +parameters: { } diff --git a/config/sync/page_manager.page.highwire_altmetric_most_shared.yml b/config/sync/page_manager.page.highwire_altmetric_most_shared.yml deleted file mode 100644 index d9a8c4ae5..000000000 --- a/config/sync/page_manager.page.highwire_altmetric_most_shared.yml +++ /dev/null @@ -1,12 +0,0 @@ -uuid: 9787e4e0-7299-49e3-b7c5-0e7125f75c1a -langcode: en -status: true -dependencies: { } -id: highwire_altmetric_most_shared -label: 'Highwire altmetric most shared' -description: '' -use_admin_theme: false -path: /most-shared-altmetric -access_logic: and -access_conditions: { } -parameters: { } diff --git a/config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml b/config/sync/page_manager.page_variant.altmetric_most_shared-panels_variant-0.yml similarity index 73% rename from config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml rename to config/sync/page_manager.page_variant.altmetric_most_shared-panels_variant-0.yml index ebdf76559..f31a76e49 100644 --- a/config/sync/page_manager.page_variant.highwire_altmetric_most_shared-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.altmetric_most_shared-panels_variant-0.yml @@ -1,25 +1,25 @@ -uuid: c1f558a4-4ff1-4b01-a895-8245ba5daae3 +uuid: d7058e55-dd18-4d5e-b9ac-18caf985b00a langcode: en status: true dependencies: config: - - page_manager.page.highwire_altmetric_most_shared + - page_manager.page.altmetric_most_shared module: - journal_article_detail - panels -id: highwire_altmetric_most_shared-panels_variant-0 +id: altmetric_most_shared-panels_variant-0 label: Panels variant: panels_variant variant_settings: blocks: - 32c956f3-55c3-433e-ac95-697e63d52a58: + b3745632-67a9-4bd7-9305-8f18e0b247ad: id: hwjma_altmetrics_data label: 'Altmetrics Data' provider: journal_article_detail label_display: visible region: main weight: 0 - uuid: 32c956f3-55c3-433e-ac95-697e63d52a58 + uuid: b3745632-67a9-4bd7-9305-8f18e0b247ad description: 'Altmetric tracks attention and engagement of scholarly articles.' month: 3m issns: 1488-2329 @@ -28,11 +28,10 @@ variant_settings: show_pager: 1 more_link: 0 more_link_label: 'See more' - more_link_url: /most-shared-altmetric msg_no_data: 'No Altmetric data available.' context_mapping: { } id: panels_variant - uuid: 0e84d9c3-fa2a-43c1-8683-a51a5e167bf3 + uuid: 7176d852-a9c6-473b-99f8-c98df4ae2b5e label: null weight: 0 layout: bs_1col @@ -53,9 +52,9 @@ variant_settings: attributes: '' page_title: 'Altmetric Data' storage_type: page_manager - storage_id: highwire_altmetric_most_shared-panels_variant-0 + storage_id: altmetric_most_shared-panels_variant-0 builder: standard -page: highwire_altmetric_most_shared +page: altmetric_most_shared weight: 0 selection_criteria: { } selection_logic: and diff --git a/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml b/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml index d7d46b71b..49c67b866 100644 --- a/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml +++ b/config/sync/page_manager.page_variant.homepage-panels_variant-0.yml @@ -66,23 +66,22 @@ variant_settings: weight: 0 uuid: 5d39389d-d6ea-45a9-9bfb-10e9af3ab989 context_mapping: { } - ed44c2a7-ff56-4578-88c4-fee69dbf2660: + b7019423-ba7b-40d0-9c7b-ad4f7ba3fbd0: id: hwjma_altmetrics_data label: 'Altmetrics Data' provider: journal_article_detail label_display: visible region: news_blogs weight: 0 - uuid: ed44c2a7-ff56-4578-88c4-fee69dbf2660 - description: '' + uuid: b7019423-ba7b-40d0-9c7b-ad4f7ba3fbd0 + description: 'Altmetric tracks attention and engagement of scholarly articles.' month: 3m issns: 1488-2329 number_per_page: '3' api_url: 'https://api.altmetric.com/v1/citations/' show_pager: 0 more_link: 1 - more_link_label: 'More >>' - more_link_url: /most-shared-altmetric + more_link_label: More msg_no_data: 'No Altmetric data available.' context_mapping: { } id: panels_variant diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml index 82e95a1b3..f17bce605 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-2.yml @@ -7,6 +7,7 @@ dependencies: module: - ctools - hwjma_search + - journal_article_detail - panels id: node_view-panels_variant-2 label: Journal @@ -44,6 +45,25 @@ variant_settings: weight: -1 uuid: b88b5f0a-9387-42e2-b95a-5505c1703af8 context_mapping: { } + 2c4d7a89-ec58-4152-81dc-ebaa741fcfa3: + id: hwjma_altmetrics_data + label: 'Altmetrics Data' + provider: journal_article_detail + label_display: visible + region: right + weight: 0 + uuid: 2c4d7a89-ec58-4152-81dc-ebaa741fcfa3 + description: 'Altmetric tracks attention and engagement of scholarly articles.' + month: 3m + issns: 1488-2329 + number_per_page: '3' + api_url: 'https://api.altmetric.com/v1/citations/' + show_pager: 0 + more_link: 1 + more_link_label: 'See more' + more_link_url: '' + msg_no_data: 'No Altmetric data available.' + context_mapping: { } id: panels_variant uuid: 9959ed8c-0ea0-4063-8de1-e06f7b1a5780 label: null diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml index 5314b127d..e9837ce0f 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml @@ -4,4 +4,12 @@ journal_article_detail.content: _controller: '\Drupal\journal_article_detail\Controller\JournalArticleDetailController::content' _title: 'Hello World' requirements: - _permission: 'access content' \ No newline at end of file + _permission: 'access content' +journal_article_detail.altmetrics_data: + path: '/content/{corpus}/most-shared-altmetrics' + defaults: + _controller: '\Drupal\journal_article_detail\Controller\MostSharedAltmetric::content' + _title: 'Altmetric Data' + requirements: + _permission: 'access content' + diff --git a/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php b/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php new file mode 100644 index 000000000..4823da008 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php @@ -0,0 +1,25 @@ +getConfiguration(); - - $page = pager_find_page(); - $num_per_page = $config['number_per_page']; - - $parameters = array( - 'issns' => $config['issns'], - 'page' => !empty($page) ? $page + 1 : 1, - 'num_results' => $config['number_per_page'], - ); - $query = http_build_query($parameters, '', '&'); - - $api_url = isset($config['api_url']) && !empty($config['api_url']) ? $config['api_url'] : 'https://api.altmetric.com/v1/citations/'; - $url = $api_url . $config['month'] . '?' . $query; - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); - $json_string = curl_exec($ch); - $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); - - $results = []; - if ($response_code == 200 && !empty($json_string)) { - $altmetrics_data = json_decode($json_string, TRUE); - if(!empty($altmetrics_data)){ - $domain = \Drupal::request()->getHost(); - foreach ($altmetrics_data['results'] as $key => $result) { - $altmetrics_data['results'][$key]['details_url'] = $result['details_url'].'&domain=' . $domain; - } - $results = $altmetrics_data['results']; + $node = \Drupal::routeMatch()->getParameter('node'); + if ($node instanceof \Drupal\node\NodeInterface) { + // You can get nid and anything else you need from the node object. + $issns = $node->get('journal_eissn')->getString(); + $corpus = $node->get('corpus')->getString(); + if(empty($issns)){ + $issns = $config['issns']; } } + else{ + $issns = $config['issns']; + } - if($config['show_pager'] == 1){ - $offset = $num_per_page * $page; - pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); - $build = [ - '#theme' => 'altmetrics_data', - '#altmetrics_data' => $results, - '#altmetrice_setting' => $config, - '#pager' => [ - '#type' => 'pager', - ], - ]; + if(empty($issns)){ + return[ + '#type' => 'markup', + '#markup' => 'No ISSNs code available.', + ]; } else{ - $build = [ - '#theme' => 'altmetrics_data', - '#altmetrics_data' => $results, - '#altmetrice_setting' => $config, - ]; - } - $build['#attached']['library'][] = 'journal_article_detail/altmetrics_style'; + $page = pager_find_page(); + $num_per_page = $config['number_per_page']; + + $parameters = array( + 'issns' => $issns, + 'page' => !empty($page) ? $page + 1 : 1, + 'num_results' => $config['number_per_page'], + ); + $query = http_build_query($parameters, '', '&'); + + $api_url = isset($config['api_url']) && !empty($config['api_url']) ? $config['api_url'] : 'https://api.altmetric.com/v1/citations/'; + $url = $api_url . $config['month'] . '?' . $query; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); + $json_string = curl_exec($ch); + $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + $results = []; + if ($response_code == 200 && !empty($json_string)) { + $altmetrics_data = json_decode($json_string, TRUE); + if(!empty($altmetrics_data)){ + $domain = \Drupal::request()->getHost(); + foreach ($altmetrics_data['results'] as $key => $result) { + $altmetrics_data['results'][$key]['details_url'] = $result['details_url'].'&domain=' . $domain; + } + $results = $altmetrics_data['results']; + } + } + if($config['more_link'] == 1){ + $config['more_url'] = '/content/'.$corpus.'/most-shared-altmetrics'; + } + + if($config['show_pager'] == 1){ + $offset = $num_per_page * $page; + pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); + $build = [ + '#theme' => 'altmetrics_data', + '#altmetrics_data' => $results, + '#altmetrice_setting' => $config, + '#pager' => [ + '#type' => 'pager', + ], + ]; + } + else{ + $build = [ + '#theme' => 'altmetrics_data', + '#altmetrics_data' => $results, + '#altmetrice_setting' => $config, + ]; + } + + $build['#attached']['library'][] = 'journal_article_detail/altmetrics_style'; + } return $build; } @@ -107,18 +132,10 @@ public function blockForm($form, FormStateInterface $form_state) { '#default_value' => isset($config['month']) ? $config['month'] : '6m', ]; - $form['issns'] = [ - '#type' => 'textfield', - '#title' => t('Enter ISSNs'), - '#description' => t('ISSNs for a Journal site.'), - '#default_value' => !empty($config['issns']) ? $config['issns'] : '', - '#required' => TRUE, - ]; - $form['number_per_page'] = [ '#type' => 'textfield', '#title' => t('Results per page'), - '#default_value' => !empty($config['number_per_page']) ? $config['number_per_page'] : 25, + '#default_value' => !empty($config['number_per_page']) ? $config['number_per_page'] : 5, '#size' => '10', '#prefix' => '
    ', '#suffix' => '
    ', @@ -159,15 +176,11 @@ public function blockForm($form, FormStateInterface $form_state) { ), ]; - $form['more_link_url'] = [ + $form['issns'] = [ '#type' => 'textfield', - '#title' => t('More Link URL'), - '#default_value' => isset($config['more_link_url']) ? $config['more_link_url'] : '', - '#states' => array( - 'visible' => array( - ':input[name="settings[more_link]"]' => array('checked' => TRUE), - ), - ), + '#title' => t('Optional: Enter ISSNs'), + '#description' => t('If no node context is provided, you may instead manually provide a ISSNs code. You must either supply a node context or a ISSNs code. If both are supplied, the node-context takes precedence.'), + '#default_value' => !empty($config['issns']) ? $config['issns'] : '', ]; $form['msg_no_data'] = [ @@ -186,7 +199,7 @@ public function blockForm($form, FormStateInterface $form_state) { public function blockSubmit($form, FormStateInterface $form_state) { parent::blockSubmit($form, $form_state); $values = $form_state->getValues(); - $data = ['label', 'label_display', 'description', 'month', 'issns', 'number_per_page', 'api_url', 'show_pager', 'more_link', 'more_link_label', 'more_link_url', 'msg_no_data']; + $data = ['label', 'label_display', 'description', 'month', 'issns', 'number_per_page', 'api_url', 'show_pager', 'more_link', 'more_link_label', 'msg_no_data']; foreach ($data as $option) { $this->configuration[$option] = $values[$option]; } diff --git a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig index 96646ac11..7c938e6af 100644 --- a/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/altmetrics-data.html.twig @@ -7,11 +7,7 @@
  • @@ -34,7 +30,7 @@ {% if altmetrice_setting.more_link == 1 %} {% endif %} {% if altmetrice_setting.show_pager == 1 %} From 84676ab20d4a3310e1afcb9302bd73c7c95dfdd7 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 28 Jul 2023 07:56:00 -0400 Subject: [PATCH 066/174] Add blank space after if --- .../src/Controller/MostSharedAltmetric.php | 4 +--- .../src/Plugin/Block/AltmetricsData.php | 17 ++++++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php b/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php index 4823da008..9512dca21 100644 --- a/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php +++ b/web/modules/highwire/journal_article_detail/src/Controller/MostSharedAltmetric.php @@ -16,10 +16,8 @@ class MostSharedAltmetric extends ControllerBase { * Return markup array. */ public function content($corpus) { - $build = []; - + $build = []; return $build; - } } diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php index aa4fa8620..683ef0cd8 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php @@ -32,22 +32,21 @@ public function build() { // You can get nid and anything else you need from the node object. $issns = $node->get('journal_eissn')->getString(); $corpus = $node->get('corpus')->getString(); - if(empty($issns)){ + if (empty($issns)){ $issns = $config['issns']; } } - else{ + else { $issns = $config['issns']; } - if(empty($issns)){ + if (empty($issns)){ return[ '#type' => 'markup', '#markup' => 'No ISSNs code available.', ]; } - else{ - + else { $page = pager_find_page(); $num_per_page = $config['number_per_page']; @@ -73,7 +72,7 @@ public function build() { $results = []; if ($response_code == 200 && !empty($json_string)) { $altmetrics_data = json_decode($json_string, TRUE); - if(!empty($altmetrics_data)){ + if (!empty($altmetrics_data)){ $domain = \Drupal::request()->getHost(); foreach ($altmetrics_data['results'] as $key => $result) { $altmetrics_data['results'][$key]['details_url'] = $result['details_url'].'&domain=' . $domain; @@ -82,11 +81,11 @@ public function build() { } } - if($config['more_link'] == 1){ + if ($config['more_link'] == 1){ $config['more_url'] = '/content/'.$corpus.'/most-shared-altmetrics'; } - if($config['show_pager'] == 1){ + if ($config['show_pager'] == 1){ $offset = $num_per_page * $page; pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); $build = [ @@ -98,7 +97,7 @@ public function build() { ], ]; } - else{ + else { $build = [ '#theme' => 'altmetrics_data', '#altmetrics_data' => $results, From f23c00f8939b575ff557add0263c530bb235051a Mon Sep 17 00:00:00 2001 From: charanjeet Date: Fri, 28 Jul 2023 08:07:57 -0400 Subject: [PATCH 067/174] Blank space --- .../src/Plugin/Block/AltmetricsData.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php index 683ef0cd8..60d0b5794 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php @@ -32,7 +32,7 @@ public function build() { // You can get nid and anything else you need from the node object. $issns = $node->get('journal_eissn')->getString(); $corpus = $node->get('corpus')->getString(); - if (empty($issns)){ + if (empty($issns)) { $issns = $config['issns']; } } @@ -40,7 +40,7 @@ public function build() { $issns = $config['issns']; } - if (empty($issns)){ + if (empty($issns)) { return[ '#type' => 'markup', '#markup' => 'No ISSNs code available.', @@ -72,7 +72,7 @@ public function build() { $results = []; if ($response_code == 200 && !empty($json_string)) { $altmetrics_data = json_decode($json_string, TRUE); - if (!empty($altmetrics_data)){ + if (!empty($altmetrics_data)) { $domain = \Drupal::request()->getHost(); foreach ($altmetrics_data['results'] as $key => $result) { $altmetrics_data['results'][$key]['details_url'] = $result['details_url'].'&domain=' . $domain; @@ -81,11 +81,11 @@ public function build() { } } - if ($config['more_link'] == 1){ + if ($config['more_link'] == 1) { $config['more_url'] = '/content/'.$corpus.'/most-shared-altmetrics'; } - if ($config['show_pager'] == 1){ + if ($config['show_pager'] == 1) { $offset = $num_per_page * $page; pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); $build = [ From f4b69848d72d99978087a42ad9c97ee84bc01f38 Mon Sep 17 00:00:00 2001 From: charanjeet Date: Mon, 31 Jul 2023 00:54:06 -0400 Subject: [PATCH 068/174] Altermic data check condition --- .../src/Plugin/Block/AltmetricsData.php | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php index 60d0b5794..529918796 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/AltmetricsData.php @@ -41,10 +41,7 @@ public function build() { } if (empty($issns)) { - return[ - '#type' => 'markup', - '#markup' => 'No ISSNs code available.', - ]; + return $build; } else { $page = pager_find_page(); @@ -59,7 +56,7 @@ public function build() { $api_url = isset($config['api_url']) && !empty($config['api_url']) ? $config['api_url'] : 'https://api.altmetric.com/v1/citations/'; $url = $api_url . $config['month'] . '?' . $query; - + $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); @@ -68,7 +65,7 @@ public function build() { $json_string = curl_exec($ch); $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); - + $results = []; if ($response_code == 200 && !empty($json_string)) { $altmetrics_data = json_decode($json_string, TRUE); @@ -79,32 +76,33 @@ public function build() { } $results = $altmetrics_data['results']; } - } - if ($config['more_link'] == 1) { + if ($config['more_link'] == 1) { $config['more_url'] = '/content/'.$corpus.'/most-shared-altmetrics'; - } + } - if ($config['show_pager'] == 1) { - $offset = $num_per_page * $page; - pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); - $build = [ - '#theme' => 'altmetrics_data', - '#altmetrics_data' => $results, - '#altmetrice_setting' => $config, - '#pager' => [ - '#type' => 'pager', - ], - ]; - } - else { - $build = [ - '#theme' => 'altmetrics_data', - '#altmetrics_data' => $results, - '#altmetrice_setting' => $config, - ]; + if ($config['show_pager'] == 1) { + $offset = $num_per_page * $page; + pager_default_initialize($altmetrics_data['query']['total'], $num_per_page); + $build = [ + '#theme' => 'altmetrics_data', + '#altmetrics_data' => $results, + '#altmetrice_setting' => $config, + '#pager' => [ + '#type' => 'pager', + ], + ]; + } + else { + $build = [ + '#theme' => 'altmetrics_data', + '#altmetrics_data' => $results, + '#altmetrice_setting' => $config, + ]; + } + } - + $build['#attached']['library'][] = 'journal_article_detail/altmetrics_style'; } return $build; From 15f7d93f6aa8cb010a86c77f57457aa1225a368e Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Fri, 4 Aug 2023 01:43:19 -0400 Subject: [PATCH 069/174] metric tab data --- .../src/Controller/JournalArticleDetailController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php index fb5d83770..711b0715a 100644 --- a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php +++ b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php @@ -21,6 +21,7 @@ class JournalArticleDetailController extends ControllerBase { * @return \Drupal\Core\Ajax\AjaxResponse */ public function content(Request $request) { + dump('test'); if (!$request->isXmlHttpRequest()) { throw new NotFoundHttpException(); } From 4c008d6bfc973ee1153b0fade556b56630dc6785 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Fri, 4 Aug 2023 02:29:04 -0400 Subject: [PATCH 070/174] JCOREX-102:metric tab data --- .../journal_article_detail.info.yml | 2 +- .../journal_article_detail.libraries.yml | 6 +- .../journal_article_detail.links.menu.yml | 6 + .../journal_article_detail.module | 91 +++++++--- .../journal_article_detail.routing.yml | 10 +- .../JournalArticleDetailController.php | 46 +++-- .../src/Form/UsageStatsDateRangeForm.php | 126 +++++++++++++ .../src/Form/UsageStatsSettingsForm.php | 144 +++++++++++++++ .../src/Plugin/Block/Altmetrics.php | 21 +-- .../src/Plugin/Block/InfoMetricsTab.php | 7 +- .../src/Plugin/Block/UsageStatsData.php | 171 ++++++------------ .../templates/hwjma-alt-metrics.html.twig | 12 ++ .../hwjma-info-metrics-tab.html.twig | 46 +++-- .../hwjma-usage-stats-data.html.twig | 7 - 14 files changed, 495 insertions(+), 200 deletions(-) create mode 100644 web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml create mode 100644 web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php create mode 100644 web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php delete mode 100644 web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml index adbf69502..4e68b7053 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml @@ -2,4 +2,4 @@ name: JOURNAL ARTICLE DETAIL description: All article detail page functionality package: 'JCOREX' type: module -core: 8.x +core_version_requirement: ^9 || ^10 \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml index c7ba4ec15..b3d5a1ab9 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml @@ -18,8 +18,4 @@ usagestatsdata: altmetrics_style: css: theme: - css/altmetrics-style.css: {} - - - - + css/altmetrics-style.css: {} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml new file mode 100644 index 000000000..fd23d5a87 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml @@ -0,0 +1,6 @@ +journal_article_detail.usage_stats_settings_form: + title: 'Article Usage Stats Config' + route_name: journal_article_detail.usage_stats_settings_form + description: 'A description for the menu entry' + parent: highwire_core.admin_index + weight: 100 \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module index d1ed23a13..a48e03dd3 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.module +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -66,14 +66,14 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity if ($content_type == HW_NODE_TYPE_JOURNAL_ARTICLE) { // Add Info & Metrics. if ($display->getComponent('hwjma_info_metrics_tab')) { - $block_manager = \Drupal::service('plugin.manager.block'); - $plugin_block = $block_manager->createInstance('hwjma_info_metrics_tab', []); - $plugin_block->setContextValue('node', $entity); - $render = $plugin_block->build(); - if (!empty($render)) { - $build['hwjma_info_metrics_tab'] = $render; - } - } + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_info_metrics_tab', []); + $plugin_block->setContextValue('node', $entity); + $render = $plugin_block->build(); + if (!empty($render)) { + $build['hwjma_info_metrics_tab'] = $render; + } + } // Add the Altmetrics field if ($display->getComponent('hwjma_altmetrics')) { $block_manager = \Drupal::service('plugin.manager.block'); @@ -86,31 +86,64 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity } // Add the usage-stats pseudofield if ($display->getComponent('hwjma_usage_stats')) { - $filter_tabs = 'ADD'; - $block_manager = \Drupal::service('plugin.manager.block'); + $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); + $usageStatsDefaultView = $usageStatsConfig->get('default_view'); + $usageStatsDateFilter = $usageStatsConfig->get('date_filters'); + $override_title = $usageStatsConfig->get('override_title'); + $usageMetricTypesFilter = $usageStatsConfig->get('metric_types'); + $defaultViewFilter = $usageStatsConfig->get('default_view'); + + $usageMetricTypesArray = []; + foreach ($usageMetricTypesFilter as $key => $value) { + if (!empty($value)) { + $usageMetricTypesArray[] = $value; + } + } + $filterTabData = ''; + $filterTabValues = [ + 'ArticleLifetime' => 'Article Lifetime', + 'LastSixMonths' => 'Last 6 Months', + 'ThisMonth' => 'This Month' + ]; + $fromDate = ''; + $toDate = ''; + if ($defaultViewFilter == 'LastSixMonths') { + $fromDate = date("Y-m-d", mktime(0, 0, 0, date("m")-6, date("d"), date("Y"))); + $toDate = date("Y-m-d"); + } elseif ($defaultViewFilter == 'ThisMonth') { + $fromDate = date("Y-m-01"); + $toDate = date("Y-m-d"); + } + $nid = $entity->get('nid')->getString(); + foreach ($usageStatsDateFilter as $key => $value) { + if (!empty($value)) { + $filterTabData .= ''; + } + } + $filter_tabs = '

    '.$override_title.':

    '.$filterTabData.'

    '; + $build['hwjma_usage_stats']['custom_tabs'] = [ + '#type' => 'markup', + '#markup' => $filter_tabs, + ]; + if (isset($usageStatsDateFilter['ViewRange']) &&!empty($usageStatsDateFilter['ViewRange'])) { + $form = \Drupal::formBuilder()->getForm('Drupal\journal_article_detail\Form\UsageStatsDateRangeForm', $nid); + $build['hwjma_usage_stats']['custom_form'] = $form; + } + $block_manager = \Drupal::service('plugin.manager.block'); $plugin_block = $block_manager->createInstance('hwjma_usage_stats', [ - 'query_type' => 'monthly', - 'views' => ['abstract', 'full', 'pdf', 'total'], + 'query_type' => 'ArticleLifetime', + 'views' => $usageMetricTypesArray, 'date_format' => 'custom', 'custom_date_format' => 'M Y', 'limit' => '', + 'fromDate' => $fromDate, + 'toDate' => $toDate, ]); $plugin_block->setContextValue('node', $entity); $render = $plugin_block->build(); - if (!empty($render)) { - $build['hwjma_usage_stats'] = $render; - } - /* $block['hwjma_usage_stats'] = [ - '#theme' => 'hwjma_usage_stats_data', - '#filter_tabs' => $filter_tabs, - '#usage_stats_data' => $render, - ]; - - $build['hwjma_usage_stats'] = [ - '#type' => 'fieldset', - '#attributes' => ['class' => ['usage-stats-container']], - 'usage_stats' => $plugin_block->build() - ];*/ + if (!empty($render)) { + $build['hwjma_usage_stats']['data'] = $render; + } } } } @@ -132,13 +165,13 @@ function journal_article_detail_theme() { ], ], 'hwjma_alt_metrics' => [ - 'variables' => ['altmetrics_data' => NULL], + 'variables' => ['altmetrics_data' => NULL, 'altmetric_title' => NULL], ], 'hwjma_usage_stats_data' => [ - 'variables' => ['filter_tabs' => NULL, 'usage_stats_data' => NULL] + 'variables' => ['filter_tabs' => NULL, 'usage_stats_data' => NULL, 'form_range' => NULL] ], 'altmetrics_data' => [ 'variables' => ['altmetrics_data' => NULL, 'altmetrice_setting' => NULL, 'pager' => NULL] ] ]; -} +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml index e9837ce0f..2cd77835d 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml @@ -12,4 +12,12 @@ journal_article_detail.altmetrics_data: _title: 'Altmetric Data' requirements: _permission: 'access content' - +journal_article_detail.usage_stats_settings_form: + path: '/admin/config/highware/usage_stats_settings' + defaults: + _form: '\Drupal\journal_article_detail\Form\UsageStatsSettingsForm' + _title: 'UsageStatsSettingsForm' + requirements: + _permission: 'access administration pages' + options: + _admin_route: TRUE \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php index 711b0715a..9b9c90ae0 100644 --- a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php +++ b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php @@ -5,6 +5,7 @@ use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\ReplaceCommand; +use Drupal\Core\Ajax\InvokeCommand; use Symfony\Component\HttpFoundation\Request; /** @@ -15,42 +16,63 @@ class JournalArticleDetailController extends ControllerBase { /** * Route callback for Ajax call. * Only works for Ajax calls. - * + * Use for Usage Stats section tabs ajax call : JCOREX-102 * @param \Symfony\Component\HttpFoundation\Request $request * * @return \Drupal\Core\Ajax\AjaxResponse */ public function content(Request $request) { - dump('test'); if (!$request->isXmlHttpRequest()) { throw new NotFoundHttpException(); } - + $response = new AjaxResponse(); - $type = \Drupal::request()->query->get('type'); $nid = \Drupal::request()->query->get('nid'); - + $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); + $fromDate = ''; + $toDate = ''; + if ($type == 'LastSixMonths') { + $fromDate = date("Y-m-d", mktime(0, 0, 0, date("m")-6, date("d"), date("Y"))); + $toDate = date("Y-m-d"); + } elseif ($type == 'ThisMonth') { + $fromDate = date("Y-m-01"); + $toDate = date("Y-m-d"); + } $build = []; + $usageMetricTypesFilter = $usageStatsConfig->get('metric_types'); + $usageMetricTypesArray = []; + foreach ($usageMetricTypesFilter as $key => $value) { + if (!empty($value)) { + $usageMetricTypesArray[] = $value; + } + } $block_manager = \Drupal::service('plugin.manager.block'); $plugin_block = $block_manager->createInstance('hwjma_usage_stats', [ 'query_type' => $type, - 'views' => ['abstract', 'full', 'pdf', 'total'], + 'views' => $usageMetricTypesArray, 'date_format' => 'custom', 'custom_date_format' => 'M Y', 'limit' => '', + 'fromDate' => $fromDate, + 'toDate' => $toDate, ]); $plugin_block->setContextValue('node', $nid); $render = $plugin_block->build(); if (!empty($render)) { $build = $render; } - - $Selector = '.ajax-wrapper'; //See: https://www.w3schools.com/cssref/css_selectors.asp - $content = '

    Changed !!!

    '; /*The content that will be replace the matched element(s), either a render array or an HTML string.*/ - $settings = ['my-setting' => 'setting',]; /*An array of JavaScript settings to be passed to any attached behaviors.*/ - $response->addCommand(new ReplaceCommand($Selector, $build, $settings)); + $Selector = '.ajax-wrapper'; + $content = '

    Changed !!!

    '; + $settings = ['my-setting' => 'setting',]; + $id = '#'.$type; + $class = '.usagestatstab'; + $addmethod = 'addClass'; + $removemethod = 'removeClass'; + $arguments = ['active']; + $response->addCommand(new InvokeCommand($class, $removemethod, $arguments)); + $response->addCommand(new InvokeCommand($id, $addmethod, $arguments)); + $response->addCommand(new ReplaceCommand($Selector, $build, $settings)); return $response; } - } \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php new file mode 100644 index 000000000..5853c1b4b --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php @@ -0,0 +1,126 @@ + 'fieldset', + '#title' => 'Select a custom date range', + '#title' => 'Select a custom date range for the past year', + '#collapsible' => TRUE, + '#prefix' => '', + '#suffix' => '
    ', + ); + + $form['filter_by_date']['start_date'] = array( + '#type' => 'date', + '#date_format' => 'Y-m-d', + '#prefix' => '
    ', + ); + + $form['filter_by_date']['nid'] = array( + '#type' => 'hidden', + '#value' => $nid, + ); + + $form['filter_by_date']['end_date'] = array( + '#type' => 'date', + '#date_format' => 'Y-m-d', + '#prefix' => ' to ', + '#suffix' => '
    ', + ); + + $form['actions'] = [ + '#type' => 'button', + '#value' => $this->t('Submit'), + '#ajax' => [ + 'callback' => '::setMessage', + ], + '#attributes' => ['class' => ['usagestatstab daterangebutton']], + '#prefix' => '
    ', + '#suffix' => '
    ', + ]; + + return $form; + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + parent::validateForm($form, $form_state); + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + parent::submitForm($form, $form_state); + } + + /** + * Ajax callback function + */ + public function setMessage(array $form, FormStateInterface $form_state) { + $response = new AjaxResponse(); + $build = []; + $block_manager = \Drupal::service('plugin.manager.block'); + $plugin_block = $block_manager->createInstance('hwjma_usage_stats', [ + 'query_type' => $type, + 'views' => ['abstract', 'full', 'pdf', 'total'], + 'date_format' => 'custom', + 'custom_date_format' => 'M Y', + 'limit' => '', + 'fromDate' => $form_state->getValue('start_date'), + 'toDate' => $form_state->getValue('end_date'), + ]); + $nid = $form_state->getValue('nid'); + $plugin_block->setContextValue('node', $nid); + $render = $plugin_block->build(); + if (!empty($render)) { + $build = $render; + } + $Selector = '.ajax-wrapper'; + $content = '

    Changed !!!

    '; + $settings = ['my-setting' => 'setting',]; + $class = '.usagestatstab'; + $addmethod = 'addClass'; + $removemethod = 'removeClass'; + $arguments = ['active']; + $id = '.daterangebutton'; + $response->addCommand(new InvokeCommand($class, $removemethod, $arguments)); + $response->addCommand(new InvokeCommand($id, $addmethod, $arguments)); + $response->addCommand(new ReplaceCommand($Selector, $build, $settings)); + return $response; + } +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php new file mode 100644 index 000000000..ef3356298 --- /dev/null +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php @@ -0,0 +1,144 @@ +config('journal_article_detail.settings'); + + $form['altmetric_override_title'] = array( + '#type' => 'textfield', + '#title' => $this->t('Altmetric Title'), + '#default_value' => !empty($config->get('altmetric_override_title')) ? $config->get('altmetric_override_title') : 'Statistics from Altmetric.com', + ); + + $form['altmetric_statistics_tag'] = array( + '#type' => 'textarea', + '#title' => $this->t('Altmetric Statistics Custom Tag'), + '#default_value' => !empty($config->get('altmetric_statistics_tag')) ? $config->get('altmetric_statistics_tag') : '
    ', + ); + + $form['override_title'] = array( + '#type' => 'textfield', + '#title' => $this->t('Usage Stats Title'), + '#default_value' => !empty($config->get('override_title')) ? $config->get('override_title') : 'Usage statistics', + ); + + $form['date_filters'] = array( + '#type' => 'checkboxes', + '#title' => $this->t('DATE FILTERS'), + '#options' => array('ArticleLifetime' => $this->t('Article lifetime'), 'LastSixMonths' => $this->t('Last 6 Months'), 'ThisMonth' => $this->t('This Month'), 'ViewRange' => $this->t('View range')), + '#default_value' => !empty($config->get('date_filters')) ? $config->get('date_filters') : array('ArticleLifetime', 'LastSixMonths', 'ThisMonth'), + ); + + $form['metric_types'] = array( + '#type' => 'checkboxes', + '#title' => $this->t('SELECT WHICH TYPE OF METRICS TO SHOW ON THE TABLE.'), + '#options' => array('abstract' => $this->t('Abstract'), 'full' => $this->t('Full'), 'pdf' => $this->t('PDF'), 'total' => $this->t('Total'), 'source' => $this->t('Source')), + '#default_value' => !empty($config->get('metric_types')) ? $config->get('metric_types') : array('Abstract', 'Full', 'PDF'), + ); + + $form['default_view'] = [ + '#type' => 'radios', + '#title' => $this->t('DEFAULT VIEW'), + '#options' => [ + 'ArticleLifetime' => $this->t('Article lifetime'), + 'LastSixMonths' => $this->t('Last 6 Months'), + 'ThisMonth' => $this->t('This Month'), + ], + '#default_value' => !empty($config->get('default_view')) ? $config->get('default_view') : 'ArticleLifetime', + ]; + + $form['display_settings'] = [ + '#type' => 'radios', + '#title' => $this->t('DISPLAY SETTINGS'), + '#options' => [ + 0 => $this->t('Chart Only'), + 1 => $this->t('Table Only'), + 2 => $this->t('Both Chart and Table'), + ], + '#default_value' => !empty($config->get('display_settings')) ? $config->get('display_settings') : 1, + '#attributes' => ['data-default-value' => 1], + ]; + + $form['empty_text'] = array( + '#type' => 'textfield', + '#title' => $this->t('EMPTY TEXT'), + '#default_value' => !empty($config->get('empty_text')) ? $config->get('empty_text') : 'No statistics are available.', + ); + + $form['default_source_name'] = array( + '#type' => 'textfield', + '#title' => $this->t('DEFAULT SOURCE NAME'), + '#default_value' => !empty($config->get('default_source_name')) ? $config->get('default_source_name') : t('Highwire'), + ); + + $form['display_grand_total'] = array( + '#type' => 'checkbox', + '#title' => t('Display Grand Total'), + '#default_value' => !empty($config->get('display_grand_total')) ? $config->get('display_grand_total') : 0, + ); + + return parent::buildForm($form, $form_state); + } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + parent::validateForm($form, $form_state); + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + parent::submitForm($form, $form_state); + $this->config('journal_article_detail.settings') + ->set('default_view', $form_state->getValue('default_view')) + ->set('date_filters', $form_state->getValue('date_filters')) + ->set('display_settings', $form_state->getValue('display_settings')) + ->set('metric_types', $form_state->getValue('metric_types')) + ->set('override_title', $form_state->getValue('override_title')) + ->set('altmetric_statistics_tag', $form_state->getValue('altmetric_statistics_tag')) + ->set('altmetric_override_title', $form_state->getValue('altmetric_override_title')) + ->set('empty_text', $form_state->getValue('empty_text')) + ->set('default_source_name', $form_state->getValue('default_source_name')) + ->set('display_grand_total', $form_state->getValue('display_grand_total')) + ->save(); + } +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php index d72d77ee6..7d67f9d92 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a block to display the pager for a chapter/section. + * Provides a block to display the statics for a Altmetric section: JCOREX-102 * * @Block( * id = "hwjma_altmetrics", @@ -74,7 +74,6 @@ public static function create(ContainerInterface $container, array $configuratio */ public function build() { $build = []; - try { $node = $this->getContextValue('node'); } @@ -82,17 +81,17 @@ public function build() { return $build; } // Get the node from context data. - $doi = $node->get('doi')->getString(); // dd($doi); - $altmetrics_data = '
    '; - //$aa = '
    '; - + $doi = $node->get('doi')->getString(); + $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); + $altMetricTagSetting = $usageStatsConfig->get('altmetric_statistics_tag'); + $altmetric_title = $usageStatsConfig->get('altmetric_override_title'); + $altmetrics_data = str_replace('[PUBCODE]', 'data-doi='.$doi, $altMetricTagSetting); $build = [ '#theme' => 'hwjma_alt_metrics', - '#altmetrics_data' => $altmetrics_data - ]; + '#altmetrics_data' => $altmetrics_data, + '#altmetric_title' => $altmetric_title + ]; $build['#attached']['library'][] = 'journal_article_detail/altmetrics'; - return $build; } - -} +} \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php index 555664f17..f3ff22c6e 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php @@ -12,7 +12,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Provides a block that displays Info & Metrics tab. + * Provides a block that displays Info & Metrics tab: JCOREX-102 * * @Block( * id = "hwjma_info_metrics_tab", @@ -80,14 +80,12 @@ public static function create(ContainerInterface $container, array $configuratio */ public function build() { $build = []; - try { $node = $this->getContextValue('node'); } catch (\Exception $e) { return $build; } - // Journal author variables $authors = $node->get('authors_full_name')->getValue(); $author_names = []; @@ -95,7 +93,6 @@ public function build() { $author_names[$key] = $value['value']; } $authors_name = $author_names; - // Journal description variables $journal_doi = $node->get('doi')->getString(); //New way to display DOI @@ -109,7 +106,6 @@ public function build() { $issue = $issue[0]['value']; $volume = !$node->get('volume')->isEmpty() ? $node->get('volume')->getString() : ''; $date_released = $node->get('date_epub_original')->getValue()['0']['original']; - $build = [ '#theme' => 'hwjma_info_metrics_tab', '#journal_title' => $journal_title, @@ -124,5 +120,4 @@ public function build() { ]; return $build; } - } \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php index 440f3ad9a..3b6f061eb 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php @@ -11,7 +11,7 @@ use HighWire\Clients\UsageStats\UsageStats; /** - * Provides a 'UsageStatsData' block. + * Provides a 'UsageStatsData' block: JCOREX-102 * * @Block( * id = "hwjma_usage_stats", @@ -58,7 +58,8 @@ class UsageStatsData extends BlockBase implements ContainerFactoryPluginInterfac 'pdf' => 'PDF', 'powerpoint' => 'PowerPoint', 'total' => 'Total', - 'grand_total' => 'Grand Total' + 'grand_total' => 'Grand Total', + 'source' => 'Source' ]; /** @@ -110,7 +111,7 @@ public static function create(ContainerInterface $container, array $configuratio */ public static function defaultSettings() { return [ - 'query_type' => 'monthly', + 'query_type' => 'ArticleLifetime', 'source' => 'highwire-pmc', 'source_total' => 0, 'views' => ['abstract', 'full', 'pdf', 'total'], @@ -119,100 +120,25 @@ public static function defaultSettings() { ] + parent::defaultSettings(); } - /** - * @inheritdoc - */ - public function blockForm($form, FormStateInterface $form_state) { - $form = parent::blockForm($form, $form_state); - $config = $this->getConfiguration(); - - $form['query_type'] = [ - '#type' => 'select', - '#required' => TRUE, - '#multiple' => FALSE, - '#title' => $this->t('Query Type'), - '#description' => $this->t('Display statistics monthly or daily?'), - '#options' => [ - 'monthly' => 'Monthly Summary', - 'daily' => 'Daily (limit one year)', - ], - '#default_value' => isset($config['query_type']) ? $config['query_type'] : 'monthly', - ]; - - $form['views'] = [ - '#type' => 'checkboxes', - '#required' => TRUE, - '#multiple' => TRUE, - '#title' => $this->t('Views'), - '#description' => $this->t('Display statistics for these views'), - '#options' => [ - 'abstract' => 'Abstract', - 'full' => 'Full Text', - 'pdf' => 'PDF', - 'powerpoint' => 'Powerpoint', - 'total' => 'Total', - ], - '#default_value' => isset($config['views']) ? $config['views'] : ['abstract', 'full', 'pdf', 'total'], - ]; - - $date_formats = []; - foreach ($this->dateFormatStorage->loadMultiple() as $machine_name => $value) { - $date_formats[$machine_name] = $this->t('@name format: @date', ['@name' => $value->label(), '@date' => $this->dateFormatter->format(REQUEST_TIME, $machine_name)]); - } - $date_formats['custom'] = $this->t('Custom'); - - $form['date_format'] = [ - '#type' => 'select', - '#title' => $this->t('Date format'), - '#options' => $date_formats, - '#default_value' => isset($config['date_format']) ? $config['date_format'] : 'medium', - ]; - - $form['custom_date_format'] = [ - '#type' => 'textfield', - '#title' => $this->t('Custom date format'), - '#description' => $this->t('See the documentation for PHP date formats.'), - '#default_value' => isset($config['custom_date_format']) ? $config['custom_date_format'] : '', - ]; - $form['custom_date_format']['#states'] = [ - 'visible' => [ - 'select[name="settings[date_format]"]' => ['value' => 'custom'] - ] - ]; - - $form['limit'] = [ - '#type' => 'numeric', - '#title' => $this->t('Limit'), - '#description' => $this->t('Limit to this number of rows'), - '#default_value' => isset($config['limit']) ? $config['limit'] : '', - ]; - - return $form; - } - - /** - * @inheritdoc - */ - public function blockSubmit($form, FormStateInterface $form_state) { - parent::blockSubmit($form, $form_state); - $values = $form_state->getValues(); - foreach (['query_type', 'source', 'source_total', 'views', 'date_format', 'custom_date_format'] as $option) { - if (is_array($values[$option])) { - $values[$option] = array_filter($values[$option]); - } - $this->configuration[$option] = $values[$option]; - } - } - /** * {@inheritdoc} */ public function build() { $build = []; - $node = $this->getContextValue('node'); $config = $this->getConfiguration(); - + $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); + $emptyErrorText = $usageStatsConfig->get('empty_text'); + $showSource = $usageStatsConfig->get('show_source'); + $defaultSourceName = $usageStatsConfig->get('default_source_name'); + $usageMetricTypesFilter = $usageStatsConfig->get('metric_types'); + $displayGrandTotal = $usageStatsConfig->get('display_grand_total'); + $errorDisplay = [ + '#type' => 'markup', + '#markup' => $emptyErrorText, + '#prefix' => '
    ', + '#suffix' => '
    ', + ]; // Date format if ($config['date_format'] == 'custom') { $date_format = $config['custom_date_format']; @@ -221,66 +147,88 @@ public function build() { $format_entity = $this->dateFormatStorage->load($config['date_format']); $date_format = $format_entity->getPattern(); } - // Apath - //$apath = $node && $node->hasField('apath') && !$node->get('apath')->isEmpty() ? $node->get('apath')->first()->getString() : ''; - $apath = '/biorxiv/early/2017/03/15/117101.atom'; + $apath = $node && $node->hasField('apath') && !$node->get('apath')->isEmpty() ? $node->get('apath')->first()->getString() : ''; if (empty($apath)) { - return $build; + return $errorDisplay; } - // Get usage Stats $stats = []; + $options = []; + // Check date fromat + if (!empty($config['fromDate']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/",$config['fromDate'])) { + $options['from-date'] = $config['fromDate']; + } + if (!empty($config['toDate']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/",$config['toDate'])) { + $options['to-date'] = $config['toDate']; + } try { - if ($config['query_type'] == 'monthly') { - $stats = $this->usageStats->singleArticle($apath)->getData(); - } - if ($config['query_type'] == 'daily') { - $stats = $this->usageStats->singleArticleYear($apath)->getData(); - } + $stats = $this->usageStats->singleArticle($apath, 'true', $options)->getData(); } catch (\Exception $e) { return $build; } if (empty($stats)) { - return $build; + return $errorDisplay; } - // Render table $build['usage_stats_data'] = [ '#type' => 'table', - '#caption' => $this->t('Article Usage Data'), - '#prefix' => '
    ', + '#prefix' => '
    ', '#suffix' => '
    ', ]; $build['usage_stats_data']['#header'] = [ 'date' => 'Period', ]; + $counter = 0; foreach ($config['views'] as $view) { $build['usage_stats_data']['#header'][$view] = $this->view_labels[$view]; } - //dump($stats); + $grand_total = []; foreach ($stats as $i => $row) { $build['usage_stats_data'][$i] = []; - $date = $this->renderDate($date_format, $row['year'], $row['month'], $row['day'] ?? NULL); $build['usage_stats_data'][$i]['date']['#markup'] = $date; - $total = 0; foreach ($config['views'] as $view) { if (isset($row[$view])) { $build['usage_stats_data'][$i][$view]['#markup'] = $row[$view]; + $grand_total[$view] += $row[$view]; $total += $row[$view]; } } if (in_array('total', $config['views'])) { $build['usage_stats_data'][$i]['total']['#markup'] = $total; + $addColTotal += $total; + } + // Add source if required. + if (!empty($usageMetricTypesFilter['source']) && in_array('source', $config['views'])) { + // Override default source if set. + if ($row['platform'] == 'highwire' && !empty($defaultSourceName)) { + $build['usage_stats_data'][$i]['source']['#markup'] = $defaultSourceName; + } + else { + $build['usage_stats_data'][$i]['source']['#markup'] = $row['platform']; + } + } + $counter = $i; + } + // Add grand total row if required + if ($displayGrandTotal == 1) { + $build['usage_stats_data'][$counter+1]['date']['#markup'] = 'Grand Total'; + $innerCounter = 0; + foreach ($grand_total as $k => $val) { + $build['usage_stats_data'][$counter+1][$k]['#markup'] = $val; + $innerCounter = $k; + } + if (in_array('total', $config['views'])) { + $build['usage_stats_data'][$counter+1][$innerCounter+1]['#markup'] = $addColTotal; + } + if (!empty($usageMetricTypesFilter['source'])) { + $build['usage_stats_data'][$counter+1][$innerCounter+2]['#markup'] = ''; } } - $build['#attached']['library'][] = 'journal_article_detail/usagestatsdata'; - // $build['#theme'] = 'hwjma_usage_stats_data'; - //dump($build); return $build; } @@ -319,5 +267,4 @@ protected function renderDate(string $date_format, string $year, string $month, $date->setDate($year, $month, $day ?? 1); return $date->format($date_format); } - } \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig index e69de29bb..e0ca9ef35 100644 --- a/web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/hwjma-alt-metrics.html.twig @@ -0,0 +1,12 @@ +
    +
    +

    {{ altmetric_title }}

    +
    +
    +
    + {% if altmetrics_data is not empty %} + {{ altmetrics_data|raw }} + {% endif %} +
    +
    +
    diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig index cf4006764..82ed8ecb9 100644 --- a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig @@ -1,29 +1,43 @@
    -
    -

    Article Information

    -
    +
    -
    -

    Author Information

    -
    +
    +
    +

    Author Information

    +
    +
    {% if authors_name %} {% for item in authors_name %} - {{ item }} +
    {{ item }}
    {% endfor %} {% endif %}

    -
    -Monthly -Daily \ No newline at end of file +
    \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig deleted file mode 100644 index 4b667318c..000000000 --- a/web/modules/highwire/journal_article_detail/templates/hwjma-usage-stats-data.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -
    -

    Usage statistics

    -
    Hello - {{ filter_tabs }} -
    {{ usage_stats_data }} -
    -
    \ No newline at end of file From e06789b7fc8461c14ea6ed327a7a3759659f0dd5 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Fri, 4 Aug 2023 03:15:03 -0400 Subject: [PATCH 071/174] JCOREX-102:metric tab data review changes --- .../journal_article_detail.libraries.yml | 2 +- .../journal_article_detail.links.menu.yml | 3 ++- .../journal_article_detail/journal_article_detail.module | 8 ++++++-- .../journal_article_detail.routing.yml | 2 +- .../src/Controller/JournalArticleDetailController.php | 4 +++- .../src/Form/UsageStatsDateRangeForm.php | 2 +- .../src/Form/UsageStatsSettingsForm.php | 2 +- .../src/Plugin/Block/Altmetrics.php | 2 +- .../src/Plugin/Block/InfoMetricsTab.php | 2 +- .../src/Plugin/Block/UsageStatsData.php | 5 ++++- .../templates/hwjma-info-metrics-tab.html.twig | 2 +- 11 files changed, 22 insertions(+), 12 deletions(-) diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml index b3d5a1ab9..d86228a42 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.libraries.yml @@ -18,4 +18,4 @@ usagestatsdata: altmetrics_style: css: theme: - css/altmetrics-style.css: {} \ No newline at end of file + css/altmetrics-style.css: {} diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml index fd23d5a87..f63813e52 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.links.menu.yml @@ -3,4 +3,5 @@ journal_article_detail.usage_stats_settings_form: route_name: journal_article_detail.usage_stats_settings_form description: 'A description for the menu entry' parent: highwire_core.admin_index - weight: 100 \ No newline at end of file + weight: 100 + \ No newline at end of file diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module index a48e03dd3..d7ab84bf5 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.module +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -92,7 +92,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity $override_title = $usageStatsConfig->get('override_title'); $usageMetricTypesFilter = $usageStatsConfig->get('metric_types'); $defaultViewFilter = $usageStatsConfig->get('default_view'); - + // Get avtive usage metric types $usageMetricTypesArray = []; foreach ($usageMetricTypesFilter as $key => $value) { if (!empty($value)) { @@ -100,6 +100,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity } } $filterTabData = ''; + // Frontend tab filter values $filterTabValues = [ 'ArticleLifetime' => 'Article Lifetime', 'LastSixMonths' => 'Last 6 Months', @@ -107,6 +108,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity ]; $fromDate = ''; $toDate = ''; + // Set date according to tab filter if ($defaultViewFilter == 'LastSixMonths') { $fromDate = date("Y-m-d", mktime(0, 0, 0, date("m")-6, date("d"), date("Y"))); $toDate = date("Y-m-d"); @@ -115,6 +117,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity $toDate = date("Y-m-d"); } $nid = $entity->get('nid')->getString(); + // Prepare a tab/button/link for frontend foreach ($usageStatsDateFilter as $key => $value) { if (!empty($value)) { $filterTabData .= ''; @@ -125,6 +128,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity '#type' => 'markup', '#markup' => $filter_tabs, ]; + // Prepare a custom date range form if (isset($usageStatsDateFilter['ViewRange']) &&!empty($usageStatsDateFilter['ViewRange'])) { $form = \Drupal::formBuilder()->getForm('Drupal\journal_article_detail\Form\UsageStatsDateRangeForm', $nid); $build['hwjma_usage_stats']['custom_form'] = $form; @@ -174,4 +178,4 @@ function journal_article_detail_theme() { 'variables' => ['altmetrics_data' => NULL, 'altmetrice_setting' => NULL, 'pager' => NULL] ] ]; -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml index 2cd77835d..2a5e32f6f 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.routing.yml @@ -20,4 +20,4 @@ journal_article_detail.usage_stats_settings_form: requirements: _permission: 'access administration pages' options: - _admin_route: TRUE \ No newline at end of file + _admin_route: TRUE diff --git a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php index 9b9c90ae0..5f0481c82 100644 --- a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php +++ b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php @@ -32,6 +32,7 @@ public function content(Request $request) { $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); $fromDate = ''; $toDate = ''; + // Set date according to tab filter if ($type == 'LastSixMonths') { $fromDate = date("Y-m-d", mktime(0, 0, 0, date("m")-6, date("d"), date("Y"))); $toDate = date("Y-m-d"); @@ -42,6 +43,7 @@ public function content(Request $request) { $build = []; $usageMetricTypesFilter = $usageStatsConfig->get('metric_types'); $usageMetricTypesArray = []; + // Prepare table views header foreach ($usageMetricTypesFilter as $key => $value) { if (!empty($value)) { $usageMetricTypesArray[] = $value; @@ -75,4 +77,4 @@ public function content(Request $request) { $response->addCommand(new ReplaceCommand($Selector, $build, $settings)); return $response; } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php index 5853c1b4b..90a51a7ea 100644 --- a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php @@ -123,4 +123,4 @@ public function setMessage(array $form, FormStateInterface $form_state) { $response->addCommand(new ReplaceCommand($Selector, $build, $settings)); return $response; } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php index ef3356298..c8d61c8b6 100644 --- a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php @@ -141,4 +141,4 @@ public function submitForm(array &$form, FormStateInterface $form_state) { ->set('display_grand_total', $form_state->getValue('display_grand_total')) ->save(); } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php index 7d67f9d92..5aa34012b 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php @@ -94,4 +94,4 @@ public function build() { $build['#attached']['library'][] = 'journal_article_detail/altmetrics'; return $build; } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php index f3ff22c6e..2d4675f16 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php @@ -120,4 +120,4 @@ public function build() { ]; return $build; } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php index 3b6f061eb..9f57e74eb 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php @@ -162,6 +162,7 @@ public function build() { if (!empty($config['toDate']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/",$config['toDate'])) { $options['to-date'] = $config['toDate']; } + // Call singleArticle() for get stats data try { $stats = $this->usageStats->singleArticle($apath, 'true', $options)->getData(); } @@ -181,10 +182,12 @@ public function build() { 'date' => 'Period', ]; $counter = 0; + // Prepare header for table view foreach ($config['views'] as $view) { $build['usage_stats_data']['#header'][$view] = $this->view_labels[$view]; } $grand_total = []; + // Prepare data foreach ($stats as $i => $row) { $build['usage_stats_data'][$i] = []; $date = $this->renderDate($date_format, $row['year'], $row['month'], $row['day'] ?? NULL); @@ -267,4 +270,4 @@ protected function renderDate(string $date_format, string $year, string $month, $date->setDate($year, $month, $day ?? 1); return $date->format($date_format); } -} \ No newline at end of file +} diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig index 82ed8ecb9..5d783c2d3 100644 --- a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig @@ -40,4 +40,4 @@

    -
    \ No newline at end of file +
    From 2d5140eb3774422dfa9d325aa352bd4fb27ca50e Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Fri, 4 Aug 2023 05:08:57 -0400 Subject: [PATCH 072/174] JCOREX-102: review changes alter comments --- .../journal_article_detail.info.yml | 2 +- .../journal_article_detail.module | 9 +++++---- .../JournalArticleDetailController.php | 5 +++-- .../src/Form/UsageStatsDateRangeForm.php | 2 +- .../src/Form/UsageStatsSettingsForm.php | 2 +- .../src/Plugin/Block/Altmetrics.php | 1 + .../src/Plugin/Block/UsageStatsData.php | 19 +++++++++---------- 7 files changed, 21 insertions(+), 19 deletions(-) diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml b/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml index 4e68b7053..4dfc0e87e 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.info.yml @@ -2,4 +2,4 @@ name: JOURNAL ARTICLE DETAIL description: All article detail page functionality package: 'JCOREX' type: module -core_version_requirement: ^9 || ^10 \ No newline at end of file +core_version_requirement: ^9 || ^10 diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module index d7ab84bf5..37b8c12d2 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.module +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -86,6 +86,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity } // Add the usage-stats pseudofield if ($display->getComponent('hwjma_usage_stats')) { + // Get backend configurations for usage stats $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); $usageStatsDefaultView = $usageStatsConfig->get('default_view'); $usageStatsDateFilter = $usageStatsConfig->get('date_filters'); @@ -100,7 +101,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity } } $filterTabData = ''; - // Frontend tab filter values + // Frontend tab filter values: Article lifetime, Last 6 Months, This Month $filterTabValues = [ 'ArticleLifetime' => 'Article Lifetime', 'LastSixMonths' => 'Last 6 Months', @@ -108,7 +109,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity ]; $fromDate = ''; $toDate = ''; - // Set date according to tab filter + // Set from and to date according to tab filter (tab Article lifetime, Last 6 Months, This Month) if ($defaultViewFilter == 'LastSixMonths') { $fromDate = date("Y-m-d", mktime(0, 0, 0, date("m")-6, date("d"), date("Y"))); $toDate = date("Y-m-d"); @@ -117,7 +118,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity $toDate = date("Y-m-d"); } $nid = $entity->get('nid')->getString(); - // Prepare a tab/button/link for frontend + // Prepare a tab/button/link for frontend (tab Article lifetime, Last 6 Months, This Month) foreach ($usageStatsDateFilter as $key => $value) { if (!empty($value)) { $filterTabData .= ''; @@ -128,7 +129,7 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity '#type' => 'markup', '#markup' => $filter_tabs, ]; - // Prepare a custom date range form + // Prepare a custom date range form with date calender if (isset($usageStatsDateFilter['ViewRange']) &&!empty($usageStatsDateFilter['ViewRange'])) { $form = \Drupal::formBuilder()->getForm('Drupal\journal_article_detail\Form\UsageStatsDateRangeForm', $nid); $build['hwjma_usage_stats']['custom_form'] = $form; diff --git a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php index 5f0481c82..63ccd3f6d 100644 --- a/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php +++ b/web/modules/highwire/journal_article_detail/src/Controller/JournalArticleDetailController.php @@ -22,6 +22,7 @@ class JournalArticleDetailController extends ControllerBase { * @return \Drupal\Core\Ajax\AjaxResponse */ public function content(Request $request) { + // Check this is ajax call or not if (!$request->isXmlHttpRequest()) { throw new NotFoundHttpException(); } @@ -32,7 +33,7 @@ public function content(Request $request) { $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); $fromDate = ''; $toDate = ''; - // Set date according to tab filter + // Set date according to tab filter within Metric tab Article lifetime, Last 6 Months, This Month if ($type == 'LastSixMonths') { $fromDate = date("Y-m-d", mktime(0, 0, 0, date("m")-6, date("d"), date("Y"))); $toDate = date("Y-m-d"); @@ -43,7 +44,7 @@ public function content(Request $request) { $build = []; $usageMetricTypesFilter = $usageStatsConfig->get('metric_types'); $usageMetricTypesArray = []; - // Prepare table views header + // Prepare usage stats data table views header: Abstract, FULL, PDF foreach ($usageMetricTypesFilter as $key => $value) { if (!empty($value)) { $usageMetricTypesArray[] = $value; diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php index 90a51a7ea..bc0c893bf 100644 --- a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php @@ -18,7 +18,7 @@ * Class UsageStatsDateRangeForm. * * @package Drupal\journal_article_detail\Form - * Use for Usage Stats date range filter form : JCOREX-102 + * Use for Usage Stats date range filter form which is configure base : JCOREX-102 */ class UsageStatsDateRangeForm extends FormBase { diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php index c8d61c8b6..be415ce12 100644 --- a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsSettingsForm.php @@ -14,7 +14,7 @@ * Class UsageStatsSettingsForm. * * @package Drupal\journal_article_detail\Form - * Use for Altmetric and Usage Stats backend configuration : JCOREX-102 + * Use for Altmetric and Usage Stats backend configuration form : JCOREX-102 */ class UsageStatsSettingsForm extends ConfigFormBase { diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php index 5aa34012b..82184dbb1 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php @@ -82,6 +82,7 @@ public function build() { } // Get the node from context data. $doi = $node->get('doi')->getString(); + // Get backend altmetric configuration settings $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); $altMetricTagSetting = $usageStatsConfig->get('altmetric_statistics_tag'); $altmetric_title = $usageStatsConfig->get('altmetric_override_title'); diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php index 9f57e74eb..cedaee95a 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php @@ -139,7 +139,7 @@ public function build() { '#prefix' => '
    ', '#suffix' => '
    ', ]; - // Date format + // Get date format from config if ($config['date_format'] == 'custom') { $date_format = $config['custom_date_format']; } @@ -147,15 +147,14 @@ public function build() { $format_entity = $this->dateFormatStorage->load($config['date_format']); $date_format = $format_entity->getPattern(); } - // Apath + // Get Apath $apath = $node && $node->hasField('apath') && !$node->get('apath')->isEmpty() ? $node->get('apath')->first()->getString() : ''; if (empty($apath)) { return $errorDisplay; } - // Get usage Stats $stats = []; $options = []; - // Check date fromat + // Check date fromat is valid or not if (!empty($config['fromDate']) && preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/",$config['fromDate'])) { $options['from-date'] = $config['fromDate']; } @@ -172,7 +171,7 @@ public function build() { if (empty($stats)) { return $errorDisplay; } - // Render table + // Render usage stats data table $build['usage_stats_data'] = [ '#type' => 'table', '#prefix' => '
    ', @@ -182,12 +181,12 @@ public function build() { 'date' => 'Period', ]; $counter = 0; - // Prepare header for table view + // Prepare header for table view : Abstract, PDF, Full foreach ($config['views'] as $view) { $build['usage_stats_data']['#header'][$view] = $this->view_labels[$view]; } $grand_total = []; - // Prepare data + // Prepare data for table view : Abstract, PDF, Full foreach ($stats as $i => $row) { $build['usage_stats_data'][$i] = []; $date = $this->renderDate($date_format, $row['year'], $row['month'], $row['day'] ?? NULL); @@ -204,9 +203,9 @@ public function build() { $build['usage_stats_data'][$i]['total']['#markup'] = $total; $addColTotal += $total; } - // Add source if required. + // Add source header and value in usage stats data table if required. if (!empty($usageMetricTypesFilter['source']) && in_array('source', $config['views'])) { - // Override default source if set. + // Get default source if set. if ($row['platform'] == 'highwire' && !empty($defaultSourceName)) { $build['usage_stats_data'][$i]['source']['#markup'] = $defaultSourceName; } @@ -216,7 +215,7 @@ public function build() { } $counter = $i; } - // Add grand total row if required + // Add grand total row in usage stats data table if required if ($displayGrandTotal == 1) { $build['usage_stats_data'][$counter+1]['date']['#markup'] = 'Grand Total'; $innerCounter = 0; From 29c5290be6623d8c0afebce7fa7cd015afb34cb1 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Tue, 8 Aug 2023 02:48:08 -0400 Subject: [PATCH 073/174] full content without login and UI issues --- .../journal_article_detail.module | 4 ++-- .../src/Form/UsageStatsDateRangeForm.php | 13 ++++++------- .../src/Plugin/Block/Altmetrics.php | 2 +- .../src/Plugin/Block/InfoMetricsTab.php | 2 +- .../src/Plugin/Block/UsageStatsData.php | 3 ++- .../templates/hwjma-info-metrics-tab.html.twig | 8 ++------ .../hwjma_theme/includes/node.theme.inc | 5 ++--- .../templates/block/hwjma-toc-pager.html.twig | 11 ++++------- ...node--journal-article--content-details.html.twig | 2 ++ .../node/node--journal-article--full.html.twig | 4 +++- .../03-components/site/_journal-top-content.twig | 13 ++----------- 11 files changed, 27 insertions(+), 40 deletions(-) diff --git a/web/modules/highwire/journal_article_detail/journal_article_detail.module b/web/modules/highwire/journal_article_detail/journal_article_detail.module index 37b8c12d2..483afc89e 100644 --- a/web/modules/highwire/journal_article_detail/journal_article_detail.module +++ b/web/modules/highwire/journal_article_detail/journal_article_detail.module @@ -120,8 +120,8 @@ function journal_article_detail_node_view(array &$build, EntityInterface $entity $nid = $entity->get('nid')->getString(); // Prepare a tab/button/link for frontend (tab Article lifetime, Last 6 Months, This Month) foreach ($usageStatsDateFilter as $key => $value) { - if (!empty($value)) { - $filterTabData .= ''; + if (!empty($value) && !empty($filterTabValues[$value])) { + $filterTabData .= ''.$filterTabValues[$value].''; } } $filter_tabs = '

    '.$override_title.':

    '.$filterTabData.'

    '; diff --git a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php index bc0c893bf..6eda9338d 100644 --- a/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php +++ b/web/modules/highwire/journal_article_detail/src/Form/UsageStatsDateRangeForm.php @@ -36,7 +36,6 @@ public function buildForm(array $form, FormStateInterface $form_state, $nid = NU $form['filter_by_date'] = array( '#type' => 'fieldset', '#title' => 'Select a custom date range', - '#title' => 'Select a custom date range for the past year', '#collapsible' => TRUE, '#prefix' => '', '#suffix' => '
    ', @@ -48,11 +47,6 @@ public function buildForm(array $form, FormStateInterface $form_state, $nid = NU '#prefix' => '
    ', ); - $form['filter_by_date']['nid'] = array( - '#type' => 'hidden', - '#value' => $nid, - ); - $form['filter_by_date']['end_date'] = array( '#type' => 'date', '#date_format' => 'Y-m-d', @@ -60,13 +54,18 @@ public function buildForm(array $form, FormStateInterface $form_state, $nid = NU '#suffix' => '
    ', ); + $form['filter_by_date']['nid'] = array( + '#type' => 'hidden', + '#value' => $nid, + ); + $form['actions'] = [ '#type' => 'button', '#value' => $this->t('Submit'), '#ajax' => [ 'callback' => '::setMessage', ], - '#attributes' => ['class' => ['usagestatstab daterangebutton']], + '#attributes' => ['class' => ['btn btn-primary usagestatstab daterangebutton']], '#prefix' => '
    ', '#suffix' => '
    ', ]; diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php index 82184dbb1..340ebeb69 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/Altmetrics.php @@ -81,7 +81,7 @@ public function build() { return $build; } // Get the node from context data. - $doi = $node->get('doi')->getString(); + $doi = '10.1503/cmaj.220966';//$node->get('doi')->getString(); // Get backend altmetric configuration settings $usageStatsConfig = \Drupal::config('journal_article_detail.settings'); $altMetricTagSetting = $usageStatsConfig->get('altmetric_statistics_tag'); diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php index 2d4675f16..d120a4350 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/InfoMetricsTab.php @@ -92,7 +92,7 @@ public function build() { foreach ($authors as $key => $value) { $author_names[$key] = $value['value']; } - $authors_name = $author_names; + $authors_name = implode(', ', $author_names); // Journal description variables $journal_doi = $node->get('doi')->getString(); //New way to display DOI diff --git a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php index cedaee95a..7ee7281f7 100644 --- a/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php +++ b/web/modules/highwire/journal_article_detail/src/Plugin/Block/UsageStatsData.php @@ -148,7 +148,8 @@ public function build() { $date_format = $format_entity->getPattern(); } // Get Apath - $apath = $node && $node->hasField('apath') && !$node->get('apath')->isEmpty() ? $node->get('apath')->first()->getString() : ''; + // $apath = $node && $node->hasField('apath') && !$node->get('apath')->isEmpty() ? $node->get('apath')->first()->getString() : ''; + $apath = '/cmaj/195/21/E748.atom'; if (empty($apath)) { return $errorDisplay; } diff --git a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig index 5d783c2d3..92f37aa8a 100644 --- a/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig +++ b/web/modules/highwire/journal_article_detail/templates/hwjma-info-metrics-tab.html.twig @@ -2,6 +2,7 @@ diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc index 281ddacb1..e707c93c0 100755 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/includes/node.theme.inc @@ -38,10 +38,9 @@ function hwjma_preprocess_node__journal_article__content_details(array &$variabl $authors = $node->get('authors_full_name')->getValue(); $author_names = []; foreach ($authors as $key => $value) { - $author_names[$key] = ['text'=>$value['value'], 'class'=> 'article__fullname']; + $author_names[$key] = $value['value']; } - $variables['authors'] = $author_names; - + $variables['authors'] = implode(', ', $author_names); // Journal description variables $doi = $node->get('doi')->getString(); //New way to display DOI diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig index 5ced0cd47..8cb963201 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/block/hwjma-toc-pager.html.twig @@ -1,7 +1,4 @@ - - {% spaceless %} - {{ previous }} - {{ next }} - {% endspaceless %} -
    - +{% spaceless %} + {{ previous }} + {{ next }} +{% endspaceless %} diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig index 97c6b42c5..726fdb7eb 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig @@ -1,4 +1,5 @@ {{journal_title}} +
    @@ -83,4 +84,5 @@ {% endif %}
    +
    \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--full.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--full.html.twig index 30884271b..5493bbead 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--full.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--full.html.twig @@ -74,10 +74,12 @@ 'clearfix', ] %} +
    {% block node_content %} {{ content }}
    {% endblock %} - \ No newline at end of file + +
    \ No newline at end of file diff --git a/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig b/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig index b429c4cd6..c4b53192c 100755 --- a/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig +++ b/web/themes/highwire/hwjma_theme/source/default/_patterns/03-components/site/_journal-top-content.twig @@ -19,11 +19,7 @@ } only %} {% endif %} {% if authors %} - {% for item in authors %} - {% include "@atoms/text/_heading-6.twig" with { - heading: item - } only %} - {% endfor %} +
    {{ authors }}
    {% endif %} {% if author_link %} \ No newline at end of file +
    From a53e42ceb2607a908718798f5769dea2ee8843d5 Mon Sep 17 00:00:00 2001 From: rajatmps <124679295+rajatmps@users.noreply.github.com> Date: Tue, 8 Aug 2023 14:59:48 +0530 Subject: [PATCH 078/174] Update node--journal-article--content-details.html.twig Add line space --- .../node/node--journal-article--content-details.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig index 726fdb7eb..2f1f337ef 100644 --- a/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig +++ b/web/themes/highwire/hwjma_theme/apps/drupal-default/hwjma_theme/templates/node/node--journal-article--content-details.html.twig @@ -85,4 +85,4 @@
  • -
    \ No newline at end of file +