From 5b4a9c50e4e7a0ce1906e2a09bae8691060b2791 Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Fri, 19 Jul 2013 15:36:59 +0000 Subject: [PATCH] Anpassungen an CIS-Redesign news.php: Wenn Student Incoming ist, wird bei den Studiengang-Details der ECI-Studiengang angezeigt --- cms/menu.inc.php | 42 +++++++------------ cms/menu/menu_addon.class.php | 23 ++++++---- .../menu_addon_lehrveranstaltungen.inc.php | 6 +-- cms/menu/menu_addon_meinelv.inc.php | 1 + cms/news.php | 30 ++++++++++--- 5 files changed, 59 insertions(+), 43 deletions(-) diff --git a/cms/menu.inc.php b/cms/menu.inc.php index b5c42ce2b..a22b94297 100755 --- a/cms/menu.inc.php +++ b/cms/menu.inc.php @@ -115,34 +115,24 @@ function drawEntry($item) if(isset($childsobject[$item->content_id]) && count($childsobject[$item->content_id])>0) { + echo "\n
  • "; // Eintrag hat Untermenue -> Aufklappbar machen - echo ' - -   - '; if($item->template_kurzbz=='include') IncludeMenuAddon($item); elseif($item->template_kurzbz=='redirect') Redirect($item, $item->content_id); else - DrawLink(APP_ROOT.'cms/content.php?content_id='.$item->content_id,'content',$item->titel, $item->content_id); - - echo ' - '; - + DrawLink(APP_ROOT.'cms/content.php?content_id='.$item->content_id,'content',$item->titel, $item->content_id, $item->menu_open); + + echo "\n - - '; + echo "\n"; + echo "\n
  • "; } else { // Normaler Eintrag ohne Untermenue - echo ' - -   - '; + echo "\n
  • "; if($item->template_kurzbz=='include') IncludeMenuAddon($item); elseif($item->template_kurzbz=='redirect') @@ -150,9 +140,7 @@ function drawEntry($item) else DrawLink(APP_ROOT.'cms/content.php?content_id='.$item->content_id,'content',$item->titel); - echo ' - - '; + echo "
  • "; } } @@ -163,18 +151,16 @@ function drawEntry($item) * @param $name Anzeigename * @param $content_id Wenn die Content_id uebergeben wird, oeffnet der Klick das Submenu */ -function DrawLink($link, $target, $name, $content_id=null) +function DrawLink($link, $target, $name, $content_id=null, $open=null) { if($target=='') $target='content'; - if(!is_null($content_id)) - $class = 'class="MenuItem" onClick="js_toggle_container(\'Content'.$content_id.'\');"'; + if($open) + $class='class="selected"'; else - $class='class="Item"'; - - echo 'menu item '.$name.''; - + $class=''; + echo ''.$name.''; } /** @@ -212,7 +198,7 @@ function Redirect($content, $content_id_Submenu=null) else $target=''; - DrawLink($url, $target, $content->titel, $content_id_Submenu); + DrawLink($url, $target, $content->titel, $content_id_Submenu, $content->menu_open); } /** diff --git a/cms/menu/menu_addon.class.php b/cms/menu/menu_addon.class.php index 25fada51d..23a5a353b 100755 --- a/cms/menu/menu_addon.class.php +++ b/cms/menu/menu_addon.class.php @@ -24,6 +24,7 @@ */ require_once(dirname(__FILE__).'/../../include/basis_db.class.php'); +require_once(dirname(__FILE__).'/../../include/functions.inc.php'); class menu_addon extends basis_db { @@ -79,14 +80,15 @@ class menu_addon extends basis_db $content = $includeparams['content']; if($this->link) - DrawLink($this->linkitem['link'],$this->linkitem['target'],$this->linkitem['name'],$this->linkitem['content_id']); - echo ' -
    '; + ($content->menu_open?(DrawLink($this->linkitem['link'],$this->linkitem['target'],$this->linkitem['name'],$this->linkitem['content_id'])):''); + //Wenn Option "Menü öffen" angeklickt ist, erschein die Überschrift, sonst nicht -> Ist eine Pfusch-Lösung. Was kann man sonst machen damit Überschrift "Meine LV" nicht angezeigt wird? + //echo ' + //
    '; $this->outputBlock(); $this->outputItems(); - echo '
    '; + //echo '
    '; } /** @@ -95,13 +97,20 @@ class menu_addon extends basis_db */ public function outputItems() { + $user = get_uid(); + $is_lector=check_lektor($user); + + $sprache = getSprache(); + $p=new phrasen($sprache); + if(count($this->items)>0) { - echo '