-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(navigation): Stanardizes the left hand menu
Closes #260 This commit represents the bulk of the work. Closing and moving on but more tweaks are likely needed. Also this commit is asymmetrical, the equivalent work has not been done in baw-server!
- Loading branch information
Showing
9 changed files
with
181 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
<nav role="navigation"> | ||
<h6> | ||
<strong class="text-uppercase text-muted"> | ||
{{ $ctrl.title }} | ||
Menu | ||
</strong> | ||
</h6> | ||
<ul class="nav nav-pills nav-stacked"> | ||
<li ng-repeat="link in $ctrl.links" | ||
ng-class="{ active: link.isActive }"> | ||
<a title="" data-toggle="tooltip" data-placement="right" ng-href="{{ link.href }}" | ||
data-original-title="View your projects">{{ link.title }}</a> | ||
ng-class="['indentation-' + link.indentation || 0, { active: link.isActive}]"> | ||
<a title="{{ link.title }}" | ||
data-toggle="tooltip" | ||
data-placement="right" | ||
ng-href="{{ link.href }}" | ||
target="{{ link.target}}" | ||
data-original-title="{{ link.title }}"> | ||
<i class="fa fa-fw default-color" ng-class="'fa-' + link.icon"></i> | ||
{{ link.title }} | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
angular | ||
.module("bawApp.navigation.menuDefinition", []) | ||
.factory("MenuDefinition", [ | ||
"conf.paths", | ||
function (paths) { | ||
const omnipresentLinks = [ | ||
{ | ||
title: "Home", | ||
href: paths.api.links.homeAbsolute, | ||
icon: "home", | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Log in", | ||
href: paths.api.links.loginActualAbsolute, | ||
icon: "sign-in", | ||
condition: user => user === null, | ||
target: "_self" | ||
}, | ||
{ | ||
title: "My Profile", | ||
href: paths.api.links.myAccountAbsolute, | ||
icon: "user", | ||
condition: user => user !== null, | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Register", | ||
href: paths.api.links.registerAbsolute, | ||
icon: "user-plus", | ||
condition: user => user === null, | ||
target: "_self" | ||
}, | ||
{ | ||
title: "My Annotations", | ||
href: user => user.annotationUrl, | ||
icon: "square-o", | ||
condition: user => user !== null, | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Projects", | ||
href: paths.api.links.projectsAbsolute, | ||
icon: "globe", | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Audio Analysis", | ||
href: paths.site.ngRoutes.analysisJobs.list, | ||
icon: "server" | ||
}, | ||
{ | ||
title: "Library", | ||
href: paths.site.ngRoutes.library, | ||
icon: "book" | ||
}, | ||
{ | ||
title: "Data Request", | ||
href: paths.api.links.dataRequestAbsolute, | ||
icon: "table", | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Send Audio", | ||
href: paths.api.links.dataUploadAbsolute, | ||
icon: "envelope", | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Report Problem", | ||
href: paths.api.links.bugReportAbsolute, | ||
icon: "bug", | ||
target: "_self" | ||
}, | ||
{ | ||
title: "Website Statistics", | ||
href: paths.api.links.websiteStatusAbsolute, | ||
icon: "line-chart", | ||
target: "_self" | ||
}, | ||
|
||
]; | ||
|
||
return omnipresentLinks; | ||
} | ||
]); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,6 @@ a { | |
display: inline; | ||
position: inherit; | ||
} | ||
|
||
} | ||
|
||
// display nav-pills without making them links | ||
|