diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-15 08:59:41 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-15 08:59:41 +0000 |
commit | 19ecfb5c854ba45125ae50136372101a8d8424fb (patch) | |
tree | 755b3e42bd366eea5f0b676f945f6458963a9da2 | |
parent | a60e09d3134379925fdab2a6f1d3c5852a3f6978 (diff) | |
parent | 6c791f7da7d87a496a0e0d1c8179badcb4490174 (diff) | |
download | gitlab-ce-19ecfb5c854ba45125ae50136372101a8d8424fb.tar.gz |
Merge branch 'group-projects-page' into 'master'
Redesign project tabs on group page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Final step to fix #13480
See merge request !3209
-rw-r--r-- | app/assets/stylesheets/framework/blocks.scss | 4 | ||||
-rw-r--r-- | app/views/groups/_projects.html.haml | 13 | ||||
-rw-r--r-- | app/views/groups/_shared_projects.html.haml | 19 | ||||
-rw-r--r-- | app/views/groups/show.html.haml | 33 |
4 files changed, 27 insertions, 42 deletions
diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 6edabe20136..d20b77ffae9 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -120,6 +120,10 @@ .cover-desc { padding: 0 $gl-padding 3px; color: $gl-text-color; + + &.username:last-child { + padding-bottom: $gl-padding; + } } .cover-controls { diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 7cd8e9bea46..cca7dc27b1c 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -1,12 +1 @@ -.top-area - .nav-controls - = form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| - - if @projects.present? - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false - = render 'shared/projects/dropdown' - - if can? current_user, :create_projects, @group - = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-new pull-right' do - = icon('plus') - New Project - -= render 'shared/projects/list', projects: @projects, stars: false, skip_namespace: true += render 'shared/projects/list', projects: projects, stars: false, skip_namespace: true diff --git a/app/views/groups/_shared_projects.html.haml b/app/views/groups/_shared_projects.html.haml index d707ad4272d..b1694c919d0 100644 --- a/app/views/groups/_shared_projects.html.haml +++ b/app/views/groups/_shared_projects.html.haml @@ -1,18 +1 @@ -- if projects.present? - .panel.panel-default - .panel-heading - Projects shared with - %strong #{@group.name} - (#{projects.count}) - %ul.well-list - - projects.each do |project| - %li.project-row - = link_to namespace_project_path(project.namespace, project), class: dom_class(project) do - %span.namespace-name - - if project.namespace - = project.namespace.human_name - \/ - %span.project-name - = truncate(project.name, length: 25) - %span.arrow - %i.icon-angle-right += render 'shared/projects/list', projects: projects, stars: false, skip_namespace: false diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index de314a4190c..23a34ac36dd 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -27,24 +27,33 @@ .cover-desc.description = markdown(@group.description, pipeline: :description) - - %ul.nav-links - %li.active - = link_to "#projects", 'data-toggle' => 'tab' do - Projects - - if @shared_projects.present? - %li - = link_to "#shared", 'data-toggle' => 'tab' do - Shared Projects - - if can?(current_user, :read_group, @group) %div{ class: container_class } + .top-area + %ul.nav-links + %li.active + = link_to "#projects", 'data-toggle' => 'tab' do + All Projects + - if @shared_projects.present? + %li + = link_to "#shared", 'data-toggle' => 'tab' do + Shared Projects + .nav-controls + = form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false + = render 'shared/projects/dropdown' + - if can? current_user, :create_projects, @group + = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-new pull-right' do + = icon('plus') + New Project + .tab-content .tab-pane.active#projects = render "projects", projects: @projects - .tab-pane#shared - = render "shared_projects", projects: @shared_projects + - if @shared_projects.present? + .tab-pane#shared + = render "shared_projects", projects: @shared_projects - else %p.nav-links.no-top |