From e9b1591427387fb9fe9dd888fe86fda6b8cdb166 Mon Sep 17 00:00:00 2001 From: donrestarone Date: Sun, 30 May 2021 16:16:18 -0400 Subject: [PATCH 1/5] fix navigation --- app/views/comfy/admin/cms/partials/_navigation_before.haml | 4 ++-- app/views/comfy/admin/cms/partials/_navigation_inner.haml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/comfy/admin/cms/partials/_navigation_before.haml b/app/views/comfy/admin/cms/partials/_navigation_before.haml index 3c565f162..50f3c9f3a 100644 --- a/app/views/comfy/admin/cms/partials/_navigation_before.haml +++ b/app/views/comfy/admin/cms/partials/_navigation_before.haml @@ -1,5 +1,5 @@ - if Subdomain.current.logo.attached? - = link_to root_path(subdomain: Apartment::Tenant.current), target: '_blank' do - = image_tag(Subdomain.current.logo, class: 'd-none d-lg-block img-fluid p-4') + = link_to root_path(subdomain: Apartment::Tenant.current), target: '_blank', class: 'd-flex justify-content-center align-items-center' do + = image_tag(Subdomain.current.logo, class: 'd-none d-lg-block img-fluid p-4', size: '150x150') - else = link_to "Add your logo here", edit_web_settings_path \ No newline at end of file diff --git a/app/views/comfy/admin/cms/partials/_navigation_inner.haml b/app/views/comfy/admin/cms/partials/_navigation_inner.haml index 44f9ab139..0c14e6e95 100644 --- a/app/views/comfy/admin/cms/partials/_navigation_inner.haml +++ b/app/views/comfy/admin/cms/partials/_navigation_inner.haml @@ -5,6 +5,7 @@ = active_link_to "Call to Actions", call_to_actions_path, class: 'nav-link' = active_link_to "Visitor Analytics", dashboard_path, class: 'nav-link' = active_link_to "My Settings", edit_user_registration_path, class: 'nav-link' +%li{class: 'nav-item'} %li.nav-item.dropdown %a#navbarDropdown.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"} = "#{Subdomain.current.name.capitalize} Shortcuts" @@ -12,4 +13,4 @@ = link_to "Website", '/', class: 'dropdown-item', target: '_blank' = link_to "Blog", '/blog', class: 'dropdown-item', target: '_blank' = link_to "Forum", '/forum', class: 'dropdown-item', target: '_blank' - = link_to "Logout", destroy_user_session_path, class: 'nav-link text-danger', method: :delete + = link_to "Logout", destroy_user_session_path, class: 'nav-link text-danger', method: :delete \ No newline at end of file From a7638e03fdd6d6fc26d6fde13de93877aca92e85 Mon Sep 17 00:00:00 2001 From: donrestarone Date: Sun, 30 May 2021 16:26:53 -0400 Subject: [PATCH 2/5] when user touches html body navbar expand should collapse --- app/assets/javascripts/comfy/admin/cms/custom.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/assets/javascripts/comfy/admin/cms/custom.js b/app/assets/javascripts/comfy/admin/cms/custom.js index 8d61f7b0b..6da5162ca 100644 --- a/app/assets/javascripts/comfy/admin/cms/custom.js +++ b/app/assets/javascripts/comfy/admin/cms/custom.js @@ -1,7 +1,18 @@ // Custom JS for the admin area +// patch the correct subdomain admin name in the browser tab let subdomain = /:\/\/([^\/]+)/.exec(window.location.href)[1].split('.')[0] document.title = `${subdomain} Admin` + +// when html body is clicked collapse bootstrap nav expansion +$(document).click(function (event) { + let clickover = $(event.target); + let _opened = $(".navbar-collapse").hasClass("navbar-collapse collapse show"); + if (_opened === true && !clickover.hasClass("navbar-toggler")) { + $("button.navbar-toggler").click(); + } +}); + if ($('#message_thread_recipients').length) { $('select').select2({ multiple: true, From 50194fef67cb9690ff52b2499786c4872d835616 Mon Sep 17 00:00:00 2001 From: donrestarone Date: Sun, 30 May 2021 16:37:56 -0400 Subject: [PATCH 3/5] fix typo --- app/views/comfy/admin/web_settings/_form.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/comfy/admin/web_settings/_form.haml b/app/views/comfy/admin/web_settings/_form.haml index eeb439f9e..1938cff71 100644 --- a/app/views/comfy/admin/web_settings/_form.haml +++ b/app/views/comfy/admin/web_settings/_form.haml @@ -39,7 +39,7 @@ %label Favicon: .m-2 - = render_logo(Subdomain.current) + = render_favicon(Subdomain.current) = f.file_field :favicon, required: false, class: 'form-control-file' .form-group.card.p-2 %label From 33695d2a76404a765a52e6ed360fb2f8b9c7afb0 Mon Sep 17 00:00:00 2001 From: donrestarone Date: Sun, 30 May 2021 16:44:32 -0400 Subject: [PATCH 4/5] make og preview bigger --- app/helpers/subdomain_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/subdomain_helper.rb b/app/helpers/subdomain_helper.rb index af1f7170f..2ae5fd686 100644 --- a/app/helpers/subdomain_helper.rb +++ b/app/helpers/subdomain_helper.rb @@ -72,7 +72,7 @@ def og_image_url(subdomain) def render_og_image(subdomain) return if !subdomain.og_image.attached? - image_tag subdomain.og_image, class: 'rounded avatar', size: '40x40' + image_tag subdomain.og_image, class: 'rounded avatar', size: '100x100' end From a9670e8b39bac09305b049b00fd1b64174d2b133 Mon Sep 17 00:00:00 2001 From: donrestarone Date: Sun, 30 May 2021 17:08:41 -0400 Subject: [PATCH 5/5] fix style in message threads --- app/views/mailbox/message_threads/_form.haml | 14 ++++++++------ app/views/messages/_form.haml | 8 +++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/views/mailbox/message_threads/_form.haml b/app/views/mailbox/message_threads/_form.haml index 9ae241b65..8b3d9bb87 100644 --- a/app/views/mailbox/message_threads/_form.haml +++ b/app/views/mailbox/message_threads/_form.haml @@ -1,8 +1,10 @@ = form_for @message_thread, url: mailbox_message_threads_path, method: :post do |f| - %label - recipients: - = f.text_field :recipients, multiple: true, required: true - %label - Subject: - = f.text_field :subject + .form-group + %label + recipients: + = f.text_field :recipients, multiple: true, required: true, class: 'form-control' + .form-group + %label + Subject: + = f.text_field :subject, class: 'form-control' = render partial: 'messages/form', locals: { f: f } \ No newline at end of file diff --git a/app/views/messages/_form.haml b/app/views/messages/_form.haml index 9b4598487..32e683518 100644 --- a/app/views/messages/_form.haml +++ b/app/views/messages/_form.haml @@ -1,3 +1,5 @@ -= f.fields_for Message.new do |message_form| - = message_form.rich_text_area :content -= f.submit \ No newline at end of file +.my-3 + = f.fields_for Message.new do |message_form| + = message_form.rich_text_area :content + .my-3 + = f.submit "Send", class: 'btn btn-primary' \ No newline at end of file