mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
- Some views had a "Close" button. We've removed this, because we don't want users accidentally hiding the validation errors and not knowing what needs to be fixed. - Some views used `li`, some used `p`, some used `span`. We've standardized on `li`. - Some views only showed the first error. We've standardized on showing all of them. - Some views added an `#error_explanation` div, which we've made standard.
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
= form_for [@project.namespace.becomes(Namespace), @project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal wiki-form gfm-form prepend-top-default js-quick-submit' } do |f|
|
|
= form_errors(@page)
|
|
|
|
= f.hidden_field :title, value: @page.title
|
|
.form-group
|
|
= f.label :format, class: 'control-label'
|
|
.col-sm-10
|
|
= f.select :format, options_for_select(ProjectWiki::MARKUPS, {selected: @page.format}), {}, class: "form-control"
|
|
|
|
.form-group
|
|
= f.label :content, class: 'control-label'
|
|
.col-sm-10
|
|
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do
|
|
= render 'projects/zen', f: f, attr: :content, classes: 'description form-control'
|
|
= render 'projects/notes/hints'
|
|
|
|
.clearfix
|
|
.error-alert
|
|
|
|
.help-block
|
|
To link to a (new) page, simply type
|
|
%code [Link Title](page-slug)
|
|
\.
|
|
.form-group
|
|
= f.label :commit_message, class: 'control-label'
|
|
.col-sm-10= f.text_field :message, class: 'form-control', rows: 18
|
|
|
|
.form-actions
|
|
- if @page && @page.persisted?
|
|
= f.submit 'Save changes', class: "btn-save btn"
|
|
= link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel"
|
|
- else
|
|
= f.submit 'Create page', class: "btn-create btn"
|
|
= link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, :home), class: "btn btn-cancel"
|