Skip to content

Commit 7f4827a

Browse files
authored
Merge pull request #103 from beluga-core/develop-5
Develop 5
2 parents 8e7b76a + a861c2a commit 7f4827a

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

module/ResultFeedback/src/ResultFeedback/Controller/ResultFeedbackController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ public function emailAction()
9696
$email_message .= $translator->translate('Email') . ':' . "\n" . $view->email . "\n\n";
9797
$email_message .= $translator->translate('PPN') . ':' . "\n" . $view->recordid . "\n\n";
9898
$email_message .= $translator->translate('Title') . ':' . "\n" . $view->recordtitle . "\n\n";
99+
100+
if (isset($resultFeedbackConfig['resultFeedback']['base_url_' . $searchClassId])) {
101+
$email_message .= $translator->translate('Link') . ':' . "\n" . trim($resultFeedbackConfig['resultFeedback']['base_url_' . $searchClassId], '/') . '/' . $driver->getUniqueID() . "\n\n";
102+
}
103+
99104
$email_message .= $translator->translate('Message') . ':' . "\n" . $view->comments . "\n\n";
100105

101106
// This sets up the email to be sent
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<div class="facet-group active-filters">
2+
<div class="title"><?=$this->transEsc('Remove Filters')?></div>
3+
<?php foreach ($filterList as $field => $filters): ?>
4+
<?php foreach ($filters as $i => $filter): ?>
5+
<?php
6+
$index = isset($filter['field']) ? array_search($filter['field'], $collapsedFacets) : false;
7+
if ($index !== false) {
8+
unset($collapsedFacets[$index]); // Open if we have a match
9+
}
10+
if (isset($filter['specialType']) && $filter['specialType'] == 'keyword') {
11+
$removeLink = $this->currentPath() . $results->getUrlQuery()->replaceTerm($filter['value'], '');
12+
} else {
13+
$removeLink = $this->currentPath() . $results->getUrlQuery()->removeFacet($filter['field'], $filter['value'], $filter['operator']);
14+
}
15+
if ($filter['displayText'] == '[* TO *]') {
16+
$filter['displayText'] = $this->translate('filter_wildcard');
17+
}
18+
?>
19+
<a class="facet" href="<?=$removeLink ?>" title="<?=$this->transEsc('clear_tag_filter') ?>">
20+
<span class="sr-only"><?=$this->transEsc('clear_tag_filter') ?></span>
21+
<span class="text">
22+
<?php if ($filter['operator'] == 'NOT'): ?><?=$this->transEsc('NOT') ?><?php endif; ?>
23+
<?php if ($filter['operator'] == 'OR' && $i > 0): ?><?=$this->transEsc('OR') ?><?php endif; ?>
24+
<?=$this->transEsc($filter['field']) ?>: <?=$this->escapeHtml($filter['displayText']) ?>
25+
</span>
26+
<span class="status"><i class="fa fa-times" aria-hidden="true"></i></span>
27+
</a>
28+
<?php endforeach; ?>
29+
<?php endforeach; ?>
30+
</div>

0 commit comments

Comments
 (0)