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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-01 12:10:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-01 12:10:39 +0300
commit1bab0ba591263cd739af2d2c7c3f1b03678a59b6 (patch)
tree39f499cf5c77338a6c1b94a2cad17153bcb7cada /app
parent2d03845a7606dc48107ac33e7a66a00956e76955 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/releases/components/milestone_list.vue45
-rw-r--r--app/assets/javascripts/releases/components/release_block.vue46
-rw-r--r--app/views/projects/pages/_access.html.haml6
-rw-r--r--app/views/projects/pages/_destroy.haml10
-rw-r--r--app/views/projects/pages/_https_only.html.haml5
-rw-r--r--app/views/projects/pages/_list.html.haml19
-rw-r--r--app/views/projects/pages/_no_domains.html.haml5
-rw-r--r--app/views/projects/pages/_use.html.haml10
-rw-r--r--app/views/projects/pages/show.html.haml11
9 files changed, 61 insertions, 96 deletions
diff --git a/app/assets/javascripts/releases/components/milestone_list.vue b/app/assets/javascripts/releases/components/milestone_list.vue
deleted file mode 100644
index 53416f0ab4d..00000000000
--- a/app/assets/javascripts/releases/components/milestone_list.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-<script>
-import { GlLink, GlTooltipDirective } from '@gitlab/ui';
-import Icon from '~/vue_shared/components/icon.vue';
-import { s__ } from '~/locale';
-
-export default {
- name: 'MilestoneList',
- components: {
- GlLink,
- Icon,
- },
- directives: {
- GlTooltip: GlTooltipDirective,
- },
- props: {
- milestones: {
- type: Array,
- required: true,
- },
- },
- computed: {
- labelText() {
- return this.milestones.length === 1 ? s__('Milestone') : s__('Milestones');
- },
- },
-};
-</script>
-<template>
- <div>
- <icon name="flag" class="align-middle" /> <span class="js-label-text">{{ labelText }}</span>
- <template v-for="(milestone, index) in milestones">
- <gl-link
- :key="milestone.id"
- v-gl-tooltip
- :title="milestone.description"
- :href="milestone.web_url"
- >
- {{ milestone.title }}
- </gl-link>
- <template v-if="index !== milestones.length - 1">
- &bull;
- </template>
- </template>
- </div>
-</template>
diff --git a/app/assets/javascripts/releases/components/release_block.vue b/app/assets/javascripts/releases/components/release_block.vue
index 32bf05a7629..7b6bd9913a8 100644
--- a/app/assets/javascripts/releases/components/release_block.vue
+++ b/app/assets/javascripts/releases/components/release_block.vue
@@ -5,8 +5,7 @@ import { GlTooltipDirective, GlLink, GlBadge } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago';
-import MilestoneList from './milestone_list.vue';
-import { __, sprintf } from '../../locale';
+import { __, n__, sprintf } from '../../locale';
export default {
name: 'ReleaseBlock',
@@ -15,7 +14,6 @@ export default {
GlBadge,
Icon,
UserAvatarLink,
- MilestoneList,
},
directives: {
GlTooltip: GlTooltipDirective,
@@ -57,19 +55,11 @@ export default {
hasAuthor() {
return !_.isEmpty(this.author);
},
- milestones() {
- // At the moment, a release can only be associated to
- // one milestone. This will be expanded to be many-to-many
- // in the near future, so we pass the milestone as an
- // array here in anticipation of this change.
- return [this.release.milestone];
- },
shouldRenderMilestones() {
- // Similar to the `milestones` computed above,
- // this check will need to be updated once
- // the API begins sending an array of milestones
- // instead of just a single object.
- return Boolean(this.release.milestone);
+ return !_.isEmpty(this.release.milestones);
+ },
+ labelText() {
+ return n__('Milestone', 'Milestones', this.release.milestones.length);
},
},
};
@@ -101,11 +91,27 @@ export default {
<span v-else v-gl-tooltip.bottom :title="__('Tag')">{{ release.tag_name }}</span>
</div>
- <milestone-list
- v-if="shouldRenderMilestones"
- class="append-right-4 js-milestone-list"
- :milestones="milestones"
- />
+ <template v-if="shouldRenderMilestones">
+ <div class="js-milestone-list-label">
+ <icon name="flag" class="align-middle" />
+ <span class="js-label-text">{{ labelText }}</span>
+ </div>
+
+ <template v-for="(milestone, index) in release.milestones">
+ <gl-link
+ :key="milestone.id"
+ v-gl-tooltip
+ :title="milestone.description"
+ :href="milestone.web_url"
+ class="append-right-4 prepend-left-4 js-milestone-link"
+ >
+ {{ milestone.title }}
+ </gl-link>
+ <template v-if="index !== release.milestones.length - 1">
+ &bull;
+ </template>
+ </template>
+ </template>
<div class="append-right-4">
&bull;
diff --git a/app/views/projects/pages/_access.html.haml b/app/views/projects/pages/_access.html.haml
index 7b6d46964a2..178f0acc5b9 100644
--- a/app/views/projects/pages/_access.html.haml
+++ b/app/views/projects/pages/_access.html.haml
@@ -1,11 +1,11 @@
- if @project.pages_deployed?
.card
.card-header
- Access pages
+ = s_('GitLabPages|Access pages')
.card-body
%p
%strong
- = _("Your pages are served under:")
+ = s_('GitLabPages|Your pages are served under:')
%p
= external_link(@project.pages_url, @project.pages_url)
@@ -14,4 +14,4 @@
%p
= external_link(domain.url, domain.url)
.card-footer.alert-primary
- = _("It may take up to 30 minutes before the site is available after the first deployment.")
+ = s_('GitLabPages|It may take up to 30 minutes before the site is available after the first deployment.')
diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml
index 138e2864bad..58dbbb5bcfc 100644
--- a/app/views/projects/pages/_destroy.haml
+++ b/app/views/projects/pages/_destroy.haml
@@ -1,12 +1,14 @@
- if @project.pages_deployed?
- if can?(current_user, :remove_pages, @project)
.card.border-danger
- .card-header.bg-danger.text-white Remove pages
+ .card-header.bg-danger.text-white
+ = s_('GitLabPages|Remove pages')
.errors-holder
.card-body
%p
- Removing pages will prevent them from being exposed to the outside world.
+ = s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.')
.form-actions
- = link_to 'Remove pages', project_pages_path(@project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove"
+ = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove"
- else
- .nothing-here-block Only project maintainers can remove pages
+ .nothing-here-block
+ = s_('GitLabPages|Only project maintainers can remove pages')
diff --git a/app/views/projects/pages/_https_only.html.haml b/app/views/projects/pages/_https_only.html.haml
index 74478ee011c..d8c4a5f0a5d 100644
--- a/app/views/projects/pages/_https_only.html.haml
+++ b/app/views/projects/pages/_https_only.html.haml
@@ -3,8 +3,9 @@
.form-check
= f.check_box :pages_https_only, class: 'form-check-input', disabled: pages_https_only_disabled?
= f.label :pages_https_only, class: pages_https_only_label_class do
- %strong Force HTTPS (requires valid certificates)
+ %strong
+ = s_('GitLabPages|Force HTTPS (requires valid certificates)')
- unless pages_https_only_disabled?
.prepend-top-10
- = f.submit 'Save', class: 'btn btn-success'
+ = f.submit s_('GitLabPages|Save'), class: 'btn btn-success'
diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml
index c4285e7f3d2..b05491f2c6e 100644
--- a/app/views/projects/pages/_list.html.haml
+++ b/app/views/projects/pages/_list.html.haml
@@ -8,20 +8,25 @@
- @domains.each do |domain|
%li.pages-domain-list-item.list-group-item.d-flex.justify-content-between
- if verification_enabled
- - tooltip, status = domain.unverified? ? [_('Unverified'), 'failed'] : [_('Verified'), 'success']
+ - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success']
.domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip }
= sprite_icon("status_#{status}", size: 16 )
.domain-name
= external_link(domain.url, domain.url)
- if domain.subject
%div
- %span.badge.badge-gray Certificate: #{domain.subject}
+ %span.badge.badge-gray
+ = s_('GitLabPages|Certificate: %{subject}') % { subject: domain.subject }
- if domain.expired?
- %span.badge.badge-danger Expired
+ %span.badge.badge-danger
+ = s_('GitLabPages|Expired')
%div
- = link_to 'Details', project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped"
- = link_to 'Remove', project_pages_domain_path(@project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
+ = link_to s_('GitLabPages|Details'), project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped"
+ = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
- if verification_enabled && domain.unverified?
%li.list-group-item.bs-callout-warning
- #{domain.domain} is not verified. To learn how to verify ownership, visit your
- #{link_to 'domain details', project_pages_domain_path(@project, domain)}.
+ - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
+ - details_link_end = '</a>'.html_safe
+ = s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain,
+ link_start: details_link_start,
+ link_end: details_link_end }
diff --git a/app/views/projects/pages/_no_domains.html.haml b/app/views/projects/pages/_no_domains.html.haml
index 8c93cf7a8ad..8d6e403b93a 100644
--- a/app/views/projects/pages/_no_domains.html.haml
+++ b/app/views/projects/pages/_no_domains.html.haml
@@ -1,7 +1,6 @@
- if can?(current_user, :update_pages, @project)
.card
.card-header
- Domains
+ = s_('GitLabPages|Domains')
.nothing-here-block
- Support for domains and certificates is disabled.
- Ask your system's administrator to enable it.
+ = s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.")
diff --git a/app/views/projects/pages/_use.html.haml b/app/views/projects/pages/_use.html.haml
index 988dabef3a0..ab44fd77e1e 100644
--- a/app/views/projects/pages/_use.html.haml
+++ b/app/views/projects/pages/_use.html.haml
@@ -1,10 +1,10 @@
- unless @project.pages_deployed?
.card.border-info
.card-header.bg-info.text-white
- Configure pages
+ = s_('GitLabPages|Configure pages')
.card-body
%p
- Learn how to upload your static site and have it served by
- GitLab by following the
- = succeed '.' do
- = link_to 'documentation on GitLab Pages', help_page_path('user/project/pages/index.md'), target: '_blank'
+ - link_start = "<a href='#{help_page_path('user/project/pages/index.md')}' target='_blank' rel='noopener noreferrer'>".html_safe
+ - link_end = '</a>'.html_safe
+ = s_('GitLabPages|Learn how to upload your static site and have it served by GitLab by following the %{link_start}documentation on GitLab Pages%{link_end}.').html_safe % { link_start: link_start,
+ link_end: link_end }
diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml
index 88ab486a248..0e1f281410a 100644
--- a/app/views/projects/pages/show.html.haml
+++ b/app/views/projects/pages/show.html.haml
@@ -1,17 +1,14 @@
- page_title 'Pages'
%h3.page-title.with-button
- Pages
+ = s_('GitLabPages|Pages')
- if can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https)
- = link_to new_project_pages_domain_path(@project), class: 'btn btn-success float-right', title: 'New Domain' do
- New Domain
+ = link_to new_project_pages_domain_path(@project), class: 'btn btn-success float-right', title: s_('GitLabPages|New Domain') do
+ = s_('GitLabPages|New Domain')
%p.light
- With GitLab Pages you can host your static websites on GitLab.
- Combined with the power of GitLab CI and the help of GitLab Runner
- you can deploy static pages for your individual projects, your user or your group.
-
+ = s_('GitLabPages|With GitLab Pages you can host your static websites on GitLab. Combined with the power of GitLab CI and the help of GitLab Runner you can deploy static pages for your individual projects, your user or your group.')
- if Gitlab.config.pages.external_https
= render 'https_only'