diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2019-02-22 12:12:36 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-02-22 12:12:36 +0000 |
commit | 220cb4c3a73022d5fccd2f3cbb180bc87fe42512 (patch) | |
tree | 2948682b2063339ca820861cff82eec1e31404f6 /app/views/dashboard/snippets | |
parent | cafc4943e04d5b342cbfa3d056d9359da0ea5c66 (diff) | |
download | gitlab-ce-220cb4c3a73022d5fccd2f3cbb180bc87fe42512.tar.gz |
Improve snippets empty state
Diffstat (limited to 'app/views/dashboard/snippets')
-rw-r--r-- | app/views/dashboard/snippets/index.html.haml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/views/dashboard/snippets/index.html.haml b/app/views/dashboard/snippets/index.html.haml index 6eb067da95c..b649fe91c24 100644 --- a/app/views/dashboard/snippets/index.html.haml +++ b/app/views/dashboard/snippets/index.html.haml @@ -3,6 +3,14 @@ - header_title "Snippets", dashboard_snippets_path = render 'dashboard/snippets_head' -= render partial: 'snippets/snippets_scope_menu', locals: { include_private: true } +- if current_user.snippets.exists? + = render partial: 'snippets/snippets_scope_menu', locals: { include_private: true } -= render partial: 'snippets/snippets', locals: { link_project: true } +.d-block.d-sm-none + + = link_to _("New snippet"), new_snippet_path, class: "btn btn-success btn-block", title: _("New snippet") + +- if current_user.snippets.exists? + = render partial: 'shared/snippets/list', locals: { link_project: true } +- else + = render 'shared/empty_states/snippets', button_path: new_snippet_path |