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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f790b670
Commit
f790b670
authored
Sep 02, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove project select dropdown from breadcrumb
parent
04ac1711
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
63 deletions
+1
-63
app/assets/javascripts/project.js
app/assets/javascripts/project.js
+0
-4
app/assets/javascripts/project_select.js
app/assets/javascripts/project_select.js
+1
-45
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+0
-6
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+0
-8
No files found.
app/assets/javascripts/project.js
View file @
f790b670
...
...
@@ -65,10 +65,6 @@ import Cookies from 'js-cookie';
return
_this
.
changeProject
(
$
(
e
.
currentTarget
).
val
());
};
})(
this
));
return
$
(
'
.js-projects-dropdown-toggle
'
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
return
$
(
'
.js-projects-dropdown
'
).
select2
(
'
open
'
);
});
};
Project
.
prototype
.
changeProject
=
function
(
url
)
{
...
...
app/assets/javascripts/project_select.js
View file @
f790b670
...
...
@@ -5,51 +5,7 @@ import ProjectSelectComboButton from './project_select_combo_button';
(
function
()
{
this
.
ProjectSelect
=
(
function
()
{
function
ProjectSelect
()
{
$
(
'
.js-projects-dropdown-toggle
'
).
each
(
function
(
i
,
dropdown
)
{
var
$dropdown
;
$dropdown
=
$
(
dropdown
);
return
$dropdown
.
glDropdown
({
filterable
:
true
,
filterRemote
:
true
,
search
:
{
fields
:
[
'
name_with_namespace
'
]
},
data
:
function
(
term
,
callback
)
{
var
finalCallback
,
projectsCallback
;
var
orderBy
=
$dropdown
.
data
(
'
order-by
'
);
finalCallback
=
function
(
projects
)
{
return
callback
(
projects
);
};
if
(
this
.
includeGroups
)
{
projectsCallback
=
function
(
projects
)
{
var
groupsCallback
;
groupsCallback
=
function
(
groups
)
{
var
data
;
data
=
groups
.
concat
(
projects
);
return
finalCallback
(
data
);
};
return
Api
.
groups
(
term
,
{},
groupsCallback
);
};
}
else
{
projectsCallback
=
finalCallback
;
}
if
(
this
.
groupId
)
{
return
Api
.
groupProjects
(
this
.
groupId
,
term
,
projectsCallback
);
}
else
{
return
Api
.
projects
(
term
,
{
order_by
:
orderBy
},
projectsCallback
);
}
},
url
:
function
(
project
)
{
return
project
.
web_url
;
},
text
:
function
(
project
)
{
return
project
.
name_with_namespace
;
}
});
});
$
(
'
.ajax-project-select
'
).
each
(
function
(
i
,
select
)
{
$
(
'
.ajax-project-select
'
).
each
(
function
(
i
,
select
)
{
var
placeholder
;
this
.
groupId
=
$
(
select
).
data
(
'
group-id
'
);
this
.
includeGroups
=
$
(
select
).
data
(
'
include-groups
'
);
...
...
app/helpers/projects_helper.rb
View file @
f790b670
...
...
@@ -70,12 +70,6 @@ module ProjectsHelper
output
.
html_safe
end
if
current_user
project_link
<<
button_tag
(
type:
'button'
,
class:
'dropdown-toggle-caret js-projects-dropdown-toggle'
,
aria:
{
label:
'Toggle switch project dropdown'
},
data:
{
target:
'.js-dropdown-menu-projects'
,
toggle:
'dropdown'
,
order_by:
'last_activity_at'
})
do
icon
(
"chevron-down"
)
end
end
"
#{
namespace_link
}
/
#{
project_link
}
"
.
html_safe
end
...
...
app/views/layouts/project.html.haml
View file @
f790b670
...
...
@@ -15,12 +15,4 @@
window
.
uploads_path
=
"
#{
project_uploads_path
(
project
)
}
"
;
window
.
preview_markdown_path
=
"
#{
preview_markdown_path
(
project
)
}
"
;
-
content_for
:header_content
do
.js-dropdown-menu-projects
.dropdown-menu.dropdown-select.dropdown-menu-projects
=
dropdown_title
(
"Go to a project"
)
=
dropdown_filter
(
"Search your projects"
)
=
dropdown_content
=
dropdown_loading
=
render
template:
"layouts/application"
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