Skip to content

Commit

Permalink
added islandora.libraries.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shriram10567 committed Nov 10, 2022
1 parent 6de21d6 commit 2cb2f2c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions css/islandora.theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.container .islandora-media-items {
margin: 0;
}
5 changes: 5 additions & 0 deletions islandora.libraries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
drupal.islandora.theme_css:
version: VERSION
css:
theme:
css/islandora.theme.css: {}
13 changes: 8 additions & 5 deletions islandora.module
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ function islandora_form_alter(&$form, FormStateInterface $form_state, $form_id)
'#theme' => 'item_list',
'#type' => 'ul',
'#items' => $media_list,
'#attributes' => ['class' => 'mylist'],
'#wrapper_attributes' => ['class' => 'container'],
'#attributes' => ['class' => ['islandora-media-items']],
'#wrapper_attributes' => ['class' => ['container']],
'#attached' => [
'library' => [
'islandora/drupal.islandora.theme_css',
Expand Down Expand Up @@ -454,7 +454,7 @@ function islandora_object_delete_form_submit($form, &$form_state) {

if ($delete_files) {
$file_storage->delete($delete_files);
foreach ($delete_files as $file) {
foreach ($delete_files as $id => $file) {
$logger->notice('The file %label has been deleted.', [
'%label' => $file->label(),
]);
Expand Down Expand Up @@ -489,15 +489,18 @@ function islandora_object_delete_form_submit($form, &$form_state) {
'#type' => 'html_tag',
'#tag' => 'div',
'#value' => t("The repository item @node and @media", [
'@node' => $node->getTitle(),
'@media' => \Drupal::translation()->formatPlural(
'#value' => t("The repository item @node and @media", [
'@node' => $node->getTitle(),
'@media' => \Drupal::translation()->formatPlural(
substr_count($media_list, ",") + 1, 'the media with the id @media has been deleted.',
'the medias with the id @media have been deleted.',
['@media' => mb_substr($media_list, 0, strlen($media_list) - 2)]),
]),
]),
],
];


$message = \Drupal::service('renderer')->renderPlain($build);
$messenger->deleteByType('status');
$messenger->addStatus($message);
Expand Down

0 comments on commit 2cb2f2c

Please sign in to comment.