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

organizations_view.vue « components « index « organizations « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9720646bca374e840b465ccbf74a43a86f25024b (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
<script>
import { GlLoadingIcon, GlEmptyState } from '@gitlab/ui';
import { s__ } from '~/locale';
import OrganizationsList from './organizations_list.vue';

export default {
  name: 'OrganizationsView',
  i18n: {
    emptyStateTitle: s__('Organization|Get started with organizations'),
    emptyStateDescription: s__(
      'Organization|Create an organization to contain all of your groups and projects.',
    ),
    emptyStateButtonText: s__('Organization|New organization'),
  },
  components: {
    GlLoadingIcon,
    OrganizationsList,
    GlEmptyState,
  },
  inject: ['newOrganizationUrl', 'organizationsEmptyStateSvgPath'],
  props: {
    organizations: {
      type: Array,
      required: false,
      default: () => [],
    },
    loading: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
};
</script>

<template>
  <gl-loading-icon v-if="loading" class="gl-mt-5" size="md" />
  <organizations-list
    v-else-if="organizations.length"
    :organizations="organizations"
    class="gl-border-t"
  />
  <gl-empty-state
    v-else
    :svg-height="144"
    :svg-path="organizationsEmptyStateSvgPath"
    :title="$options.i18n.emptyStateTitle"
    :description="$options.i18n.emptyStateDescription"
    :primary-button-link="newOrganizationUrl"
    :primary-button-text="$options.i18n.emptyStateButtonText"
  />
</template>