Commit d74cfe7d authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'bugfix/jschatz1/missing-project-button' into 'master'

Fix group projects styles

Makes new project button visible when no projects are available.
Fixes #13193 

# BEFORE
![Screen_Shot_2016-02-04_at_1.08.27_PM](/uploads/36be9d5892506e7d1abcf4eb2a622e12/Screen_Shot_2016-02-04_at_1.08.27_PM.png)

# AFTER (w/projects)
![Screen_Shot_2016-02-04_at_1.07.48_PM](/uploads/fa257a1965017ff1274572dc66fccf90/Screen_Shot_2016-02-04_at_1.07.48_PM.png)

# AFTER (no projects)
![Screen_Shot_2016-02-04_at_1.07.28_PM](/uploads/326f6fdac24b56e8408efd0d11dc2805/Screen_Shot_2016-02-04_at_1.07.28_PM.png)

cc @creamzy @skyruler 

See merge request !2714
parents bd71438d 798c2200
...@@ -90,6 +90,7 @@ class Dispatcher ...@@ -90,6 +90,7 @@ class Dispatcher
when 'groups:new', 'groups:edit', 'admin:groups:edit', 'admin:groups:new' when 'groups:new', 'groups:edit', 'admin:groups:edit', 'admin:groups:new'
new GroupAvatar() new GroupAvatar()
when 'projects:tree:show' when 'projects:tree:show'
shortcut_handler = new ShortcutsNavigation()
new TreeView() new TreeView()
when 'projects:find_file:show' when 'projects:find_file:show'
shortcut_handler = true shortcut_handler = true
......
.top-area .top-area
.nav-controls .nav-controls
= form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| = form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
= search_field_tag :filter_projects, params[:filter_projects], placeholder: 'Filter by name...', class: 'input-short project-filter-form-field form-control projects-list-filter', spellcheck: false, id: 'project-filter-form-field' - if @projects.present?
- if current_user && current_user.can_create_project? = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false
= link_to new_project_path, class: 'btn btn-new' do - if can? current_user, :create_projects, @group
= icon('plus') = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-new pull-right' do
New Project = icon('plus')
New Project
.projects-list-holder .projects-list-holder
= render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false, skip_namespace: true = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false, skip_namespace: true
...@@ -32,10 +32,9 @@ ...@@ -32,10 +32,9 @@
%li.active %li.active
= link_to "#activity", 'data-toggle' => 'tab' do = link_to "#activity", 'data-toggle' => 'tab' do
Activity Activity
- if @projects.present? %li
%li = link_to "#projects", 'data-toggle' => 'tab' do
= link_to "#projects", 'data-toggle' => 'tab' do Projects
Projects
- if can?(current_user, :read_group, @group) - if can?(current_user, :read_group, @group)
%div{ class: container_class } %div{ class: container_class }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment