-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated dependencies Mar 3 2021 - HSD8-987 Added action to mark content to be ignored by the importers - HSD8-911 Add print friendly module - STN-650: Views padding refinement (#816) - STN-654: Bug fix for hb-list-reset incorrect markers (#815) - STN-656: Heading Links Utility Class to add Color (#804) - chore: document the emoji/symbols used in the utility class tables (#809) - HSD8-995 Fixed media images not saving the caption field - Fixed the migrate process plugin that gets the field default value
- Loading branch information
Showing
25 changed files
with
415 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
printfriendly_image: printfriendly-pdf-email-button-notext.png | ||
db_version: 1 | ||
printfriendly_display: | ||
hs_basic_page: 0 | ||
hs_course: 0 | ||
hs_event: 0 | ||
hs_event_series: 0 | ||
hs_news: 0 | ||
hs_person: 0 | ||
hs_private_page: 0 | ||
hs_publications: 0 | ||
hs_research: 0 | ||
teaser: 0 | ||
printfriendly_page_header: default_logo | ||
printfriendly_page_custom_header: '' | ||
printfriendly_tagline: '' | ||
printfriendly_click_delete: '0' | ||
printfriendly_images: '0' | ||
printfriendly_image_style: right | ||
printfriendly_email: '1' | ||
printfriendly_pdf: '0' | ||
printfriendly_print: '0' | ||
printfriendly_custom_css: '' | ||
custom_button_img_url: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ignore content from importer: | ||
title: 'Flag Content to be ignored with importers' | ||
description: 'Flag the content to be ignore. The flag does not work when an importer is set to "Force Update".' |
99 changes: 99 additions & 0 deletions
99
docroot/modules/humsci/hs_actions/src/Plugin/Action/MigrationIgnore.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
namespace Drupal\hs_actions\Plugin\Action; | ||
|
||
use Drupal\Core\Access\AccessResult; | ||
use Drupal\Core\Database\Connection; | ||
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | ||
use Drupal\Core\Session\AccountInterface; | ||
use Drupal\migrate\Plugin\MigrateIdMapInterface; | ||
use Drupal\migrate\Plugin\MigrationPluginManagerInterface; | ||
use Drupal\node\NodeInterface; | ||
use Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionBase; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
/** | ||
* Clones a node. | ||
* | ||
* @Action( | ||
* id = "migration_ignore", | ||
* label = @Translation("Ignore from importing"), | ||
* type = "node" | ||
* ) | ||
*/ | ||
class MigrationIgnore extends ViewsBulkOperationsActionBase implements ContainerFactoryPluginInterface { | ||
|
||
/** | ||
* Database connection service. | ||
* | ||
* @var \Drupal\Core\Database\Connection | ||
*/ | ||
protected $database; | ||
|
||
/** | ||
* Migration plugin manager service. | ||
* | ||
* @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface | ||
*/ | ||
protected $migrationPluginManager; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { | ||
return new static( | ||
$configuration, | ||
$plugin_id, | ||
$plugin_definition, | ||
$container->get('database'), | ||
$container->get('plugin.manager.migration') | ||
); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, MigrationPluginManagerInterface $migration_plugin_manager) { | ||
parent::__construct($configuration, $plugin_id, $plugin_definition); | ||
$this->database = $database; | ||
$this->migrationPluginManager = $migration_plugin_manager; | ||
} | ||
|
||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) { | ||
if (!$account->hasPermission('ignore content from importer')) { | ||
return $return_as_object ? AccessResult::forbidden() : FALSE; | ||
} | ||
|
||
/** @var \Drupal\node\NodeInterface $object */ | ||
$result = $object->access('update', $account, TRUE) | ||
->andIf($object->access('create', $account, TRUE)); | ||
|
||
return $return_as_object ? $result : $result->isAllowed(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function execute($entity = NULL) { | ||
if ($entity instanceof NodeInterface) { | ||
foreach ($this->migrationPluginManager->getDefinitions() as $definition) { | ||
$table = "migrate_map_{$definition['id']}"; | ||
if ( | ||
$this->database->schema()->tableExists($table) && | ||
$this->database->schema()->fieldExists($table, 'destid1') && | ||
$this->database->schema()->fieldExists($table, 'source_row_status') | ||
) { | ||
$this->database->update($table) | ||
->fields(['source_row_status' => MigrateIdMapInterface::STATUS_IGNORED]) | ||
->condition('destid1', $entity->id()) | ||
->execute(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.info.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docroot/themes/humsci/humsci_basic/src/scss/objects/_layouts.views.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//These are styles for views blocks specifically added through Layout Builder. | ||
.layout__region .block-views { | ||
&:not(:last-child) { | ||
margin-bottom: hb-spacing-width(); | ||
} | ||
|
||
&.hb-dark-pattern { | ||
//Allows hb-dark-pattern to be added with Layout Builder Attributes block class | ||
padding: hb-spacing-width('xs'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.