BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4beae990
Commit
4beae990
authored
Feb 03, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor nav controls section (search and new project/group btn)
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
df922d81
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
109 deletions
+76
-109
buttons.scss
app/assets/stylesheets/framework/buttons.scss
+1
-7
nav.scss
app/assets/stylesheets/framework/nav.scss
+62
-0
projects.scss
app/assets/stylesheets/pages/projects.scss
+0
-86
_groups_head.html.haml
app/views/dashboard/_groups_head.html.haml
+1
-1
_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+3
-3
_projects.html.haml
app/views/groups/_projects.html.haml
+3
-4
index.html.haml
app/views/projects/forks/index.html.haml
+6
-8
No files found.
app/assets/stylesheets/framework/buttons.scss
View file @
4beae990
...
@@ -82,8 +82,7 @@
...
@@ -82,8 +82,7 @@
&
.btn-success
,
&
.btn-success
,
&
.btn-new
,
&
.btn-new
,
&
.btn-create
,
&
.btn-create
,
&
.btn-save
,
&
.btn-save
{
&
.btn-green
{
@include
btn-green
;
@include
btn-green
;
}
}
...
@@ -159,7 +158,6 @@
...
@@ -159,7 +158,6 @@
.input-group-btn
{
.input-group-btn
{
.btn
{
.btn
{
@include
btn-gray
;
@include
btn-middle
;
@include
btn-middle
;
&
:hover
{
&
:hover
{
...
@@ -186,8 +184,4 @@
...
@@ -186,8 +184,4 @@
border
:
1px
solid
#c6cacf
!
important
;
border
:
1px
solid
#c6cacf
!
important
;
background-color
:
#e4e7ed
!
important
;
background-color
:
#e4e7ed
!
important
;
}
}
.btn-green
{
@include
btn-green
}
}
}
app/assets/stylesheets/framework/nav.scss
View file @
4beae990
...
@@ -37,3 +37,65 @@
...
@@ -37,3 +37,65 @@
}
}
}
}
}
}
.top-area
{
border-bottom
:
1px
solid
#EEE
;
.nav-text
{
padding-top
:
16px
;
padding-bottom
:
11px
;
display
:
inline-block
;
width
:
50%
;
line-height
:
28px
;
}
.nav-links
{
display
:
inline-block
;
width
:
50%
;
margin-bottom
:
0px
;
border-bottom
:
none
;
}
.nav-controls
{
width
:
50%
;
display
:
inline-block
;
float
:
right
;
text-align
:
right
;
padding
:
11px
0
;
margin-bottom
:
0px
;
>
.dropdown
{
display
:
inline-block
;
}
input
{
display
:
inline-block
;
width
:
calc
(
100%
-
151px
);
/* Small devices (tablets, 768px and up) */
@media
(
min-width
:
$screen-sm-min
)
{
width
:
150px
;
}
/* Medium devices (desktops, 992px and up) */
@media
(
min-width
:
$screen-md-min
)
{
width
:
200px
;
}
/* Large devices (large desktops, 1200px and up) */
@media
(
min-width
:
$screen-lg-min
)
{
width
:
300px
;
}
}
.btn-new
{
width
:
135px
;
margin-left
:
10px
;
float
:
right
;
}
.dropdown-toggle.btn
{
margin-top
:
-3px
;
}
}
@media
(
max-width
:
$screen-xs-max
)
{
.nav-controls
{
padding-top
:
15px
;
}
}
}
app/assets/stylesheets/pages/projects.scss
View file @
4beae990
...
@@ -281,36 +281,6 @@
...
@@ -281,36 +281,6 @@
margin-top
:
-1px
;
margin-top
:
-1px
;
}
}
.top-area
{
border-bottom
:
1px
solid
#EEE
;
ul
.nav-links
{
display
:
inline-block
;
width
:
50%
;
margin-bottom
:
0px
;
border-bottom
:
none
;
}
.projects-search-form
{
width
:
50%
;
display
:
inline-block
;
float
:
right
;
padding-top
:
11px
;
text-align
:
right
;
.btn-green
{
margin-left
:
10px
;
float
:
right
;
}
}
@media
(
max-width
:
$screen-xs-max
)
{
.projects-search-form
{
padding-top
:
15px
;
}
}
}
.fork-namespaces
{
.fork-namespaces
{
.fork-thumbnail
{
.fork-thumbnail
{
text-align
:
center
;
text-align
:
center
;
...
@@ -386,22 +356,6 @@ pre.light-well {
...
@@ -386,22 +356,6 @@ pre.light-well {
border-color
:
#f1f1f1
;
border-color
:
#f1f1f1
;
}
}
.projects-search-form
{
padding
:
$gl-padding
0
;
padding-bottom
:
0
;
margin-bottom
:
0px
;
input
{
display
:
inline-block
;
width
:
calc
(
100%
-
151px
);
}
.btn
{
display
:
inline-block
;
width
:
135px
;
}
}
.git-empty
{
.git-empty
{
margin
:
0
7px
0
7px
;
margin
:
0
7px
0
7px
;
...
@@ -565,46 +519,6 @@ pre.light-well {
...
@@ -565,46 +519,6 @@ pre.light-well {
margin-top
:
2px
;
margin-top
:
2px
;
}
}
/*
* Forks list rendered on Project's forks page
*/
.forks-top-block
{
padding
:
16px
0
;
}
.projects-search-form
{
.dropdown-toggle.btn
{
margin-top
:
-3px
;
}
&
.fork-search-form
{
margin
:
0
;
margin-top
:
-
$gl-padding
;
padding-bottom
:
0
;
input
{
/* Small devices (tablets, 768px and up) */
@media
(
min-width
:
$screen-sm-min
)
{
width
:
180px
;
}
/* Medium devices (desktops, 992px and up) */
@media
(
min-width
:
$screen-md-min
)
{
width
:
350px
;
}
/* Large devices (large desktops, 1200px and up) */
@media
(
min-width
:
$screen-lg-min
)
{
width
:
400px
;
}
}
.sort-forks
{
width
:
160px
;
}
.fork-link
{
float
:
right
;
margin-left
:
$gl-padding
;
}
}
}
.private-forks-notice
.private-fork-icon
{
.private-forks-notice
.private-fork-icon
{
i
:nth-child
(
1
)
{
i
:nth-child
(
1
)
{
color
:
#2AA056
;
color
:
#2AA056
;
...
...
app/views/dashboard/_groups_head.html.haml
View file @
4beae990
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
=
link_to
explore_groups_path
,
title:
'Explore groups'
do
=
link_to
explore_groups_path
,
title:
'Explore groups'
do
Explore Groups
Explore Groups
-
if
current_user
.
can_create_group?
-
if
current_user
.
can_create_group?
.
projects-search-form
.
nav-controls
=
link_to
new_group_path
,
class:
"btn btn-new"
do
=
link_to
new_group_path
,
class:
"btn btn-new"
do
=
icon
(
'plus'
)
=
icon
(
'plus'
)
New Group
New Group
app/views/dashboard/_projects_head.html.haml
View file @
4beae990
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
=
link_to
explore_root_path
,
title:
'Explore'
,
data:
{
placement:
'right'
}
do
=
link_to
explore_root_path
,
title:
'Explore'
,
data:
{
placement:
'right'
}
do
Explore Projects
Explore Projects
.
projects-search-form
.
nav-controls
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name...'
,
class:
'projects-list-filter form-control hidden-xs'
,
spellcheck:
false
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name...'
,
class:
'projects-list-filter form-control hidden-xs'
,
spellcheck:
false
-
if
current_user
.
can_create_project?
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
class:
'btn btn-
green
'
do
=
link_to
new_project_path
,
class:
'btn btn-
new
'
do
%i
.fa.fa-plus
=
icon
(
'plus'
)
New Project
New Project
app/views/groups/_projects.html.haml
View file @
4beae990
.projects-list-holder
.projects-list-holder.prepend-top-default
.projects-search-form
.input-group
.input-group
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Filter by name'
,
class:
'projects-list-filter form-control'
,
spellcheck:
false
=
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
-
if
can?
current_user
,
:create_projects
,
@group
%span
.input-group-btn
%span
.input-group-btn
=
link_to
new_project_path
(
namespace_id:
@group
.
id
),
class:
'btn btn-green
'
do
=
link_to
new_project_path
(
namespace_id:
@group
.
id
),
class:
'btn btn-new
'
do
%i
.fa.fa-plus
=
icon
(
'plus'
)
New Project
New Project
=
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
app/views/projects/forks/index.html.haml
View file @
4beae990
.
gray-content-block.top-block.clearfix.white.forks-top-block
.
top-area
.
pull-lef
t
.
nav-tex
t
-
public_count
=
@public_forks
.
size
-
public_count
=
@public_forks
.
size
-
protected_count
=
@protected_forks
.
size
-
protected_count
=
@protected_forks
.
size
-
full_count_title
=
"
#{
public_count
}
public and
#{
protected_count
}
private"
-
full_count_title
=
"
#{
public_count
}
public and
#{
protected_count
}
private"
==
#{
pluralize
(
@all_forks
.
size
,
'fork'
)
}
:
#{
full_count_title
}
==
#{
pluralize
(
@all_forks
.
size
,
'fork'
)
}
:
#{
full_count_title
}
.pull-right
.nav-controls
.projects-search-form.fork-search-form
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Search forks'
,
class:
'projects-list-filter form-control'
,
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Search forks'
,
class:
'projects-list-filter form-control'
,
spellcheck:
false
,
data:
{
'filter-selector'
=>
'span.namespace-name'
}
spellcheck:
false
,
data:
{
'filter-selector'
=>
'span.namespace-name'
}
.dropdown.inline
.prepend-left-10
.dropdown
.prepend-left-10
%button
.dropdown-toggle.btn.sort-forks
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%button
.dropdown-toggle.btn.sort-forks
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
%span
.light
sort:
-
if
@sort
.
present?
-
if
@sort
.
present?
...
@@ -30,13 +29,12 @@
...
@@ -30,13 +29,12 @@
=
link_to
page_filter_path
(
sort:
sort_value_oldest_updated
,
without:
excluded_filters
)
do
=
link_to
page_filter_path
(
sort:
sort_value_oldest_updated
,
without:
excluded_filters
)
do
=
sort_title_oldest_updated
=
sort_title_oldest_updated
.fork-link.inline
-
if
current_user
.
already_forked?
(
@project
)
&&
current_user
.
manageable_namespaces
.
size
<
2
-
if
current_user
.
already_forked?
(
@project
)
&&
current_user
.
manageable_namespaces
.
size
<
2
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'pull-right
btn btn-new'
do
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'
btn btn-new'
do
=
icon
(
'code-fork fw'
)
=
icon
(
'code-fork fw'
)
Fork
Fork
-
else
-
else
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'pull-right
btn btn-new'
do
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'
btn btn-new'
do
=
icon
(
'code-fork fw'
)
=
icon
(
'code-fork fw'
)
Fork
Fork
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment