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
41d598ce
Commit
41d598ce
authored
Aug 01, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial implementation of an async branch dropdown for Revert and Cherry Pick.
parent
83bbca26
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
app/assets/stylesheets/framework/modal.scss
app/assets/stylesheets/framework/modal.scss
+0
-1
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+7
-0
app/views/projects/commit/_change.html.haml
app/views/projects/commit/_change.html.haml
+8
-1
No files found.
app/assets/stylesheets/framework/modal.scss
View file @
41d598ce
.modal-body
{
position
:
relative
;
overflow-y
:
auto
;
padding
:
15px
;
.form-actions
{
...
...
app/controllers/projects/branches_controller.rb
View file @
41d598ce
...
...
@@ -15,6 +15,13 @@ class Projects::BranchesController < Projects::ApplicationController
diverging_commit_counts
=
repository
.
diverging_commit_counts
(
branch
)
[
memo
,
diverging_commit_counts
[
:behind
],
diverging_commit_counts
[
:ahead
]].
max
end
respond_to
do
|
format
|
format
.
html
format
.
json
do
render
json:
@repository
.
branch_names
.
to_json
end
end
end
def
recent
...
...
app/views/projects/commit/_change.html.haml
View file @
41d598ce
...
...
@@ -17,7 +17,14 @@
.form-group.branch
=
label_tag
'target_branch'
,
target_label
,
class:
'control-label'
.col-sm-10
=
select_tag
"target_branch"
,
project_branches
,
class:
"select2 select2-sm js-target-branch"
.dropdown
=
dropdown_toggle
@project
.
default_branch
,
{
toggle:
"dropdown"
,
selected:
@project
.
default_branch
,
ref:
@ref
,
refs_url:
branches_namespace_project_path
(
@project
.
namespace
,
@project
)
},
{
toggle_class:
"js-project-refs-dropdown js-target-branch"
}
.dropdown-menu.dropdown-menu-selectable
=
dropdown_title
"Switch branch"
=
dropdown_filter
"Search branches"
=
dropdown_content
=
dropdown_loading
-
if
can?
(
current_user
,
:push_code
,
@project
)
.js-create-merge-request-container
.checkbox
...
...
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