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

work_item_information.vue « components « work_items « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ce75cc98a752ba7271ed6b849924ae04536d2691 (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
<script>
import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui';
import { s__ } from '~/locale';
import { helpPagePath } from '~/helpers/help_page_helper';

export default {
  i18n: {
    learnTasksLinkText: s__('WorkItem|Learn about tasks.'),
    tasksInformationTitle: s__('WorkItem|Introducing tasks'),
    tasksInformationBody: s__(
      'WorkItem|Use tasks to break down your work in an issue into smaller pieces. %{learnMoreLink}',
    ),
  },
  helpPageLinks: {
    tasksDocLinkPath: helpPagePath('user/tasks'),
  },
  components: {
    GlAlert,
    GlSprintf,
    GlLink,
  },
  props: {
    showInfoBanner: {
      type: Boolean,
      required: false,
      default: true,
    },
  },
  emits: ['work-item-banner-dismissed'],
};
</script>

<template>
  <section class="gl-display-block gl-mb-2">
    <gl-alert
      v-if="showInfoBanner"
      variant="tip"
      :title="$options.i18n.tasksInformationTitle"
      data-testid="work-item-information"
      class="gl-mt-3"
      @dismiss="$emit('work-item-banner-dismissed')"
    >
      <gl-sprintf :message="$options.i18n.tasksInformationBody">
        <template #learnMoreLink>
          <gl-link :href="$options.helpPageLinks.tasksDocLinkPath">{{
            $options.i18n.learnTasksLinkText
          }}</gl-link>
        </template>
        ></gl-sprintf
      >
    </gl-alert>
  </section>
</template>