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
6ca86272
Commit
6ca86272
authored
Mar 23, 2020
by
Natalia Tepluhina
Committed by
Andrew Fontaine
Mar 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update "More Pages" button on Wiki Page
parent
438f0aff
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
app/views/projects/wikis/_sidebar.html.haml
app/views/projects/wikis/_sidebar.html.haml
+3
-2
changelogs/unreleased/211408-update-more-pages-button-on-wiki-page.yml
...released/211408-update-more-pages-button-on-wiki-page.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+14
-2
No files found.
app/views/projects/wikis/_sidebar.html.haml
View file @
6ca86272
...
...
@@ -17,5 +17,6 @@
%ul
.wiki-pages
=
render
@sidebar_wiki_entries
,
context:
'sidebar'
.block.w-100
=
link_to
project_wikis_pages_path
(
@project
),
class:
'btn btn-block'
do
=
s_
(
"Wiki|More Pages"
)
-
if
@sidebar_wiki_entries
&
.
length
.
to_i
>=
15
=
link_to
project_wikis_pages_path
(
@project
),
class:
'btn btn-block'
do
=
s_
(
"Wiki|View All Pages"
)
changelogs/unreleased/211408-update-more-pages-button-on-wiki-page.yml
0 → 100644
View file @
6ca86272
---
title
:
Update More Pages button on Wiki Page
merge_request
:
27499
author
:
type
:
changed
locale/gitlab.pot
View file @
6ca86272
...
...
@@ -22762,9 +22762,6 @@ msgstr ""
msgid "Wiki|Edit Page"
msgstr ""
msgid "Wiki|More Pages"
msgstr ""
msgid "Wiki|New page"
msgstr ""
...
...
@@ -22783,6 +22780,9 @@ msgstr ""
msgid "Wiki|Title"
msgstr ""
msgid "Wiki|View All Pages"
msgstr ""
msgid "Wiki|Wiki Pages"
msgstr ""
...
...
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
6ca86272
...
...
@@ -312,7 +312,6 @@ describe "User creates wiki page" do
visit
(
project_wikis_path
(
project
))
expect
(
page
).
to
have_content
(
'another'
)
expect
(
page
).
to
have_content
(
'More Pages'
)
end
context
'when there is a customized sidebar'
do
...
...
@@ -324,10 +323,23 @@ describe "User creates wiki page" do
visit
(
project_wikis_path
(
project
))
expect
(
page
).
to
have_content
(
'My customized sidebar'
)
expect
(
page
).
to
have_content
(
'More Pages'
)
expect
(
page
).
not_to
have_content
(
'Another'
)
end
end
end
context
'when there are more than 15 existing pages'
do
before
do
create
(
:wiki_page
,
wiki:
wiki
,
attrs:
{
title:
'home'
,
content:
'home'
})
(
1
..
14
).
each
{
|
i
|
create
(
:wiki_page
,
wiki:
wiki
,
attrs:
{
title:
"page-
#{
i
}
"
,
content:
"page
#{
i
}
"
})
}
end
it
'renders a default sidebar when there is no customized sidebar'
do
visit
(
project_wikis_path
(
project
))
expect
(
page
).
to
have_content
(
'View All Pages'
)
expect
(
page
).
to
have_content
(
'page 1'
)
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