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
Tatuya Kamada
gitlab-ce
Commits
e119f994
Commit
e119f994
authored
Sep 02, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pagination on user snippets page
parent
faac7121
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
6 deletions
+47
-6
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/snippets_list.js
app/assets/javascripts/snippets_list.js
+7
-0
app/views/snippets/_snippets.html.haml
app/views/snippets/_snippets.html.haml
+10
-6
spec/features/users/snippets_spec.rb
spec/features/users/snippets_spec.rb
+29
-0
No files found.
CHANGELOG
View file @
e119f994
...
...
@@ -8,6 +8,7 @@ v 8.12.0 (unreleased)
- Add font color contrast to external label in admin area (ClemMakesApps)
- Change logo animation to CSS (ClemMakesApps)
- Instructions for enabling Git packfile bitmaps !6104
- Fix pagination on user snippets page
- Change merge_error column from string to text type
- Reduce contributions calendar data payload (ClemMakesApps)
- Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel)
...
...
app/assets/javascripts/snippets_list.js
0 → 100644
View file @
e119f994
(
function
()
{
this
.
gl
.
SnippetsList
=
function
()
{
$
(
'
.snippets-list-holder .pagination
'
).
on
(
'
ajax:success
'
,
function
(
e
,
data
)
{
$
(
'
.snippets-list-holder
'
).
replaceWith
(
data
.
html
);
});
};
}).
call
(
this
);
app/views/snippets/_snippets.html.haml
View file @
e119f994
%ul
.content-list
.snippets-list-holder
%ul
.content-list
=
render
partial:
'shared/snippets/snippet'
,
collection:
@snippets
-
if
@snippets
.
empty?
%li
.nothing-here-block
Nothing here.
=
paginate
@snippets
,
theme:
'gitlab'
=
paginate
@snippets
,
theme:
'gitlab'
,
remote:
true
:javascript
gl
.
SnippetsList
();
spec/features/users/snippets_spec.rb
0 → 100644
View file @
e119f994
require
'spec_helper'
describe
'Snippets tab on a user profile'
,
feature:
true
,
js:
true
do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
context
'when the user has snippets'
do
before
do
create_list
(
:snippet
,
25
,
:public
,
author:
user
)
visit
user_path
(
user
)
page
.
within
(
'.user-profile-nav'
)
{
click_link
'Snippets'
}
wait_for_ajax
end
it
'is limited to 20 items per page'
do
expect
(
page
.
all
(
'.snippets-list-holder .snippet-row'
).
count
).
to
eq
(
20
)
end
context
'clicking on the link to the second page'
do
before
{
click_link
(
'2'
)
}
it
'shows the remaining snippets'
do
expect
(
page
.
all
(
'.snippets-list-holder .snippet-row'
).
count
).
to
eq
(
5
)
end
end
end
end
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