Basic history implementation
parent
3dc98bbd3b
commit
41c9689b7b
|
@ -69,7 +69,13 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
loadIssue: ->
|
||||
return @rs.issues.get(@scope.projectId, @scope.issueId).then (issue) =>
|
||||
@scope.issue = issue
|
||||
return issue
|
||||
@scope.previousUrl = "/project/#{@scope.project.slug}/issues/#{@scope.issue.neighbors.previous.ref}" if @scope.issue.neighbors.previous.id?
|
||||
@scope.nextUrl = "/project/#{@scope.project.slug}/issues/#{@scope.issue.neighbors.next.ref}" if @scope.issue.neighbors.next.id?
|
||||
|
||||
loadHistory: ->
|
||||
return @rs.issues.history(@scope.issueId).then (history) =>
|
||||
@scope.history = history.results
|
||||
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")
|
||||
|
||||
loadInitialData: ->
|
||||
params = {
|
||||
|
@ -85,6 +91,7 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
return promise.then(=> @.loadProject())
|
||||
.then(=> @.loadUsersAndRoles())
|
||||
.then(=> @.loadIssue())
|
||||
.then(=> @.loadHistory())
|
||||
|
||||
block: ->
|
||||
@rootscope.$broadcast("block", @scope.issue)
|
||||
|
@ -117,11 +124,10 @@ IssueDirective = ($tgrepo, $log, $location) ->
|
|||
|
||||
$el.on "click", ".save-issue", (event) ->
|
||||
$tgrepo.save($scope.issue).then ->
|
||||
console.log "TODO"
|
||||
$location.path("/project/#{$scope.project.slug}/issues/#{$scope.issue.ref}")
|
||||
|
||||
return {link:link}
|
||||
|
||||
|
||||
module.directive("tgIssueDetail", ["$tgRepo", "$log", "$tgLocation", IssueDirective])
|
||||
|
||||
|
||||
|
|
|
@ -39,6 +39,9 @@ resourceProvider = ($repo) ->
|
|||
service.filtersData = (projectId) ->
|
||||
return $repo.queryOneRaw("projects", "#{projectId}/issue_filters_data")
|
||||
|
||||
service.history = (issueId) ->
|
||||
return $repo.queryOneRaw("history/issue", issueId)
|
||||
|
||||
return (instance) ->
|
||||
instance.issues = service
|
||||
|
||||
|
|
|
@ -28,19 +28,8 @@ block content
|
|||
textarea(placeholder="Write a description of your issue", ng-model="issue.description")
|
||||
|
||||
// include views/modules/attachments
|
||||
section.us-activity
|
||||
ul.us-activity-tabs
|
||||
li
|
||||
a.active(href="#")
|
||||
span.icon.icon-bulk
|
||||
span.tab-title Comments
|
||||
textarea(ng-model="issue.comment", placeholder="Write here a new commet")
|
||||
|
||||
li
|
||||
a(href="#")
|
||||
span.icon.icon-issues
|
||||
span.tab-title Activity
|
||||
include views/modules/comments
|
||||
// include views/modules/activity
|
||||
sidebar.menu-secondary.sidebar
|
||||
section.us-status(tg-issue-status, ng-model="issue", editable="true")
|
||||
section.us-assigned-to(tg-assigned-to, ng-model="issue.assigned_to", editable="true")
|
||||
|
|
|
@ -17,8 +17,8 @@ block content
|
|||
span.us-number(tg-bo-html="issue.ref")
|
||||
span.us-name(ng-bind="issue.subject")
|
||||
div.issue-nav
|
||||
a.icon.icon-arrow-left(href="", title="next issue")
|
||||
a.icon.icon-arrow-right(href="", title="previous issue")
|
||||
a.icon.icon-arrow-left(ng-show="nextUrl", href="{{ nextUrl }}", title="next issue")
|
||||
a.icon.icon-arrow-right(ng-show="previousUrl",href="{{ previousUrl }}", title="previous issue")
|
||||
|
||||
div.blocked-warning(ng-show="issue.is_blocked")
|
||||
span.icon.icon-warning
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
div.us-activity
|
||||
a.activity-title(href="", title="Show activity")
|
||||
span made 3 changes
|
||||
span made {{ comment.diff }} changes
|
||||
span.icon.icon-arrow-up
|
||||
- for(var y = 0; y < 2; y++)
|
||||
div.activity-inner
|
||||
|
|
|
@ -3,8 +3,7 @@ section.us-comments
|
|||
textarea(placeholder="Write here a new commet")
|
||||
a.button.button-green(href="", title="Comment") Comment
|
||||
div.comment-list
|
||||
- for(var x = 0; x < 6; x++)
|
||||
div.comment-single
|
||||
div.comment-single(ng-repeat="comment in comments")
|
||||
div.comment-user
|
||||
a.avatar(href="", title="User preferences")
|
||||
img(src="http://thecodeplayer.com/u/uifaces/12.jpg", alt="username")
|
||||
|
@ -13,9 +12,10 @@ section.us-comments
|
|||
//- includes module activity
|
||||
include comment-activity
|
||||
p.comment
|
||||
Para un escenario en el cual ya están cargados en la DB la lista de usuarios para un Grupo o varios, tenemos que tener la posibilidad de lanzar a todos los miembros de un grupo y/o a un individuo en concreto, un mail. El mail lleva un bloque de texto (pendiende de que os lo pasemos) y también llevará un link que llevará a una pantalla donde ponga la pw que usará a partir de ese momento. Si elige su PW dentro de las reglas de PW establecidas (pendientes de decidir), el sistema le logará automáticamente.
|
||||
{{ comment.comment }}
|
||||
p.date 15 junio 2014 15:30h
|
||||
a.delete-comment.icon.icon-delete(href="", title="delete comment")
|
||||
a.more-comments(href="", title="show more comments")
|
||||
span show previous comments
|
||||
span.prev-comments-num (3 more)
|
||||
|
||||
//a.more-comments(href="", title="show more comments")
|
||||
//span show previous comments
|
||||
//span.prev-comments-num (3 more)
|
||||
|
|
Loading…
Reference in New Issue