2018-11-08 19:23:39 +05:30
= form_for @appearance, url: admin_appearances_path do |f|
2016-06-02 11:05:42 +05:30
= form_errors(@appearance)
2016-04-02 18:10:28 +05:30
2018-03-17 18:26:18 +05:30
%fieldset.app_logo
%legend
Navigation bar:
2018-11-08 19:23:39 +05:30
.form-group.row
2018-12-05 23:21:45 +05:30
= f.label :header_logo, 'Header logo', class: 'col-sm-2 col-form-label pt-0'
2018-03-17 18:26:18 +05:30
.col-sm-10
- if @appearance.header_logo?
= image_tag @appearance.header_logo_url, class: 'appearance-light-logo-preview'
- if @appearance.persisted?
%br
2018-11-08 19:23:39 +05:30
= link_to 'Remove header logo', header_logos_admin_appearances_path, data: { confirm: "Header logo will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
2018-03-17 18:26:18 +05:30
%hr
= f.hidden_field :header_logo_cache
= f.file_field :header_logo, class: ""
.hint
Maximum file size is 1MB. Pages are optimized for a 28px tall header logo
2018-11-08 19:23:39 +05:30
%fieldset.app_logo
%legend
Favicon:
.form-group.row
2018-12-05 23:21:45 +05:30
= f.label :favicon, 'Favicon', class: 'col-sm-2 col-form-label pt-0'
2018-11-08 19:23:39 +05:30
.col-sm-10
- if @appearance.favicon?
= image_tag @appearance.favicon_url, class: 'appearance-light-logo-preview'
- if @appearance.persisted?
%br
= link_to 'Remove favicon', favicon_admin_appearances_path, data: { confirm: "Favicon will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
%hr
= f.hidden_field :favicon_cache
= f.file_field :favicon, class: ''
.hint
Maximum file size is 1MB. Image size must be 32x32px. Allowed image formats are #{favicon_extension_whitelist}.
%br
Images with incorrect dimensions are not resized automatically, and may result in unexpected behavior.
2016-04-02 18:10:28 +05:30
%fieldset.sign-in
%legend
Sign in/Sign up pages:
2018-11-08 19:23:39 +05:30
.form-group.row
= f.label :title, class: 'col-sm-2 col-form-label'
2016-04-02 18:10:28 +05:30
.col-sm-10
= f.text_field :title, class: "form-control"
2018-11-08 19:23:39 +05:30
.form-group.row
= f.label :description, class: 'col-sm-2 col-form-label'
2016-04-02 18:10:28 +05:30
.col-sm-10
= f.text_area :description, class: "form-control", rows: 10
.hint
2016-09-29 09:46:39 +05:30
Description parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
2018-11-08 19:23:39 +05:30
.form-group.row
2018-12-05 23:21:45 +05:30
= f.label :logo, class: 'col-sm-2 col-form-label pt-0'
2016-04-02 18:10:28 +05:30
.col-sm-10
- if @appearance.logo?
= image_tag @appearance.logo_url, class: 'appearance-logo-preview'
- if @appearance.persisted?
%br
2018-11-08 19:23:39 +05:30
= link_to 'Remove logo', logo_admin_appearances_path, data: { confirm: "Logo will be removed. Are you sure?"}, method: :delete, class: "btn btn-inverted btn-remove btn-sm remove-logo"
2016-04-02 18:10:28 +05:30
%hr
= f.hidden_field :logo_cache
= f.file_field :logo, class: ""
.hint
Maximum file size is 1MB. Pages are optimized for a 640x360 px logo.
2018-03-17 18:26:18 +05:30
%fieldset
2016-04-02 18:10:28 +05:30
%legend
2018-03-17 18:26:18 +05:30
New project pages:
2018-11-08 19:23:39 +05:30
.form-group.row
= f.label :new_project_guidelines, class: 'col-sm-2 col-form-label'
2016-04-02 18:10:28 +05:30
.col-sm-10
2018-03-17 18:26:18 +05:30
= f.text_area :new_project_guidelines, class: "form-control", rows: 10
2016-04-02 18:10:28 +05:30
.hint
2018-03-17 18:26:18 +05:30
Guidelines parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
2016-04-02 18:10:28 +05:30
.form-actions
2018-12-05 23:21:45 +05:30
= f.submit 'Save', class: 'btn btn-success append-right-10'
2016-04-02 18:10:28 +05:30
- if @appearance.persisted?
2018-03-17 18:26:18 +05:30
Preview last save:
= link_to 'Sign-in page', preview_sign_in_admin_appearances_path, class: 'btn', target: '_blank', rel: 'noopener noreferrer'
= link_to 'New project page', new_project_path, class: 'btn', target: '_blank', rel: 'noopener noreferrer'
2016-04-02 18:10:28 +05:30
- if @appearance.updated_at
2018-11-08 19:23:39 +05:30
%span.float-right
2016-04-02 18:10:28 +05:30
Last edit #{time_ago_with_tooltip(@appearance.updated_at)}