Moved template files into related modules
This patch moves all HTML templates from the central 'templates' module into their respective modules, while still creating the 'dummy' sb.templates template cache injector. The intent is to make it a little clearer which templates go with which javascript files. Change-Id: I8ec4929e18feedc5ec4a4cb53a46ff425bbdcf4a
This commit is contained in:
parent
29ff6b33ac
commit
86714a09ea
@ -193,7 +193,7 @@ module.exports = function (grunt) {
|
||||
base: dir.source
|
||||
},
|
||||
main: {
|
||||
src: [dir.source + '/app/templates/**/*.html'],
|
||||
src: [dir.source + '/app/*/template/**.html'],
|
||||
dest: dir.output + '/js/templates.js'
|
||||
}
|
||||
},
|
||||
@ -404,7 +404,7 @@ module.exports = function (grunt) {
|
||||
},
|
||||
templates: {
|
||||
files: [
|
||||
dir.source + '/app/templates/**/*.html'
|
||||
dir.source + '/app/**/*.html'
|
||||
],
|
||||
tasks: ['html2js']
|
||||
},
|
||||
|
@ -31,7 +31,7 @@ angular.module('sb.auth', [ 'sb.services', 'sb.templates', 'ui.router',
|
||||
})
|
||||
.state('auth.authorize', {
|
||||
url: '/authorize?error&error_description',
|
||||
templateUrl: 'app/templates/auth/busy.html',
|
||||
templateUrl: 'app/auth/template/busy.html',
|
||||
controller: 'AuthAuthorizeController',
|
||||
resolve: {
|
||||
isLoggedOut: SessionResolver.requireLoggedOut
|
||||
@ -39,7 +39,7 @@ angular.module('sb.auth', [ 'sb.services', 'sb.templates', 'ui.router',
|
||||
})
|
||||
.state('auth.deauthorize', {
|
||||
url: '/deauthorize',
|
||||
templateUrl: 'app/templates/auth/busy.html',
|
||||
templateUrl: 'app/auth/template/busy.html',
|
||||
controller: 'AuthDeauthorizeController',
|
||||
resolve: {
|
||||
isLoggedIn: SessionResolver.requireLoggedIn
|
||||
@ -47,7 +47,7 @@ angular.module('sb.auth', [ 'sb.services', 'sb.templates', 'ui.router',
|
||||
})
|
||||
.state('auth.token', {
|
||||
url: '/token?code&state&error&error_description',
|
||||
templateUrl: 'app/templates/auth/busy.html',
|
||||
templateUrl: 'app/auth/template/busy.html',
|
||||
controller: 'AuthTokenController',
|
||||
resolve: {
|
||||
isLoggedOut: SessionResolver.requireLoggedOut
|
||||
@ -55,7 +55,7 @@ angular.module('sb.auth', [ 'sb.services', 'sb.templates', 'ui.router',
|
||||
})
|
||||
.state('auth.error', {
|
||||
url: '/error?error&error_description',
|
||||
templateUrl: 'app/templates/auth/error.html',
|
||||
templateUrl: 'app/auth/template/error.html',
|
||||
controller: 'AuthErrorController'
|
||||
});
|
||||
})
|
||||
|
@ -31,7 +31,7 @@ angular.module('sb.auth')
|
||||
showLoginRequiredModal: function () {
|
||||
var modalInstance = $modal.open(
|
||||
{
|
||||
templateUrl: 'app/templates/auth' +
|
||||
templateUrl: 'app/auth/template' +
|
||||
'/modal/login_required.html',
|
||||
controller: 'LoginRequiredModalController'
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ angular.module('sb.dashboard',
|
||||
$stateProvider
|
||||
.state('index', {
|
||||
url: '/',
|
||||
templateUrl: 'app/templates/dashboard/index.html',
|
||||
templateUrl: 'app/dashboard/template/index.html',
|
||||
controller: 'HomeController',
|
||||
resolve: {
|
||||
sessionState: SessionResolver.resolveSessionState
|
||||
@ -34,7 +34,7 @@ angular.module('sb.dashboard',
|
||||
})
|
||||
.state('dashboard', {
|
||||
url: '/dashboard',
|
||||
templateUrl: 'app/templates/dashboard/dashboard.html',
|
||||
templateUrl: 'app/dashboard/template/dashboard.html',
|
||||
controller: 'DashboardController',
|
||||
resolve: {
|
||||
sessionState: SessionResolver.requireLoggedIn,
|
||||
|
@ -24,7 +24,7 @@ angular.module('sb.notification').directive('notifications',
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'app/templates/error/notifications.html',
|
||||
templateUrl: 'app/notification/template/notifications.html',
|
||||
controller: 'NotificationsController'
|
||||
};
|
||||
});
|
@ -35,6 +35,6 @@ angular.module('sb.pages',
|
||||
})
|
||||
.state('page.about', {
|
||||
url: '/about',
|
||||
templateUrl: 'app/templates/page/about.html'
|
||||
templateUrl: 'app/pages/template/about.html'
|
||||
});
|
||||
});
|
@ -44,7 +44,7 @@ angular.module('sb.profile',
|
||||
})
|
||||
.state('profile.preferences', {
|
||||
url: '/preferences',
|
||||
templateUrl: 'app/templates/profile/preferences.html',
|
||||
templateUrl: 'app/profile/template/preferences.html',
|
||||
controller: 'ProfilePreferencesController'
|
||||
});
|
||||
});
|
@ -40,17 +40,17 @@ angular.module('sb.projects',
|
||||
})
|
||||
.state('project.list', {
|
||||
url: '/list',
|
||||
templateUrl: 'app/templates/project/list.html',
|
||||
templateUrl: 'app/projects/template/list.html',
|
||||
controller: 'ProjectListController'
|
||||
})
|
||||
.state('project.detail', {
|
||||
url: '/{id:[0-9]+}',
|
||||
templateUrl: 'app/templates/project/detail.html',
|
||||
templateUrl: 'app/projects/template/detail.html',
|
||||
controller: 'ProjectDetailController'
|
||||
})
|
||||
.state('project.new', {
|
||||
url: '/new',
|
||||
templateUrl: 'app/templates/project/new.html',
|
||||
templateUrl: 'app/projects/template/new.html',
|
||||
controller: 'ProjectNewController',
|
||||
resolve: {
|
||||
isLoggedIn: SessionResolver.requireLoggedIn,
|
||||
|
@ -160,7 +160,7 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="story in stories"
|
||||
ng-controller="StoryListItemController"
|
||||
ng-include="'app/templates/story/story_list_item.html'">
|
||||
ng-include="'app/stories/template/story_list_item.html'">
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -27,6 +27,6 @@ angular.module('sb.search',
|
||||
$stateProvider
|
||||
.state('search', {
|
||||
url: '/search?q',
|
||||
templateUrl: 'app/templates/search/index.html'
|
||||
templateUrl: 'app/search/template/index.html'
|
||||
});
|
||||
});
|
||||
|
@ -26,7 +26,7 @@
|
||||
tag-complete="criteria as criteria.title for criteria in searchForCriteria($viewValue)"
|
||||
tag-complete-tags="criteria"
|
||||
tag-complete-label-field="title"
|
||||
tag-complete-option-template-url="'app/templates/search/typeahead_criteria_item.html'"
|
||||
tag-complete-option-template-url="'app/search/template/typeahead_criteria_item.html'"
|
||||
tag-complete-tag-template-url="'/inline/criteria_tag_item.html'"
|
||||
tag-complete-loading="loadingCriteria = isLoading"
|
||||
tag-complete-on-select="addCriteria(tag)">
|
||||
@ -74,7 +74,7 @@
|
||||
<table class="table table-condensed table-striped table-clean">
|
||||
<tbody ng-if="searchResults.length != 0">
|
||||
<tr ng-repeat="project in searchResults"
|
||||
ng-include="'app/templates/search/project_search_item.html'">
|
||||
ng-include="'app/search/template/project_search_item.html'">
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
<table class="table table-condensed table-striped table-clean">
|
||||
<tbody ng-if="searchResults.length != 0">
|
||||
<tr ng-repeat="story in searchResults"
|
||||
ng-include="'app/templates/search/story_search_item.html'">
|
||||
ng-include="'app/search/template/story_search_item.html'">
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -164,7 +164,7 @@
|
||||
<table class="table table-condensed table-striped table-clean">
|
||||
<tbody ng-if="searchResults.length != 0">
|
||||
<tr ng-repeat="task in searchResults"
|
||||
ng-include="'app/templates/search/task_search_item.html'">
|
||||
ng-include="'app/search/template/task_search_item.html'">
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
<table class="table table-condensed table-striped table-clean">
|
||||
<tbody ng-if="searchResults.length != 0">
|
||||
<tr ng-repeat="user in searchResults"
|
||||
ng-include="'app/templates/search/user_search_item.html'">
|
||||
ng-include="'app/search/template/user_search_item.html'">
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -148,7 +148,7 @@ angular.module('sb.story').controller('StoryDetailController',
|
||||
*/
|
||||
$scope.remove = function () {
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'app/templates/story/delete.html',
|
||||
templateUrl: 'app/stories/template/delete.html',
|
||||
controller: 'StoryDeleteController',
|
||||
resolve: {
|
||||
story: function () {
|
||||
@ -163,7 +163,7 @@ angular.module('sb.story').controller('StoryDetailController',
|
||||
|
||||
$scope.updateFilter = function () {
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'app/templates/story/update_filter.html',
|
||||
templateUrl: 'app/stories/template/update_filter.html',
|
||||
controller: 'TimelineFilterController'
|
||||
});
|
||||
|
||||
|
@ -82,7 +82,7 @@ angular.module('sb.story').controller('StoryTaskListItemController',
|
||||
*/
|
||||
$scope.removeTask = function () {
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'app/templates/story/delete_task.html',
|
||||
templateUrl: 'app/stories/template/delete_task.html',
|
||||
controller: 'StoryTaskDeleteController',
|
||||
resolve: {
|
||||
task: function () {
|
||||
|
@ -26,7 +26,7 @@ angular.module('sb.story').directive('taskEditForm',
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'app/templates/story/task_edit_form.html',
|
||||
templateUrl: 'app/stories/template/task_edit_form.html',
|
||||
scope: {
|
||||
task: '=',
|
||||
onButtonClick: '&',
|
||||
|
@ -36,12 +36,12 @@ angular.module('sb.story', ['ui.router', 'sb.services', 'sb.util',
|
||||
})
|
||||
.state('story.list', {
|
||||
url: '/list',
|
||||
templateUrl: 'app/templates/story/list.html',
|
||||
templateUrl: 'app/stories/template/list.html',
|
||||
controller: 'StoryListController'
|
||||
})
|
||||
.state('story.detail', {
|
||||
url: '/{storyId:[0-9]+}',
|
||||
templateUrl: 'app/templates/story/detail.html'
|
||||
templateUrl: 'app/stories/template/detail.html'
|
||||
});
|
||||
|
||||
// Register a preference for filtering timeline events.
|
||||
|
@ -26,7 +26,7 @@ angular.module('sb.story').factory('NewStoryService',
|
||||
} else {
|
||||
var modalInstance = $modal.open(
|
||||
{
|
||||
templateUrl: 'app/templates/story/new.html',
|
||||
templateUrl: 'app/stories/template/new.html',
|
||||
controller: 'StoryModalController',
|
||||
resolve: {
|
||||
params: function () {
|
||||
|
@ -1,30 +1,30 @@
|
||||
<div ng-switch="event_type">
|
||||
<div ng-switch-when="story_created">
|
||||
<div ng-include src="'app/templates/story/comments/story_created.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/story_created.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="story_details_changed">
|
||||
<div ng-include src="'app/templates/story/comments/story_details_changed.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/story_details_changed.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="task_assignee_changed">
|
||||
<div ng-include src="'app/templates/story/comments/task_assignee_changed.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/task_assignee_changed.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="task_created">
|
||||
<div ng-include src="'app/templates/story/comments/task_created.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/task_created.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="task_deleted">
|
||||
<div ng-include src="'app/templates/story/comments/task_deleted.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/task_deleted.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="task_details_changed">
|
||||
<div ng-include src="'app/templates/story/comments/task_details_changed.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/task_details_changed.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="task_status_changed">
|
||||
<div ng-include src="'app/templates/story/comments/task_status_changed.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/task_status_changed.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="task_priority_changed">
|
||||
<div ng-include src="'app/templates/story/comments/task_priority_changed.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/task_priority_changed.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-when="user_comment">
|
||||
<div ng-include src="'app/templates/story/comments/user_comment.html'"></div>
|
||||
<div ng-include src="'app/stories/template/comments/user_comment.html'"></div>
|
||||
</div>
|
||||
<div ng-switch-default>
|
||||
<div class="discussion-comment">
|
@ -51,7 +51,7 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="story in stories"
|
||||
ng-controller="StoryListItemController"
|
||||
ng-include="'app/templates/story/story_list_item.html'">
|
||||
ng-include="'app/stories/template/story_list_item.html'">
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -93,7 +93,7 @@
|
||||
typeahead="criteria as criteria.title for criteria in quickSearch($viewValue)"
|
||||
typeahead-loading="headerCriteriaLoading"
|
||||
typeahead-on-select="search($model)"
|
||||
typeahead-template-url="app/templates/search/typeahead_criteria_item.html"
|
||||
typeahead-template-url="app/search/template/typeahead_criteria_item.html"
|
||||
/>
|
||||
<span class="form-control-feedback text-muted">
|
||||
<i class="fa fa-search" ng-hide="headerCriteriaLoading"></i>
|
@ -36,7 +36,7 @@ angular.module('sb.util').directive('tagComplete',
|
||||
tagCompleteOnSelect: '&',
|
||||
tagCompleteLoading: '&'
|
||||
},
|
||||
templateUrl: 'app/templates/util/tag_complete.html',
|
||||
templateUrl: 'app/util/template/tag_complete.html',
|
||||
link: function ($scope, $element, attrs) {
|
||||
/**
|
||||
* Grab our input.
|
||||
|
@ -29,7 +29,7 @@ angular.module('sb.util').directive('tagInput',
|
||||
},
|
||||
require: 'ngModel',
|
||||
controller: 'TagInputController',
|
||||
templateUrl: 'app/templates/util/tag_input.html'
|
||||
templateUrl: 'app/util/template/tag_input.html'
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@ angular.module('sb.util').directive('storyStatusLabel',
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'app/templates/util/story_status_label.html',
|
||||
templateUrl: 'app/util/template/story_status_label.html',
|
||||
scope: {
|
||||
story: '='
|
||||
},
|
||||
|
@ -24,7 +24,7 @@ angular.module('sb.util').directive('storyTaskStatus',
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'app/templates/util/story_task_status.html',
|
||||
templateUrl: 'app/util/template/story_task_status.html',
|
||||
scope: {
|
||||
story: '='
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ angular.module('sb.util').directive('taskPriorityDropdown',
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'app/templates/util/task_priority_dropdown.html',
|
||||
templateUrl: 'app/util/template/task_priority_dropdown.html',
|
||||
scope: {
|
||||
priority: '@',
|
||||
onChange: '&',
|
||||
|
@ -50,7 +50,7 @@ angular.module('sb.util').directive('taskStatusDropdown',
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'app/templates/util/task_status_dropdown.html',
|
||||
templateUrl: 'app/util/template/task_status_dropdown.html',
|
||||
scope: {
|
||||
status: '@',
|
||||
onChange: '&',
|
||||
|
@ -24,7 +24,7 @@ angular.module('sb.util').directive('timeMoment',
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
templateUrl: 'app/templates/util/time_moment.html',
|
||||
templateUrl: 'app/util/template/time_moment.html',
|
||||
scope: {
|
||||
eventdate: '='
|
||||
},
|
||||
|
@ -30,6 +30,6 @@ angular.module('sb.util').directive('timelineEvent', function($log) {
|
||||
scope.event_type = 'unknown';
|
||||
}
|
||||
},
|
||||
templateUrl: 'app/templates/story/comments/template_switch.html'
|
||||
templateUrl: 'app/stories/template/comments/template_switch.html'
|
||||
};
|
||||
});
|
@ -46,8 +46,8 @@
|
||||
</head>
|
||||
<body ng-class="{'logged-in' : isLoggedIn}">
|
||||
|
||||
<header ng-include src="'app/templates/header_menu.html'"></header>
|
||||
<div ng-include src="'app/templates/side_menu.html'"></div>
|
||||
<header ng-include src="'app/storyboard/template/header_menu.html'"></header>
|
||||
<div ng-include src="'app/storyboard/template/side_menu.html'"></div>
|
||||
<div ui-view class="main"></div>
|
||||
<notifications></notifications>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user