Skip to content
Snippets Groups Projects
Commit 967723de authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Improved view control display.

- Fixes view.phtml to display the translated name for the view in title and display the title for selected view also when hovering over the text part.
parent 83d61b85
No related merge requests found
<div class="view-buttons hidden-xs"> <div class="view-buttons hidden-xs">
<? $viewList = $this->params->getViewList(); if (count($viewList) > 1): ?> <? $viewList = $this->params->getViewList(); if (count($viewList) > 1): ?>
<? foreach ($viewList as $viewType => $viewData): ?> <? foreach ($viewList as $viewType => $viewData): ?>
<? $viewDesc = $this->translate($viewData['desc']); ?>
<? if (!$viewData['selected']): ?> <? if (!$viewData['selected']): ?>
<a href="<?=$this->results->getUrlQuery()->setViewParam($viewType)?>" title="<?=$this->transEsc('switch_view', ['%%view%%' => $viewData['desc']])?>" > <a href="<?=$this->results->getUrlQuery()->setViewParam($viewType)?>" title="<?=$this->escapeHtmlAttr($this->translate('switch_view', ['%%view%%' => $viewDesc]))?>" >
<? else: ?>
<span title="<?=$this->escapeHtmlAttr($this->translate('view_already_selected', ['%%current%%' => $viewDesc])) ?>">
<? endif; ?> <? endif; ?>
<i class="fa fa-<?=$viewType ?>"<? if($viewData['selected']): ?> title="<?=$this->transEsc('view_already_selected', ['%%current%%' => $viewData['desc']]) ?>"<? endif ?> alt="<?=$this->transEsc($viewData['desc'])?>"></i> <i class="fa fa-<?=$viewType ?>" alt="<?=$this->escapeHtmlAttr($viewDesc)?>"></i>
<?=$this->transEsc($viewData['desc']) ?><? if (!$viewData['selected']): ?></a><? endif; ?>&nbsp; <?=$viewDesc ?>
<? if (!$viewData['selected']): ?>
</a>
<? else: ?>
</span>
<? endif; ?>
&nbsp;
<? endforeach; ?> <? endforeach; ?>
<? endif; ?> <? endif; ?>
</div> </div>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment