Skip to content

Commit

Permalink
Merge pull request #52 from winnietan/feature/app_title
Browse files Browse the repository at this point in the history
[MNOE-109] Better App title management
  • Loading branch information
ouranos authored Jul 20, 2016
2 parents 7025478 + 312ad8d commit 7785ac7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ angular.module('mnoEnterprise.configuration', [])
})
.constant('PRICING_CONFIG', <%= Settings.pricing.to_json %>)
.constant('GOOGLE_TAG_CONTAINER_ID', <%= MnoEnterprise.google_tag_container.to_json %>)
.constant('APP_NAME', <%= MnoEnterprise.app_name.to_json %>)

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def current_ability

def set_default_meta
@meta = {}
@meta[:title] = "Application"
@meta[:title] = MnoEnterprise.app_name
@meta[:description] = "Enterprise Applications"
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/* Login Page */
/*-----------------------------------------------------------------------*/
@login-bg-color: @bg-main-color;
@login-bg-img: "";
@login-box-grid-position: { margin-top: 80px; .make-sm-column(4); .make-sm-column-offset(4); };

@login-box-title-color: @decorator-main-color;
Expand Down
3 changes: 2 additions & 1 deletion frontend-admin/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"restangular": "~1.5.1",
"rdash-ui": "~1.0.1",
"angular-scroll": "^1.0.0",
"angular-smart-table": "^2.1.8"
"angular-smart-table": "^2.1.8",
"ng-page-title": "^1.1.1"
},
"devDependencies": {
"angular-mocks": "~1.5.3"
Expand Down
3 changes: 3 additions & 0 deletions frontend-admin/src/app/index.module.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@App = angular.module 'frontendAdmin', [
'mnoEnterprise.configuration',

'ngAnimate',
'ngAria',
'ngCookies',
Expand All @@ -12,4 +14,5 @@
'smart-table',
'angularMoment',
'duScroll',
'ngPageTitle'
]
12 changes: 12 additions & 0 deletions frontend-admin/src/app/index.route.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
controller: 'DashboardController'
controllerAs: 'main'
.state 'dashboard.home',
data:
pageTitle:'Home'
url: '/home'
templateUrl: 'app/views/home/home.html'
controller: 'HomeController'
controllerAs: 'vm'
ncyBreadcrumb:
label: 'Home'
.state 'dashboard.home.user',
data:
pageTitle:'User'
url: '^/user/:userId'
views: '@dashboard':
templateUrl: 'app/views/user/user.html'
Expand All @@ -22,6 +26,8 @@
ncyBreadcrumb:
label: 'User'
.state 'dashboard.home.organization',
data:
pageTitle:'Organization'
url: '^/organization/:orgId'
views: '@dashboard':
templateUrl: 'app/views/organization/organization.html'
Expand All @@ -30,20 +36,26 @@
ncyBreadcrumb:
label: 'Organisation'
.state 'dashboard.finance',
data:
pageTitle:'Finance'
url: '/finance'
templateUrl: 'app/views/finance/finance.html'
controller: 'FinanceController'
controllerAs: 'vm'
ncyBreadcrumb:
label: 'Finance'
.state 'dashboard.staff',
data:
pageTitle:'Staff'
url: '/staff' #:staffId
templateUrl: 'app/views/staff/staff.html'
controller: 'StaffController'
controllerAs: 'vm'
ncyBreadcrumb:
label: 'Staff'
.state 'dashboard.customers',
data:
pageTitle:'Customers'
url: '/customers'
templateUrl: 'app/views/customers/customers.html'
controller: 'CustomersController'
Expand Down
6 changes: 6 additions & 0 deletions frontend-admin/src/app/index.run.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
@App

# Load the app name title
.run(($rootScope, APP_NAME) ->
$rootScope.app_name = APP_NAME
)

# Force the page to scroll to top when a view change
.run(($rootScope) ->
$rootScope.$on('$viewContentLoaded', ->
Expand Down
3 changes: 2 additions & 1 deletion frontend-admin/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html ng-app="frontendAdmin" ng-strict-di="true">
<head>
<meta charset="utf-8">
<title>Admin Platform</title>
<title state-title="Admin Platform" pattern="{{::app_name}} - Admin Platform - %s"></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
Expand Down Expand Up @@ -42,5 +42,6 @@
<!-- endinject -->
<!-- endbuild -->

<script src="/assets/mno_enterprise/config.js"></script>
</body>
</html>

0 comments on commit 7785ac7

Please sign in to comment.