summaryrefslogtreecommitdiff
path: root/app/views/groups
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-02-04 13:05:40 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-02-23 18:47:48 -0500
commit0267954403a60dd03b438f855320aeb1a7926e09 (patch)
tree89df538331460a82f6e196b6574793b5239563bd /app/views/groups
parent9f80118e05e68743d95a83742a1d0a06bba3039c (diff)
downloadgitlab-ce-0267954403a60dd03b438f855320aeb1a7926e09.tar.gz
Fix group projects styles
Makes new project button visible when no projects are available. Fixes #13193
Diffstat (limited to 'app/views/groups')
-rw-r--r--app/views/groups/_projects.html.haml11
-rw-r--r--app/views/groups/show.html.haml7
2 files changed, 9 insertions, 9 deletions
diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml
index 9c16ab7e30f..209729dc7ee 100644
--- a/app/views/groups/_projects.html.haml
+++ b/app/views/groups/_projects.html.haml
@@ -1,11 +1,12 @@
.top-area
.nav-controls
= 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 current_user && current_user.can_create_project?
- = link_to new_project_path, class: 'btn btn-new' do
- = icon('plus')
- New Project
+ - if @projects.present?
+ = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false
+ - 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
.projects-list-holder
= render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false, skip_namespace: true
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index a0ba11b11a1..6148d8cb3d2 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -32,10 +32,9 @@
%li.active
= link_to "#activity", 'data-toggle' => 'tab' do
Activity
- - if @projects.present?
- %li
- = link_to "#projects", 'data-toggle' => 'tab' do
- Projects
+ %li
+ = link_to "#projects", 'data-toggle' => 'tab' do
+ Projects
- if can?(current_user, :read_group, @group)
%div{ class: container_class }