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
ce2991b8
Commit
ce2991b8
authored
Oct 06, 2020
by
Tom Quirk
Committed by
Denys Mishunov
Oct 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move wiki edit button inline with wiki title
And update QA tests to reflect this change. Includes changelog.
parent
4f4e34fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
app/views/shared/wikis/_main_links.html.haml
app/views/shared/wikis/_main_links.html.haml
+3
-6
app/views/shared/wikis/show.html.haml
app/views/shared/wikis/show.html.haml
+5
-1
changelogs/unreleased/wiki-editor-ux-debt-1.yml
changelogs/unreleased/wiki-editor-ux-debt-1.yml
+5
-0
qa/qa/page/project/wiki/show.rb
qa/qa/page/project/wiki/show.rb
+1
-1
No files found.
app/views/shared/wikis/_main_links.html.haml
View file @
ce2991b8
-
if
@page
&
.
persisted?
-
if
can?
(
current_user
,
:create_wiki
,
@wiki
.
container
)
=
link_to
wiki_path
(
@wiki
,
action: :new
),
class:
"btn gl-button btn-success"
,
role:
"button"
,
data:
{
qa_selector:
'new_page_button'
}
do
=
s_
(
"Wiki|New page"
)
=
link_to
wiki_page_path
(
@wiki
,
@page
,
action: :history
),
class:
"btn gl-button"
,
role:
"button"
,
data:
{
qa_selector:
'page_history_button'
}
do
=
s_
(
"Wiki|Page history"
)
-
if
can?
(
current_user
,
:create_wiki
,
@wiki
.
container
)
&&
@page
.
latest?
&&
@valid_encoding
=
link_to
wiki_pa
ge_path
(
@wiki
,
@page
,
action: :edit
),
class:
"btn gl-button js-wiki-edit"
,
role:
"button"
,
data:
{
qa_selector:
'edit
_page_button'
}
do
=
_
(
"Edit
"
)
-
if
can?
(
current_user
,
:create_wiki
,
@wiki
.
container
)
=
link_to
wiki_pa
th
(
@wiki
,
action: :new
),
class:
"btn gl-button btn-success btn-inverted"
,
role:
"button"
,
data:
{
qa_selector:
'new
_page_button'
}
do
=
s_
(
"Wiki|New page
"
)
app/views/shared/wikis/show.html.haml
View file @
ce2991b8
...
...
@@ -20,7 +20,11 @@
=
(
s_
(
"WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}."
)
%
{
most_recent_link:
most_recent_link
,
history_link:
history_link
}).
html_safe
.gl-mt-5.gl-mb-3
%h2
.gl-mt-0.gl-mb-5
{
data:
{
qa_selector:
'wiki_page_title'
,
testid:
'wiki_page_title'
}
}=
@page
.
human_title
.gl-display-flex.gl-justify-content-space-between
%h2
.gl-mt-0.gl-mb-5
{
data:
{
qa_selector:
'wiki_page_title'
,
testid:
'wiki_page_title'
}
}=
@page
.
human_title
%div
-
if
can?
(
current_user
,
:create_wiki
,
@wiki
.
container
)
&&
@page
.
latest?
&&
@valid_encoding
=
link_to
sprite_icon
(
'pencil'
,
css_class:
'gl-icon'
),
wiki_page_path
(
@wiki
,
@page
,
action: :edit
),
title:
'Edit'
,
role:
"button"
,
class:
'btn gl-button btn-icon js-wiki-edit'
,
data:
{
qa_selector:
'edit_page_button'
}
.js-wiki-page-content.md.gl-pt-2
{
data:
{
qa_selector:
'wiki_page_content'
,
testid:
'wiki_page_content'
,
tracking_context:
wiki_page_tracking_context
(
@page
).
to_json
}
}
=
render_wiki_content
(
@page
)
...
...
changelogs/unreleased/wiki-editor-ux-debt-1.yml
0 → 100644
View file @
ce2991b8
---
title
:
Move wiki edit button inline with wiki title
merge_request
:
44391
author
:
type
:
changed
qa/qa/page/project/wiki/show.rb
View file @
ce2991b8
...
...
@@ -11,12 +11,12 @@ module QA
view
'app/views/shared/wikis/show.html.haml'
do
element
:wiki_page_title
element
:wiki_page_content
element
:edit_page_button
end
view
'app/views/shared/wikis/_main_links.html.haml'
do
element
:new_page_button
element
:page_history_button
element
:edit_page_button
end
view
'app/views/shared/empty_states/_wikis.html.haml'
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