Welcome to mirror list, hosted at ThFree Co, Russian Federation.

edit_form.vue « lock « components « sidebar « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c7a6edc7c70b969bbc70ee8dee5b359fa0076b7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<script>
import editFormButtons from './edit_form_buttons.vue';
import issuableMixin from '../../../vue_shared/mixins/issuable';

export default {
  props: {
    isLocked: {
      required: true,
      type: Boolean,
    },

    toggleForm: {
      required: true,
      type: Function,
    },

    updateLockedAttribute: {
      required: true,
      type: Function,
    },

    issuableType: {
      required: true,
      type: String,
    },
  },

  mixins: [
    issuableMixin,
  ],

  components: {
    editFormButtons,
  },
};
</script>

<template>
  <div class="dropdown open">
    <div class="dropdown-menu sidebar-item-warning-message">
      <p class="text" v-if="isLocked">
        Unlock this {{ issuableDisplayName(issuableType) }}?
        <strong>Everyone</strong>
        will be able to comment.
      </p>

      <p class="text" v-else>
        Lock this {{ issuableDisplayName(issuableType) }}?
        Only
        <strong>project members</strong>
        will be able to comment.
      </p>

      <edit-form-buttons
        :is-locked="isLocked"
        :toggle-form="toggleForm"
        :update-locked-attribute="updateLockedAttribute"
      />
    </div>
  </div>
</template>