     ,
     ]
   ]
-  updateMenuLinks()

.controller 'BaseCtrl', (
  $scope
  $mdSidenav
  $mdDialog
  $state
  Sprint
  projectUtils
  project
  sprint
  Project
) ->
  $scope.project = project
  $scope.sprint = sprint

  $scope.toggleSidenav = ->
    $mdSidenav('left').toggle()

  showConfirmNewSprint = (ev) ->
    confirm = $mdDialog.confirm()
      .title 'Start a new sprint'
      .textContent 'Starting a new sprint will end this one'
      .targetEvent ev
      .ok 'OK'
      .cancel 'Cancel'
    $mdDialog.show(confirm).then ->
      $state.go 'tab.new-sprint'

  $scope.goTo = (item) ->
    $state.go item.state, item.params

    ,
      state: 'tab.sprint-list'
      params:
        projectId: $scope.project?.objectId
      title: 'Sprints'
      icon: 'view-list'
    ,
    ]
  ,
    title: 'Current Sprint'
    items: [
      state: 'tab.edit-sprint'
      params:
        sprintId: $scope.sprint?.objectId
      title: 'Settings'
      icon: 'settings'
    ,
