Adding a sidebar tab

This commit is contained in:
Will Marshall
2014-03-27 13:34:38 +11:00
parent b5f1464ce9
commit 2158937f82
6 changed files with 16 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
window.ForgotSidebarCtrl = Darkswarm.controller "ForgotSidebarCtrl", ($scope, $http, $location) ->
$scope.active = ->
$location.path() == '/forgot'
$scope.select = ->
$location.path("/forgot")

View File

@@ -1,3 +1,3 @@
window.SidebarCtrl = Darkswarm.controller "SidebarCtrl", ($scope, $location) ->
$scope.active = ->
$location.path() in ["/login", "/signup"]
$location.path() in ["/login", "/signup", "/forgot"]

View File

@@ -17,3 +17,6 @@
@include panel($bg, $padding, $adjust)
.content
background: white
.tabs dd a
padding: 0.5em 1em

View File

@@ -0,0 +1,5 @@
%tab#forgot{"ng-controller" => "ForgotSidebarCtrl",
heading: "Forgot Password?",
active: "active()",
select: "select()"}
Well you're a bit stupid then

View File

@@ -3,4 +3,5 @@
%tabset
= render partial: "shared/login_sidebar"
= render partial: "shared/signup_sidebar"
= render partial: "shared/forgot_sidebar"
= yield :sidebar

View File

@@ -1,4 +1,3 @@
#sign-up-content{"ng-controller" => "SignupSidebarCtrl", "ng-show" => "active()"}
%tab#sign-up-content{"ng-controller" => "SignupSidebarCtrl",
heading: "Signup",
active: "active()",