Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-09-26 10:54:32 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2018-06-05 17:20:18 +0300
commitce6172e863f982c73fedc9f4a73877543c30cb1c (patch)
treec35bc83d94504d1aa55086d62ff2234d12fe62d4 /app/views/admin/appearances/_form.html.haml
parentc8a4d202c99c772822a2b9b09fa6da2c90b2ae81 (diff)
allow uploading favicon in appearance settings
Diffstat (limited to 'app/views/admin/appearances/_form.html.haml')
-rw-r--r--app/views/admin/appearances/_form.html.haml17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml
index 5e08837255f..163ce55eb53 100644
--- a/app/views/admin/appearances/_form.html.haml
+++ b/app/views/admin/appearances/_form.html.haml
@@ -55,6 +55,23 @@
.hint
Guidelines parsed with #{link_to "GitLab Flavored Markdown", help_page_path('user/markdown'), target: '_blank'}.
+ %fieldset.app_logo
+ %legend
+ Favicon:
+ .form-group
+ = f.label :favicon, 'Favicon', class: 'control-label'
+ .col-sm-10
+ - if @appearance.favicon?
+ = image_tag @appearance.favicon.default_without_format_conversion.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-remove btn-sm remove-logo"
+ %hr
+ = f.hidden_field :favicon_cache
+ = f.file_field :favicon, class: ''
+ .hint
+ Maximum file size is 1MB. The resulting favicons will be cropped to be square and scaled down to a size of 32x32 px.
+
.form-actions
= f.submit 'Save', class: 'btn btn-save append-right-10'
- if @appearance.persisted?