diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 03:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 03:08:27 +0300 |
commit | b7d58ff8b17623f64ac7835a590e79d916e758ac (patch) | |
tree | 4f75a8f9e0e30cf8c7e944ea2c4461be396c0d5f /app/assets/javascripts/notes | |
parent | 0e2fc1701bd0c87cc458cbbb34c618b0e0dc5a14 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r-- | app/assets/javascripts/notes/components/discussion_locked_widget.vue | 13 | ||||
-rw-r--r-- | app/assets/javascripts/notes/mixins/issuable_state.js | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/app/assets/javascripts/notes/components/discussion_locked_widget.vue b/app/assets/javascripts/notes/components/discussion_locked_widget.vue index 53f509185a8..8636984c6af 100644 --- a/app/assets/javascripts/notes/components/discussion_locked_widget.vue +++ b/app/assets/javascripts/notes/components/discussion_locked_widget.vue @@ -12,6 +12,9 @@ export default { }, mixins: [Issuable, issuableStateMixin], computed: { + projectArchivedWarning() { + return __('This project is archived and cannot be commented on.'); + }, lockedIssueWarning() { return sprintf( __('This %{issuableDisplayName} is locked. Only project members can comment.'), @@ -26,9 +29,15 @@ export default { <div class="disabled-comment text-center"> <span class="issuable-note-warning inline"> <icon :size="16" name="lock" class="icon" /> - <span> - {{ lockedIssueWarning }} + <span v-if="isProjectArchived"> + {{ projectArchivedWarning }} + <gl-link :href="archivedProjectDocsPath" target="_blank" class="learn-more"> + {{ __('Learn more') }} + </gl-link> + </span> + <span v-else> + {{ lockedIssueWarning }} <gl-link :href="lockedIssueDocsPath" target="_blank" class="learn-more"> {{ __('Learn more') }} </gl-link> diff --git a/app/assets/javascripts/notes/mixins/issuable_state.js b/app/assets/javascripts/notes/mixins/issuable_state.js index d97d9f6850a..0ca8c8c98a3 100644 --- a/app/assets/javascripts/notes/mixins/issuable_state.js +++ b/app/assets/javascripts/notes/mixins/issuable_state.js @@ -3,6 +3,12 @@ import { mapGetters } from 'vuex'; export default { computed: { ...mapGetters(['getNoteableDataByProp']), + isProjectArchived() { + return this.getNoteableDataByProp('is_project_archived'); + }, + archivedProjectDocsPath() { + return this.getNoteableDataByProp('archived_project_docs_path'); + }, lockedIssueDocsPath() { return this.getNoteableDataByProp('locked_discussion_docs_path'); }, |