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
e2b28d25
Commit
e2b28d25
authored
Nov 07, 2017
by
Vitaliy @blackst0ne Klachkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change tags order in refs dropdown
parent
df7eaa85
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
app/views/shared/_ref_switcher.html.haml
app/views/shared/_ref_switcher.html.haml
+1
-1
changelogs/unreleased/feature_change_sort_refs.yml
changelogs/unreleased/feature_change_sort_refs.yml
+5
-0
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+6
-5
No files found.
app/views/shared/_ref_switcher.html.haml
View file @
e2b28d25
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
-
@options
&&
@options
.
each
do
|
key
,
value
|
-
@options
&&
@options
.
each
do
|
key
,
value
|
=
hidden_field_tag
key
,
value
,
id:
nil
=
hidden_field_tag
key
,
value
,
id:
nil
.dropdown
.dropdown
=
dropdown_toggle
dropdown_toggle_text
,
{
toggle:
"dropdown"
,
selected:
dropdown_toggle_text
,
ref:
@ref
,
refs_url:
refs_project_path
(
@project
),
field_name:
'ref'
,
submit_form_on_click:
true
,
visit:
true
},
{
toggle_class:
"js-project-refs-dropdown"
}
=
dropdown_toggle
dropdown_toggle_text
,
{
toggle:
"dropdown"
,
selected:
dropdown_toggle_text
,
ref:
@ref
,
refs_url:
refs_project_path
(
@project
,
sort:
'updated_desc'
),
field_name:
'ref'
,
submit_form_on_click:
true
,
visit:
true
},
{
toggle_class:
"js-project-refs-dropdown"
}
.dropdown-menu.dropdown-menu-selectable.git-revision-dropdown.dropdown-menu-paging
{
class:
(
"dropdown-menu-align-right"
if
local_assigns
[
:align_right
])
}
.dropdown-menu.dropdown-menu-selectable.git-revision-dropdown.dropdown-menu-paging
{
class:
(
"dropdown-menu-align-right"
if
local_assigns
[
:align_right
])
}
.dropdown-page-one
.dropdown-page-one
=
dropdown_title
_
(
"Switch branch/tag"
)
=
dropdown_title
_
(
"Switch branch/tag"
)
...
...
changelogs/unreleased/feature_change_sort_refs.yml
0 → 100644
View file @
e2b28d25
---
title
:
Change tags order in refs dropdown
merge_request
:
15235
author
:
Vitaliy @blackst0ne Klachkov
type
:
changed
spec/controllers/projects_controller_spec.rb
View file @
e2b28d25
...
@@ -503,13 +503,14 @@ describe ProjectsController do
...
@@ -503,13 +503,14 @@ describe ProjectsController do
describe
"GET refs"
do
describe
"GET refs"
do
let
(
:public_project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:public_project
)
{
create
(
:project
,
:public
,
:repository
)
}
it
"gets a list of branches and tags"
do
it
'gets a list of branches and tags'
do
get
:refs
,
namespace_id:
public_project
.
namespace
,
id:
public_project
get
:refs
,
namespace_id:
public_project
.
namespace
,
id:
public_project
,
sort:
'updated_desc'
parsed_body
=
JSON
.
parse
(
response
.
body
)
parsed_body
=
JSON
.
parse
(
response
.
body
)
expect
(
parsed_body
[
"Branches"
]).
to
include
(
"master"
)
expect
(
parsed_body
[
'Branches'
]).
to
include
(
'master'
)
expect
(
parsed_body
[
"Tags"
]).
to
include
(
"v1.0.0"
)
expect
(
parsed_body
[
'Tags'
].
first
).
to
eq
(
'v1.1.0'
)
expect
(
parsed_body
[
"Commits"
]).
to
be_nil
expect
(
parsed_body
[
'Tags'
].
last
).
to
eq
(
'v1.0.0'
)
expect
(
parsed_body
[
'Commits'
]).
to
be_nil
end
end
it
"gets a list of branches, tags and commits"
do
it
"gets a list of branches, tags and commits"
do
...
...
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