Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
2c91f6162d |
|
@ -407,6 +407,7 @@
|
||||||
"ASSIGNED_TO": "Assigned",
|
"ASSIGNED_TO": "Assigned",
|
||||||
"STATUS": "Status",
|
"STATUS": "Status",
|
||||||
"PROGRESS": "Progress",
|
"PROGRESS": "Progress",
|
||||||
|
"CLOSED_US": "Closed user stories",
|
||||||
"VIEW_OPTIONS": "View options"
|
"VIEW_OPTIONS": "View options"
|
||||||
},
|
},
|
||||||
"CREATE": {
|
"CREATE": {
|
||||||
|
|
|
@ -25,7 +25,7 @@ EpicRowDirective = () ->
|
||||||
bindToController: true,
|
bindToController: true,
|
||||||
scope: {
|
scope: {
|
||||||
epic: '=',
|
epic: '=',
|
||||||
column: '='
|
options: '='
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
.epic-row.e2e-epic-row(
|
.epic-row.e2e-epic-row(
|
||||||
ng-class="{'is-blocked': vm.epic.get('is_blocked'), 'is-closed': vm.epic.get('is_closed'), 'unfold': vm.displayUserStories, 'not-empty': vm.epic.getIn(['user_stories_counts', 'opened']) || vm.epic.getIn(['user_stories_counts', 'closed'])}"
|
ng-class="{'is-blocked': vm.epic.get('is_blocked'), 'is-closed': vm.epic.get('is_closed'), 'unfold': vm.displayUserStories, 'not-empty': vm.epic.getIn(['user_stories_counts', 'opened']) || vm.epic.getIn(['user_stories_counts', 'closed'])}"
|
||||||
ng-click="vm.toggleUserStoryList()"
|
ng-click="vm.toggleUserStoryList()"
|
||||||
|
ng-hide="!vm.options.closed && vm.epic.get('is_closed')"
|
||||||
)
|
)
|
||||||
tg-svg.icon-drag(
|
tg-svg.icon-drag(
|
||||||
svg-icon="icon-drag"
|
svg-icon="icon-drag"
|
||||||
|
@ -9,13 +10,13 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
.vote(
|
.vote(
|
||||||
ng-if="vm.column.votes"
|
ng-if="vm.options.votes"
|
||||||
ng-class="{'is-voter': vm.epic.get('is_voter')}"
|
ng-class="{'is-voter': vm.epic.get('is_voter')}"
|
||||||
)
|
)
|
||||||
tg-svg(svg-icon='icon-upvote')
|
tg-svg(svg-icon='icon-upvote')
|
||||||
span {{::vm.epic.get('total_voters')}}
|
span {{::vm.epic.get('total_voters')}}
|
||||||
|
|
||||||
.name(ng-if="vm.column.name")
|
.name(ng-if="vm.options.name")
|
||||||
- var hash = "#";
|
- var hash = "#";
|
||||||
a(
|
a(
|
||||||
tg-nav="project-epics-detail:project=vm.project.slug,ref=vm.epic.get('ref')"
|
tg-nav="project-epics-detail:project=vm.project.slug,ref=vm.epic.get('ref')"
|
||||||
|
@ -31,12 +32,12 @@
|
||||||
ng-if="vm.epic.getIn(['user_stories_counts', 'total'])"
|
ng-if="vm.epic.getIn(['user_stories_counts', 'total'])"
|
||||||
)
|
)
|
||||||
|
|
||||||
.project(ng-if="vm.column.project")
|
.project(ng-if="vm.options.project")
|
||||||
|
|
||||||
.sprint(ng-if="vm.column.sprint")
|
.sprint(ng-if="vm.options.sprint")
|
||||||
|
|
||||||
.assigned.e2e-assigned-to(
|
.assigned.e2e-assigned-to(
|
||||||
ng-if="vm.column.assigned"
|
ng-if="vm.options.assigned"
|
||||||
tg-loading="vm.assignLoader"
|
tg-loading="vm.assignLoader"
|
||||||
)
|
)
|
||||||
tg-assigned-to-component(
|
tg-assigned-to-component(
|
||||||
|
@ -48,11 +49,11 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
.status(
|
.status(
|
||||||
ng-if="vm.column.status && !vm.canEditEpics()"
|
ng-if="vm.options.status && !vm.canEditEpics()"
|
||||||
)
|
)
|
||||||
span {{vm.epic.getIn(['status_extra_info', 'name'])}}
|
span {{vm.epic.getIn(['status_extra_info', 'name'])}}
|
||||||
.status(
|
.status(
|
||||||
ng-if="vm.column.status && vm.canEditEpics()"
|
ng-if="vm.options.status && vm.canEditEpics()"
|
||||||
ng-mouseleave="vm.displayStatusList = false"
|
ng-mouseleave="vm.displayStatusList = false"
|
||||||
tg-isolate-click
|
tg-isolate-click
|
||||||
)
|
)
|
||||||
|
@ -72,7 +73,7 @@
|
||||||
ng-click="vm.updateStatus(status.id)"
|
ng-click="vm.updateStatus(status.id)"
|
||||||
) {{status.name}}
|
) {{status.name}}
|
||||||
|
|
||||||
.progress(ng-if="vm.column.progress")
|
.progress(ng-if="vm.options.progress")
|
||||||
.progress-bar
|
.progress-bar
|
||||||
.progress-status(
|
.progress-status(
|
||||||
ng-if="::vm.percentage"
|
ng-if="::vm.percentage"
|
||||||
|
@ -83,5 +84,5 @@
|
||||||
.epic-story(tg-repeat="story in vm.epicStories track by story.get('id')")
|
.epic-story(tg-repeat="story in vm.epicStories track by story.get('id')")
|
||||||
tg-story-row.e2e-story(
|
tg-story-row.e2e-story(
|
||||||
story="story"
|
story="story"
|
||||||
column="vm.column"
|
column="vm.options"
|
||||||
)
|
)
|
||||||
|
|
|
@ -33,14 +33,15 @@ class EpicsTableController
|
||||||
@.hash = generateHash([@projectService.project.get('id'), 'epics'])
|
@.hash = generateHash([@projectService.project.get('id'), 'epics'])
|
||||||
@.displayOptions = false
|
@.displayOptions = false
|
||||||
@.displayVotes = true
|
@.displayVotes = true
|
||||||
@.column = @storage.get(@.hash, {
|
@.options = @storage.get(@.hash, {
|
||||||
votes: true,
|
votes: true,
|
||||||
name: true,
|
name: true,
|
||||||
project: true,
|
project: true,
|
||||||
sprint: true,
|
sprint: true,
|
||||||
assigned: true,
|
assigned: true,
|
||||||
status: true,
|
status: true,
|
||||||
progress: true
|
progress: true,
|
||||||
|
closed: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
taiga.defineImmutableProperty @, 'epics', () => return @epicsService.epics
|
taiga.defineImmutableProperty @, 'epics', () => return @epicsService.epics
|
||||||
|
@ -69,6 +70,6 @@ class EpicsTableController
|
||||||
return @.timer = @timeout (=> @.displayOptions = false), 400
|
return @.timer = @timeout (=> @.displayOptions = false), 400
|
||||||
|
|
||||||
updateViewOptions: () ->
|
updateViewOptions: () ->
|
||||||
@storage.set(@.hash, @.column)
|
@storage.set(@.hash, @.options)
|
||||||
|
|
||||||
angular.module("taigaEpics").controller("EpicsTableCtrl", EpicsTableController)
|
angular.module("taigaEpics").controller("EpicsTableCtrl", EpicsTableController)
|
||||||
|
|
|
@ -86,4 +86,4 @@ describe "EpicTable", ->
|
||||||
it "storage view options", () ->
|
it "storage view options", () ->
|
||||||
epicTableCtrl = controller "EpicsTableCtrl"
|
epicTableCtrl = controller "EpicsTableCtrl"
|
||||||
|
|
||||||
expect(epicTableCtrl.column).to.be.eql({col1: true})
|
expect(epicTableCtrl.options).to.be.eql({col1: true})
|
||||||
|
|
|
@ -16,30 +16,30 @@ mixin epicSwitch(name, model)
|
||||||
.epics-table-header.e2e-epics-table-header
|
.epics-table-header.e2e-epics-table-header
|
||||||
.vote(
|
.vote(
|
||||||
translate="EPICS.TABLE.VOTES"
|
translate="EPICS.TABLE.VOTES"
|
||||||
ng-if="vm.column.votes"
|
ng-if="vm.options.votes"
|
||||||
)
|
)
|
||||||
.name(
|
.name(
|
||||||
translate="EPICS.TABLE.NAME"
|
translate="EPICS.TABLE.NAME"
|
||||||
)
|
)
|
||||||
.project(
|
.project(
|
||||||
translate="EPICS.TABLE.PROJECT"
|
translate="EPICS.TABLE.PROJECT"
|
||||||
ng-if="vm.column.project"
|
ng-if="vm.options.project"
|
||||||
)
|
)
|
||||||
.sprint(
|
.sprint(
|
||||||
translate="EPICS.TABLE.SPRINT"
|
translate="EPICS.TABLE.SPRINT"
|
||||||
ng-if="vm.column.sprint"
|
ng-if="vm.options.sprint"
|
||||||
)
|
)
|
||||||
.assigned(
|
.assigned(
|
||||||
translate="EPICS.TABLE.ASSIGNED_TO"
|
translate="EPICS.TABLE.ASSIGNED_TO"
|
||||||
ng-if="vm.column.assigned"
|
ng-if="vm.options.assigned"
|
||||||
)
|
)
|
||||||
.status(
|
.status(
|
||||||
translate="EPICS.TABLE.STATUS"
|
translate="EPICS.TABLE.STATUS"
|
||||||
ng-if="vm.column.status"
|
ng-if="vm.options.status"
|
||||||
)
|
)
|
||||||
.progress(
|
.progress(
|
||||||
translate="EPICS.TABLE.PROGRESS"
|
translate="EPICS.TABLE.PROGRESS"
|
||||||
ng-if="vm.column.progress"
|
ng-if="vm.options.progress"
|
||||||
)
|
)
|
||||||
.epics-table-options-wrapper(
|
.epics-table-options-wrapper(
|
||||||
ng-mouseleave="vm.hideEpicTableOption()"
|
ng-mouseleave="vm.hideEpicTableOption()"
|
||||||
|
@ -56,37 +56,43 @@ mixin epicSwitch(name, model)
|
||||||
translate="EPICS.TABLE.VOTES"
|
translate="EPICS.TABLE.VOTES"
|
||||||
for="epicSwitch-votes"
|
for="epicSwitch-votes"
|
||||||
)
|
)
|
||||||
+epicSwitch('switch-votes', 'vm.column.votes')
|
+epicSwitch('switch-votes', 'vm.options.votes')
|
||||||
.fieldset
|
.fieldset
|
||||||
label.epics-table-options-vote(
|
label.epics-table-options-vote(
|
||||||
translate="EPICS.TABLE.PROJECT"
|
translate="EPICS.TABLE.PROJECT"
|
||||||
for="switch-project"
|
for="switch-project"
|
||||||
)
|
)
|
||||||
+epicSwitch('switch-project', 'vm.column.project')
|
+epicSwitch('switch-project', 'vm.options.project')
|
||||||
.fieldset
|
.fieldset
|
||||||
label.epics-table-options-vote(
|
label.epics-table-options-vote(
|
||||||
translate="EPICS.TABLE.SPRINT"
|
translate="EPICS.TABLE.SPRINT"
|
||||||
for="switch-sprint"
|
for="switch-sprint"
|
||||||
)
|
)
|
||||||
+epicSwitch('switch-sprint', 'vm.column.sprint')
|
+epicSwitch('switch-sprint', 'vm.options.sprint')
|
||||||
.fieldset
|
.fieldset
|
||||||
label.epics-table-options-vote(
|
label.epics-table-options-vote(
|
||||||
translate="EPICS.TABLE.ASSIGNED_TO"
|
translate="EPICS.TABLE.ASSIGNED_TO"
|
||||||
for="switch-assigned"
|
for="switch-assigned"
|
||||||
)
|
)
|
||||||
+epicSwitch('switch-assigned', 'vm.column.assigned')
|
+epicSwitch('switch-assigned', 'vm.options.assigned')
|
||||||
.fieldset
|
.fieldset
|
||||||
label.epics-table-options-vote(
|
label.epics-table-options-vote(
|
||||||
translate="EPICS.TABLE.STATUS"
|
translate="EPICS.TABLE.STATUS"
|
||||||
for="switch-status"
|
for="switch-status"
|
||||||
)
|
)
|
||||||
+epicSwitch('switch-status', 'vm.column.status')
|
+epicSwitch('switch-status', 'vm.options.status')
|
||||||
.fieldset
|
.fieldset
|
||||||
label.epics-table-options-vote(
|
label.epics-table-options-vote(
|
||||||
translate="EPICS.TABLE.PROGRESS"
|
translate="EPICS.TABLE.PROGRESS"
|
||||||
for="switch-progress"
|
for="switch-progress"
|
||||||
)
|
)
|
||||||
+epicSwitch('switch-progress', 'vm.column.progress')
|
+epicSwitch('switch-progress', 'vm.options.progress')
|
||||||
|
.fieldset
|
||||||
|
label.epics-table-options-vote(
|
||||||
|
translate="EPICS.TABLE.CLOSED_US"
|
||||||
|
for="switch-closed"
|
||||||
|
)
|
||||||
|
+epicSwitch('switch-closed', 'vm.options.closed')
|
||||||
|
|
||||||
.epics-table-body(
|
.epics-table-body(
|
||||||
tg-epics-sortable="vm.reorderEpic(epic, newIndex)"
|
tg-epics-sortable="vm.reorderEpic(epic, newIndex)"
|
||||||
|
@ -100,7 +106,7 @@ mixin epicSwitch(name, model)
|
||||||
)
|
)
|
||||||
tg-epic-row.e2e-epic(
|
tg-epic-row.e2e-epic(
|
||||||
epic="epic"
|
epic="epic"
|
||||||
column="vm.column"
|
options="vm.options"
|
||||||
)
|
)
|
||||||
|
|
||||||
div(tg-loading="vm.loadingEpics")
|
div(tg-loading="vm.loadingEpics")
|
||||||
|
|
Loading…
Reference in New Issue