Skip to content

Commit

Permalink
Reduce UI inconsistencies between the Suma and Uyuni themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Etheryte committed Jan 15, 2024
1 parent 0997d0a commit 8110391
Show file tree
Hide file tree
Showing 53 changed files with 806 additions and 3,421 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ html(lang=window.preferredLocale.replace("_", "-"))

include /templates/common.jade

body(class='#{webTheme}' == "uyuni" ? "login-page" : "")
body(class='#{webTheme}' == "uyuni" ? "theme-#{webTheme} login-page" : "theme-#{webTheme}")
#login

+csrfToken
Expand Down
5 changes: 4 additions & 1 deletion java/code/webapp/WEB-INF/decorators/layout_bare.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ page import="com.redhat.rhn.GlobalInstanceHolder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Expand All @@ -21,7 +22,9 @@
<link rel="stylesheet" href="/css/susemanager-fullscreen.css" />
</rhn:require>
</head>
<body onload="<decorator:getProperty property="body.onload" />">
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'updated-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<div id="menu-portal-target"></div>
<div class="spacewalk-main-column-layout">
<section id="spacewalk-content">
Expand Down
5 changes: 4 additions & 1 deletion java/code/webapp/WEB-INF/decorators/layout_c.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
%><%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"
%><%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"
%><%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn"
%><%@ page import="com.redhat.rhn.GlobalInstanceHolder"
%><%@ page contentType="text/html; charset=UTF-8"
%><!DOCTYPE HTML>
<html:html lang="true">
<head>
<jsp:include page="layout_head.jsp" />
<decorator:head />
</head>
<body onload="<decorator:getProperty property="body.onload" />">
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'updated-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<div class="senna-loading-bar"></div>
<div id="menu-portal-target"></div>
<header class="navbar-pf navbar navbar-dark bg-dark">
Expand Down
5 changes: 4 additions & 1 deletion java/code/webapp/WEB-INF/decorators/layout_equals.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ page import="com.redhat.rhn.GlobalInstanceHolder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Expand All @@ -13,7 +14,9 @@
<jsp:include page="layout_head.jsp" />
<decorator:head />
</head>
<body onload="<decorator:getProperty property="body.onload" />">
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'updated-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<nav class="navbar-pf navbar navbar-dark bg-dark" role="navigation">
<jsp:include page="/WEB-INF/includes/header.jsp" />
</nav>
Expand Down
4 changes: 3 additions & 1 deletion java/code/webapp/WEB-INF/decorators/layout_error.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn"%>
<%@ page import="com.redhat.rhn.common.conf.Config"%>
<%@ page import="com.redhat.rhn.common.conf.ConfigDefaults"%>
<%@ page import="com.redhat.rhn.GlobalInstanceHolder" %>
<%@ page contentType="text/html; charset=UTF-8"
%><!DOCTYPE HTML>
<html:html lang="true">
Expand Down Expand Up @@ -52,7 +53,8 @@
<script src='/javascript/momentjs/moment-with-langs.min.js?cb=${cb_version}' type='text/javascript'></script>
<decorator:head />
</head>
<body onload="<decorator:getProperty property="body.onload" />">
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<body class="theme-${webTheme}" onload="<decorator:getProperty property="body.onload" />">
<c:set var="custom_header" scope="page" value="${rhn:getConfig('java.custom_header')}" />

<header class="navbar-pf navbar navbar-dark bg-dark">
Expand Down
13 changes: 2 additions & 11 deletions java/code/webapp/WEB-INF/decorators/layout_head.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,8 @@

<!-- import styles -->
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:choose>
<c:when test="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}">
<link rel="stylesheet" href="/css/${webTheme}.css?cb=${cb_version}" id="web-theme" disabled="disabled"/>
<link rel="stylesheet" href="/css/updated-${webTheme}.css?cb=${cb_version}" id="updated-web-theme"/>
</c:when>
<c:otherwise>
<link rel="stylesheet" href="/css/${webTheme}.css?cb=${cb_version}" id="web-theme"/>
<link rel="stylesheet" href="/css/updated-${webTheme}.css?cb=${cb_version}" id="updated-web-theme" disabled="disabled"/>
</c:otherwise>
</c:choose>

<link rel="stylesheet" href="/css/${webTheme}.css?cb=${cb_version}" id="web-theme"/>

<!-- expose user preferred language to the application -->
<c:set var="currentLocale" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentLocale(pageContext)}"/>
<script>window.preferredLocale='${currentLocale}'</script>
Expand Down
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.eth.simplify-theme-2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Reduce UI inconsistencies between the Suma and Uyuni themes
4 changes: 1 addition & 3 deletions web/html/src/branding/css/base/setup-wizard.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ body{
.responsive-wizard {
> .panel-default > .panel-body {
padding-bottom: 0;
button.btn {
.btn-sm;
}

.panel{
box-shadow: 0px 2px 1px 0px @box-shadow;
-moz-box-shadow: 0px 2px 1px 0px @box-shadow;
Expand Down
Loading

0 comments on commit 8110391

Please sign in to comment.