mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
- Renamed widget FHC_navheader as NavigationHeaderWidget
- Renamed widget FHC_navigation as NavigationMenuWidget - Added new widget NavigationWidget to create header and menu - Renamed view fhcnavheader as navigationHeader - Renamed view fhcnavigation as navigationMenu - Added new view navigation - InfoCenter controller creates the header array - NavigationHeaderWidget print the header items from an array
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class FHC_navheader extends Widget
|
||||
{
|
||||
public function display($data)
|
||||
{
|
||||
if (!isset($data['items']))
|
||||
{
|
||||
//default nav header
|
||||
$data = array('headertext' => 'Infocenter', 'headertextlink' => base_url('index.ci.php/system/infocenter/InfoCenter'));
|
||||
$data['items'] = array(
|
||||
'messages' =>
|
||||
array(
|
||||
'icon' => 'envelope', 'showall' => array('showalllink' => '#', 'showalltext' => 'Alle Nachrichten anzeigen'), 'children' =>
|
||||
array(array('link' => '#', 'html' => '
|
||||
<div>
|
||||
<strong>Maximillion Pegasus</strong>
|
||||
<span class="pull-right text-muted">
|
||||
<em>Gestern</em>
|
||||
</span>
|
||||
</div>
|
||||
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
|
||||
'), array('link' => '#', 'html' => '
|
||||
<div>
|
||||
<strong>Yugi Muto</strong>
|
||||
<span class="pull-right text-muted">
|
||||
<em>Vorgestern</em>
|
||||
</span>
|
||||
</div>
|
||||
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
|
||||
'))
|
||||
),
|
||||
'alerts' =>
|
||||
array(
|
||||
'icon' => 'bell', 'showall' => array('showalllink' => '#', 'showalltext' => 'Alle Aktionen anzeigen'), 'children' =>
|
||||
array(array('link' => '#', 'html' => '
|
||||
<div>
|
||||
<i class="fa fa-upload fa-fw"></i> Dokument hochgeladen
|
||||
<span class="pull-right text-muted small">vor 2 Minuten</span>
|
||||
</div>'), array('link' => '#', 'html' => '
|
||||
<div>
|
||||
<i class="fa fa-envelope fa-fw"></i> Nachricht versandt
|
||||
<span class="pull-right text-muted small">vor 4 Minuten</span>
|
||||
</div>'), array('link' => '#', 'html' => '
|
||||
<div>
|
||||
<i class="fa fa-share fa-fw"></i> InteressentIn freigegeben
|
||||
<span class="pull-right text-muted small">vor 5 Minuten</span>
|
||||
</div>'))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$this->view('widgets/fhcnavheader', $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class NavigationHeaderWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function display($data)
|
||||
{
|
||||
$this->view('widgets/navigationHeader', $data);
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -3,13 +3,11 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class FHC_navigation extends Widget
|
||||
class NavigationMenuWidget extends Widget
|
||||
{
|
||||
const NAVIGATION_MENU = 'navigationMenu'; //
|
||||
|
||||
private $navigationMenu;
|
||||
|
||||
private static $FHC_navigationInstance;
|
||||
private static $NavigationMenuWidgetInstance;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -18,9 +16,9 @@ class FHC_navigation extends Widget
|
||||
{
|
||||
$this->navigationMenu = $widgetData;
|
||||
|
||||
self::$FHC_navigationInstance = $this;
|
||||
self::$NavigationMenuWidgetInstance = $this;
|
||||
|
||||
$this->view('widgets/fhcnavigation');
|
||||
$this->view('widgets/navigationMenu');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,8 +26,10 @@ class FHC_navigation extends Widget
|
||||
*/
|
||||
public static function printNavigationMenu()
|
||||
{
|
||||
foreach (self::$FHC_navigationInstance->navigationMenu as $item)
|
||||
foreach (self::$NavigationMenuWidgetInstance->navigationMenu as $item)
|
||||
{
|
||||
self::printNavItem($item);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class NavigationWidget extends Widget
|
||||
{
|
||||
const NAVIGATION_HEADER = 'navigationHeader'; //
|
||||
const NAVIGATION_MENU = 'navigationMenu'; //
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
$this->view('widgets/navigation', array('widgetData' => $widgetData));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user