fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9660]


From: Torstein
Subject: [Fmsystem-commits] [9660]
Date: Tue, 26 Jun 2012 08:15:56 +0000

Revision: 9660
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9660
Author:   vator
Date:     2012-06-26 08:15:56 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.menu.inc.php
    trunk/controller/inc/hook_home.inc.php
    trunk/controller/templates/base/css/base.css

Modified: trunk/controller/inc/class.menu.inc.php
===================================================================
--- trunk/controller/inc/class.menu.inc.php     2012-06-26 06:48:39 UTC (rev 
9659)
+++ trunk/controller/inc/class.menu.inc.php     2012-06-26 08:15:56 UTC (rev 
9660)
@@ -72,12 +72,6 @@
                                                                                
        )
                                                                                
)
                                        ),
-/*                                     'location_for_check_list' => array
-                                       (
-                                               'text'  => 
lang('location_connections'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uicontrol_location.index') ),
-                                               'image' => array('property', 
'location_1')
-                                       ),*/
                                        'control_item' => array
                                        (
                                                'text'  => lang('Control_item'),
@@ -104,12 +98,6 @@
                                                'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uiprocedure.index') ),
                                                'image' => array('property', 
'location_1'),
                                        ),
-                                       'check_list' => array
-                                       (
-                                               'text'  => lang('Check_list'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uicheck_list.index') ),
-                                               'image' => array('property', 
'location_1'),
-                                       ),
                                        'calendar_overview' => array
                                        (
                                                'text'  => 
lang('Calendar_overview'),
@@ -118,25 +106,7 @@
                                        )
                                );
                        }
-                       else
-                       {
-                               $menus['navigation'] =  array
-                               (
-                                       'check_list' => array
-                                       (
-                                               'text'  => lang('Check_list'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uicheck_list.index') ),
-                                               'image' => array('property', 
'location_1'),
-                                       ),
-                                       'location_check_list' => array
-                                       (
-                                               'text'  => 
lang('Check_list_location'),
-                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uilocation_check_list.view_check_lists_for_location') ),
-                                               'image' => array('property', 
'location_1'),
-                                       ),
-                               );
-                       }
-
+                       
                        if ( $GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin')
                                || $GLOBALS['phpgw']->acl->check('admin', 
phpgwapi_acl::ADD, 'controller'))
                        {
@@ -194,14 +164,6 @@
                                                'url'   => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'preferences.uiadmin_acl.aclprefs', 'acl_app'=> 'controller') )
                                        )
                                );
-/*
-                               $menus['toolbar'][] = array
-                               (
-                                       'text'  => 
$GLOBALS['phpgw']->translation->translate('Preferences', array(), true),
-                                       'url'   => 
$GLOBALS['phpgw']->link('/preferences/preferences.php', array('appname'      => 
'controller')),
-                                       'image' => array('hrm', 'preferences')
-                               );
-*/
                        }
 
                        //Nothing...

Modified: trunk/controller/inc/hook_home.inc.php
===================================================================
--- trunk/controller/inc/hook_home.inc.php      2012-06-26 06:48:39 UTC (rev 
9659)
+++ trunk/controller/inc/hook_home.inc.php      2012-06-26 08:15:56 UTC (rev 
9660)
@@ -33,7 +33,7 @@
        include_class('controller', 'check_list_status_info', 'inc/helper/');
        include_class('controller', 'date_generator', 'inc/component/');
        include_class('controller', 'location_finder', 'inc/helper/');
-       
+               
        $so = CreateObject('controller.socheck_list');
        $so_control = CreateObject('controller.socontrol');
        
@@ -42,8 +42,6 @@
        $limit_no_of_planned = 
isset($GLOBALS['phpgw_info']['user']['preferences']['controller']['no_of_planned_controls'])?
 
$GLOBALS['phpgw_info']['user']['preferences']['controller']['no_of_planned_controls']
 : (isset($config->config_data['no_of_planned_controls']) && 
$config->config_data['no_of_planned_controls'] > 0 ? 
$config->config_data['no_of_planned_controls']:5);
        $limit_no_of_assigned = 
isset($GLOBALS['phpgw_info']['user']['preferences']['controller']['no_of_assigned_controls'])?
 
$GLOBALS['phpgw_info']['user']['preferences']['controller']['no_of_assigned_controls']
 : (isset($config->config_data['no_of_assigned_controls']) && 
$config->config_data['no_of_assigned_controls'] > 0 ? 
$config->config_data['no_of_assigned_controls']:10);
 
-       //echo '<H1> Hook for controller </H1>';        
-       //$location_code = '1101';
        $year = phpgw::get_var('year');
        
        if(empty($year)){
@@ -52,7 +50,6 @@
        
        $year = intval($year);
                                
-       //$from_date_ts = strtotime("01/01/$year");
        $from_date_ts = strtotime("now");
        $to_year = $year + 1;
        $to_date_ts = strtotime("01/01/$to_year");      
@@ -113,11 +110,6 @@
                'edit'  => array('url'  => '/set_box.php', 'app'        => 
$app_id)
        );
 
-       foreach ( $var as $key => $value )
-       {
-               //                      $portalbox->set_controls($key,$value);
-       }
-
        $category_name = array(); // caching
        
        $cats   = CreateObject('phpgwapi.categories', -1, 'controller', 
'.control');
@@ -146,7 +138,7 @@
                        $portalbox0_data[] = array
                        ($check_list->get_deadline(), array
                        (
-                               'text' => "{$location_name} - 
{$control_area_name} - {$current_control["title"]} :: {$next_date}",
+                               'text' => "<span 
class='title'>{$location_name}</span><span 
class='control-area'>{$control_area_name}</span> <span 
class='control'>{$current_control["title"]}</span> <span 
class='date'>{$next_date}</span>",
                                'link' => $GLOBALS['phpgw']->link('/index.php', 
array('menuaction' => 'controller.uicheck_list.edit_check_list', 
'check_list_id' => $check_list->get_id()))
                        ));
                }
@@ -164,8 +156,19 @@
                $tmp++;
        }
 
-       echo "\n".'<!-- BEGIN checklist info -->'."\n<div 
class='controller_checklist' style='padding-left: 10px; background-color: 
red;'>".$portalbox0->draw()."</div>\n".'<!-- END checklist info -->'."\n";
+       $styling  = "\n".'<!-- BEGIN checklist info -->'."\n ";
+       $styling .= "<style> .home_portal_content 
a{color:#0066CC;text-decoration: none;text-transform: uppercase;} 
.home_portal{margin: 20px 10px 0;} "; 
+       $styling .= " .home-box {background: none repeat scroll 0 0 #EDF5FF; 
border-color: #DBE5EF; border-radius: 4px; margin: 20px;}";
+       $styling .= " .home-box .home_portal{margin: 0;border: 1px solid 
#DEEAF8;} .home_portal_content{padding:10px;} ";
+       $styling .= " .home_portal_title h2{ background: #DEEAF8; margin: 0; 
padding: 5px;} .home_portal_content ul li{padding: 3px;}";
+       $styling .= " .home_portal_content 
.title{display:inline-block;width:300px;} .home_portal_content 
.control-area{display:inline-block;width:200px;}";
+       $styling .= " .home_portal_content 
.control{display:inline-block;width:300px;} .home_portal_content 
.date{display:inline-block;width:300px;}";
+       $styling .= "</style>"; 
+       $styling .= "\n".'<!-- END checklist info -->'."\n";
        
+       echo $styling;
+       echo "\n".'<!-- BEGIN checklist info -->'."\n <div 
class='home-box'>".$portalbox0->draw()."</div>\n".'<!-- END checklist info 
-->'."\n";
+       
        $portalbox1 = CreateObject('phpgwapi.listbox', array
        (
                'title'         => "Mine planlagte kontroller",
@@ -191,11 +194,6 @@
                'edit'  => array('url'  => '/set_box.php', 'app'        => 
$app_id)
        );
 
-       foreach ( $var as $key => $value )
-       {
-               //                      $portalbox->set_controls($key,$value);
-       }
-
        $category_name = array(); // caching
        
        $cats   = CreateObject('phpgwapi.categories', -1, 'controller', 
'.control');
@@ -224,7 +222,7 @@
                        $portalbox1_data[] = array
                        ($check_list->get_planned_date(), array
                        (
-                               'text' => "{$location_name} - 
{$control_area_name} - {$current_control["title"]} :: {$next_date}",
+                               'text' => "<span 
class='title'>{$location_name}</span><span 
class='control-area'>{$control_area_name}</span> <span 
class='control'>{$current_control["title"]}</span> <span 
class='date'>{$next_date}</span>",
                                'link' => $GLOBALS['phpgw']->link('/index.php', 
array('menuaction' => 'controller.uicheck_list.edit_check_list', 
'check_list_id' => $check_list->get_id()))
                        ));
                }
@@ -241,7 +239,7 @@
                }
                $tmp++;
        }
-       echo "\n".'<!-- BEGIN checklist info -->'."\n<div 
class='controller_checklist' style='padding-left: 
10px;'>".$portalbox1->draw()."</div>\n".'<!-- END checklist info -->'."\n";
+       echo "\n".'<!-- BEGIN checklist info -->'."\n<div 
class='home-box'>".$portalbox1->draw()."</div>\n".'<!-- END checklist info 
-->'."\n";
 
        $portalbox2 = CreateObject('phpgwapi.listbox', array
        (
@@ -308,7 +306,7 @@
                                                $portalbox2_data[] = array
                                                ($current_date, array
                                                (
-                                                       'text' => 
"{$location_name} - {$control_area_name} - {$current_control["title"]} :: 
{$next_date}",
+                                                       'text' => "<span 
class='title'>{$location_name}</span><span 
class='control-area'>{$control_area_name}</span> <span 
class='control'>{$current_control["title"]}</span> <span 
class='date'>{$next_date}</span>",
                                                        'link' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'controller.uicheck_list.add_check_list', 'date' => $current_date, 'control_id' 
=> $current_control["id"], 'location_code' => $curr_location))
                                                ));
                                        }
@@ -320,7 +318,7 @@
                                                $portalbox2_data[] = array
                                                ($check_list->get_deadline(), 
array
                                                (
-                                                       'text' => 
"{$location_name} - {$control_area_name} - {$current_control["title"]} :: 
{$next_date}",
+                                                       'text' => "<span 
class='title'>{$location_name}</span><span 
class='control-area'>{$control_area_name}</span> <span 
class='control'>{$current_control["title"]}</span> <span 
class='date'>{$next_date}</span>",
                                                        'link' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'controller.uicheck_list.edit_check_list', 'check_list_id' => 
$check_list->get_id()))
                                                ));
                                            }                                   
    
@@ -333,7 +331,7 @@
                                $portalbox2_data[] = array
                                ($current_date, array
                                (
-                                       'text' => "{$location_name} - 
{$control_area_name} - {$current_control["title"]} :: {$next_date}",
+                                       'text' => "<span 
class='title'>{$location_name}</span><span 
class='control-area'>{$control_area_name}</span> <span 
class='control'>{$current_control["title"]}</span> <span 
class='date'>{$next_date}</span>",
                                        'link' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'controller.uicheck_list.add_check_list', 'date' => $current_date, 'control_id' 
=> $current_control["id"], 'location_code' => $curr_location))
                                ));                                     
                        }
@@ -352,4 +350,4 @@
                }
                $tmp++;
        }
-       echo "\n".'<!-- BEGIN assigned checklist info -->'."\n<div 
class='controller_checklist' style='padding-left: 
10px;'>".$portalbox2->draw()."</div>\n".'<!-- END assigned checklist info 
-->'."\n";
+       echo "\n".'<!-- BEGIN assigned checklist info -->'."\n<div 
class='home-box'>".$portalbox2->draw()."</div>\n".'<!-- END assigned checklist 
info -->'."\n";

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-06-26 06:48:39 UTC 
(rev 9659)
+++ trunk/controller/templates/base/css/base.css        2012-06-26 08:15:56 UTC 
(rev 9660)
@@ -2048,3 +2048,9 @@
 p.no_items_msg {
        padding: 5px;   
 }
+
+.home-box {
+       background: none repeat scroll 0 0 #EDF5FF;
+  border-color: #DBE5EF;
+  border-radius: 4px;  
+}
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]