2016-11-17 09:29:35 -05:00
|
|
|
#review-panel
|
2016-11-16 09:42:07 -05:00
|
|
|
.review-panel-toolbar
|
2017-01-05 12:15:27 -05:00
|
|
|
resolved-comments-dropdown(
|
|
|
|
entries="reviewPanel.entries"
|
|
|
|
threads="reviewPanel.commentThreads"
|
2017-01-06 07:00:17 -05:00
|
|
|
docs="docs"
|
2017-01-09 09:59:01 -05:00
|
|
|
on-open="refreshResolvedCommentsDropdown();"
|
2017-01-09 12:22:01 -05:00
|
|
|
on-unresolve="unresolveComment(threadId);"
|
2017-01-10 05:33:54 -05:00
|
|
|
on-delete="deleteComment(entryId);"
|
2017-01-09 09:59:01 -05:00
|
|
|
is-loading="reviewPanel.dropdown.loading"
|
2017-01-05 12:15:27 -05:00
|
|
|
)
|
2016-12-08 09:10:30 -05:00
|
|
|
span.review-panel-toolbar-label(ng-click="editor.wantTrackChanges = true;", ng-if="editor.wantTrackChanges === false") Track Changes is
|
2016-11-24 10:55:09 -05:00
|
|
|
strong off
|
2016-12-08 09:10:30 -05:00
|
|
|
span.review-panel-toolbar-label(ng-click="editor.wantTrackChanges = false;", ng-if="editor.wantTrackChanges === true") Track Changes is
|
2016-11-24 10:55:09 -05:00
|
|
|
strong on
|
2016-12-08 09:10:30 -05:00
|
|
|
review-panel-toggle(ng-if="editor.wantTrackChanges == editor.trackChanges", ng-model="editor.wantTrackChanges")
|
|
|
|
span.review-panel-toolbar-spinner(ng-if="editor.wantTrackChanges != editor.trackChanges")
|
|
|
|
i.fa.fa-spin.fa-spinner
|
2016-11-23 09:34:55 -05:00
|
|
|
|
2016-11-17 07:09:07 -05:00
|
|
|
.rp-entry-list(
|
2016-11-16 10:23:29 -05:00
|
|
|
review-panel-sorted
|
|
|
|
ng-if="reviewPanel.subView === SubViews.CUR_FILE"
|
|
|
|
)
|
|
|
|
.rp-entry-list-inner
|
2016-11-16 09:42:07 -05:00
|
|
|
.rp-entry-wrapper(
|
|
|
|
ng-repeat="(entry_id, entry) in reviewPanel.entries[editor.open_doc_id]"
|
|
|
|
)
|
2016-11-16 10:47:05 -05:00
|
|
|
div(ng-if="entry.type === 'insert' || entry.type === 'delete'")
|
|
|
|
change-entry(
|
|
|
|
entry="entry"
|
|
|
|
user="users[entry.metadata.user_id]"
|
|
|
|
on-reject="rejectChange(entry_id);"
|
|
|
|
on-accept="acceptChange(entry_id);"
|
2016-11-16 11:13:39 -05:00
|
|
|
on-indicator-click="toggleReviewPanel();"
|
2016-11-16 10:47:05 -05:00
|
|
|
)
|
2016-11-16 09:42:07 -05:00
|
|
|
|
2017-01-09 10:15:03 -05:00
|
|
|
div(ng-if="entry.type === 'comment' && !(reviewPanel.commentThreads[entry.thread_id].resolved === true)")
|
2016-11-16 10:47:05 -05:00
|
|
|
comment-entry(
|
|
|
|
entry="entry"
|
2016-12-16 11:42:41 -05:00
|
|
|
threads="reviewPanel.commentThreads"
|
2016-11-17 13:06:08 -05:00
|
|
|
on-resolve="resolveComment(entry, entry_id)"
|
|
|
|
on-reply="submitReply(entry, entry_id);"
|
2016-11-16 11:13:39 -05:00
|
|
|
on-indicator-click="toggleReviewPanel();"
|
2016-11-16 10:47:05 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
div(ng-if="entry.type === 'add-comment'")
|
|
|
|
add-comment-entry(
|
|
|
|
on-start-new="startNewComment();"
|
|
|
|
on-submit="submitNewComment(content);"
|
|
|
|
on-cancel="cancelNewComment();"
|
2016-11-16 11:13:39 -05:00
|
|
|
on-indicator-click="toggleReviewPanel();"
|
2016-11-16 10:47:05 -05:00
|
|
|
)
|
2016-11-16 09:42:07 -05:00
|
|
|
|
2016-11-17 07:09:07 -05:00
|
|
|
.rp-entry-list(
|
2016-11-17 06:47:20 -05:00
|
|
|
ng-if="reviewPanel.subView === SubViews.OVERVIEW"
|
|
|
|
)
|
2017-01-09 09:59:01 -05:00
|
|
|
.rp-loading(ng-if="reviewPanel.overview.loading")
|
2016-12-09 10:43:08 -05:00
|
|
|
i.fa.fa-spinner.fa-spin
|
2016-11-17 06:47:20 -05:00
|
|
|
.rp-overview-file(
|
2016-12-09 11:17:28 -05:00
|
|
|
ng-repeat="doc in docs"
|
2016-12-09 10:43:08 -05:00
|
|
|
ng-if="!reviewPanel.overview.loading"
|
2016-11-16 09:42:07 -05:00
|
|
|
)
|
2016-12-09 11:17:28 -05:00
|
|
|
.rp-overview-file-header(
|
|
|
|
ng-if="reviewPanel.entries[doc.doc.id] | notEmpty"
|
|
|
|
)
|
|
|
|
| {{ doc.path }}
|
2016-11-17 06:47:20 -05:00
|
|
|
.rp-entry-wrapper(
|
2016-12-09 11:17:28 -05:00
|
|
|
ng-repeat="(entry_id, entry) in reviewPanel.entries[doc.doc.id] | orderOverviewEntries"
|
2016-11-16 09:42:07 -05:00
|
|
|
)
|
2016-11-17 06:47:20 -05:00
|
|
|
div(ng-if="entry.type === 'insert' || entry.type === 'delete'")
|
|
|
|
change-entry(
|
|
|
|
entry="entry"
|
|
|
|
user="users[entry.metadata.user_id]"
|
|
|
|
on-indicator-click="toggleReviewPanel();"
|
2016-11-17 10:55:18 -05:00
|
|
|
ng-click="gotoEntry(doc_id, entry)"
|
2016-11-16 09:42:07 -05:00
|
|
|
)
|
|
|
|
|
2017-01-09 10:15:03 -05:00
|
|
|
div(ng-if="entry.type === 'comment' && !(reviewPanel.commentThreads[entry.thread_id].resolved === true)")
|
2016-11-17 06:47:20 -05:00
|
|
|
comment-entry(
|
|
|
|
entry="entry"
|
2017-01-06 08:17:57 -05:00
|
|
|
threads="reviewPanel.commentThreads"
|
2016-11-17 13:06:08 -05:00
|
|
|
on-reply="submitReply(entry, entry_id);"
|
2016-11-17 06:47:20 -05:00
|
|
|
on-indicator-click="toggleReviewPanel();"
|
2016-11-17 10:55:18 -05:00
|
|
|
ng-click="gotoEntry(doc_id, entry)"
|
2016-11-16 09:42:07 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
.rp-nav
|
|
|
|
a.rp-nav-item(
|
|
|
|
href
|
|
|
|
ng-click="setSubView(SubViews.CUR_FILE);"
|
|
|
|
ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.CUR_FILE }"
|
|
|
|
)
|
|
|
|
i.fa.fa-file-text-o
|
|
|
|
span.rp-nav-label Current file
|
|
|
|
a.rp-nav-item(
|
|
|
|
href
|
|
|
|
ng-click="setSubView(SubViews.OVERVIEW);"
|
|
|
|
ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.OVERVIEW }"
|
|
|
|
)
|
|
|
|
i.fa.fa-list
|
|
|
|
span.rp-nav-label Overview
|
|
|
|
|
|
|
|
|
|
|
|
script(type='text/ng-template', id='changeEntryTemplate')
|
2016-11-16 11:13:39 -05:00
|
|
|
div
|
2016-11-16 11:21:24 -05:00
|
|
|
.rp-entry-callout(
|
|
|
|
ng-class="'rp-entry-callout-' + entry.type"
|
|
|
|
)
|
2016-11-16 11:13:39 -05:00
|
|
|
.rp-entry-indicator(
|
|
|
|
ng-switch="entry.type"
|
|
|
|
ng-class="{ 'rp-entry-indicator-focused': entry.focused }"
|
|
|
|
ng-click="onIndicatorClick();"
|
|
|
|
)
|
|
|
|
i.fa.fa-pencil(ng-switch-when="insert")
|
|
|
|
i.rp-icon-delete(ng-switch-when="delete")
|
|
|
|
.rp-entry(
|
|
|
|
ng-class="[ 'rp-entry-' + entry.type, (entry.focused ? 'rp-entry-focused' : '')]"
|
|
|
|
)
|
2017-01-04 10:24:49 -05:00
|
|
|
.rp-entry-body
|
2016-11-16 11:13:39 -05:00
|
|
|
.rp-entry-action-icon(ng-switch="entry.type")
|
|
|
|
i.fa.fa-pencil(ng-switch-when="insert")
|
|
|
|
i.rp-icon-delete(ng-switch-when="delete")
|
2017-01-04 10:24:49 -05:00
|
|
|
.rp-entry-details
|
|
|
|
.rp-entry-description(ng-switch="entry.type")
|
|
|
|
span(ng-switch-when="insert") Added
|
|
|
|
ins.rp-content-highlight {{ entry.content }}
|
|
|
|
span(ng-switch-when="delete") Deleted
|
|
|
|
del.rp-content-highlight {{ entry.content }}
|
|
|
|
.rp-entry-metadata
|
2017-01-05 12:15:27 -05:00
|
|
|
| {{ entry.metadata.ts | date : 'MMM d, y h:mm a' }} •
|
2017-01-04 10:24:49 -05:00
|
|
|
span.rp-entry-user(style="color: hsl({{ user.hue }}, 70%, 40%);") {{ user.name }}
|
2016-11-16 11:13:39 -05:00
|
|
|
.rp-entry-actions
|
|
|
|
a.rp-entry-button(href, ng-click="onReject();")
|
|
|
|
i.fa.fa-times
|
|
|
|
| Reject
|
|
|
|
a.rp-entry-button(href, ng-click="onAccept();")
|
|
|
|
i.fa.fa-check
|
|
|
|
| Accept
|
2016-11-16 09:42:07 -05:00
|
|
|
|
2016-11-16 10:12:58 -05:00
|
|
|
script(type='text/ng-template', id='commentEntryTemplate')
|
2016-11-16 11:13:39 -05:00
|
|
|
div
|
2017-01-05 06:50:43 -05:00
|
|
|
.rp-entry-callout.rp-entry-callout-comment
|
2016-11-16 11:13:39 -05:00
|
|
|
.rp-entry-indicator(
|
|
|
|
ng-class="{ 'rp-entry-indicator-focused': entry.focused }"
|
|
|
|
ng-click="onIndicatorClick();"
|
2016-11-16 10:12:58 -05:00
|
|
|
)
|
2016-11-16 10:47:05 -05:00
|
|
|
i.fa.fa-comment
|
2016-11-16 11:13:39 -05:00
|
|
|
.rp-entry.rp-entry-comment(
|
2017-01-05 06:50:43 -05:00
|
|
|
ng-class="{ 'rp-entry-focused': entry.focused }"
|
2016-11-16 11:13:39 -05:00
|
|
|
)
|
2017-01-05 06:50:43 -05:00
|
|
|
div
|
|
|
|
.rp-comment(
|
2017-01-05 12:15:27 -05:00
|
|
|
ng-repeat="comment in threads[entry.thread_id].messages track by comment.id"
|
2017-01-05 06:50:43 -05:00
|
|
|
)
|
2017-01-05 12:15:27 -05:00
|
|
|
p.rp-comment-content
|
|
|
|
span.rp-entry-user(
|
|
|
|
style="color: hsl({{ comment.user.hue }}, 70%, 40%);"
|
|
|
|
ng-if="$first || comment.user.id !== threads[entry.thread_id].messages[$index - 1].user.id"
|
|
|
|
) {{ comment.user.name }}:
|
|
|
|
| {{ comment.content }}
|
2017-01-05 06:50:43 -05:00
|
|
|
.rp-entry-metadata
|
2016-12-16 11:42:41 -05:00
|
|
|
| {{ comment.timestamp | date : 'MMM d, y h:mm a' }}
|
2017-01-05 06:50:43 -05:00
|
|
|
.rp-comment-reply
|
2016-11-16 10:47:05 -05:00
|
|
|
textarea.rp-comment-input(
|
2016-11-16 11:13:39 -05:00
|
|
|
ng-model="entry.replyContent"
|
|
|
|
ng-keypress="handleCommentReplyKeyPress($event);"
|
2016-11-18 10:08:16 -05:00
|
|
|
stop-propagation="click"
|
2016-11-17 13:06:08 -05:00
|
|
|
placeholder="{{ 'Hit \"Enter\" to reply' + (entry.resolved ? ' and re-open' : '') }}"
|
2016-11-16 10:47:05 -05:00
|
|
|
)
|
|
|
|
.rp-entry-actions
|
2017-01-05 06:50:43 -05:00
|
|
|
a.rp-entry-button(href, ng-click="onResolve();")
|
2017-01-05 12:15:27 -05:00
|
|
|
i.fa.fa-inbox
|
2017-01-05 06:50:43 -05:00
|
|
|
| Resolve
|
|
|
|
a.rp-entry-button(href, ng-click="onReply();")
|
|
|
|
i.fa.fa-reply
|
|
|
|
| Reply
|
2017-01-06 07:00:17 -05:00
|
|
|
|
|
|
|
script(type='text/ng-template', id='resolvedCommentEntryTemplate')
|
2017-01-06 10:24:33 -05:00
|
|
|
.rp-resolved-comment
|
2017-01-06 07:00:17 -05:00
|
|
|
div
|
2017-01-06 10:24:33 -05:00
|
|
|
.rp-resolved-comment-context
|
2017-01-06 07:00:17 -05:00
|
|
|
| Quoted text on
|
2017-01-06 10:24:33 -05:00
|
|
|
span.rp-resolved-comment-context-file {{ doc.doc.name }}
|
|
|
|
p.rp-resolved-comment-context-quote {{ thread.content }}
|
2017-01-06 07:00:17 -05:00
|
|
|
.rp-comment(
|
|
|
|
ng-repeat="comment in thread.messages track by comment.id"
|
|
|
|
)
|
|
|
|
p.rp-comment-content
|
|
|
|
span.rp-entry-user(
|
|
|
|
style="color: hsl({{ comment.user.hue }}, 70%, 40%);"
|
|
|
|
ng-if="$first || comment.user.id !== thread.messages[$index - 1].user.id"
|
|
|
|
) {{ comment.user.name }}:
|
|
|
|
| {{ comment.content }}
|
|
|
|
.rp-entry-metadata
|
|
|
|
| {{ comment.timestamp | date : 'MMM d, y h:mm a' }}
|
2017-01-06 10:24:33 -05:00
|
|
|
.rp-comment.rp-comment-resolver
|
|
|
|
p.rp-comment-resolver-content
|
|
|
|
span.rp-entry-user(
|
|
|
|
style="color: hsl({{ thread.resolved_by_user.hue }}, 70%, 40%);"
|
|
|
|
) {{ thread.resolved_by_user.name }}:
|
|
|
|
| Marked as resolved.
|
|
|
|
.rp-entry-metadata
|
|
|
|
| {{ thread.resolved_at | date : 'MMM d, y h:mm a' }}
|
|
|
|
|
2017-01-06 07:00:17 -05:00
|
|
|
.rp-entry-actions
|
2017-01-09 12:22:01 -05:00
|
|
|
a.rp-entry-button(
|
|
|
|
href
|
|
|
|
ng-click="onUnresolve({ 'threadId': threadId });"
|
|
|
|
)
|
2017-01-06 07:00:17 -05:00
|
|
|
| Re-open
|
2017-01-10 05:33:54 -05:00
|
|
|
a.rp-entry-button(
|
|
|
|
href
|
|
|
|
ng-click="onDelete({ 'entryId': entryId });"
|
|
|
|
)
|
2017-01-06 07:00:17 -05:00
|
|
|
| Delete
|
|
|
|
|
2016-11-16 11:13:39 -05:00
|
|
|
|
|
|
|
script(type='text/ng-template', id='addCommentEntryTemplate')
|
|
|
|
div
|
2016-11-16 11:21:24 -05:00
|
|
|
.rp-entry-callout.rp-entry-callout-add-comment
|
2016-11-16 11:13:39 -05:00
|
|
|
.rp-entry-indicator(
|
|
|
|
ng-if="!commentState.adding"
|
|
|
|
ng-click="startNewComment(); onIndicatorClick();"
|
2016-11-18 11:08:02 -05:00
|
|
|
tooltip="Add a comment"
|
|
|
|
tooltip-placement="right"
|
|
|
|
tooltip-append-to-body="true"
|
2016-11-16 11:13:39 -05:00
|
|
|
)
|
|
|
|
i.fa.fa-commenting
|
|
|
|
.rp-entry.rp-entry-add-comment(
|
|
|
|
ng-class="[ (state.isAdding ? 'rp-entry-adding-comment' : ''), (entry.focused ? 'rp-entry-focused' : '')]"
|
|
|
|
)
|
|
|
|
a.rp-add-comment-btn(
|
|
|
|
href
|
|
|
|
ng-if="!state.isAdding"
|
|
|
|
ng-click="startNewComment();"
|
|
|
|
)
|
|
|
|
i.fa.fa-comment
|
|
|
|
| Add comment
|
|
|
|
div(ng-if="state.isAdding")
|
|
|
|
.rp-new-comment
|
|
|
|
textarea.rp-comment-input(
|
|
|
|
ng-model="state.content"
|
|
|
|
ng-keypress="handleCommentKeyPress($event);"
|
|
|
|
placeholder="Add your comment here"
|
|
|
|
)
|
|
|
|
.rp-entry-actions
|
|
|
|
a.rp-entry-button(href, ng-click="cancelNewComment();")
|
|
|
|
i.fa.fa-times
|
|
|
|
| Cancel
|
|
|
|
a.rp-entry-button(href, ng-click="submitNewComment()")
|
|
|
|
i.fa.fa-comment
|
2017-01-05 12:15:27 -05:00
|
|
|
| Comment
|
|
|
|
|
|
|
|
script(type='text/ng-template', id='resolvedCommentsDropdownTemplate')
|
|
|
|
.resolved-comments
|
2017-01-06 10:24:33 -05:00
|
|
|
//- .resolved-comments-backdrop(
|
|
|
|
//- ng-class="{ 'resolved-comments-backdrop-visible' : state.isOpen }"
|
|
|
|
//- ng-click="state.isOpen = !state.isOpen"
|
|
|
|
//- )
|
2017-01-05 12:15:27 -05:00
|
|
|
a.resolved-comments-toggle(
|
|
|
|
href
|
2017-01-09 09:59:01 -05:00
|
|
|
ng-click="toggleOpenState();"
|
2017-01-05 12:15:27 -05:00
|
|
|
)
|
|
|
|
i.fa.fa-inbox
|
|
|
|
.resolved-comments-dropdown(
|
|
|
|
ng-class="{ 'resolved-comments-dropdown-open' : state.isOpen }"
|
|
|
|
)
|
2017-01-09 09:59:01 -05:00
|
|
|
.rp-loading(ng-if="isLoading")
|
|
|
|
i.fa.fa-spinner.fa-spin
|
2017-01-06 07:00:17 -05:00
|
|
|
div(
|
2017-01-09 09:59:01 -05:00
|
|
|
ng-if="!isLoading"
|
2017-01-06 07:00:17 -05:00
|
|
|
ng-repeat="doc in docs"
|
|
|
|
)
|
|
|
|
resolved-comment-entry(
|
|
|
|
ng-repeat="thread in resolvedCommentsPerFile[doc.doc.id]"
|
2017-01-10 05:33:54 -05:00
|
|
|
entry-id="thread.entryId"
|
2017-01-09 12:22:01 -05:00
|
|
|
thread-id="thread.threadId"
|
2017-01-06 07:00:17 -05:00
|
|
|
thread="thread"
|
|
|
|
doc="doc"
|
2017-01-09 12:22:01 -05:00
|
|
|
on-unresolve="handleUnresolve(threadId);"
|
2017-01-10 05:33:54 -05:00
|
|
|
on-delete="handleDelete(entryId);"
|
2017-01-06 07:00:17 -05:00
|
|
|
)
|
|
|
|
|