Commit 9ffaf034 authored by Katrin Otto's avatar Katrin Otto

Einbindung von TUC spezifischen Elementen

parent e2c659c5
......@@ -4,11 +4,15 @@
# author: Katrin Otto (katrin.otto@bibliothek.tu-chemnitz.de)
# 21.06.2018
# active TUC specific settings with TRUE
$tuc = True;
# local file path
$base_dir = dirname(__FILE__);
# basic weblink to ikonline
$base_URL = 'https:';
$base_URL = '';
# current weblink
$url =(isset($_SERVER['HTTPS'])?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
......
......@@ -26,9 +26,12 @@ function page($file, $index ='')
{
# Variable for recursion and current lang from top of the script
global $CMS_page_shown, $current_lang;
//Variables from config.inc
# Variables from config.inc
global $base_dir, $base_URL, $array_navigation;
# TUC
global $tuc;
# allready shown - stop of recursion
if ($CMS_page_shown == 1) return;
$CMS_page_shown = 1;
......@@ -45,13 +48,50 @@ function page($file, $index ='')
$html[] = '<script type="text/javascript" src="' . $base_URL . '/js/jquery.js"></script>'. PHP_EOL;
$html[] = '<script type="text/javascript" src="' . $base_URL . '/bootstrap_336/js/bootstrap.min.js"></script>'. PHP_EOL;
$html[] = '<script type="text/javascript" src="' . $base_URL . '/js/local.js"></script>'. PHP_EOL;
# TUC specfic Layout
if($tuc)
{
$html[] = '<script type="text/javascript" src="/tucal4/js/tucal.js?201803011412/de"></script>'. PHP_EOL;
$html[] = '<link rel="stylesheet" type="text/css" href="/tucal4/css/tucal4.css?201802080836">'. PHP_EOL;
$html[] = '<link rel="stylesheet" href="'.$base_URL.'/css/tuc.css"/>'. PHP_EOL;
}
$html[] = '</head>'. PHP_EOL;
$html[] = '<body class="main">'. PHP_EOL;
# TUC specific class for body
$body_class = $tuc ? 'class-tuc' : 'main';
$html[] = '<body class="' . $body_class . '">'. PHP_EOL;
# TUC specific header
if($tuc)
{
$html[] = '<header>'. PHP_EOL;
$html[] = '<div id="tucal-head" class="hidden-print">'. PHP_EOL;
$html[] = '<div class="container">'. PHP_EOL;
$html[] = '<div id="tucal-headlogoborder" class="col-sm-3">'. PHP_EOL;
$html[] = '<a href="/index.html.en" accesskey="h" class="border"><span class="sr-only">Link zur Startseite</span>
<img src="/tucal4/img/logo.png" id="tucal-headlogo" alt="Logo: TU Chemnitz"></a>'. PHP_EOL;
$html[] = '</div>'. PHP_EOL;
$html[] = '<div id="tucal-headnavigation" class="col-sm-9 collapse navbar-collapse">'. PHP_EOL;
$html[] = '<div id="tucal-orgtitle" class="row">'. PHP_EOL;
$html[] = '<div class="col-xs-12 no-spacing">'. PHP_EOL;
$html[] = '<div>Universitätsbibliothek</div>'. PHP_EOL;
$html[] = '</div></div></div></div></div></header>'. PHP_EOL;
$html[] = '<nav id="tucal-breadcrumbs" class="hidden-print"><h2 class="sr-only">Breadcrumb Navigation</h2>'. PHP_EOL;
$html[] = '<div class="container">'. PHP_EOL;
$html[] = '<div id="tucal-breadcrumbrow" class="row">'. PHP_EOL;
$html[] = '<ol class="tucal-breadcrumb"><li><a href="/" title="Homepage">TU Chemnitz</a></li>'. PHP_EOL;
$html[] = '<li><a href="/ub/">Universitätsbibliothek</a></li>'. PHP_EOL;
$html[] = '<li><a href="/ub/kurse-und-e-learning/">Kurse & E-Learnung</a></li>'. PHP_EOL;
$html[] = '<li class="active">IKOnline</li></ol>'. PHP_EOL;
$html[] = '</div></div></nav>'. PHP_EOL;
}
$html[] = '<div id="cclicence">'. PHP_EOL;
$html[] = '<p><a href="https://creativecommons.org/licenses/by/4.0/deed.de" target="blank"><img id="imagecc" src="' . $base_URL . '/images/ccby.png"></a>'. PHP_EOL;
$html[] = '<a href="https://www.tu-chemnitz.de/ub/" target="blank">Universitätsbibliothek Chemnitz</a></p>'. PHP_EOL;
$html[] = '<a href="https://www.tu-chemnitz.de/ub/" target="blank">UB Chemnitz</a></p>'. PHP_EOL;
$html[] = '</div>'. PHP_EOL;
$html[] = '<div class="content">'. PHP_EOL;
......@@ -96,15 +136,14 @@ function page($file, $index ='')
$html[] = '</html>'. PHP_EOL;
echo implode('',$html);
exit;
}
# main navigation on top
function main_navigation($current_lang)
{
global $base_dir, $base_URL, $array_navigation, $url, $startpage;
global $base_dir, $base_URL, $array_navigation, $url, $startpage, $tuc ;
# get the naviagtion in current language
$navigation = $array_navigation[$current_lang];
......@@ -113,7 +152,11 @@ function main_navigation($current_lang)
$html = array();
# start navigation
$html[] = '<nav class="navbar navbar-default">'. PHP_EOL;
# TUC specific class for navigation
$nav_class = $tuc ? 'navbar-inverse' : 'navbar-default';
$html[] = '<nav class="navbar ' . $nav_class . '">'. PHP_EOL;
$html[] = '<div class="container-fluid">'. PHP_EOL;
$html[] = '<div class="navbar-header">'. PHP_EOL;
......@@ -510,12 +553,12 @@ function get_glossary()
$html[] = '</dl>';
# navigation on top via letters of alphabet
# range auf alphabet
$alphabet = range('A','Z');
$navigation = array('<div id="aZ" class="col-md-12 col-xs-12 col-md-offset-2">','<p>');
foreach($alphabet as $a)
{
# if the letter of alphabet is in the array of used letters, set a link
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment