Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
08a0af9f
Commit
08a0af9f
authored
Jul 03, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved more action buttons
parent
e95f81d2
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
21 deletions
+40
-21
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-0
app/assets/javascripts/project_select.js
app/assets/javascripts/project_select.js
+8
-0
app/assets/stylesheets/new_nav.scss
app/assets/stylesheets/new_nav.scss
+10
-0
app/views/dashboard/_groups_head.html.haml
app/views/dashboard/_groups_head.html.haml
+6
-3
app/views/dashboard/_projects_head.html.haml
app/views/dashboard/_projects_head.html.haml
+7
-3
app/views/dashboard/milestones/index.html.haml
app/views/dashboard/milestones/index.html.haml
+5
-1
app/views/shared/_new_project_item_select.html.haml
app/views/shared/_new_project_item_select.html.haml
+1
-14
No files found.
app/assets/javascripts/dispatcher.js
View file @
08a0af9f
...
...
@@ -150,6 +150,9 @@ import initExperimentalFlags from './experimental_flags';
shortcut_handler
=
new
ShortcutsIssuable
();
new
ZenMode
();
break
;
case
'
dashboard:milestones:index
'
:
new
ProjectSelect
();
break
;
case
'
projects:milestones:show
'
:
case
'
groups:milestones:show
'
:
case
'
dashboard:milestones:show
'
:
...
...
app/assets/javascripts/project_select.js
View file @
08a0af9f
...
...
@@ -104,6 +104,14 @@ import Api from './api';
dropdownCssClass
:
"
ajax-project-dropdown
"
});
});
$
(
'
.new-project-item-select-button
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.project-item-select
'
,
this
.
parentNode
).
select2
(
'
open
'
);
});
$
(
'
.project-item-select
'
).
on
(
'
click
'
,
function
()
{
window
.
location
=
`
${
$
(
this
).
val
()}
/
${
this
.
dataset
.
relativePath
}
`
;
});
}
return
ProjectSelect
;
...
...
app/assets/stylesheets/new_nav.scss
View file @
08a0af9f
...
...
@@ -388,3 +388,13 @@ header.navbar-gitlab-new {
color
:
$gl-text-color
;
}
}
.top-area
{
.nav-controls-new-nav
{
.dropdown
{
@media
(
min-width
:
$screen-sm-min
)
{
margin-right
:
0
;
}
}
}
}
app/views/dashboard/_groups_head.html.haml
View file @
08a0af9f
-
if
show_new_nav?
&&
current_user
.
can_create_group?
-
content_for
:breadcrumbs_extra
do
=
link_to
"New group"
,
new_group_path
,
class:
"btn btn-new"
.top-area
%ul
.nav-links
=
nav_link
(
page:
dashboard_groups_path
)
do
...
...
@@ -6,9 +10,8 @@
=
nav_link
(
page:
explore_groups_path
)
do
=
link_to
explore_groups_path
,
title:
'Explore public groups'
do
Explore public groups
.nav-controls
.nav-controls
{
class:
(
"nav-controls-new-nav"
if
show_new_nav?
)
}
=
render
'shared/groups/search_form'
=
render
'shared/groups/dropdown'
-
if
current_user
.
can_create_group?
=
link_to
new_group_path
,
class:
"btn btn-new"
do
New group
=
link_to
"New group"
,
new_group_path
,
class:
"btn btn-new
#{
(
"visible-xs"
if
show_new_nav?
)
}
"
app/views/dashboard/_projects_head.html.haml
View file @
08a0af9f
=
content_for
:flash_message
do
=
render
'shared/project_limit'
-
if
show_new_nav?
&&
current_user
.
can_create_project?
-
content_for
:breadcrumbs_extra
do
=
link_to
"New project"
,
new_project_path
,
class:
'btn btn-new'
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
.fade-left
=
icon
(
'angle-left'
)
.fade-right
=
icon
(
'angle-right'
)
...
...
@@ -14,9 +19,8 @@
=
link_to
explore_root_path
,
title:
'Explore'
,
data:
{
placement:
'right'
}
do
Explore projects
.nav-controls
.nav-controls
{
class:
(
"nav-controls-new-nav"
if
show_new_nav?
)
}
=
render
'shared/projects/search_form'
=
render
'shared/projects/dropdown'
-
if
current_user
.
can_create_project?
=
link_to
new_project_path
,
class:
'btn btn-new'
do
New project
=
link_to
"New project"
,
new_project_path
,
class:
"btn btn-new
#{
(
"visible-xs"
if
show_new_nav?
)
}
"
app/views/dashboard/milestones/index.html.haml
View file @
08a0af9f
...
...
@@ -2,10 +2,14 @@
-
page_title
'Milestones'
-
header_title
'Milestones'
,
dashboard_milestones_path
-
if
show_new_nav?
-
content_for
:breadcrumbs_extra
do
=
render
'shared/new_project_item_select'
,
path:
'milestones/new'
,
label:
'New milestone'
,
include_groups:
true
.top-area
=
render
'shared/milestones_filter'
,
counts:
@milestone_states
.nav-controls
.nav-controls
{
class:
(
"visible-xs"
if
show_new_nav?
)
}
=
render
'shared/new_project_item_select'
,
path:
'milestones/new'
,
label:
'New milestone'
,
include_groups:
true
.milestones
...
...
app/views/shared/_new_project_item_select.html.haml
View file @
08a0af9f
-
if
@projects
.
any?
.project-item-select-holder
=
project_select_tag
:project_path
,
class:
"project-item-select"
,
data:
{
include_groups:
local_assigns
[
:include_groups
],
order_by:
'last_activity_at'
},
with_feature_enabled:
local_assigns
[
:with_feature_enabled
]
%a
.btn.btn-new.new-project-item-select-button
%a
.btn.btn-new.new-project-item-select-button
{
data:
{
relative_path:
local_assigns
[
:path
]
}
}
=
local_assigns
[
:label
]
=
icon
(
'caret-down'
)
:javascript
$
(
'
.new-project-item-select-button
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.project-item-select
'
).
select2
(
'
open
'
);
});
var
relativePath
=
'
#{
local_assigns
[
:path
]
}
'
;
$
(
'
.project-item-select
'
).
on
(
'
click
'
,
function
()
{
window
.
location
=
$
(
this
).
val
()
+
'
/
'
+
relativePath
;
});
new
ProjectSelect
()
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