open settings and profile on the feeds page

This commit is contained in:
Athou
2013-05-01 16:21:52 +02:00
parent 1e4b01d67d
commit cd10ee2e0a
4 changed files with 20 additions and 16 deletions

View File

@@ -410,10 +410,10 @@ function($scope, $http, $state, $stateParams, $route, $location,
$location.path('admin');
};
$scope.toSettings = function() {
$location.path('settings');
$state.transitionTo('feeds.settings');
};
$scope.toProfile = function() {
$location.path('profile');
$state.transitionTo('feeds.profile');
};
$scope.toHelp = function() {
$state.transitionTo('feeds.help');

View File

@@ -39,6 +39,16 @@ app.config([ '$routeProvider', '$stateProvider', '$urlRouterProvider',
templateUrl : 'templates/feeds.help.html',
controller : trackCtrl
});
$stateProvider.state('feeds.settings', {
url : '/settings',
templateUrl : 'templates/settings.html',
controller : 'SettingsCtrl'
});
$stateProvider.state('feeds.profile', {
url : '/profile',
templateUrl : 'templates/profile.html',
controller : 'ProfileCtrl'
});
$stateProvider.state('admin', {
'abstract' : true,
@@ -66,18 +76,6 @@ app.config([ '$routeProvider', '$stateProvider', '$urlRouterProvider',
controller : 'ManageSettingsCtrl'
});
$stateProvider.state('settings', {
url : '/settings',
templateUrl : 'templates/settings.html',
controller : 'SettingsCtrl'
});
$stateProvider.state('profile', {
url : '/profile',
templateUrl : 'templates/profile.html',
controller : 'ProfileCtrl'
});
$urlRouterProvider.when('/', '/feeds/view/category/all');
$urlRouterProvider.when('/admin', '/admin/settings');
$urlRouterProvider.otherwise('/');

View File

@@ -1,8 +1,14 @@
<div class="container profile">
<div class="container-fluid profile">
<div class="page-header">
<h1>Profile</h1>
</div>
<form name="profileForm" ng-submit="save()" class="form-horizontal">
<div class="control-group">
<label class="control-label" for="email">User name</label>
<div class="controls horizontal-align">
<span>{{user.name}}</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">E-mail</label>
<div class="controls">

View File

@@ -1,4 +1,4 @@
<div class="container settings">
<div class="container-fluid settings">
<div class="page-header">
<h1>Settings</h1>
</div>