Partially integrate projects nav.
parent
e68a1dc1b9
commit
8477e36c56
|
@ -118,11 +118,33 @@ MainTaigaDirective = ($log, $compile, $rootscope) ->
|
|||
menuDom.find("a.active").removeClass("active")
|
||||
menuDom.find("[data-name=#{sectionName}] > a").addClass("active")
|
||||
|
||||
# Link function related to projects navigation
|
||||
# part of main menu.
|
||||
linkProjecsNav = ($scope, $el, $attrs, $ctrl) ->
|
||||
$el.addClass("closed-project-nav")
|
||||
|
||||
$el.on "click", ".menu .logo > a", (event) ->
|
||||
event.preventDefault()
|
||||
$el.toggleClass("closed-project-nav")
|
||||
$el.toggleClass("open-project-nav")
|
||||
|
||||
$el.on "click", ".projects-list > li > a", (event) ->
|
||||
$el.toggleClass("closed-project-nav")
|
||||
$el.toggleClass("open-project-nav")
|
||||
|
||||
$scope.$watch ->
|
||||
console.log $scope
|
||||
|
||||
link = ($scope, $el, $attrs, $ctrl) ->
|
||||
$scope.$on "$viewContentLoaded", (ctx) ->
|
||||
renderMainMenu($el, ctx.targetScope.$$childHead)
|
||||
|
||||
return {link:link}
|
||||
linkProjecsNav($scope, $el, $attrs, $ctrl)
|
||||
|
||||
return {
|
||||
controller: MainTaigaController
|
||||
link: link
|
||||
}
|
||||
|
||||
|
||||
module.directive("tgMain", ["$log", "$compile", "$rootScope", MainTaigaDirective])
|
||||
|
|
|
@ -235,6 +235,7 @@ IssueStatusDirective = ->
|
|||
|
||||
return {link:link}
|
||||
|
||||
|
||||
IssueAssignedtoDirective = ->
|
||||
template = """
|
||||
<figure class="avatar">
|
||||
|
@ -305,5 +306,3 @@ module.directive("tgIssueStatus", IssueStatusDirective)
|
|||
module.directive("tgIssueAssignedto", IssueAssignedtoDirective)
|
||||
module.directive("tgIssuePriority", IssuePriorityDirective)
|
||||
module.directive("tgIssueSeverity", IssueSeverityDirective)
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ html(lang="en", ng-app="taiga")
|
|||
meta(name="viewport", content="width=device-width, user-scalable=no")
|
||||
link(rel="stylesheet", href="/styles/main.css")
|
||||
body(tg-main)
|
||||
include partials/views/modules/project-nav
|
||||
nav.menu
|
||||
include partials/views/components/notification-message
|
||||
div.master(ng-view)
|
||||
|
|
|
@ -16,6 +16,5 @@ block content
|
|||
section.main.issues-page
|
||||
header
|
||||
include views/components/mainTitle
|
||||
|
||||
include views/modules/list-filters
|
||||
include views/modules/issues-table
|
||||
|
|
|
@ -2,22 +2,10 @@ nav.project-nav
|
|||
h1 Your projects
|
||||
form
|
||||
fieldset
|
||||
input(type="text" placeholder="Search in...")
|
||||
input(type="text" placeholder="Search in...", ng-model="projectsSearch.$")
|
||||
a.icon.icon-search
|
||||
|
||||
ul.projects-list
|
||||
li
|
||||
a(href="") Decathlon
|
||||
li(ng-repeat="project in projects|filter:projectsSearch:strict track by project.id")
|
||||
a(href="", tg-bo-html="project.name", tg-nav="project-backlog:project=project.slug")
|
||||
span.icon.icon-arrow-right
|
||||
|
||||
li
|
||||
a.active(href="") Yump
|
||||
span.icon.icon-arrow-right
|
||||
|
||||
li
|
||||
a(href="") Taiga
|
||||
span.icon.icon-arrow-right
|
||||
|
||||
li
|
||||
a(href="") Wine and people
|
||||
span.icon.icon-arrow-right
|
Loading…
Reference in New Issue