Skip to content

Commit

Permalink
Merge pull request #7 from dartmouth-dltg/feature-v4
Browse files Browse the repository at this point in the history
DRAFT: Feature v4
  • Loading branch information
jdshaw authored Nov 7, 2023
2 parents f37517d + 6c9967e commit 03abc3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/module.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[info]
name = "Random Items Block"
version = "1.0.4"
version = "1.1.0"
author = "BibLibre, Dartmouth Library"
configurable = false
description = "A page block layout to display random items"
module_link = "https://github.com/dartmouth-dltg/omeka-s-module-RandomItemsBlock"
author_link = "https://github.com/dartmouth-dltg/omeka-s-module-RandomItemsBlock"
omeka_version_constraint = "^3.0.0"
omeka_version_constraint = "^3.1.0 || ^4.0.0"
2 changes: 1 addition & 1 deletion src/View/Helper/RandomItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RandomItems extends AbstractHelper
public function __construct(EntityManager $entityManager, ApiAdapterManager $apiAdapterManager)
{
$this->entityManager = $entityManager;
$this->apiAdapterManager = $apiAdapterManager;
$this->apiAdapterManager = $apiAdapterManager;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php $items = $this->randomItems($block->dataValue('count', 3), $block->dataValue('totalItems', 1000), $block->dataValue('show_res_template_select_option', null)); ?>
<?php $items = $this->randomItems((int) $block->dataValue('count', 3), (int) $block->dataValue('totalItems', 1000), $block->dataValue('show_res_template_select_option', null)); ?>
<?php $itemIds = $items[0];
$initialItems = $items[1];
$randomIdx = $items[2];
Expand All @@ -16,7 +16,7 @@
</div>
<?php endif; ?>
<?php endif; ?>
<div class="item-showcase" id="<?php echo $blockUuid ?>">
<div class="item-showcase random-items" id="<?php echo $blockUuid ?>">
<div class="item resource" aria-live="polite">
<?php foreach ($initialItems as $initialItem): ?>
<div class="random-item">
Expand Down

0 comments on commit 03abc3f

Please sign in to comment.