Commit 44051b47 authored by michael.simon's avatar michael.simon
Browse files

add some more layout, and make some icons configurable

parent 97bbbb7e
package edu.kit.scc.webreg.bean;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
import javax.servlet.http.HttpServletRequest;
import edu.kit.scc.webreg.bootstrap.ApplicationConfig;
@Named("headBarBean")
@RequestScoped
public class HeadBarBean {
@Inject
private ApplicationConfig appConfig;
@Inject
private HttpServletRequest request;
public ApplicationConfig getAppConfig() {
return appConfig;
}
public String getHeaderImage() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_header_icon", "/resources/img/logo.svg");
}
public String getHeaderLink() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_header_link", "https://");
}
public String getHeaderTitle() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_header_title", "FeLS - Federated Login Service");
}
public String getAppTitle() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_app_title", "FeLS - Federated Login Service");
}
public String getAppLink() {
return getApplicationBase() + getOrDefault(request.getServerName() + "_app_link", "https://");
}
public String getApplicationBase() {
return getOrDefault(request.getServerName() + "_app_base", "");
}
private String getOrDefault(String key, String defaultString) {
if (appConfig.getConfigValue(key) != null) {
return appConfig.getConfigValue(key);
}
else {
return defaultString;
}
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ public class ResourceBundleHelper {
if (bundle == null)
return "???" + key + "???";
try {
try {
return bundle.getString(key);
} catch (Exception e) {
return "???" + key + "???";
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="400"
height="300"
viewBox="0 0 105.83333 79.375004"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="logo.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="154.04212"
inkscape:cy="129.27596"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="2560"
inkscape:window-height="1380"
inkscape:window-x="0"
inkscape:window-y="31"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid815" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-217.62498)">
<g
aria-label="?"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bdbdbd;fill-opacity:1;stroke:#010101;stroke-width:0.03247356;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="text4579"
transform="matrix(8.1476531,0,0,8.1476531,-238.55701,-1760.6611)">
<path
d="m 35.093466,250.70823 h 1.049032 v 1.31258 h -1.049032 z m 1.018026,-0.75964 h -0.98702 v -0.79582 q 0,-0.52193 0.144694,-0.85783 0.144694,-0.33589 0.609782,-0.78031 l 0.465088,-0.45992 q 0.294556,-0.27389 0.423747,-0.51677 0.134358,-0.24288 0.134358,-0.49609 0,-0.45992 -0.341064,-0.74414 -0.335897,-0.28422 -0.894002,-0.28422 -0.408244,0 -0.873332,0.18087 -0.45992,0.18086 -0.961182,0.5271 v -0.97152 q 0.485759,-0.29456 0.981853,-0.43925 0.501261,-0.14469 1.033528,-0.14469 0.950847,0 1.524455,0.50126 0.578776,0.50126 0.578776,1.32291 0,0.39274 -0.186035,0.74931 -0.186035,0.3514 -0.651123,0.79582 l -0.454753,0.44442 q -0.242879,0.24288 -0.346232,0.3824 -0.09819,0.13436 -0.139526,0.26355 -0.03101,0.10852 -0.04651,0.26355 -0.0155,0.15503 -0.0155,0.42375 z"
style="stroke-width:0.03247356;stroke-miterlimit:4;stroke-dasharray:none;stroke:#010101;stroke-opacity:1;fill:#bdbdbd;fill-opacity:1"
id="path4581"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>
......@@ -6,7 +6,9 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:bw="http://www.scc.kit.edu/bwfacelets"
xmlns:p="http://primefaces.org/ui">
xmlns:p="http://primefaces.org/ui"
xmlns:of="http://omnifaces.org/functions">
<head>
<title></title>
</head>
......@@ -23,39 +25,42 @@
<ui:param name="title" value="#{messages.title}"/>
<ui:define name="content">
<h:form id="form">
<p:panel header="#{messages.set_password} (#{setServicePasswordBean.serviceEntity.name})">
<div style="margin-bottom: 8px;">
<h:outputText value="#{messages.service_password_help_change_ecp_disabled}" escape="false"
rendered="#{setServicePasswordBean.serviceEntity.serviceProps.containsKey('ecp') and setServicePasswordBean.serviceEntity.serviceProps.get('ecp').equalsIgnoreCase('disabled')}"/>
<h:outputText value="#{messages.service_password_help_change}" escape="false"
rendered="#{not (setServicePasswordBean.serviceEntity.serviceProps.containsKey('ecp') and setServicePasswordBean.serviceEntity.serviceProps.get('ecp').equalsIgnoreCase('disabled'))}"/>
</div>
<p:messages id="messageBox" for="pw_error" showDetail="true" />
<p:panelGrid id="baseData" columns="2">
<h:outputLabel for="password1" value="#{messages.password}:" />
<h:inputSecret id="password1" redisplay="true" size="50" value="#{setServicePasswordBean.password1}" />
<h:form id="form" prependId="false" class="full form">
<h:outputLabel for="password2" value="#{messages.password_retype}:" />
<h:inputSecret id="password2" redisplay="true" size="50" value="#{setServicePasswordBean.password2}" />
</p:panelGrid>
<div>
<p:commandButton id="save" action="#{setServicePasswordBean.save()}" value="#{messages.save}"
update="messageBox,baseData" />
</div>
</p:panel>
<p:panel header="#{messages.delete_password} (#{setServicePasswordBean.serviceEntity.name})">
<div style="margin-bottom: 8px;">
<h:outputText value="#{messages.service_password_help_delete}" escape="false" />
</div>
<div>
<p:commandButton id="delete" action="#{setServicePasswordBean.deleteServicePassword()}" value="#{messages.delete}"
update="messageBox,baseData" />
</div>
</p:panel>
<h3><h:outputText value="#{messages.set_password}: #{setServicePasswordBean.serviceEntity.name}" /></h3>
<p:panel>
<h:outputText value="#{messages.service_password_help_change_ecp_disabled}" escape="false"
rendered="#{setServicePasswordBean.serviceEntity.serviceProps.containsKey('ecp') and setServicePasswordBean.serviceEntity.serviceProps.get('ecp').equalsIgnoreCase('disabled')}"/>
<h:outputText value="#{messages.service_password_help_change}" escape="false"
rendered="#{not (setServicePasswordBean.serviceEntity.serviceProps.containsKey('ecp') and setServicePasswordBean.serviceEntity.serviceProps.get('ecp').equalsIgnoreCase('disabled'))}"/>
<p:messages id="messageBox" for="pw_error" showDetail="true" />
<p:panelGrid id="baseData" columns="2">
<h:outputLabel for="password1" value="#{messages.password}:" />
<h:inputSecret id="password1" redisplay="true" size="50" value="#{setServicePasswordBean.password1}" />
<h:outputLabel for="password2" value="#{messages.password_retype}:" />
<h:inputSecret id="password2" redisplay="true" size="50" value="#{setServicePasswordBean.password2}" />
</p:panelGrid>
<div>
<p:commandButton id="save" action="#{setServicePasswordBean.save()}" value="#{messages.save}"
update="messageBox,baseData" />
</div>
</p:panel>
<h3><h:outputText value="#{messages.delete_password} #{setServicePasswordBean.serviceEntity.name}" /></h3>
<p:panel>
<div style="margin-bottom: 1em;">
<h:outputText value="#{messages.service_password_help_delete}" escape="false" />
</div>
<div>
<p:commandButton id="delete" action="#{setServicePasswordBean.deleteServicePassword()}" value="#{messages.delete}"
update="messageBox,baseData" />
</div>
</p:panel>
</h:form>
</ui:define>
</ui:composition>
......
......@@ -24,10 +24,11 @@
<ui:param name="title" value="#{messages.title}"/>
<ui:define name="content">
<h:form id="form">
<h:form id="form" prependId="false" class="full form">
<div id="panelInline">
<p:panel header="#{messages.set_ssh_pub_key_for} #{setServiceSshPubKeyBean.serviceEntity.name}">
<h3><h:outputText value="#{messages.set_ssh_pub_key_for} #{setServiceSshPubKeyBean.serviceEntity.name}" /></h3>
<p:panel>
<div class="panel">
<h:outputText value="#{messages.service_ssh_pub_key_help}" escape="false" />
......@@ -87,7 +88,9 @@
</p:dataTable>
</p:panel>
<p:panel header="#{messages.set_ssh_pub_key}">
<h3><h:outputText value="#{messages.set_ssh_pub_key}" /></h3>
<p:panel>
<p:dataTable var="key" value="#{setServiceSshPubKeyBean.sshPubKeyList.toArray()}">
<p:column>
<f:facet name="header"><h:outputText value="#{messages.ssh_key_name}:"/></f:facet>
......@@ -165,7 +168,6 @@
</p:confirmDialog>
</p:panel>
</div>
</h:form>
</ui:define>
......
......@@ -9,18 +9,18 @@
<title>Default page</title>
</head>
<body>
<ui:composition template="${bwreg.template}">
<ui:composition template="layout-template.xhtml">
<ui:define name="header">
<ui:include src="${bwreg.template.head-bar}"/>
<ui:include src="head-bar.xhtml"/>
</ui:define>
<ui:define name="left_sidebar">
<ui:include src="${bwreg.template.left-side-bar}"/>
<ui:include src="left-side-bar.xhtml"/>
</ui:define>
<ui:define name="footer">
<ui:include src="${bwreg.template.footer}"/>
<ui:include src="footer.xhtml"/>
</ui:define>
</ui:composition>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<head>
<title>Footer</title>
</head>
<body>
<ui:composition>
<div id="footer-content">
${project.artifactId}${bwreg.name.suffix}-${project.version}
</div>
<div id="owner">
<span id="owner-text">KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft</span>
</div>
</ui:composition>
</body>
</html>
\ No newline at end of file
......@@ -15,7 +15,7 @@
${project.artifactId}${bwreg.name.suffix}-${project.version}
</div>
<div id="owner">
<span id="owner-text">Text unten</span>
<span id="owner-text">KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft</span>
</div>
</ui:composition>
</body>
......
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<head>
<title>Head bar</title>
</head>
<body>
<ui:composition>
<header class="page-header">
<div class="content-wrap">
<div class="logo">
<a href="http://www.kit.edu" title="KIT-Logo - Link zur KIT-Startseite">
<img src="#{resource['img/kitlogo.svg']}" />
</a>
</div>
<div class="navigation">
<button class="burger"><img src="#{resource['img/burger-icon.svg']}" /></button>
<div class="navigation-meta">
<ul class="navigation-meta-links">
<li><a accesskey="8" href="https://www.scc.kit.edu/impressum.php" target="_blank">Impressum</a></li>
<li><a href="https://www.scc.kit.edu/datenschutz.php" target="_blank">Datenschutz</a></li>
<li><a href="http://www.kit.edu" target="_blank"><span class="svg-icon"><img src="#{resource['img/kitlogo_nano.svg']}" width="10px"/></span><span>KIT</span></a></li>
</ul>
<div class="navigation-language" style="display: none;"><ul><li></li></ul></div>
</div>
<nav class="navigation-main">
<ui:insert name="left_sidebar">Default left side bar</ui:insert>
</nav>
<ul class="side-widgets">
<li class="meta"><a accesskey="1" href="/scc.php">Home</a></li>
<li class="meta"><a accesskey="3" href="/3249.php">Sitemap</a></li>
<li class="meta"><a accesskey="8" href="/impressum.php">Impressum</a></li>
<li class="meta"><a href="/datenschutz.php">Datenschutz</a></li>
</ul>
</div>
</div>
</header>
</ui:composition>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<head>
<title>Left side bar</title>
<title>Head bar</title>
</head>
<body>
<ui:composition>
<div id="header-logo">
<h:graphicImage value="#{resource['img/bw.png']}" alt="BW Logo" />
</div>
<div id="header-image">
<div id="header-right" class="ui-widget">
Header rechts
</div>
<div id="header-text" class="ui-widget">Landesdienste am Standort XY</div>
</div>
<header class="page-header">
<div class="content-wrap">
<div class="logo">
<a href="#{headBarBean.headerLink}" title="#{headBarBean.headerTitle}">
<img src="#{headBarBean.headerImage}" />
</a>
</div>
<div class="navigation">
<button class="burger"><img src="#{resource['img/burger-icon.svg']}" /></button>
<div class="navigation-meta">
<ul class="navigation-meta-links">
<li><a accesskey="8" href="https://www.scc.kit.edu/impressum.php" target="_blank">Impressum</a></li>
<li><a href="https://www.scc.kit.edu/datenschutz.php" target="_blank">Datenschutz</a></li>
<li><a href="http://www.kit.edu" target="_blank"><span class="svg-icon"><img src="#{resource['img/kitlogo_nano.svg']}" width="10px"/></span><span>KIT</span></a></li>
</ul>
<div class="navigation-language" style="display: none;"><ul><li></li></ul></div>
</div>
<nav class="navigation-main">
<ui:insert name="left_sidebar">Default left side bar</ui:insert>
</nav>
<ul class="side-widgets">
<li class="meta"><a accesskey="1" href="/scc.php">Home</a></li>
<li class="meta"><a accesskey="3" href="/index.php">Sitemap</a></li>
<li class="meta"><a accesskey="8" href="/index.php">Impressum</a></li>
<li class="meta"><a href="/datenschutz.php">Datenschutz</a></li>
</ul>
</div>
</div>
</header>
</ui:composition>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
class="no-js" lang="de-de">
<f:view contentType="text/html" locale="#{sessionManager.locale != null ? sessionManager.locale : ''}">
<h:head>
<ui:insert name="metadata"/>
<f:facet name="first">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#009682" />
<meta http-equiv="cleartype" content="on" />
<title>#{title}</title>
</f:facet>
<link rel="stylesheet" href="https://static.scc.kit.edu/fancybox/dist/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://static.scc.kit.edu/kit-2020/fontawesome/css/all.min.css" />
<h:outputStylesheet name="css/${bwreg.css}"/>
<h:outputScript library="javax.faces" name="jsf.js" target="head"/>
</h:head>
<h:body class="oe-page" vocab="http://schema.org/" typeof="WebPage">
<ui:insert name="header">Default header</ui:insert>
<main>
<section class="stage stage-small"><img src="#{resource['img/regapp.jpg']}" alt="Föderierte Dienste am KIT" loading="lazy"/>
<div class="content-wrap"><a href="https://bwidm.scc.kit.edu">Föderierte Dienste am KIT</a></div>
</section>
<section class="content-wrap">
<div class="content">
<!-- <div class="ui-widget text form full fancy"> -->
<ui:insert name="content">Default content</ui:insert>
<!-- </div> -->
</div>
</section>
</main>
<!--
<div id="container">
<div id="sidebar">
<ui:insert name="left_sidebar">Default left side bar</ui:insert>
</div>
<div id="content" class="ui-widget text form full fancy">
</div>
<div class="clear"></div>
<div id="footer-container">
<div class="spacer"></div>
<ui:insert name="footer">Default footer</ui:insert>
</div>
</div>
-->
</h:body>
</f:view>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
xmlns:ui="http://java.sun.com/jsf/facelets"
class="no-js" lang="de-de">
<f:view contentType="text/html" locale="#{sessionManager.locale != null ? sessionManager.locale : ''}">
<h:head>
<ui:insert name="metadata"/>
<f:facet name="first">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#009682" />
<meta http-equiv="cleartype" content="on" />
<title>#{title}</title>
</f:facet>
<link rel="stylesheet" href="https://static.scc.kit.edu/fancybox/dist/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://static.scc.kit.edu/kit-2020/fontawesome/css/all.min.css" />
<h:outputStylesheet name="css/${bwreg.css}"/>
<h:outputScript library="javax.faces" name="jsf.js" target="head"/>
</h:head>
<h:body>
<div id="wrapper">
<div id="header">
<ui:insert name="header">Default header</ui:insert>
</div>
<div class="spacer"></div>
<div id="container">
<div id="sidebar">
<ui:insert name="left_sidebar">Default left side bar</ui:insert>
</div>
<div id="content" class="ui-widget">
<ui:insert name="content">Default content</ui:insert>
</div>
<div class="clear"></div>
<div id="footer-container">
<div class="spacer"></div>
<ui:insert name="footer">Default footer</ui:insert>
<h:body class="oe-page" vocab="http://schema.org/" typeof="WebPage">
<ui:insert name="header">Default header</ui:insert>
<main>
<section class="stage stage-small"><img src="#{resource['img/regapp.jpg']}" alt="#{headBarBean.appTitle}" loading="lazy"/>
<div class="content-wrap"><a href="#{headBarBean.appLink}">#{headBarBean.appTitle}</a></div>
</section>
<section class="content-wrap">
<div class="content">
<!-- <div class="ui-widget text form full fancy"> -->
<ui:insert name="content">Default content</ui:insert>
<!-- </div> -->
</div>
</section>
</main>
<!--
<div id="container">
<div id="sidebar">
<ui:insert name="left_sidebar">Default left side bar</ui:insert>
</div>
<div id="content" class="ui-widget text form full fancy">
</div>
<div class="clear"></div>
<div id="footer-container">
<div class="spacer"></div>
<ui:insert name="footer">Default footer</ui:insert>
</div>
</div>
-->
</h:body>
</f:view>
......