summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-07-26 20:03:21 +0200
committerCamil Staps <info@camilstaps.nl>2019-08-07 20:49:18 +0200
commitdf5d9ab0fa4e2aadf6d203d24dfd477ef3167c41 (patch)
treed3e01df2e19779b587302d9806159f1197ae9ee4
parentd81ffbd84d378552ad8cd2151389337af1ff95f6 (diff)
downloadgitlab-ce-df5d9ab0fa4e2aadf6d203d24dfd477ef3167c41.tar.gz
Add empty state for starred projects tab on user page
-rw-r--r--app/views/shared/projects/_list.html.haml31
-rw-r--r--locale/gitlab.pot6
2 files changed, 27 insertions, 10 deletions
diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml
index 67cb1aa549c..bb05658c719 100644
--- a/app/views/shared/projects/_list.html.haml
+++ b/app/views/shared/projects/_list.html.haml
@@ -17,15 +17,20 @@
- contributed_projects_illustration_path = 'illustrations/profile-page/contributed-projects.svg'
- contributed_projects_current_user_empty_message_header = s_('UserProfile|Explore public groups to find projects to contribute to.')
- contributed_projects_visitor_empty_message = s_('UserProfile|This user hasn\'t contributed to any projects')
+- starred_projects_illustration_path = 'illustrations/starred_empty.svg'
+- starred_projects_current_user_empty_message_header = s_('UserProfile|Star projects to track their progress and show your appreciation.')
+- starred_projects_visitor_empty_message = s_('UserProfile|This user hasn\'t starred any projects')
- own_projects_illustration_path = 'illustrations/profile-page/personal-project.svg'
- own_projects_current_user_empty_message_header = s_('UserProfile|You haven\'t created any personal projects.')
- own_projects_current_user_empty_message_description = s_('UserProfile|Your projects can be available publicly, internally, or privately, at your choice.')
- own_projects_visitor_empty_message = s_('UserProfile|This user doesn\'t have any personal projects')
- explore_page_empty_message = s_('UserProfile|Explore public groups to find projects to contribute to.')
-- primary_button_label = _('New project')
-- primary_button_link = new_project_path
-- secondary_button_label = _('Explore groups')
-- secondary_button_link = explore_groups_path
+- new_project_button_label = _('New project')
+- new_project_button_link = new_project_path
+- explore_projects_button_label = _('Explore projects')
+- explore_projects_button_link = explore_projects_path
+- explore_groups_button_label = _('Explore groups')
+- explore_groups_button_link = explore_groups_path
.js-projects-list-holder
- if any_projects?(projects)
@@ -48,15 +53,21 @@
- if @contributed_projects
= render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: contributed_projects_illustration_path,
current_user_empty_message_header: contributed_projects_current_user_empty_message_header,
- primary_button_label: primary_button_label,
- primary_button_link: primary_button_link,
- secondary_button_label: secondary_button_label,
- secondary_button_link: secondary_button_link,
+ primary_button_label: new_project_button_label,
+ primary_button_link: new_project_button_link,
+ secondary_button_label: explore_groups_button_label,
+ secondary_button_link: explore_groups_button_link,
visitor_empty_message: contributed_projects_visitor_empty_message }
+ - elsif @starred_projects
+ = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: starred_projects_illustration_path,
+ current_user_empty_message_header: starred_projects_current_user_empty_message_header,
+ primary_button_label: explore_projects_button_label,
+ primary_button_link: explore_projects_button_link,
+ visitor_empty_message: starred_projects_visitor_empty_message }
- else
= render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: own_projects_illustration_path,
current_user_empty_message_header: own_projects_current_user_empty_message_header,
current_user_empty_message_description: own_projects_current_user_empty_message_description,
- primary_button_label: primary_button_label,
- primary_button_link: primary_button_link,
+ primary_button_label: new_project_button_label,
+ primary_button_link: new_project_button_link,
visitor_empty_message: defined?(explore_page) && explore_page ? explore_page_empty_message : own_projects_visitor_empty_message }
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 71fa85c2c35..18b4a00bb79 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -12239,6 +12239,9 @@ msgstr ""
msgid "UserProfile|Snippets in GitLab can either be private, internal, or public."
msgstr ""
+msgid "UserProfile|Star projects to track their progress and show your appreciation."
+msgstr ""
+
msgid "UserProfile|Starred projects"
msgstr ""
@@ -12254,6 +12257,9 @@ msgstr ""
msgid "UserProfile|This user hasn't contributed to any projects"
msgstr ""
+msgid "UserProfile|This user hasn't starred any projects"
+msgstr ""
+
msgid "UserProfile|View all"
msgstr ""