mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-10 08:26:39 +00:00
DSS-3869, breadcrumb for dataset detail page
This commit is contained in:
parent
960440cc33
commit
e7dd347d04
@ -1350,6 +1350,21 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="well well-sm">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-10">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
{{#each breadcrumbs as |crumb|}}
|
||||||
|
<li>
|
||||||
|
<a title="{{crumb.title}}" href="#/datasets/{{crumb.urn}}">
|
||||||
|
{{crumb.title}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if tabview}}
|
{{#if tabview}}
|
||||||
|
@ -197,10 +197,35 @@ App.DatasetRoute = Ember.Route.extend({
|
|||||||
urn = urn.replace('<b>', '').replace('</b>', '');
|
urn = urn.replace('<b>', '').replace('</b>', '');
|
||||||
var index = urn.lastIndexOf("/");
|
var index = urn.lastIndexOf("/");
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
var name = urn.substring(index +1);
|
var name = urn.substring(index +1);
|
||||||
findAndActiveDatasetNode(name, urn);
|
findAndActiveDatasetNode(name, urn);
|
||||||
|
}
|
||||||
|
var breadcrumbs = [];
|
||||||
|
var updatedUrn = urn.replace("://", "");
|
||||||
|
var b = updatedUrn.split('/');
|
||||||
|
for(var i = 0; i < b.length; i++) {
|
||||||
|
if( i === 0) {
|
||||||
|
breadcrumbs.push({
|
||||||
|
title: b[i],
|
||||||
|
urn: "name/" + b[i] + "/page/1?urn=" + b[i]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
else if (i === (b.length -1))
|
||||||
|
{
|
||||||
|
breadcrumbs.push({
|
||||||
|
title: b[i],
|
||||||
|
urn: id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
breadcrumbs.push({
|
||||||
|
title: b[i],
|
||||||
|
urn: "name/" + b[i] + "/page/1?urn=" + urn.split('/').splice(0, i+3).join('/')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
controller.set("breadcrumbs", breadcrumbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
var userSettingsUrl = 'api/v1/user/me';
|
var userSettingsUrl = 'api/v1/user/me';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user