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
00209ed8
Commit
00209ed8
authored
Nov 26, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove needless auto-capitalization on Wiki page titles
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/38317
parent
b8e5acb2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
24 deletions
+27
-24
app/views/projects/wikis/_sidebar_wiki_page.html.haml
app/views/projects/wikis/_sidebar_wiki_page.html.haml
+1
-1
app/views/projects/wikis/edit.html.haml
app/views/projects/wikis/edit.html.haml
+4
-6
app/views/projects/wikis/history.html.haml
app/views/projects/wikis/history.html.haml
+2
-2
app/views/projects/wikis/show.html.haml
app/views/projects/wikis/show.html.haml
+3
-3
changelogs/unreleased/sh-fix-issue-38317.yml
changelogs/unreleased/sh-fix-issue-38317.yml
+5
-0
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+7
-7
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+1
-1
spec/features/projects/wiki/user_views_wiki_page_spec.rb
spec/features/projects/wiki/user_views_wiki_page_spec.rb
+4
-4
No files found.
app/views/projects/wikis/_sidebar_wiki_page.html.haml
View file @
00209ed8
%li
{
class:
active_when
(
params
[
:id
]
==
wiki_page
.
slug
)
}
%li
{
class:
active_when
(
params
[
:id
]
==
wiki_page
.
slug
)
}
=
link_to
project_wiki_path
(
@project
,
wiki_page
)
do
=
link_to
project_wiki_path
(
@project
,
wiki_page
)
do
=
wiki_page
.
title
.
capitalize
=
wiki_page
.
title
app/views/projects/wikis/edit.html.haml
View file @
00209ed8
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
add_to_breadcrumbs
_
(
"Wiki"
),
project_wiki_path
(
@project
,
@page
)
-
page_title
_
(
"Edit"
),
@page
.
title
,
_
(
"Wiki"
)
-
breadcrumb_title
@page
.
persisted?
?
_
(
"Edit"
)
:
_
(
"New"
)
-
page_title
@page
.
persisted?
?
_
(
"Edit"
)
:
_
(
"New"
),
@page
.
title
.
capitalize
,
_
(
"Wiki"
)
=
wiki_page_errors
(
@error
)
=
wiki_page_errors
(
@error
)
...
@@ -12,9 +10,9 @@
...
@@ -12,9 +10,9 @@
.nav-text
.nav-text
%h2
.wiki-page-title
%h2
.wiki-page-title
-
if
@page
.
persisted?
-
if
@page
.
persisted?
=
link_to
@page
.
title
.
capitalize
,
project_wiki_path
(
@project
,
@page
)
=
link_to
@page
.
title
,
project_wiki_path
(
@project
,
@page
)
-
else
-
else
=
@page
.
title
.
capitalize
=
@page
.
title
%span
.light
%span
.light
·
·
-
if
@page
.
persisted?
-
if
@page
.
persisted?
...
@@ -30,7 +28,7 @@
...
@@ -30,7 +28,7 @@
=
link_to
project_wiki_history_path
(
@project
,
@page
),
class:
"btn"
do
=
link_to
project_wiki_history_path
(
@project
,
@page
),
class:
"btn"
do
=
s_
(
"Wiki|Page history"
)
=
s_
(
"Wiki|Page history"
)
-
if
can?
(
current_user
,
:admin_wiki
,
@project
)
-
if
can?
(
current_user
,
:admin_wiki
,
@project
)
#delete-wiki-modal-wrapper
{
data:
{
delete_wiki_url:
project_wiki_path
(
@project
,
@page
),
page_title:
@page
.
title
.
capitalize
}
}
#delete-wiki-modal-wrapper
{
data:
{
delete_wiki_url:
project_wiki_path
(
@project
,
@page
),
page_title:
@page
.
title
}
}
=
render
'form'
,
uploads_path:
wiki_attachment_upload_url
=
render
'form'
,
uploads_path:
wiki_attachment_upload_url
...
...
app/views/projects/wikis/history.html.haml
View file @
00209ed8
-
page_title
_
(
"History"
),
@page
.
title
.
capitalize
,
_
(
"Wiki"
)
-
page_title
_
(
"History"
),
@page
.
title
,
_
(
"Wiki"
)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.has-sidebar-toggle
%button
.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle
{
role:
"button"
,
type:
"button"
}
%button
.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle
{
role:
"button"
,
type:
"button"
}
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
.nav-text
.nav-text
%h2
.wiki-page-title
%h2
.wiki-page-title
=
link_to
@page
.
title
.
capitalize
,
project_wiki_path
(
@project
,
@page
)
=
link_to
@page
.
title
,
project_wiki_path
(
@project
,
@page
)
%span
.light
%span
.light
·
·
=
_
(
"History"
)
=
_
(
"History"
)
...
...
app/views/projects/wikis/show.html.haml
View file @
00209ed8
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
breadcrumb_title
@page
.
title
.
capitalize
-
breadcrumb_title
@page
.
title
-
wiki_breadcrumb_dropdown_links
(
@page
.
slug
)
-
wiki_breadcrumb_dropdown_links
(
@page
.
slug
)
-
page_title
@page
.
title
.
capitalize
,
_
(
"Wiki"
)
-
page_title
@page
.
title
,
_
(
"Wiki"
)
-
add_to_breadcrumbs
_
(
"Wiki"
),
get_project_wiki_path
(
@project
)
-
add_to_breadcrumbs
_
(
"Wiki"
),
get_project_wiki_path
(
@project
)
.wiki-page-header.has-sidebar-toggle
.wiki-page-header.has-sidebar-toggle
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
=
icon
(
'angle-double-left'
)
=
icon
(
'angle-double-left'
)
.nav-text
.nav-text
%h2
.wiki-page-title
=
@page
.
title
.
capitalize
%h2
.wiki-page-title
=
@page
.
title
%span
.wiki-last-edit-by
%span
.wiki-last-edit-by
-
if
@page
.
last_version
-
if
@page
.
last_version
=
(
_
(
"Last edited by %{name}"
)
%
{
name:
"<strong>
#{
@page
.
last_version
.
author_name
}
</strong>"
}).
html_safe
=
(
_
(
"Last edited by %{name}"
)
%
{
name:
"<strong>
#{
@page
.
last_version
.
author_name
}
</strong>"
}).
html_safe
...
...
changelogs/unreleased/sh-fix-issue-38317.yml
0 → 100644
View file @
00209ed8
---
title
:
Remove needless auto-capitalization on Wiki page titles
merge_request
:
23288
author
:
type
:
fixed
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
00209ed8
...
@@ -85,7 +85,7 @@ describe "User creates wiki page" do
...
@@ -85,7 +85,7 @@ describe "User creates wiki page" do
expect
(
current_path
).
to
eq
(
project_wiki_path
(
project
,
"test"
))
expect
(
current_path
).
to
eq
(
project_wiki_path
(
project
,
"test"
))
page
.
within
(
:css
,
".nav-text"
)
do
page
.
within
(
:css
,
".nav-text"
)
do
expect
(
page
).
to
have_content
(
"
T
est"
).
and
have_content
(
"Create Page"
)
expect
(
page
).
to
have_content
(
"
t
est"
).
and
have_content
(
"Create Page"
)
end
end
click_link
(
"Home"
)
click_link
(
"Home"
)
...
@@ -97,7 +97,7 @@ describe "User creates wiki page" do
...
@@ -97,7 +97,7 @@ describe "User creates wiki page" do
expect
(
current_path
).
to
eq
(
project_wiki_path
(
project
,
"api"
))
expect
(
current_path
).
to
eq
(
project_wiki_path
(
project
,
"api"
))
page
.
within
(
:css
,
".nav-text"
)
do
page
.
within
(
:css
,
".nav-text"
)
do
expect
(
page
).
to
have_content
(
"Create"
).
and
have_content
(
"
A
pi"
)
expect
(
page
).
to
have_content
(
"Create"
).
and
have_content
(
"
a
pi"
)
end
end
click_link
(
"Home"
)
click_link
(
"Home"
)
...
@@ -109,7 +109,7 @@ describe "User creates wiki page" do
...
@@ -109,7 +109,7 @@ describe "User creates wiki page" do
expect
(
current_path
).
to
eq
(
project_wiki_path
(
project
,
"raketasks"
))
expect
(
current_path
).
to
eq
(
project_wiki_path
(
project
,
"raketasks"
))
page
.
within
(
:css
,
".nav-text"
)
do
page
.
within
(
:css
,
".nav-text"
)
do
expect
(
page
).
to
have_content
(
"Create"
).
and
have_content
(
"
R
ake"
)
expect
(
page
).
to
have_content
(
"Create"
).
and
have_content
(
"
r
ake"
)
end
end
end
end
...
@@ -200,7 +200,7 @@ describe "User creates wiki page" do
...
@@ -200,7 +200,7 @@ describe "User creates wiki page" do
click_button
(
"Create page"
)
click_button
(
"Create page"
)
end
end
expect
(
page
).
to
have_content
(
"
F
oo"
)
expect
(
page
).
to
have_content
(
"
f
oo"
)
.
and
have_content
(
"Last edited by
#{
user
.
name
}
"
)
.
and
have_content
(
"Last edited by
#{
user
.
name
}
"
)
.
and
have_content
(
"My awesome wiki!"
)
.
and
have_content
(
"My awesome wiki!"
)
end
end
...
@@ -246,7 +246,7 @@ describe "User creates wiki page" do
...
@@ -246,7 +246,7 @@ describe "User creates wiki page" do
click_button
(
"Create page"
)
click_button
(
"Create page"
)
end
end
expect
(
page
).
to
have_content
(
"
H
yphens in the name"
)
expect
(
page
).
to
have_content
(
"
Create h
yphens in the name"
)
.
and
have_content
(
"Last edited by
#{
user
.
name
}
"
)
.
and
have_content
(
"Last edited by
#{
user
.
name
}
"
)
.
and
have_content
(
"My awesome wiki!"
)
.
and
have_content
(
"My awesome wiki!"
)
end
end
...
@@ -293,7 +293,7 @@ describe "User creates wiki page" do
...
@@ -293,7 +293,7 @@ describe "User creates wiki page" do
click_button
(
"Create page"
)
click_button
(
"Create page"
)
end
end
expect
(
page
).
to
have_content
(
"
F
oo"
)
expect
(
page
).
to
have_content
(
"
f
oo"
)
.
and
have_content
(
"Last edited by
#{
user
.
name
}
"
)
.
and
have_content
(
"Last edited by
#{
user
.
name
}
"
)
.
and
have_content
(
"My awesome wiki!"
)
.
and
have_content
(
"My awesome wiki!"
)
end
end
...
@@ -311,7 +311,7 @@ describe "User creates wiki page" do
...
@@ -311,7 +311,7 @@ describe "User creates wiki page" do
it
'renders a default sidebar when there is no customized sidebar'
do
it
'renders a default sidebar when there is no customized sidebar'
do
visit
(
project_wikis_path
(
project
))
visit
(
project_wikis_path
(
project
))
expect
(
page
).
to
have_content
(
'
A
nother'
)
expect
(
page
).
to
have_content
(
'
a
nother'
)
expect
(
page
).
to
have_content
(
'More Pages'
)
expect
(
page
).
to
have_content
(
'More Pages'
)
end
end
...
...
spec/features/projects/wiki/user_updates_wiki_page_spec.rb
View file @
00209ed8
...
@@ -39,7 +39,7 @@ describe 'User updates wiki page' do
...
@@ -39,7 +39,7 @@ describe 'User updates wiki page' do
end
end
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'
T
hree'
)
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'
t
hree'
)
first
(
:link
,
text:
'Three'
).
click
first
(
:link
,
text:
'Three'
).
click
...
...
spec/features/projects/wiki/user_views_wiki_page_spec.rb
View file @
00209ed8
...
@@ -38,7 +38,7 @@ describe 'User views a wiki page' do
...
@@ -38,7 +38,7 @@ describe 'User views a wiki page' do
it
'shows the history of a page that has a path'
,
:js
do
it
'shows the history of a page that has a path'
,
:js
do
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
first
(
:link
,
text:
'
T
hree'
).
click
first
(
:link
,
text:
'
t
hree'
).
click
click_on
(
'Page history'
)
click_on
(
'Page history'
)
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
...
@@ -50,11 +50,11 @@ describe 'User views a wiki page' do
...
@@ -50,11 +50,11 @@ describe 'User views a wiki page' do
it
'shows an old version of a page'
,
:js
do
it
'shows an old version of a page'
,
:js
do
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
current_path
).
to
include
(
'one/two/three-test'
)
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'
T
hree'
)
expect
(
find
(
'.wiki-pages'
)).
to
have_content
(
'
t
hree'
)
first
(
:link
,
text:
'
T
hree'
).
click
first
(
:link
,
text:
'
t
hree'
).
click
expect
(
find
(
'.nav-text'
)).
to
have_content
(
'
T
hree'
)
expect
(
find
(
'.nav-text'
)).
to
have_content
(
'
t
hree'
)
click_on
(
'Edit'
)
click_on
(
'Edit'
)
...
...
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