fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11388] controller: location info for components


From: Sigurd Nes
Subject: [Fmsystem-commits] [11388] controller: location info for components
Date: Thu, 24 Oct 2013 14:09:45 +0000

Revision: 11388
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11388
Author:   sigurdne
Date:     2013-10-24 14:09:44 +0000 (Thu, 24 Oct 2013)
Log Message:
-----------
controller: location info for components

Modified Paths:
--------------
    trunk/controller/inc/class.hook_helper.inc.php
    trunk/controller/inc/class.uicase.inc.php
    trunk/controller/inc/class.uicheck_list.inc.php

Modified: trunk/controller/inc/class.hook_helper.inc.php
===================================================================
--- trunk/controller/inc/class.hook_helper.inc.php      2013-10-23 13:18:01 UTC 
(rev 11387)
+++ trunk/controller/inc/class.hook_helper.inc.php      2013-10-24 14:09:44 UTC 
(rev 11388)
@@ -99,6 +99,7 @@
                        $styling .= " .property_tickets .home_portal_title h2 { 
font-size: 20px; padding: 5px 10px;}";
 
                        $styling .= " h2.heading { font-size: 22px; 
font-weight: normal;margin: 0 0 0 20px;}";
+                       $styling .= " th.heading { font-size: 22px; 
font-weight: normal;margin: 0 0 0 20px;}";
 
                        $styling .= " h4.expand_trigger { 
clear:both;overflow:hidden;font-size: 12px;color:#031647;background: 
#DEEAF8;padding:2px 4px;margin:0; }";
                        $styling .= " h4.expand_trigger img { 
float:left;vertical-align:middle;margin-right:3px; }";
@@ -162,13 +163,14 @@
 
                        $my_planned_controls_HTML = <<<HTML
                                <div class='home_portal'>
-                                       <h2>
-                                               <div class='date 
heading'>Planlagt dato</div>
-                                               <div class='date 
heading'>Fristdato</div>
-                                               <div class='control 
heading'>Tittel på kontroll</div>
-                                               <div class='title 
heading'>Lokasjonsnavn</div>
-                                               <div class='control-area 
heading'>Kontrollområde</div>
-                                       </h2>
+                                       <table>
+                                       <tr>
+                                               <th class='date 
heading'>Planlagt dato</th>
+                                               <th class='date 
heading'>Fristdato</th>
+                                               <th class='control 
heading'>Tittel på kontroll</th>
+                                               <th class='title 
heading'>Lokasjonsnavn</th>
+                                               <th class='control-area 
heading'>Kontrollområde</th>
+                                       </tr>
 HTML;
                        // Todays date
                        $from_date_ts =  mktime(0, 0, 0, date("n"), date("j"), 
date("Y") );
@@ -262,13 +264,15 @@
                                }
                        }
 
-                       $my_planned_controls_HTML .= "<ul 
style='overflow:hidden;'>";
+//                     $my_planned_controls_HTML .= "<ul 
style='overflow:hidden;'>";
 
+
                        foreach($my_planned_controls as $planned_date_ts => 
$planned_controls_on_date)
                        {
                                foreach($planned_controls_on_date as 
$my_planned_control)
                                {
 
+                                       $my_planned_controls_HTML .= "<tr>";
                                        $deadline_ts = $my_planned_control[0];
                                        $my_control = $my_planned_control[1];
                                        
@@ -294,16 +298,23 @@
                                        $link = "";
                                //      $link = 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'controller.uicheck_list.edit_check_list', 'check_list_id' => $check_list_id));
                                        $link = 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'controller.uicase.add_case', 'check_list_id' => $check_list_id));
-                                       $my_planned_controls_HTML .= "<li><a 
href='$link'><div class='date'>{$planned_formatted}</div><div 
class='date'>{$deadline_formatted}</div><div 
class='control'>{$my_control['title']}</div><div 
class='title'>{$location_name}</div><div 
class='control-area'>{$control_area_name}</div></a></li>";
+//                                     $my_planned_controls_HTML .= "<li><a 
href='$link'><div class='date'>{$planned_formatted}</div><div 
class='date'>{$deadline_formatted}</div><div 
class='control'>{$my_control['title']}</div><div 
class='title'>{$location_name}</div><div 
class='control-area'>{$control_area_name}</div></a></li>";
+                                       $my_planned_controls_HTML .= "<td><a 
href='$link'><div class='date'>{$planned_formatted}</div></a></td>";
+                                       $my_planned_controls_HTML .= "<td><a 
href='$link'><div class='date'>{$deadline_formatted}</div></a></td>";
+                                       $my_planned_controls_HTML .= "<td><a 
href='$link'><div class='control'>{$my_control['title']}</div></a></td>";
+                                       $my_planned_controls_HTML .= "<td><a 
href='$link'><div class='title'>{$location_name}</div></a></td>";
+                                       $my_planned_controls_HTML .= "<td><a 
href='$link'><div class='control-area'>{$control_area_name}</div></a></td>";
+                                       $my_planned_controls_HTML .= "</tr>";
                                }
                        }
 
                        if(count( $planned_controls_on_date ) > 1 )
                        {
-                               $my_planned_controls_HTML .= "</li></ul>";
+//                             $my_planned_controls_HTML .= "</li></ul>";
+//                             $my_planned_controls_HTML .= "</tr>";
                        }
 
-                       $my_planned_controls_HTML .= "</div>"; // home_portal
+                       $my_planned_controls_HTML .= "</table></div>"; // 
home_portal
 
                        echo "\n".'<!-- BEGIN checklist info -->'."\n <h2 
class='heading'>Mine planlagte kontroller</h2><div class='home-box'>" . 
$my_planned_controls_HTML . "</div>\n".'<!-- END checklist info -->'."\n";
 

Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php   2013-10-23 13:18:01 UTC (rev 
11387)
+++ trunk/controller/inc/class.uicase.inc.php   2013-10-24 14:09:44 UTC (rev 
11388)
@@ -122,7 +122,10 @@
                                $component_id = $check_list->get_component_id();
                                
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
+
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
                
                                $component = new controller_component();
                                $component->set_location_code( 
$component_arr['location_code'] );
@@ -433,7 +436,12 @@
                                $component_id = $check_list->get_component_id();
                                                
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
+
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+               //              $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
                                        
                                $component = new controller_component();
                                $component->set_location_code( 
$component_arr['location_code'] );
@@ -616,7 +624,12 @@
                                $component_id = $check_list->get_component_id();
                                                
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
+
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+//                             $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
                                        
                                $component = new controller_component();
                                $component->set_location_code( 
$component_arr['location_code'] );
@@ -784,7 +797,12 @@
                                $component_id = $check_list->get_component_id();
                                
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
+
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+//                             $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
                
                                $component = new controller_component();
                                $component->set_location_code( 
$component_arr['location_code'] );
@@ -886,7 +904,11 @@
                                $component_id = $check_list->get_component_id();
                                
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
+
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
+//                             $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
                
                                $component = new controller_component();
                                $component->set_location_code( 
$component_arr['location_code'] );

Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php     2013-10-23 13:18:01 UTC 
(rev 11387)
+++ trunk/controller/inc/class.uicheck_list.inc.php     2013-10-24 14:09:44 UTC 
(rev 11388)
@@ -254,16 +254,16 @@
 
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
 
-//
                                $location_code = 
$component_arr['location_code'];
 
                                $check_list->set_location_code($location_code);
                                $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$check_list->get_location_code()));
                                $level = 
$this->location_finder->get_location_level($location_code);
 
-//
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
 
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
                                $component = new controller_component();
                                
$component->set_location_code($component_arr['location_code']);
                                $component->set_xml_short_desc($short_desc);
@@ -362,8 +362,10 @@
                                $component_id = $check_list->get_component_id();
 
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
 
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
                                $component = new controller_component();
                                
$component->set_location_code($component_arr['location_code']);
                                $component->set_xml_short_desc($short_desc);
@@ -548,8 +550,11 @@
                                $component_id = $check_list->get_component_id();
 
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
-                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
 
+                               $location_name = 
execMethod('property.bolocation.get_location_name', 
$component_arr['location_code']);
+
+                               $short_desc = $location_name . '::' . 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
+
                                $component = new controller_component();
                                
$component->set_location_code($component_arr['location_code']);
                                $component->set_xml_short_desc($short_desc);




reply via email to

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