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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
140 deletions
+107
-140
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
+1
-87
_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
+8
-9
index.html.haml
app/views/projects/forks/index.html.haml
+31
-33
No files found.
app/assets/stylesheets/framework/buttons.scss
View file @
4beae990
...
...
@@ -82,8 +82,7 @@
&
.btn-success
,
&
.btn-new
,
&
.btn-create
,
&
.btn-save
,
&
.btn-green
{
&
.btn-save
{
@include
btn-green
;
}
...
...
@@ -159,7 +158,6 @@
.input-group-btn
{
.btn
{
@include
btn-gray
;
@include
btn-middle
;
&
:hover
{
...
...
@@ -186,8 +184,4 @@
border
:
1px
solid
#c6cacf
!
important
;
background-color
:
#e4e7ed
!
important
;
}
.btn-green
{
@include
btn-green
}
}
app/assets/stylesheets/framework/nav.scss
View file @
4beae990
...
...
@@ -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 @@
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-thumbnail
{
text-align
:
center
;
...
...
@@ -386,22 +356,6 @@ pre.light-well {
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
{
margin
:
0
7px
0
7px
;
...
...
@@ -559,52 +513,12 @@ pre.light-well {
}
}
.cannot-be-merged
,
.cannot-be-merged
,
.cannot-be-merged
:hover
{
color
:
#E62958
;
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
{
i
:nth-child
(
1
)
{
color
:
#2AA056
;
...
...
app/views/dashboard/_groups_head.html.haml
View file @
4beae990
...
...
@@ -7,7 +7,7 @@
=
link_to
explore_groups_path
,
title:
'Explore groups'
do
Explore Groups
-
if
current_user
.
can_create_group?
.
projects-search-form
.
nav-controls
=
link_to
new_group_path
,
class:
"btn btn-new"
do
=
icon
(
'plus'
)
New Group
app/views/dashboard/_projects_head.html.haml
View file @
4beae990
...
...
@@ -12,9 +12,9 @@
=
link_to
explore_root_path
,
title:
'Explore'
,
data:
{
placement:
'right'
}
do
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
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
class:
'btn btn-
green
'
do
%i
.fa.fa-plus
=
link_to
new_project_path
,
class:
'btn btn-
new
'
do
=
icon
(
'plus'
)
New Project
app/views/groups/_projects.html.haml
View file @
4beae990
.projects-list-holder
.projects-search-form
.input-group
=
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
%span
.input-group-btn
=
link_to
new_project_path
(
namespace_id:
@group
.
id
),
class:
'btn btn-green'
do
%i
.fa.fa-plus
New Project
.projects-list-holder.prepend-top-default
.input-group
=
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
%span
.input-group-btn
=
link_to
new_project_path
(
namespace_id:
@group
.
id
),
class:
'btn btn-new'
do
=
icon
(
'plus'
)
New Project
=
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
.
pull-lef
t
.
top-area
.
nav-tex
t
-
public_count
=
@public_forks
.
size
-
protected_count
=
@protected_forks
.
size
-
full_count_title
=
"
#{
public_count
}
public and
#{
protected_count
}
private"
==
#{
pluralize
(
@all_forks
.
size
,
'fork'
)
}
:
#{
full_count_title
}
.pull-right
.projects-search-form.fork-search-form
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Search forks'
,
class:
'projects-list-filter form-control'
,
spellcheck:
false
,
data:
{
'filter-selector'
=>
'span.namespace-name'
}
.nav-controls
=
search_field_tag
:filter_projects
,
nil
,
placeholder:
'Search forks'
,
class:
'projects-list-filter form-control'
,
spellcheck:
false
,
data:
{
'filter-selector'
=>
'span.namespace-name'
}
.dropdown.inline.prepend-left-10
%button
.dropdown-toggle.btn.sort-forks
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
else
.dropdown.prepend-left-10
%button
.dropdown-toggle.btn.sort-forks
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
else
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu.dropdown-menu-align-right
%li
-
excluded_filters
=
[
:state
,
:scope
,
:label_name
,
:milestone_id
,
:assignee_id
,
:author_id
]
=
link_to
page_filter_path
(
sort:
sort_value_recently_created
,
without:
excluded_filters
)
do
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu.dropdown-menu-align-right
%li
-
excluded_filters
=
[
:state
,
:scope
,
:label_name
,
:milestone_id
,
:assignee_id
,
:author_id
]
=
link_to
page_filter_path
(
sort:
sort_value_recently_created
,
without:
excluded_filters
)
do
=
sort_title_recently_created
=
link_to
page_filter_path
(
sort:
sort_value_oldest_created
,
without:
excluded_filters
)
do
=
sort_title_oldest_created
=
link_to
page_filter_path
(
sort:
sort_value_recently_updated
,
without:
excluded_filters
)
do
=
sort_title_recently_updated
=
link_to
page_filter_path
(
sort:
sort_value_oldest_updated
,
without:
excluded_filters
)
do
=
sort_title_oldest_updated
=
link_to
page_filter_path
(
sort:
sort_value_oldest_created
,
without:
excluded_filters
)
do
=
sort_title_oldest_created
=
link_to
page_filter_path
(
sort:
sort_value_recently_updated
,
without:
excluded_filters
)
do
=
sort_title_recently_updated
=
link_to
page_filter_path
(
sort:
sort_value_oldest_updated
,
without:
excluded_filters
)
do
=
sort_title_oldest_updated
.fork-link.inline
-
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
=
icon
(
'code-fork fw'
)
Fork
-
else
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'pull-right btn btn-new'
do
=
icon
(
'code-fork fw'
)
Fork
-
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:
'btn btn-new'
do
=
icon
(
'code-fork fw'
)
Fork
-
else
=
link_to
new_namespace_project_fork_path
(
@project
.
namespace
,
@project
),
title:
"Fork project"
,
class:
'btn btn-new'
do
=
icon
(
'code-fork fw'
)
Fork
.projects-list-holder
...
...
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