diff --git a/views/helpers/CollectionTreeFullList.php b/views/helpers/CollectionTreeFullList.php
index 5835a4f..c04e31c 100644
--- a/views/helpers/CollectionTreeFullList.php
+++ b/views/helpers/CollectionTreeFullList.php
@@ -1,7 +1,7 @@
getTable('Collection');
- $html = '
';
+ $html = 'Collection Tree
';
foreach ($rootCollections as $rootCollection) {
$html .= '- ';
if ($linkToCollectionShow) {
$html .= link_to_collection(null, array(), 'show', $collectionTable->find($rootCollection['id']));
+ $html .= link_to_collection(null, ["aria-label" => $rootCollection["name"]], 'show', $collectionTable->find($rootCollection['id']));
} else {
$html .= $rootCollection['name'] ? $rootCollection['name'] : __('[Untitled]');
}
$collectionTree = get_db()->getTable('CollectionTree')->getDescendantTree($rootCollection['id']);
- $html .= $this->view->collectionTreeList($collectionTree, $linkToCollectionShow);
+ $html .= $this->view->collectionTreeList($collectionTree, $linkToCollectionShow, $rootCollection["name"]);
$html .= '
';
}
$html .= '
';
diff --git a/views/helpers/CollectionTreeList.php b/views/helpers/CollectionTreeList.php
index 729f993..6be0231 100644
--- a/views/helpers/CollectionTreeList.php
+++ b/views/helpers/CollectionTreeList.php
@@ -20,9 +20,10 @@ class CollectionTree_View_Helper_CollectionTreeList extends Zend_View_Helper_Abs
* @see CollectionTreeTable::getDescendantTree()
* @param array $collectionTree
* @param bool $linkToCollectionShow
+ * @param string $parentString
* @return string
*/
- public function collectionTreeList($collectionTree, $linkToCollectionShow = true)
+ public function collectionTreeList($collectionTree, $linkToCollectionShow = true, $parentString = '')
{
if (!$collectionTree) {
return;
@@ -31,10 +32,17 @@ public function collectionTreeList($collectionTree, $linkToCollectionShow = true
$collectionTable = get_db()->getTable('Collection');
$html = '';
foreach ($collectionTree as $collection) {
+ $path = '';
+ if (strlen($parentString) > 0) {
+ $path = $parentString.' / '.$collection['name'];
+ }
+ else {
+ $path = $collection['name'];
+ }
$html .= '- ';
// No link to current collection.
if ($linkToCollectionShow && !isset($collection['current']) && isset($collection['id'])) {
- $html .= link_to_collection(null, array(), 'show', $collectionTable->find($collection['id']));
+ $html .= link_to_collection(null, ["aria-label" => $path], 'show', $collectionTable->find($collection['id']));
}
// No link to private parent collection.
elseif (!isset($collection['id'])) {
@@ -44,7 +52,7 @@ public function collectionTreeList($collectionTree, $linkToCollectionShow = true
else {
$html .= empty($collection['name']) ? __('[Untitled]') : $collection['name'];
}
- $html .= $this->collectionTreeList($collection['children'], $linkToCollectionShow);
+ $html .= $this->collectionTreeList($collection['children'], $linkToCollectionShow, $path);
$html .= '
';
}
$html .= '
';