browseRoot();
}
}
- }
+ breadCrumbEntries=function(){
+ var curBrowseViewModel=self;
+ var entries=[];
+ do{
+ entries.push(curBrowseViewModel.groupId);
+ curBrowseViewModel=curBrowseViewModel.parentBrowseViewModel;
+ if (!curBrowseViewModel) return entries.reverse();
+ }while(curBrowseViewModel.parentBrowseViewModel)
+ return entries.reverse();
+ }
+ }
+ findParentGroupId=function(browseViewModel){
+ return browseViewModel.groupId;
+ }
displayGroupDetail=function(groupId,parentBrowseViewModel,restUrl){
var mainContent = $("#main-content");
<ul>
<!-- if null we are on root level -->
{{if $root.parentBrowseViewModel}}
- <li class="browse-list"><a href="#" data-bind="click:function(){displayParentGroupId()}">..</a></li>
+ <li class="browse-list" data-bind="click:function(){displayParentGroupId()}">
+ <a href="#">..</a>
+ </li>
{{/if}}
{{each(i,browseResultEntry) browseResultEntries}}
- <li class="browse-list">
- <a href="#" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">
+ <li class="browse-list" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">
+ <a href="#">
${browseResultEntry.name} (project: ${browseResultEntry.project})
</a>
</li>
<script id="browse-breadcrumb-tmpl" type="text/html">
<ul class="breadcrumb">
<li><a href="#" data-bind="click: function(){ browseRoot()}"><i class="icon-home"/> </a> <span class="divider">/</span></li>
- <li><a href="#">org</a> <span class="divider">/</span></li>
+ {{each(i,breadCrumbEntry) breadCrumbEntries}}
+ <li><a href="#">${breadCrumbEntry}</a> <span class="divider">/</span></li>
+ {{/each}}
</ul>
</script>
\ No newline at end of file