diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-09-08 16:49:20 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-09-08 16:49:20 +0300 |
commit | 5d785457db3017a17722314a52433543dd925164 (patch) | |
tree | a030699b752fcd1f161118be70a9df0f625fa0ef /app/views/explore | |
parent | 260fcd45209b59ace6b3fd6dcca6c32c2c75a8f1 (diff) |
Clean up overlap between dashboard and explore.
- Split up SnippetsController into separate dashboard and explore sections.
- Use consistent page titles, header titles and sidebars between dashboard and explore sections when signed in or not.
Diffstat (limited to 'app/views/explore')
-rw-r--r-- | app/views/explore/_head.html.haml | 6 | ||||
-rw-r--r-- | app/views/explore/groups/index.html.haml | 8 | ||||
-rw-r--r-- | app/views/explore/projects/index.html.haml | 7 | ||||
-rw-r--r-- | app/views/explore/projects/starred.html.haml | 6 | ||||
-rw-r--r-- | app/views/explore/projects/trending.html.haml | 12 | ||||
-rw-r--r-- | app/views/explore/snippets/index.html.haml | 18 |
6 files changed, 46 insertions, 11 deletions
diff --git a/app/views/explore/_head.html.haml b/app/views/explore/_head.html.haml new file mode 100644 index 00000000000..d8a57560788 --- /dev/null +++ b/app/views/explore/_head.html.haml @@ -0,0 +1,6 @@ +.explore-title + %h3 + Explore GitLab + %p.lead + Discover projects, groups and snippets. Share your projects with others + %br diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index e8a6752de8c..83d4d321c83 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -1,7 +1,11 @@ -- page_title "Groups" -- header_title "Groups", (current_user ? dashboard_groups_path : explore_groups_path) +- page_title "Groups" +- header_title "Groups", dashboard_groups_path + - if current_user = render 'dashboard/groups_head' +- else + = render 'explore/head' + .gray-content-block.clearfix .pull-left = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f| diff --git a/app/views/explore/projects/index.html.haml b/app/views/explore/projects/index.html.haml index 9df5b3830a8..67e38ca3127 100644 --- a/app/views/explore/projects/index.html.haml +++ b/app/views/explore/projects/index.html.haml @@ -1,6 +1,11 @@ -- page_title "Projects" +- page_title "Projects" +- header_title "Projects", root_path + - if current_user = render 'dashboard/projects_head' +- else + = render 'explore/head' + .gray-content-block.clearfix = render 'filter' = render 'projects', projects: @projects diff --git a/app/views/explore/projects/starred.html.haml b/app/views/explore/projects/starred.html.haml index a9df32f3d7d..596cb0a96cd 100644 --- a/app/views/explore/projects/starred.html.haml +++ b/app/views/explore/projects/starred.html.haml @@ -1,6 +1,10 @@ -- page_title "Starred Projects" +- page_title "Projects" +- header_title "Projects", root_path + - if current_user = render 'dashboard/projects_head' +- else + = render 'explore/head' .explore-trending-block .gray-content-block diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml index c1ef06f6cdb..5ea6d81c5b9 100644 --- a/app/views/explore/projects/trending.html.haml +++ b/app/views/explore/projects/trending.html.haml @@ -1,13 +1,11 @@ -- page_title "Trending Projects" +- page_title "Projects" +- header_title "Projects", root_path + - if current_user = render 'dashboard/projects_head' - else - .explore-title - %h3 - Explore GitLab - %p.lead - Discover projects and groups. Share your projects with others - %br + = render 'explore/head' + .explore-trending-block .gray-content-block .pull-right diff --git a/app/views/explore/snippets/index.html.haml b/app/views/explore/snippets/index.html.haml new file mode 100644 index 00000000000..7e4fa7d4873 --- /dev/null +++ b/app/views/explore/snippets/index.html.haml @@ -0,0 +1,18 @@ +- page_title "Snippets" +- header_title "Snippets", snippets_path + +- if current_user + = render 'dashboard/snippets_head' +- else + = render 'explore/head' + +.gray-content-block + - if current_user + .pull-right + = link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do + Add new snippet + + .oneline + Public snippets created by you and other users are listed here + += render 'snippets/snippets' |