Fix #730: hide comment button in edit mode
parent
33d18a173c
commit
204d5ef7b0
|
@ -43,6 +43,7 @@ block content
|
||||||
span.tab-title Activity
|
span.tab-title Activity
|
||||||
|
|
||||||
- var commentModel = "us"
|
- var commentModel = "us"
|
||||||
|
- var noSaveButton = true
|
||||||
include views/modules/comments
|
include views/modules/comments
|
||||||
include views/modules/activity
|
include views/modules/activity
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,11 @@ block content
|
||||||
form.wrapper(tg-task-detail, ng-controller="TaskDetailController as ctrl",
|
form.wrapper(tg-task-detail, ng-controller="TaskDetailController as ctrl",
|
||||||
ng-init="section='backlog'")
|
ng-init="section='backlog'")
|
||||||
div.main.us-detail
|
div.main.us-detail
|
||||||
div.us-detail-header
|
div.us-detail-header.header-with-actions
|
||||||
include views/components/mainTitle
|
include views/components/mainTitle
|
||||||
a.button.button-green.save-task(href="", title="Save") Save
|
.action-buttons
|
||||||
a.button.button-red.cancel(tg-nav="project-tasks-detail:project=project.slug,ref=task.ref", href="", title="Cancel") Cancel
|
a.button.button-green.save-task(href="", title="Save") Save
|
||||||
|
a.button.button-red.cancel(tg-nav="project-tasks-detail:project=project.slug,ref=task.ref", href="", title="Cancel") Cancel
|
||||||
|
|
||||||
section.us-story-main-data
|
section.us-story-main-data
|
||||||
div.us-title(ng-class="{blocked: task.is_blocked}")
|
div.us-title(ng-class="{blocked: task.is_blocked}")
|
||||||
|
@ -29,7 +30,22 @@ block content
|
||||||
- var permissionSuffix = "task"
|
- var permissionSuffix = "task"
|
||||||
include views/modules/attachments
|
include views/modules/attachments
|
||||||
|
|
||||||
textarea(ng-model="task.comment", placeholder="Write here a new commet")
|
section.us-activity
|
||||||
|
ul.us-activity-tabs
|
||||||
|
li
|
||||||
|
a.active(href="#")
|
||||||
|
span.icon.icon-bulk
|
||||||
|
span.tab-title Comments
|
||||||
|
|
||||||
|
li
|
||||||
|
a(href="#")
|
||||||
|
span.icon.icon-issues
|
||||||
|
span.tab-title Activity
|
||||||
|
|
||||||
|
- var commentModel = "task"
|
||||||
|
- var noSaveButton = true
|
||||||
|
include views/modules/comments
|
||||||
|
include views/modules/activity
|
||||||
|
|
||||||
sidebar.menu-secondary.sidebar
|
sidebar.menu-secondary.sidebar
|
||||||
section.us-status(tg-task-status, ng-model="task", editable="true")
|
section.us-status(tg-task-status, ng-model="task", editable="true")
|
||||||
|
|
|
@ -7,9 +7,10 @@ block content
|
||||||
div.wrapper(tg-task-detail, ng-controller="TaskDetailController as ctrl",
|
div.wrapper(tg-task-detail, ng-controller="TaskDetailController as ctrl",
|
||||||
ng-init="section='backlog'")
|
ng-init="section='backlog'")
|
||||||
div.main.us-detail
|
div.main.us-detail
|
||||||
div.us-detail-header
|
div.us-detail-header.header-with-actions
|
||||||
include views/components/mainTitle
|
include views/components/mainTitle
|
||||||
a.button.button-green(tg-check-permission, permission="modify_task", href="", title="Edit", tg-nav="project-tasks-detail-edit:project=project.slug,ref=task.ref") Edit
|
.action-buttons
|
||||||
|
a.button.button-green(tg-check-permission, permission="modify_task", href="", title="Edit", tg-nav="project-tasks-detail-edit:project=project.slug,ref=task.ref") Edit
|
||||||
|
|
||||||
section.us-story-main-data
|
section.us-story-main-data
|
||||||
div.us-title(ng-class="{blocked: task.is_blocked}")
|
div.us-title(ng-class="{blocked: task.is_blocked}")
|
||||||
|
|
|
@ -43,6 +43,7 @@ block content
|
||||||
span.tab-title Activity
|
span.tab-title Activity
|
||||||
|
|
||||||
- var commentModel = "us"
|
- var commentModel = "us"
|
||||||
|
- var noSaveButton = true
|
||||||
include views/modules/comments
|
include views/modules/comments
|
||||||
include views/modules/activity
|
include views/modules/activity
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
//- NOTE: You must to define 'var commentModel' with the object model
|
//- NOTE: You must to define 'var commentModel' with the object model
|
||||||
|
//- You must to define 'var noSaveButton = true' if save button is not necessary
|
||||||
|
|
||||||
section.us-comments
|
section.us-comments
|
||||||
div.add-comment(tg-check-permission, tg-toggle-comment, permission="modify_"+commentModel)
|
div.add-comment(tg-check-permission, tg-toggle-comment, permission="modify_"+commentModel)
|
||||||
textarea(placeholder="Write here a new commet", ng-model="commentModel.comment", tg-markitup)
|
textarea(placeholder="Write here a new commet", ng-model="commentModel.comment", tg-markitup)
|
||||||
a.button.button-green.save-comment(href="", title="Comment") Comment
|
|
||||||
|
unless noSaveButton
|
||||||
|
a.button.button-green.save-comment(href="", title="Comment") Comment
|
||||||
|
|
||||||
div.comment-list
|
div.comment-list
|
||||||
//- modules/common.coffee - ChangeDirective
|
//- modules/common.coffee - ChangeDirective
|
||||||
div.comment-single(tg-change, mode="comment", ng-model="comment", ng-repeat="comment in comments")
|
div.comment-single(tg-change, mode="comment", ng-model="comment", ng-repeat="comment in comments")
|
||||||
|
|
Loading…
Reference in New Issue