Commit 1b89528b authored by Tom Quirk's avatar Tom Quirk

UI improvements to Wiki Edit page

- Remove page history btn from wiki edit page
- Make wiki edit tip text gray-600
- Use columns for wiki edit form

Includes changelog entry
parent 7d523a37
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
= f.hidden_field :last_commit_sha, value: @page.last_commit_sha = f.hidden_field :last_commit_sha, value: @page.last_commit_sha
.form-group.row .form-group.row
.col-sm-12= f.label :title, class: 'control-label-full-width' .col-sm-2.col-form-label= f.label :title, class: 'control-label-full-width'
.col-sm-12 .col-sm-10
= f.text_field :title, class: 'form-control qa-wiki-title-textbox', value: @page.title, required: true, autofocus: !@page.persisted?, placeholder: s_('Wiki|Page title') = f.text_field :title, class: 'form-control qa-wiki-title-textbox', value: @page.title, required: true, autofocus: !@page.persisted?, placeholder: s_('Wiki|Page title')
%span.d-inline-block.mw-100.gl-mt-2 %span.gl-display-inline-block.gl-max-w-full.gl-mt-2.gl-text-gray-600
= sprite_icon('bulb', size: 12, css_class: 'gl-mr-n1') = sprite_icon('bulb', size: 12, css_class: 'gl-mr-n1')
- if @page.persisted? - if @page.persisted?
= s_("WikiEditPageTip|Tip: You can move this page by adding the path to the beginning of the title.") = s_("WikiEditPageTip|Tip: You can move this page by adding the path to the beginning of the title.")
...@@ -29,18 +29,18 @@ ...@@ -29,18 +29,18 @@
- else - else
= s_("WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories.") = s_("WikiNewPageTip|Tip: You can specify the full path for the new file. We will automatically create any missing directories.")
= succeed '.' do = succeed '.' do
= link_to _('Learn more'), help_page_path('user/project/wiki/index', anchor: 'creating-a-new-wiki-page'), = link_to _('More information'), help_page_path('user/project/wiki/index', anchor: 'creating-a-new-wiki-page'),
target: '_blank', rel: 'noopener noreferrer' target: '_blank', rel: 'noopener noreferrer'
.form-group.row .form-group.row
.col-sm-12= f.label :format, class: 'control-label-full-width' .col-sm-2.col-form-label= f.label :format, class: 'control-label-full-width'
.col-sm-12 .col-sm-10
.select-wrapper .select-wrapper
= f.select :format, options_for_select(Wiki::MARKUPS, {selected: @page.format}), {}, class: 'form-control select-control' = f.select :format, options_for_select(Wiki::MARKUPS, {selected: @page.format}), {}, class: 'form-control select-control'
= icon('chevron-down') = icon('chevron-down')
.form-group.row .form-group.row
.col-sm-12= f.label :content, class: 'control-label-full-width' .col-sm-2.col-form-label= f.label :content, class: 'control-label-full-width'
.col-sm-12 .col-sm-10
= render layout: 'shared/md_preview', locals: { url: wiki_page_path(@wiki, @page, action: :preview_markdown) } do = render layout: 'shared/md_preview', locals: { url: wiki_page_path(@wiki, @page, action: :preview_markdown) } do
= render 'shared/zen', f: f, attr: :content, classes: 'note-textarea qa-wiki-content-textarea', placeholder: s_("WikiPage|Write your content or drag files here…") = render 'shared/zen', f: f, attr: :content, classes: 'note-textarea qa-wiki-content-textarea', placeholder: s_("WikiPage|Write your content or drag files here…")
= render 'shared/notes/hints' = render 'shared/notes/hints'
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
.clearfix .clearfix
.error-alert .error-alert
.form-text.text-muted .form-text.gl-text-gray-600
= succeed '.' do = succeed '.' do
- case @page.format.to_s - case @page.format.to_s
- when 'rdoc' - when 'rdoc'
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
= (s_("WikiMarkdownDocs|More examples are in the %{docs_link}") % { docs_link: markdown_link }).html_safe = (s_("WikiMarkdownDocs|More examples are in the %{docs_link}") % { docs_link: markdown_link }).html_safe
.form-group.row .form-group.row
.col-sm-12= f.label :commit_message, class: 'control-label-full-width' .col-sm-2.col-form-label= f.label :commit_message, class: 'control-label-full-width'
.col-sm-12= f.text_field :message, class: 'form-control qa-wiki-message-textbox', rows: 18, value: nil .col-sm-10= f.text_field :message, class: 'form-control qa-wiki-message-textbox', rows: 18, value: nil
.form-actions .form-actions
- if @page && @page.persisted? - if @page && @page.persisted?
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
.nav-controls.pb-md-3.pb-lg-0 .nav-controls.pb-md-3.pb-lg-0
- if @page.persisted? - if @page.persisted?
= link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button" do
= s_("Wiki|Page history")
- if can?(current_user, :admin_wiki, @wiki.container) - if can?(current_user, :admin_wiki, @wiki.container)
#delete-wiki-modal-wrapper{ data: { delete_wiki_url: wiki_page_path(@wiki, @page), page_title: @page.human_title } } #delete-wiki-modal-wrapper{ data: { delete_wiki_url: wiki_page_path(@wiki, @page), page_title: @page.human_title } }
......
---
title: Minor UI improvements to Wiki edit page
merge_request: 45247
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment