summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanadium23 <chernoffivan@gmail.com>2017-06-13 20:58:46 +0300
committervanadium23 <chernoffivan@gmail.com>2017-06-16 23:56:02 +0300
commit541950322c6bde9403ea893985abe88700dca669 (patch)
tree9250cd5dc98c1e3f93cbbcac0395956622cd84df
parentf2505eb6ce87877f78ee90c8567f879bcd77642b (diff)
downloadgitlab-ce-541950322c6bde9403ea893985abe88700dca669.tar.gz
Disable fork button on project limit
-rw-r--r--app/views/projects/buttons/_fork.html.haml4
-rw-r--r--changelogs/unreleased/25164-disable-fork-on-project-limit.yml4
-rw-r--r--locale/bg/gitlab.po3
-rw-r--r--locale/de/gitlab.po3
-rw-r--r--locale/en/gitlab.po3
-rw-r--r--locale/es/gitlab.po3
-rw-r--r--locale/gitlab.pot3
-rw-r--r--locale/pt_BR/gitlab.po3
-rw-r--r--locale/zh_CN/gitlab.po3
-rw-r--r--locale/zh_HK/gitlab.po3
-rw-r--r--locale/zh_TW/gitlab.po3
11 files changed, 35 insertions, 0 deletions
diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml
index d3d44c45cc7..42f8c75f57b 100644
--- a/app/views/projects/buttons/_fork.html.haml
+++ b/app/views/projects/buttons/_fork.html.haml
@@ -4,6 +4,10 @@
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: _('Go to your fork'), class: 'btn has-tooltip' do
= custom_icon('icon_fork')
%span= s_('GoToYourFork|Fork')
+ - elsif !current_user.can_create_project?
+ = link_to new_namespace_project_fork_path(@project.namespace, @project), title: _('You have reached your project limit'), class: 'btn has-tooltip disabled' do
+ = custom_icon('icon_fork')
+ %span= s_('CreateNewFork|Fork')
- else
= link_to new_namespace_project_fork_path(@project.namespace, @project), class: 'btn' do
= custom_icon('icon_fork')
diff --git a/changelogs/unreleased/25164-disable-fork-on-project-limit.yml b/changelogs/unreleased/25164-disable-fork-on-project-limit.yml
new file mode 100644
index 00000000000..9fa824b161d
--- /dev/null
+++ b/changelogs/unreleased/25164-disable-fork-on-project-limit.yml
@@ -0,0 +1,4 @@
+---
+title: Disable fork button on project limit
+merge_request: 12145
+author: Ivan Chernov
diff --git a/locale/bg/gitlab.po b/locale/bg/gitlab.po
index e6caf83252d..43a5de65c43 100644
--- a/locale/bg/gitlab.po
+++ b/locale/bg/gitlab.po
@@ -250,6 +250,9 @@ msgstr "Искате ли да видите данните? Помолете а
msgid "We don't have enough data to show this stage."
msgstr "Няма достатъчно данни за този етап."
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "Нуждаете се от разрешение."
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 9a660571db9..ea864091b10 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -291,6 +291,9 @@ msgstr "Um diese Daten einsehen zu können, wenden Sie sich bitte an Ihren Admin
msgid "We don't have enough data to show this stage."
msgstr "Es liegen nicht genügend Daten vor, um diese Phase anzuzeigen."
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "Sie benötigen Zugriffsrechte."
diff --git a/locale/en/gitlab.po b/locale/en/gitlab.po
index 2f2075b131e..afb8fb3176f 100644
--- a/locale/en/gitlab.po
+++ b/locale/en/gitlab.po
@@ -984,6 +984,9 @@ msgstr ""
msgid "You can only add files when you are on a branch"
msgstr ""
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You must sign in to star a project"
msgstr ""
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index 4ce9ce4b28a..6946a256308 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -987,6 +987,9 @@ msgstr "Solo puedes agregar archivos cuando estás en una rama"
msgid "You must sign in to star a project"
msgstr "Debes iniciar sesión para destacar un proyecto"
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "Necesitas permisos."
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index f3f08cc4950..2d8076f5567 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -982,6 +982,9 @@ msgstr ""
msgid "You can only add files when you are on a branch"
msgstr ""
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You must sign in to star a project"
msgstr ""
diff --git a/locale/pt_BR/gitlab.po b/locale/pt_BR/gitlab.po
index 5ad41f92b64..fe6d51c36ac 100644
--- a/locale/pt_BR/gitlab.po
+++ b/locale/pt_BR/gitlab.po
@@ -250,6 +250,9 @@ msgstr "Precisa visualizar os dados? Solicite acesso ao administrador."
msgid "We don't have enough data to show this stage."
msgstr "Não temos dados suficientes para mostrar esta fase."
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "Você precisa de permissão."
diff --git a/locale/zh_CN/gitlab.po b/locale/zh_CN/gitlab.po
index 11434460207..8d994ff3c4f 100644
--- a/locale/zh_CN/gitlab.po
+++ b/locale/zh_CN/gitlab.po
@@ -283,6 +283,9 @@ msgstr "权限不足。如需查看相关数据,请向管理员申请权限。
msgid "We don't have enough data to show this stage."
msgstr "该阶段的数据不足,无法显示。"
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "您需要相关的权限。"
diff --git a/locale/zh_HK/gitlab.po b/locale/zh_HK/gitlab.po
index 81b2ff863ea..f0a9e44daf3 100644
--- a/locale/zh_HK/gitlab.po
+++ b/locale/zh_HK/gitlab.po
@@ -283,6 +283,9 @@ msgstr "權限不足。如需查看相關數據,請向管理員申請權限。
msgid "We don't have enough data to show this stage."
msgstr "該階段的數據不足,無法顯示。"
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "您需要相關的權限。"
diff --git a/locale/zh_TW/gitlab.po b/locale/zh_TW/gitlab.po
index e40723a9d8d..5130572d7ed 100644
--- a/locale/zh_TW/gitlab.po
+++ b/locale/zh_TW/gitlab.po
@@ -283,6 +283,9 @@ msgstr "權限不足。如需查看相關資料,請向管理員申請權限。
msgid "We don't have enough data to show this stage."
msgstr "因該階段的資料不足而無法顯示相關資訊"
+msgid "You have reached your project limit"
+msgstr ""
+
msgid "You need permission."
msgstr "您需要相關的權限。"