diff --git a/app/coffee/app.coffee b/app/coffee/app.coffee index c7ed28cb..753ae33a 100644 --- a/app/coffee/app.coffee +++ b/app/coffee/app.coffee @@ -341,6 +341,7 @@ modules = [ "taigaIntegrations", "taigaComponents", "taigaProfile", + "taigaHome", # template cache "templates", diff --git a/app/modules/home/home-project-list.directive.coffee b/app/modules/home/home-project-list.directive.coffee new file mode 100644 index 00000000..ae0048b6 --- /dev/null +++ b/app/modules/home/home-project-list.directive.coffee @@ -0,0 +1,18 @@ +HomeProjectListDirective = (projectsService) -> + link = (scope, el, attrs, ctrl) -> + scope.vm = {} + + scope.vm.projects = projectsService.projects + + scope.vm.newProject = -> + projectsService.newProject() + + directive = { + templateUrl: "home/home-project-list.html" + scope: {} + link: link + } + + return directive + +angular.module("taigaHome").directive("tgHomeProjectList", ["tgProjects", HomeProjectListDirective]) diff --git a/app/modules/home/home-project-list.jade b/app/modules/home/home-project-list.jade new file mode 100644 index 00000000..7617033d --- /dev/null +++ b/app/modules/home/home-project-list.jade @@ -0,0 +1,10 @@ +ul.home-project-list + li.home-project-list-single(tg-bind-scope, ng-repeat="project in vm.projects.all") + div.home-project-list-single-left + div.home-project-list-single-title + h2 + a(href="#", ng-bind="::project.name", tg-nav="project:project=project.slug") + span {{project.is_private}} + p {{ ::project.description }} + + div.home-project-list-single-right diff --git a/app/modules/home/home.module.coffee b/app/modules/home/home.module.coffee new file mode 100644 index 00000000..9cdb1f39 --- /dev/null +++ b/app/modules/home/home.module.coffee @@ -0,0 +1 @@ +module = angular.module("taigaHome", []) diff --git a/app/modules/home/styles/home-project-list b/app/modules/home/styles/home-project-list deleted file mode 100644 index e69de29b..00000000 diff --git a/app/modules/home/styles/home-project-list.scss b/app/modules/home/styles/home-project-list.scss new file mode 100644 index 00000000..ab01f613 --- /dev/null +++ b/app/modules/home/styles/home-project-list.scss @@ -0,0 +1,3 @@ +.home-project-list { + content: 'WIP'; +} diff --git a/app/modules/home/styles/home-working.scss b/app/modules/home/styles/home-working.scss index 808bc378..add730f1 100644 --- a/app/modules/home/styles/home-working.scss +++ b/app/modules/home/styles/home-working.scss @@ -1,5 +1,6 @@ .working-on, .watching { + margin-bottom: 2rem; .duty-single { align-items: center; border-bottom: 1px solid $whitish; @@ -55,7 +56,3 @@ margin: 2rem 30%; } } - -.watching { - margin-bottom: 2rem; -} diff --git a/app/modules/home/styles/home.scss b/app/modules/home/styles/home.scss index 0166400b..72e932c9 100644 --- a/app/modules/home/styles/home.scss +++ b/app/modules/home/styles/home.scss @@ -1,7 +1,9 @@ .home-wrapper { display: flex; - .main { + padding-top: 2rem; + .duty-summary { flex: 1; + margin-right: .5rem; } .project-list { width: 250px; @@ -12,7 +14,7 @@ align-content: center; background: $whitish; display: flex; - margin: 2rem 0 .5rem; + margin: 0 0 .5rem; padding: .9rem 1rem; } } diff --git a/app/modules/projects/listing/listing.directive.coffee b/app/modules/projects/listing/listing.directive.coffee index 0339c929..506af5cd 100644 --- a/app/modules/projects/listing/listing.directive.coffee +++ b/app/modules/projects/listing/listing.directive.coffee @@ -38,5 +38,4 @@ ProjectsListingDirective = (projectsService) -> return directive -angular.module("taigaProjects").directive("tgProjectsListing", - ["tgProjects", ProjectsListingDirective]) +angular.module("taigaProjects").directive("tgProjectsListing", ["tgProjects", ProjectsListingDirective]) diff --git a/app/partials/home/home.jade b/app/partials/home/home.jade index 5cecaa68..74c9ab2c 100644 --- a/app/partials/home/home.jade +++ b/app/partials/home/home.jade @@ -2,7 +2,7 @@ doctype html include ../includes/components/beta div.home-wrapper.centered - div.main + div.duty-summary // TODO Hide if ASSIGNED TO ==== false div.title-bar.working-on-title Working on // TODO Hide if ASSIGNED TO ==== false @@ -65,4 +65,5 @@ div.home-wrapper.centered span.duty-name It is not possible to re-order stories in the sprint view . div.duty-project Teletransportation hubs a.button-gray.see-more(href="#", title="See more Watching US") See more - aside.project-list + aside.project-list(tg-home-project-list) +