Visualisierungsmodul für SuperX http://www.superx-projekt.de/doku/viz_modul/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

640 lines
21 KiB

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util.HtmlUtils">
<xsl:import href="resultset_html.xsl" />
<xsl:import href="interLinks_html.xsl" />
<xsl:import href="nd_templates.xsl" />
<xsl:import href="pageComponents_html.xsl" />
<xsl:import href="viz_components.xsl" />
<!--In diesem Stylesheet können Sie individuelle templates unterbringen,
die in ihrer Präzedenz das normale Stylesheet
pageComponents_html.xsl überragt. -->
<xsl:import href="pageComponents_html_final.xsl" />
<xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," />
<!-- wichtig für DOJO!-->
<xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes" encoding="UTF-8"/>
<xsl:variable name="colon"><xsl:text>'</xsl:text></xsl:variable>
<xsl:variable name="quote"><xsl:text>"</xsl:text></xsl:variable>
<!--<xsl:variable name="defaultRenderer" select="'echarts'" />
<xsl:variable name="availableRendererPlot" select="'true'" />
<xsl:variable name="availableRendererD3" select="'true'" />
-->
<xsl:template match="/">
<xsl:variable name="maskenname">
<xsl:choose>
<xsl:when test="/ergebnisse/@isMakro='true'">
<xsl:value-of select="/ergebnisse/makro/name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/ergebnisse/ergebnis/maskenname" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html>
<head>
<xsl:call-template name="nd_htmlhead">
<xsl:with-param name="title" select="concat('Tabelle ',$maskenname)" />
</xsl:call-template>
<link rel="stylesheet" href="../style/sx_tabelle.css" />
<!--<link rel="stylesheet" href="../style/superx.css" />-->
</head>
<xsl:call-template name="nd_htmlscript" />
<xsl:call-template name="nd_tableJavascript" />
<xsl:call-template name="nd_tableCSS" />
<xsl:call-template name="ude_tableCSS" />
<xsl:call-template name="importVizViewer"></xsl:call-template>
<body class="has-navbar-fixed-top" onload="document.getElementById('progressbar').style.display='none';initPage();">
<!--#Template Beginn Top-Navigation-->
<xsl:call-template name="viz_navi_top" />
<!--<xsl:call-template name="ude_header_dashboard" />-->
<!--#Template Ende Top-Navigation-->
<!--#Template Beginn Navigations-Panel Auswertungen-->
<xsl:if test="/ergebnisse/@showNavigation='true' and 1=0"><!-- erstmal kein Panel,weil der Asssistent schon recht breit ist -->
<xsl:for-each select="/ergebnisse">
<xsl:call-template name="nd_navi_panel" />
</xsl:for-each>
</xsl:if>
<!--#Template Ende Navigations-Panel Auswertungen-->
<!--Beginn Seitentitel, Krümelpfad, Knopfleiste, Legende, Erläuterung-->
<xsl:call-template name="nd_progressbar" />
<div id="content" style="padding-left:1rem">
<!--#Template Beginn Seitentitel-->
<xsl:variable name="masken_tid"><xsl:value-of select="/ergebnisse/ergebnis[@ordnr='0']/maskenname/@id"/></xsl:variable>
<xsl:call-template name="nd_pagetitle" >
<xsl:with-param name="title" select="$maskenname" />
<xsl:with-param name="subtitle" />
<xsl:with-param name="icon_classname" select="/ergebnisse/menue/eintraege/eintrag[@isMaske='true' and tid=$masken_tid]/css_class" />
</xsl:call-template>
<!--#Template Krümelpfad-->
<!--<xsl:call-template name="nd_breadcrumb" />-->
<!--#Template Ende Krümelpfad-->
<xsl:call-template name="buildVizMetadata" />
<xsl:call-template name="viz_viewer_grid" />
</div><!--content-->
<xsl:call-template name="bottombar" />
<xsl:comment>customfooter</xsl:comment>
<xsl:call-template name="modalCards" />
</body>
<!-- end body -->
</html>
</xsl:template>
<!-- end main -->
<xsl:template name="viz_viewer_grid">
<!-- Variableninitialisierung fürs Dashboard:
-->
<xsl:variable name="spalten_anz">
<!--<xsl:value-of select="2"/>-->
<xsl:value-of select="/ergebnisse/ergebnis/felder/feld[@varname='Spaltenanzahl']/value"/>
</xsl:variable>
<xsl:variable name="kachelbreite">
<xsl:value-of select="/ergebnisse/ergebnis/felder/feld[@varname='Kachelbreite']/value"/>
</xsl:variable>
<xsl:variable name="kachelhoehe">
<xsl:value-of select="/ergebnisse/ergebnis/felder/feld[@varname='Kachelhöhe']/value"/>
</xsl:variable>
<xsl:variable name="ergebniselemente_anz">
<xsl:value-of select="count(/ergebnisse/ergebnis[felder/feld[@varname='Grafik']])"/>
</xsl:variable>
<xsl:variable name="kachelbreite_rem">
<xsl:value-of select="round($kachelbreite div 24)"/><!-- 1 em=16px, für bulma dann *1,5 -->
</xsl:variable>
<!--<p>plan: <xsl:value-of select="/ergebnisse/ergebnis/felder/feld[@varname='Spaltenanzahl']/value"/>
</p>-->
<!--<span class="separator">&#160;</span>-->
<!--Beginn Selektions-Card-->
<!--Beginn Berichtstitel, Pfad, Knopfleiste-->
<!--<section class="hero-body">
<section class="container">--> <!--Beginn Kartenreihe -->
<!--<div class="columns features is-mobile is-left">-->
<div>
<xsl:if test="$spalten_anz!='0'"><!--nicht dynamisch-->
<xsl:attribute name="class"><xsl:value-of select="concat('fixed-grid has-',$spalten_anz,'-cols')" />
</xsl:attribute>
</xsl:if>
<div><!--Beginn columns Kartenreihe -->
<xsl:choose>
<xsl:when test="$spalten_anz='0'"><!--dynamisch-->
<!--klappt noch nicht, Bug in Bulma?-->
<xsl:attribute name="class"><xsl:value-of select="concat('grid is-col-min-',$kachelbreite_rem)" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class"><xsl:text>grid</xsl:text></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="ergebnisse/ergebnis[felder/feld[@varname='Grafik']/value!='']/ergebniselement">
<xsl:variable name="ergebniselement_counter" select="position()" />
<xsl:variable name="chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable>
<xsl:variable name="maskennummer"><xsl:value-of select="@id" /></xsl:variable>
<!--<p><xsl:value-of select="concat('Zähler: ',$ergebniselement_counter)"/></p>-->
<!--
<div>
<xsl:attribute name="class"><xsl:text>column is-</xsl:text><xsl:value-of select="$colwidth"/></xsl:attribute>-->
<div class="cell is-col-min-25">
<xsl:call-template name="viewer_kachel">
<xsl:with-param name="caption" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@caption"/>
<xsl:with-param name="ergebniselement_ordnr" select="$ergebniselement_ordnr" />
<xsl:with-param name="kachelbreite" select="$kachelbreite"/>
<xsl:with-param name="kachelhoehe" select="$kachelhoehe"/>
<xsl:with-param name="link_maskennummer" select="$maskennummer"/>
<xsl:with-param name="link_chart_uniquename" select="$chart_uniquename" />
<xsl:with-param name="link_tablestylesheet" select="'viz_html_chart_viewer_mask_and_table.xsl'"/>
</xsl:call-template>
<!--<p><xsl:value-of select="concat($spalten_anz,'-',$ergebniselement_counter,':',$ergebniselement_counter mod $spalten_anz)"/></p>-->
</div>
</xsl:for-each>
</div><!-- des grid -->
</div><!--fixed-grid-->
<!--
</section>
</section>--><!-- des Portals -->
</xsl:template>
<xsl:template name="ude_header_dashboard_alt">
<header>
<div class="hs_header">
<div class="hs_header_box1"></div>
<div class="hs_header_box2">
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Studienanfänger*innen</a>
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Studierende</a>
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Absolvent*innen</a>
<a class="button is-link is-outlined is-small" onclick="alert('todo');">Doktorand*innen</a>
<!--<p class="cockpit_title">Universität Duisburg-Essen</p>-->
<div class="field"><span class="buttonlist">
<a onmouseover="window.status='Export starten';return true" onfocus="window.status='Download starten';return true" onmouseout="window.status='Download starten';return true" href="javascript:exportBooklet('application/pdf')">
<img title="Ausgabe im PDF-Querformat" alt="Ausgabe im PDF-Querformat" src="../images/icons/into_pdf.svg" class="svg_icon" border="0" /></a>
<span class="separator">&#160;</span>
<a onmouseover="window.status='Export starten';return true" onfocus="window.status='Download starten';return true" onmouseout="window.status='Download starten';return true" href="javascript:exportBooklet('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')">
<img title="Ausgabe in Excel" alt="Ausgabe in Excel" src="../images/icons/into_excel_normal.svg" class="svg_icon" border="0" /></a>
<span class="separator">&#160;</span>
<a onmouseover="window.status='Export starten';return true" onfocus="window.status='Download starten';return true" onmouseout="window.status='Download starten';return true" href="javascript:exportBooklet('application/vnd.openxmlformats-officedocument.wordprocessingml.document')">
<img title="Ausgabe in Word" alt="Ausgabe in Word" width="25px" height="25px" src="../images/icons/into_word.svg" class="svg_icon" border="0" /></a>
</span>
</div>
<a href="https://www.uni-due.de/verwaltung/dtac/akademisches_controlling.php">
<figure class="image is-64x64"><img src="../images/signet_ude_rgb.svg" title="UDE. Akademisches Controlling" /></figure></a>
</div>
<div class="hs_header_box1"></div>
</div>
</header>
</xsl:template>
<xsl:template name="ude_tableCSS">
<!-- aus 800000280_datencockpit.xsl -->
<style type="text/css">
.dojoDialog {background : #eee; border : 1px solid #999;-moz-border-radius : 5px;padding : 4px;width:650;height:420px;overflow:scroll}
.treebutton {
border:none;
margin: 0 4px 0 0;
}
@media print{
.dontprint{display:none;}
}
/*Cockpit-Header*/
.hs_header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 20; /*positioniert sich im flow am nähesten zum Betrachter*/
}
.cockpit_title {
color: #004C93;
font-size: 3.0em;
font-weight: 800;
}
.hs_header_box1 { /*für Balken-Box über/unter Cockpittitel*/
background: #004C93;
height: 1.0rem;
}
.hs_header_box2 { /*für Logo-/Cockpittitel-Box*/
display: flex;
height: 4.0rem;
padding: 0.3rem 17.0rem 0rem 9.0rem; /*für Padding: ob re un li*/
align-items: center; /*für vertikale Ausrichtung d Elemente*/
justify-content: space-between; /*für gleichm. Leerraum zw. Elementen*/
background-color: white;
}
/*Buttons mit is-link=UDE-Blau*/
.button.is-link {
background-color: #004C93; /*link-Blau:#3273dc; UDE-Blau:#004C93*/
border-color: transparent;
color: #fff; }
.button.is-link:hover, .button.is-link.is-hovered {
background-color: #276cda;
border-color: transparent;
color: #fff; }
.button.is-link:focus, .button.is-link.is-focused {
border-color: transparent;
color: #fff; }
.button.is-link:focus:not(:active), .button.is-link.is-focused:not(:active) {
box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }
.button.is-link:active, .button.is-link.is-active {
background-color: #2366d1;
border-color: transparent;
color: #fff; }
.button.is-link[disabled],
fieldset[disabled] .button.is-link {
background-color: #004C93;
border-color: transparent;
box-shadow: none; }
.button.is-link.is-inverted {
background-color: #fff;
color: #004C93; }
.button.is-link.is-inverted:hover, .button.is-link.is-inverted.is-hovered {
background-color: #f2f2f2; }
.button.is-link.is-inverted[disabled],
fieldset[disabled] .button.is-link.is-inverted {
background-color: #fff;
border-color: transparent;
box-shadow: none;
color: #004C93; }
.button.is-link.is-loading::after {
border-color: transparent transparent #fff #fff !important; }
.button.is-link.is-outlined {
background-color: transparent;
border-color: #004C93;
color: #004C93; }
.button.is-link.is-outlined:hover, .button.is-link.is-outlined.is-hovered, .button.is-link.is-outlined:focus, .button.is-link.is-outlined.is-focused {
background-color: #004C93;
border-color: #004C93;
color: #fff; }
.button.is-link.is-outlined.is-loading::after {
border-color: transparent transparent #004C93; #004C93; !important; }
.button.is-link.is-outlined.is-loading:hover::after, .button.is-link.is-outlined.is-loading.is-hovered::after, .button.is-link.is-outlined.is-loading:focus::after, .button.is-link.is-outlined.is-loading.is-focused::after {
border-color: transparent transparent #fff #fff !important; }
.button.is-link.is-outlined[disabled],
fieldset[disabled] .button.is-link.is-outlined {
background-color: transparent;
border-color: #004C93;
box-shadow: none;
color: #004C93; }
.button.is-link.is-inverted.is-outlined {
background-color: transparent;
border-color: #fff;
color: #fff; }
.button.is-link.is-inverted.is-outlined:hover, .button.is-link.is-inverted.is-outlined.is-hovered, .button.is-link.is-inverted.is-outlined:focus, .button.is-link.is-inverted.is-outlined.is-focused {
background-color: #fff;
color: #004C93; }
.button.is-link.is-inverted.is-outlined.is-loading:hover::after, .button.is-link.is-inverted.is-outlined.is-loading.is-hovered::after, .button.is-link.is-inverted.is-outlined.is-loading:focus::after, .button.is-link.is-inverted.is-outlined.is-loading.is-focused::after {
border-color: transparent transparent #004C93; #004C93; !important; }
.exportoptions {
margin-top: 2.0em;
}
.buttonlist{ /*für resposive Buttonleiste*/
display: flex;
flex-flow: no wrap;
justify-content: flex-start;
padding: 0.3rem 0rem 0.3rem 0rem; /*für Padding: ob re un li*/
}
.buttonlist img { /*für Icongröße in Buttonleiste*/
height: 2.5rem;
width: auto;
margin-top: 0em; }
/*Auswahlfelder*/
.card { /*für Auswahlfeldercard-Position*/
display: flex;
flex-flow: column;
margin-left: 0em;
margin-top: 8em;
min-width: 10.0em;
width: 100%;
}
.label-container, .button-label { /*für einh.responsive Feldbezeichner*/
display: flex;
justify-content: left;
background: ;
min-width: 10.0em; /*für kleine Viewports*/
width: 10%; } /*für kleine Viewports*/
.control-new { /*für einheitliche Controls*/
min-width: 10.0em; /*für kleine Viewports*/
width: 10%; /*für große Viewports*/
}
.button { /*für Button-Bezeichner-Ausrichtung*/
display: flex;
justify-content: left; }
/*Erläuterungen/Legende*/
.box-new { /*für Kopfzeile mit Close-Button*/
display: flex;
justify-content: space-between;
font-weight: bold;
}
.leg_erl {
background-color: whitesmoke; /*für Abschnitthintergrund, Schrift*/
font-size: 0.8em;
}
.dl_title { /*für Texthervorhebungen*/
display: flex;
justify-content: center;
background: inherit;
font-size: 1.2em;
font-weight: 400;
}
/*Datentabellen*/
.table-container {
z-index: 10; /*positioniert sich im flow hinter dem hs-header*/
}
table.ergtabelle tr.listRowOdd td.leer
{
border:thin solid white;
background-color:white;
}
table.ergtabelle tr.listRowEven td.leer
{
border:thin solid white;
background-color:white;
}
table.ergtabelle tr td.leer
{
border:thin solid white;
background-color:white;
}
table.ergtabelle tr th.leer
{
border:thin solid white;
background-color:white;
}
table.ergtabelle tr th.header
{
vertical-align:center;
text-align:center;
}
table.ergtabelle
{
border:thin solid white;
}
/* Zahlen rechtsbündig:*/
table.ergtabelle tbody tr.listRowEven td.integer
{
text-align:right;
empty-cells:show
vertical-align:center;
}
table.ergtabelle tbody tr.listRowOdd td.integer
{
text-align:right;
empty-cells:show
vertical-align:center;
}
table.ergtabelle tbody tr.listRowEven td.decimal
{
text-align:right;
empty-cells:show
vertical-align:center;
}
table.ergtabelle tbody tr.listRowOdd td.decimal
{
text-align:right;
empty-cells:show
vertical-align:center;
}
</style>
</xsl:template>
<xsl:template name="buildVizMetadata">
<xsl:variable name="vizInitialName">
<xsl:choose>
<xsl:when test="/ergebnisse/@isMakro='true'">
<xsl:value-of select="/ergebnisse/makro/name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/ergebnisse/ergebnis/maskenname" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--<xsl:call-template name="navigationsmenue" />-->
<script language="Javascript">
<xsl:text>
var vizInitialName='</xsl:text><xsl:value-of select="$vizInitialName"/><xsl:text>';
function dataRowMetaData(tableId,nr,colname,colcaption,coltype,colfunction)
{
this.tableId=tableId;
this.nr=nr;
this.colname=colname;
this.colcaption=colcaption;
this.coltype=coltype;
this.colfunction=colfunction;
}
function tableMetaData(nr,value,name,isDefault)
{
this.value=value;
this.nr=nr;
this.name=name
this.isDefault=isDefault;
}
var rsTableMetaData=new Array();
var rsColumnMetaData=new Array();
var rs=new Array();
</xsl:text>
</script>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement">
<xsl:call-template name="buildVizData" >
<xsl:with-param name="tableId" select="@ordnr" />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="buildVizData">
<xsl:param name="tableId" />
<script language="Javascript">
<xsl:text>
rsTableMetaData.push(new tableMetaData(
</xsl:text>
<xsl:value-of select="position()"/>
<xsl:text>,'</xsl:text>
<xsl:value-of select="$tableId"/>
<xsl:text>','</xsl:text>
<xsl:value-of select="concat('Tab. ',$tableId+1)"/>
<xsl:text>',
</xsl:text>
<xsl:choose>
<xsl:when test="position()=1">
<xsl:text>true</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>false</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
));
rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>]=new Array();
//var myChartModel=new chartModel(1,"","",rsTableMetaData);
function dataRow_</xsl:text><xsl:value-of select="$tableId"/><xsl:text>(rownr</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:text>,</xsl:text>
<xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template>
</xsl:for-each>
<xsl:text>
)
{
this.rownr=rownr;
</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:text>this.</xsl:text><xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template><xsl:text>=</xsl:text>
<xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template><xsl:text>;
</xsl:text>
</xsl:for-each><xsl:text>
}
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>]=new Array();
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRowMetaData('</xsl:text>
<xsl:value-of select="$tableId"/><xsl:text>',</xsl:text>
<xsl:value-of select="0"/>
<xsl:text>,'rownr','Zeilennr.',0,4));
</xsl:text>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:variable name="rownr">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:text>
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRowMetaData('</xsl:text>
<xsl:value-of select="$tableId"/><xsl:text>',</xsl:text>
<xsl:value-of select="$rownr"/>
<xsl:text>,'</xsl:text>
<xsl:call-template name="getColumnNameJS">
<xsl:with-param name="columnNameFromDB" select="f_name"/>
</xsl:call-template>
<xsl:text>','</xsl:text>
<xsl:call-template name="remove_linebreaksAndQuot">
<xsl:with-param name="volltext" select="wert" />
</xsl:call-template>
<xsl:text>',0,null));</xsl:text> <!--coltype noch unbekannt, colfunction unnötig-->
</xsl:for-each>
<xsl:for-each select="sqlerg/row">
<xsl:variable name="rownr">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:if test="$rownr=1">
<!-- first metadata -->
<xsl:for-each select="col">
<xsl:variable name="colnr">
<xsl:value-of select="position()"/>
</xsl:variable>
<xsl:text>
rsColumnMetaData[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>][</xsl:text><xsl:value-of select="number($colnr)"/><xsl:text>].coltype=</xsl:text><xsl:value-of select="@typ"/>
<xsl:text>;
</xsl:text>
</xsl:for-each>
</xsl:if>
<!--now resultset-->
<xsl:text>
//rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>]= new Array();
rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRow_</xsl:text><xsl:value-of select="$tableId"/><xsl:text>(</xsl:text><xsl:value-of select="$rownr"/>
<xsl:for-each select="col">
<xsl:text>,</xsl:text>
<xsl:choose>
<xsl:when test="@typ='1'"><xsl:text>'</xsl:text>
<xsl:call-template name="remove_linebreaksAndQuot">
<xsl:with-param name="volltext" select="wert" />
</xsl:call-template>
<xsl:text>'</xsl:text></xsl:when>
<!--todo:Typ Datum -->
<xsl:when test="string-length(wert)=0"><xsl:text>null</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="wert"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:text>));
</xsl:text>
</xsl:for-each>
</script>
</xsl:template>
</xsl:stylesheet>