Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom logo capability to the ‘About’ modal #566

Merged
merged 1 commit into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/assets/stylesheets/about_modal_background.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
background-color: $modal-about-pf-bg-color;
background-image: image-url($modal-about-pf-bg-img);
}
.about-modal-pf.whitelabel {
background-image: image-url($img-bg-login-whitelabel);
background-size: 100% 100%;
}
4 changes: 2 additions & 2 deletions app/views/layouts/_about_modal.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.modal.fade{:id => "aboutModal", "tabindex" => "-1", "role" => "dialog1", "aria-labelledby" => "aboutModalLabel", "aria-hidden" => "true"}
.modal-dialog
.modal-content.about-modal-pf
.modal-content.about-modal-pf{:class => ::Settings.server.custom_login_logo ? 'whitelabel' : ''}
.modal-header
%button.close{"data-dismiss" => "modal"}
%span.pficon.pficon-close
Expand All @@ -23,7 +23,7 @@
.trademark-pf
= I18n.t("product.copyright")
.modal-footer
%img{:src => image_path("layout/login-screen-logo.png"), :alt => "ManageIQ"}
%img{:src => ::Settings.server.custom_logo ? '/upload/custom_logo.png' : image_path("layout/login-screen-logo.png")}
:javascript
$(function(){
$("button[data-dismiss='modal']").off('click');
Expand Down
4 changes: 2 additions & 2 deletions app/views/ops/_settings_custom_logos_tab.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
.col-md-8
= check_box_tag("server_uselogo", true, @edit[:new][:server][:custom_logo], :data => {:on_text => 'Yes', :off_text => 'No'})
%hr
%h3= _("Custom Login Background Image")
%h3= _("Custom Login & 'About' Screen Background Image")
- if File.exist?(@login_logo_file)
= image_tag("/upload/custom_login_logo.png?#{rand(99_999_999)}",
:height => 400,
Expand Down Expand Up @@ -58,7 +58,7 @@
%form.form-horizontal
.form-group
%label.col-md-2.control-label
= _("Use Custom Login Background Image")
= _("Use Custom Login & 'About' Screen Background Image")
.col-md-8
= check_box_tag("server_useloginlogo", true, @edit[:new][:server][:custom_login_logo], :data => {:on_text => 'Yes', :off_text => 'No'})
%hr
Expand Down