Merge pull request #677 from taigaio/issue/2527/sprint-drop-area

Improve drop area on empty sprints
stable
Alejandro 2015-10-23 08:35:55 +02:00
commit 5547c892d8
4 changed files with 15 additions and 9 deletions

View File

@ -35,12 +35,6 @@ BacklogSprintDirective = ($repo, $rootscope) ->
easing: 'linear' easing: 'linear'
} }
refreshSprintTableHeight = (sprintTable) =>
if !sprintTable.find(".row").length
sprintTable.css("height", sprintTableMinHeight)
else
sprintTable.css("height", "auto")
toggleSprint = ($el) => toggleSprint = ($el) =>
sprintTable = $el.find(".sprint-table") sprintTable = $el.find(".sprint-table")
sprintArrow = $el.find(".icon-arrow-up") sprintArrow = $el.find(".icon-arrow-up")
@ -48,8 +42,6 @@ BacklogSprintDirective = ($repo, $rootscope) ->
sprintArrow.toggleClass('active') sprintArrow.toggleClass('active')
sprintTable.toggleClass('open') sprintTable.toggleClass('open')
refreshSprintTableHeight(sprintTable)
link = ($scope, $el, $attrs) -> link = ($scope, $el, $attrs) ->
$scope.$watch $attrs.tgBacklogSprint, (sprint) -> $scope.$watch $attrs.tgBacklogSprint, (sprint) ->
sprint = $scope.$eval($attrs.tgBacklogSprint) sprint = $scope.$eval($attrs.tgBacklogSprint)

View File

@ -951,6 +951,7 @@
"TITLE_LINK_TASKBOARD": "Go to Taskboard of \"{{name}}\"", "TITLE_LINK_TASKBOARD": "Go to Taskboard of \"{{name}}\"",
"NUMBER_SPRINTS": "<br/>sprints", "NUMBER_SPRINTS": "<br/>sprints",
"EMPTY": "YOU HAVE NO SPRINTS", "EMPTY": "YOU HAVE NO SPRINTS",
"WARNING_EMPTY_SPRINT": "Drop here Stories from your backlog to start a new sprint",
"TITLE_ACTION_NEW_SPRINT": "Add new sprint", "TITLE_ACTION_NEW_SPRINT": "Add new sprint",
"TEXT_ACTION_NEW_SPRINT": "You may want to create a new sprint in your project", "TEXT_ACTION_NEW_SPRINT": "You may want to create a new sprint in your project",
"ACTION_SHOW_CLOSED_SPRINTS": "Show closed sprints", "ACTION_SHOW_CLOSED_SPRINTS": "Show closed sprints",

View File

@ -3,7 +3,12 @@ header(tg-backlog-sprint-header, ng-model="sprint")
div.sprint-progress-bar(tg-progress-bar="100 * sprint.closed_points / sprint.total_points") div.sprint-progress-bar(tg-progress-bar="100 * sprint.closed_points / sprint.total_points")
div.sprint-table div.sprint-table
div.row.milestone-us-item-row(ng-repeat="us in sprint.user_stories track by us.id", tg-bind-scope, tg-class-permission="{'readonly': '!modify_us'}") div.sprint-empty(ng-if="!sprint.user_stories.length") {{ 'BACKLOG.SPRINTS.WARNING_EMPTY_SPRINT' | translate }}
div.row.milestone-us-item-row(
ng-repeat="us in sprint.user_stories track by us.id"
tg-bind-scope
tg-class-permission="{'readonly': '!modify_us'}"
)
div.column-us div.column-us
a.us-name.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref", a.us-name.clickable(tg-nav="project-userstories-detail:project=project.slug,ref=us.ref",
tg-nav-get-params="{\"milestone\": {{us.milestone}}}" tg-nav-get-params="{\"milestone\": {{us.milestone}}}"

View File

@ -146,6 +146,14 @@
} }
} }
.sprint-table { .sprint-table {
.sprint-empty {
@extend %light;
background: lighten($gray-light, 18%);
border: 2px dashed lighten($gray-light, 10%);
color: $gray;
padding: 1rem;
text-align: center;
}
.row { .row {
border-bottom: 1px solid $gray-light; border-bottom: 1px solid $gray-light;
display: flex; display: flex;