[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9659]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [9659] |
Date: |
Tue, 26 Jun 2012 06:48:41 +0000 |
Revision: 9659
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9659
Author: vator
Date: 2012-06-26 06:48:39 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.socontrol.inc.php
trunk/controller/inc/class.uicalendar.inc.php
trunk/controller/inc/class.uicontrol_location.inc.php
trunk/controller/inc/model/class.component.inc.php
trunk/controller/templates/base/calendar/select_buildings_on_property.xsl
trunk/controller/templates/base/calendar/select_my_locations.xsl
trunk/controller/templates/base/calendar/view_calendar_month.xsl
trunk/controller/templates/base/calendar/view_calendar_year.xsl
trunk/controller/templates/base/control_item/control_item.xsl
trunk/controller/templates/base/control_location/control_location_tabs.xsl
trunk/controller/templates/base/control_location/register_control_to_component.xsl
trunk/controller/templates/base/control_location/register_control_to_location.xsl
trunk/controller/templates/base/control_location/view_locations_for_control.xsl
trunk/controller/templates/base/css/base.css
Added Paths:
-----------
trunk/controller/templates/base/calendar/calendar_filters.xsl
trunk/controller/templates/base/calendar/nav_calendar_month.xsl
trunk/controller/templates/base/calendar/nav_calendar_year.xsl
Modified: trunk/controller/inc/class.socontrol.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol.inc.php 2012-06-26 06:25:33 UTC
(rev 9658)
+++ trunk/controller/inc/class.socontrol.inc.php 2012-06-26 06:48:39 UTC
(rev 9659)
@@ -244,10 +244,12 @@
$sql .= "AND bim_item.type = bim_type.id ";
$sql .= "AND bim_item.location_code LIKE
'$location_code%' ";
- if( is_numeric($repeat_type)){
+ if( is_numeric($repeat_type))
+ {
$sql .= "AND c.repeat_type = $repeat_type ";
}
- if( is_numeric($role_id)){
+ if( is_numeric($role_id))
+ {
$sql .= "AND c.responsibility_id = $role_id ";
}
@@ -260,15 +262,21 @@
$component_id = 0;
$component = null;
- while($this->db->next_record()) {
- if( $this->db->f('component_id', true) !=
$component_id ){
- if($component_id != 0){
+ while($this->db->next_record())
+ {
+ if( $this->db->f('component_id', true) !=
$component_id )
+ {
+ if($component_id != 0)
+ {
$component->set_controls_array($controls_array);
$controls_array = array();
- if($return_type ==
"return_array"){
+ if($return_type ==
"return_array")
+ {
$components_array[] =
$component->toArray();
- }else{
+ }
+ else
+ {
$components_array[] =
$component;
}
}
@@ -300,23 +308,34 @@
$control->set_repeat_interval($this->unmarshal($this->db->f('repeat_interval',
true), 'int'));
if($return_type == "return_object")
+ {
$controls_array[] = $control;
+ }
else
+ {
$controls_array[] = $control->toArray();
-
+ }
+
$component_id = $component->get_id();
}
- if($component != null){
+ if($component != null)
+ {
$component->set_controls_array($controls_array);
if($return_type == "return_array")
+ {
$components_array[] =
$component->toArray();
+ }
else
+ {
$components_array[] = $component;
+ }
return $components_array;
- }else {
+ }
+ else
+ {
return null;
}
}
@@ -329,7 +348,8 @@
$sql = "SELECT * FROM controller_control WHERE
control_area_id=$control_area_id";
$this->db->query($sql);
- while($this->db->next_record()) {
+ while($this->db->next_record())
+ {
$control = new
controller_control($this->unmarshal($this->db->f('id', true), 'int'));
$control->set_title($this->unmarshal($this->db->f('title', true), 'string'));
$control->set_description($this->unmarshal($this->db->f('description', true),
'boolean'));
@@ -348,9 +368,12 @@
$controls_array[] = $control->toArray();
}
- if( count( $controls_array ) > 0 ){
+ if( count( $controls_array ) > 0 )
+ {
return $controls_array;
- }else {
+ }
+ else
+ {
return null;
}
}
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2012-06-26 06:25:33 UTC
(rev 9658)
+++ trunk/controller/inc/class.uicalendar.inc.php 2012-06-26 06:48:39 UTC
(rev 9659)
@@ -117,7 +117,8 @@
$controls_with_check_list_array =
$this->populate_controls_with_check_lists($controls_for_location_array,
$control_id_with_check_list_array);
$controls_calendar_array = array();
- foreach($controls_with_check_list_array as $control){
+ foreach($controls_with_check_list_array as $control)
+ {
$month_calendar = new month_calendar($control,
$year, $month);
$calendar_array =
$month_calendar->build_calendar( $control->get_check_lists_array() );
@@ -125,11 +126,13 @@
}
// COMPONENTS
- foreach($components_with_controls_array as $component){
+ foreach($components_with_controls_array as $component)
+ {
$controls_for_component_array =
$component->get_controls_array();
$controls_components_calendar_array = array();
- foreach($controls_for_component_array as $control){
+ foreach($controls_for_component_array as $control)
+ {
// Fetches control ids with check lists for
specified time period
$control_id_with_check_list_array =
$this->so->get_check_lists_for_component($component->get_type(),
$component->get_id(), $from_date_ts, $to_date_ts, $repeat_type = ">=2");
@@ -150,12 +153,19 @@
$property_array =
execMethod('property.solocation.read', array('type_id' => 1, 'allrows' =>
true));
// Gets array of locations assigned to current user
- $my_locations = $this->get_my_assigned_locations();
+ $my_locations =
$this->get_my_assigned_locations($location_code);
$heading_array =
month_calendar::get_heading_array($year, $month);
$roles_array = $this->so_control->get_roles();
+ $repeat_type_array = array(
+
array('id' => "0", 'value' => "Dag"),
+
array('id' => "1", 'value' => "Uke"),
+
array('id' => "2", 'value' => "Måned"),
+
array('id' => "3", 'value' => "År")
+ );
+
$data = array
(
'buildings_on_property' =>
$buildings_on_property,
@@ -169,6 +179,7 @@
'current_month_nr' =>
$month,
'location_level'
=> $level,
'roles_array'
=> $roles_array,
+ 'repeat_type_array' =>
$repeat_type_array
);
self::add_javascript('controller', 'controller',
'jquery.js');
@@ -178,7 +189,8 @@
self::render_template_xsl(array('calendar/view_calendar_month',
'calendar/check_list_status_checker',
'calendar/icon_color_map', 'calendar/select_my_locations',
-
'calendar/select_buildings_on_property'), $data);
+
'calendar/select_buildings_on_property', 'calendar/nav_calendar_month',
+
'calendar/calendar_filters'), $data);
}
public function view_calendar_for_year()
@@ -220,9 +232,10 @@
// Loops through controls with repeat type day or week
// and populates array that contains aggregated open
cases pr month.
- foreach($controls_for_location_array as $control){
- if($control->get_repeat_type() == 0 |
$control->get_repeat_type() == 1){
-
+ foreach($controls_for_location_array as $control)
+ {
+ if($control->get_repeat_type() == 0 |
$control->get_repeat_type() == 1)
+ {
$cl_criteria = new
controller_check_list();
$cl_criteria->set_control_id($control->get_id());
$cl_criteria->set_location_code($location_code);
@@ -244,9 +257,10 @@
// Loops through all controls for location and
populates controls with check lists
$controls_for_location_array =
$this->populate_controls_with_check_lists($controls_for_location_array,
$control_id_with_check_list_array);
- foreach($controls_for_location_array as $control){
- if($control->get_repeat_type() == 2 |
$control->get_repeat_type() == 3){
-
+ foreach($controls_for_location_array as $control)
+ {
+ if($control->get_repeat_type() == 2 |
$control->get_repeat_type() == 3)
+ {
$year_calendar = new
year_calendar($control, $year, null, $location_code, "location" );
$calendar_array =
$year_calendar->build_calendar( $control->get_check_lists_array() );
@@ -254,35 +268,38 @@
}
}
+ //print_r( $components_with_controls_array );
+
// COMPONENTS
- foreach($components_with_controls_array as $component){
-
- //$location_id = 2295; //Eksempel: Valglokaler
-
+ foreach($components_with_controls_array as $component)
+ {
$location_id = $component->get_location_id();
- echo " location_id: " . $location_id;
+
$system_location =
$GLOBALS['phpgw']->locations->get_name($location_id);
+
$filters = array("short_description" => "IS NOT
NULL");
- $attributes['attributes'] =
$GLOBALS['phpgw']->custom_fields->find($system_location['appname'],$system_location['location'],
0, '', 'ASC', 'attrib_sort', true, true);
-
- print_r( $attributes['attributes'][1] );
-
- $fields['attributes']= $attributes[0][0];
- //print_r($fields);
+ $attributes['attributes'] =
$GLOBALS['phpgw']->custom_fields->find($system_location['appname'],$system_location['location'],
0, '', 'ASC', 'short_description', true, true,$filters);
+
$params = array
(
- 'location_id' => $component->get_type(),
+ 'location_id' =>
$component->get_location_id(),
'id' => $component->get_id()
);
- $prop_array =
execMethod('property.soentity.read_single_eav', $params, $attributes);
- //print_r($prop_array);
-
- $controls_for_component_array =
$component->get_controls_array();
+ $soentity =
createObject('property.soentity');
+ $prop_array = $soentity->read_single_eav($params, $attributes);
+
+ $attr_arr =
array_pop($prop_array['attributes']);
+ $xml_short_desc = $attr_arr['value'];
+ $component->set_xml_short_desc($xml_short_desc);
+
+ $controls_for_component_array =
$component->get_controls_array();
$controls_components_calendar_array = array();
- foreach($controls_for_component_array as $control){
- if($control->get_repeat_type() == 0 |
$control->get_repeat_type() == 1){
+ foreach($controls_for_component_array as $control)
+ {
+ if($control->get_repeat_type() == 0 |
$control->get_repeat_type() == 1)
+ {
$cl_criteria = new
controller_check_list();
$cl_criteria->set_control_id(
$control->get_id() );
$cl_criteria->set_component_id(
$component->get_id() );
@@ -294,7 +311,9 @@
$calendar_array =
$year_calendar->build_agg_month_calendar($agg_open_cases_pr_month_array);
$controls_components_calendar_array[]
= array("control" => $control->toArray(), "calendar_array" => $calendar_array);
- }else {
+ }
+ else
+ {
// Fetches control ids with check lists for
specified time period
$control_id_with_check_list_array =
$this->so->get_check_lists_for_component($component->get_type(),
$component->get_id(), $from_date_ts, $to_date_ts, $repeat_type = ">=2");
@@ -314,7 +333,7 @@
$location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
// Gets array of locations assigned to current user
- $my_locations = $this->get_my_assigned_locations();
+ $my_locations =
$this->get_my_assigned_locations($location_code);
$heading_array = year_calendar::get_heading_array();
@@ -343,7 +362,8 @@
self::render_template_xsl(array('calendar/view_calendar_year',
'calendar/check_list_status_checker',
'calendar/icon_color_map', 'calendar/select_my_locations',
-
'calendar/select_buildings_on_property'), $data);
+
'calendar/select_buildings_on_property', 'calendar/nav_calendar_year',
+
'calendar/calendar_filters'), $data);
self::add_javascript('controller', 'controller',
'jquery.js');
self::add_javascript('controller', 'controller',
'ajax.js');
@@ -375,8 +395,10 @@
$locations_with_calendar_array = array();
// Process aggregated values for controls with repeat
type day or week
- if($control->get_repeat_type() <= 1 ){
- foreach($locations_for_control_array as
$location){
+ if($control->get_repeat_type() <= 1 )
+ {
+ foreach($locations_for_control_array as
$location)
+ {
$curr_location_code =
$location['location_code'];
$cl_criteria = new
controller_check_list();
@@ -391,7 +413,8 @@
$locations_with_calendar_array[] =
array( "location" => $location, "calendar_array" => $calendar_array );
}
- foreach($components_for_control_array as $component){
+ foreach($components_for_control_array as $component)
+ {
$curr_component_id =
$component['component_id'];
// Loops through controls in
controls_for_location_array and populates aggregate open cases pr month array.
@@ -403,8 +426,10 @@
}
}
// Process values for controls with repeat type month
or year
- else if($control->get_repeat_type() > 1){
- foreach($locations_for_control_array as
$location){
+ else if($control->get_repeat_type() > 1)
+ {
+ foreach($locations_for_control_array as
$location)
+ {
$curr_location_code =
$location['location_code'];
$repeat_type =
$control->get_repeat_type();
@@ -418,7 +443,8 @@
$locations_with_calendar_array[] =
array("location" => $location, "calendar_array" => $calendar_array);
}
- foreach($components_for_control_array as $component){
+ foreach($components_for_control_array as $component)
+ {
$curr_component_id =
$component['component_id'];
$repeat_type =
$control->get_repeat_type();
@@ -434,7 +460,7 @@
}
// Gets array of locations assigned to current user
- $my_locations = $this->get_my_assigned_locations();
+ $my_locations =
$this->get_my_assigned_locations($location_code);
$heading_array = year_calendar::get_heading_array();
@@ -483,7 +509,8 @@
$locations_with_calendar_array = array();
- foreach($locations_for_control_array as $location){
+ foreach($locations_for_control_array as $location)
+ {
$curr_location_code =
$location['location_code'];
$repeat_type = $control->get_repeat_type();
@@ -498,7 +525,7 @@
}
// Gets array of locations assigned to current user
- $my_locations = $this->get_my_assigned_locations();
+ $my_locations =
$this->get_my_assigned_locations($location_code);
$heading_array =
month_calendar::get_heading_array($year, $month);
@@ -522,13 +549,18 @@
self::add_javascript('controller', 'controller',
'ajax.js');
}
- public function
populate_controls_with_check_lists($controls_for_location_array,
$control_id_with_check_list_array){
+ public function
populate_controls_with_check_lists($controls_for_location_array,
$control_id_with_check_list_array)
+ {
$controls_with_check_list = array();
- foreach($controls_for_location_array as $control){
- foreach($control_id_with_check_list_array as
$control_id){
+ foreach($controls_for_location_array as $control)
+ {
+ foreach($control_id_with_check_list_array as
$control_id)
+ {
if($control->get_id() ==
$control_id->get_id())
-
$control->set_check_lists_array($control_id->get_check_lists_array());
+ {
+
$control->set_check_lists_array($control_id->get_check_lists_array());
+ }
}
$controls_with_check_list[] = $control;
@@ -538,27 +570,33 @@
}
// Generates array of aggregated number of open cases for each
month in time period
- function build_agg_open_cases_pr_month_array( $cl_criteria,
$year ){
-
+ function build_agg_open_cases_pr_month_array( $cl_criteria,
$year )
+ {
// Checks if control starts in the year that is
displayed
- if( date("Y", $control->get_start_date()) == $year ){
+ if( date("Y", $control->get_start_date()) == $year )
+ {
$from_month = date("n",
$control->get_start_date());
- }else{
+ }
+ else
+ {
$from_month = 1;
}
// Checks if control ends in the year that is displayed
- if( date("Y", $control->get_end_date()) == $year ){
+ if( date("Y", $control->get_end_date()) == $year )
+ {
$to_month = date("n", $control->get_end_date());
- }else{
+ }
+ else
+ {
$to_month = 12;
}
$agg_open_cases_pr_month_array = array();
// Fetches aggregate value for open cases in each month
in time period
- for($from_month; $from_month <= $to_month;
$from_month++){
-
+ for($from_month; $from_month <= $to_month;
$from_month++)
+ {
$month_start_ts =
$this->get_month_start_date_ts($year, $from_month);
$month_end_ts =
$this->get_month_start_date_ts($year, $from_month+1);
@@ -568,7 +606,8 @@
$num_open_cases_for_control_array =
$this->so_check_list->get_num_open_cases_for_control( $cl_criteria,
$month_start_ts, $month_end_ts );
// If there is a aggregated value for the
month, add aggregated status object to agg_open_cases_pr_month_array
- if( !empty($num_open_cases_for_control_array) ){
+ if( !empty($num_open_cases_for_control_array) )
+ {
$status_agg_month_info = new
status_agg_month_info();
$status_agg_month_info->set_month_nr($from_month);
$status_agg_month_info->set_agg_open_cases(
$num_open_cases_for_control_array["count"] );
@@ -579,39 +618,47 @@
return $agg_open_cases_pr_month_array;
}
- function get_buildings_on_property($user_role, $location_code,
$level){
+ function get_buildings_on_property($user_role, $location_code,
$level)
+ {
// Property level
- if($level == 1){
+ if($level == 1)
+ {
$property_location_code = $location_code;
}
// Building level
- else if($level > 1){
+ else if($level > 1)
+ {
$split_loc_code_array = explode('-',
$location_code);
$property_location_code =
$split_loc_code_array[0];
}
- if($user_role){
+ if($user_role)
+ {
$criteria = array();
$criteria['location_code'] =
$property_location_code;
$criteria['field_name'] = 'loc2_name';
$criteria['child_level'] = '2';
$buildings_on_property = execMethod('property.solocation.get_children',
$criteria);
- }else{
+ }
+ else
+ {
$buildings_on_property =
execMethod('property.solocation.get_children', $property_location_code);
}
return $buildings_on_property;
}
- function get_location_level($location_code){
+ function get_location_level($location_code)
+ {
$level = count(explode('-', $location_code));
return $level;
}
- function validate_location_code($location_code){
+ function validate_location_code($location_code)
+ {
$criteria = array
(
'user_id' =>
$GLOBALS['phpgw_info']['user']['account_id'],
@@ -630,7 +677,8 @@
return $location_code;
}
- function get_my_assigned_locations($location_code){
+ function get_my_assigned_locations($current_location_code)
+ {
$criteria = array
(
'user_id' =>
$GLOBALS['phpgw_info']['user']['account_id'], //
@@ -642,11 +690,23 @@
$location_finder = new location_finder();
$my_locations = $location_finder->get_responsibilities(
$criteria );
- return $my_locations;
+ $my_washed_locations = array();
+
+ foreach($my_locations as $location)
+ {
+ if($location['location_code'] !=
$current_location_code)
+ {
+ $my_washed_locations[] = $location;
+ }
+ }
+
+ return $my_washed_locations;
}
- function get_month_start_ts($year, $month){
- if($month > 12){
+ function get_month_start_ts($year, $month)
+ {
+ if($month > 12)
+ {
$year = $year + 1;
$month = $month % 12;
}
@@ -654,22 +714,25 @@
return strtotime("$month/01/$year");
}
- function get_start_date_year_ts($year){
+ function get_start_date_year_ts($year)
+ {
$start_date_year_ts = strtotime("01/01/$year");
return $start_date_year_ts;
}
- function get_end_date_year_ts($year){
+ function get_end_date_year_ts($year)
+ {
$to_year = $year + 1;
$end_date_year_ts = strtotime("01/01/$to_year");
return $end_date_year_ts;
}
- function validate_year($validate_year){
-
- if( empty( $validate_year ) ){
+ function validate_year($validate_year)
+ {
+ if( empty( $validate_year ) )
+ {
$validate_year = date("Y");
}
@@ -678,8 +741,8 @@
return $validate_year;
}
- function validate_month($month){
-
+ function validate_month($month)
+ {
if( empty( $month ) ){
$month = date("n");
}
Modified: trunk/controller/inc/class.uicontrol_location.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol_location.inc.php 2012-06-26
06:25:33 UTC (rev 9658)
+++ trunk/controller/inc/class.uicontrol_location.inc.php 2012-06-26
06:48:39 UTC (rev 9659)
@@ -112,7 +112,7 @@
self::set_active_menu('controller::control::location_for_check_list');
}
- function index()
+ function index_old()
{
if(phpgw::get_var('phpgw_return_as') == 'json') {
return $this->query();
@@ -137,19 +137,10 @@
$tabs = array
(
- array
+ array
(
- 'label' =>
lang('View_locations_for_control')
- ),
- array
- (
'label' =>
lang('Add_locations_for_control'),
'link' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'controller.uicontrol_location.register_control_to_location'))
- ),
- array
- (
- 'label' => lang('add components for
control'),
- 'link' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'controller.uicontrol_location.register_control_to_component'))
)
);
@@ -207,7 +198,7 @@
self::render_template_xsl(array('control_location/control_location_tabs',
'control_location/view_locations_for_control', 'common' ), $data);
}
- function register_control_to_location()
+ function index()
{
$control_id = phpgw::get_var('control_id');
if(phpgw::get_var('save_location'))
@@ -219,15 +210,6 @@
$ok =
$this->so_control->register_control_to_location($control_id, $values);
-/* if($ok)
- {
- return json_encode( array( "status" =>
"saved" ) );
- }
- else
- {
- return json_encode( array( "status" =>
"not_saved" ) );
- }
-*/
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' =>
'controller.uicontrol_location.register_control_to_location', 'control_id' =>
$control_id));
}
@@ -285,26 +267,10 @@
);
}
-/*
- $control_info =
execMethod('controller.socontrol.get_single', $control_id);
- if($control_info)
- {
- $control_array = array
- (
- 'id' => $control_id,
- 'title' =>
$control_info->get_title()
- );
- }
-*/
$tabs = array
(
array
(
- 'label' =>
lang('View_locations_for_control'),
- 'link' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'controller.uicontrol_location.index'))
- ),
- array
- (
'label' =>
lang('Add_locations_for_control')
)
);
@@ -389,8 +355,6 @@
}
}
-
-
// Returns locations for a control
public function get_locations_for_control()
{
Modified: trunk/controller/inc/model/class.component.inc.php
===================================================================
--- trunk/controller/inc/model/class.component.inc.php 2012-06-26 06:25:33 UTC
(rev 9658)
+++ trunk/controller/inc/model/class.component.inc.php 2012-06-26 06:48:39 UTC
(rev 9659)
@@ -82,7 +82,6 @@
public function get_guid() { return $this->guid; }
-
public function set_xml($xml)
{
$this->xml = $xml;
@@ -90,6 +89,13 @@
public function get_xml() { return $this->xml; }
+ public function set_xml_short_desc($xml_short_desc)
+ {
+ $this->xml_short_desc = $xml_short_desc;
+ }
+
+ public function get_xml_short_desc() { return
$this->xml_short_desc; }
+
public function set_location_code($location_code)
{
$this->location_code = $location_code;
Added: trunk/controller/templates/base/calendar/calendar_filters.xsl
===================================================================
--- trunk/controller/templates/base/calendar/calendar_filters.xsl
(rev 0)
+++ trunk/controller/templates/base/calendar/calendar_filters.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -0,0 +1,67 @@
+<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
+<xsl:template name="calendar_filters" xmlns:php="http://php.net/xsl">
+
+<xsl:param name="view_period" />
+
+<form id="cal-filters" class="select-box" method="post">
+ <xsl:choose>
+ <xsl:when test="$view_period = 'month'">
+ <xsl:attribute
name="action">index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute
name="action">index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <input type="hidden" name="year">
+ <xsl:attribute name="value">
+ <xsl:value-of select="current_year"/>
+ </xsl:attribute>
+ </input>
+ <xsl:if test="$view_period = 'month'">
+ <input type="hidden" name="month">
+ <xsl:attribute name="value">
+ <xsl:value-of select="current_month_nr"/>
+ </xsl:attribute>
+ </input>
+ </xsl:if>
+ <input type="hidden" name="location_code">
+ <xsl:attribute name="value">
+ <xsl:value-of select="current_location/location_code"/>
+ </xsl:attribute>
+ </input>
+ <input type="hidden" name="repeat_type">
+ <xsl:attribute name="value">
+ <xsl:value-of select="current_repeat_type"/>
+ </xsl:attribute>
+ </input>
+ <input type="hidden" name="role">
+ <xsl:attribute name="value">
+ <xsl:value-of select="current_role"/>
+ </xsl:attribute>
+ </input>
+
+ <div class="filter first">
+ <label>Filtrer på rolle</label>
+ <select id="filter-role">
+ <xsl:for-each select="roles_array">
+ <xsl:variable name="role_id"><xsl:value-of
select="id"/></xsl:variable>
+ <option value="{$role_id}">
+ <xsl:value-of
disable-output-escaping="yes" select="name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+ </div>
+ <div class="filter">
+ <label>Filtrer på frekvenstype</label>
+ <select class="required" id="filter-repeat_type"
name="repeat_type">
+ <option value="" selected="selected" >Velg
frekvenstype</option>
+ <xsl:for-each select="repeat_type_array">
+ <option value="{id}">
+ <xsl:value-of
disable-output-escaping="yes" select="value"/>
+ </option>
+ </xsl:for-each>
+ </select>
+ </div>
+</form>
+</xsl:template>
Property changes on:
trunk/controller/templates/base/calendar/calendar_filters.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/controller/templates/base/calendar/nav_calendar_month.xsl
===================================================================
--- trunk/controller/templates/base/calendar/nav_calendar_month.xsl
(rev 0)
+++ trunk/controller/templates/base/calendar/nav_calendar_month.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -0,0 +1,78 @@
+<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
+<xsl:template name="nav_calendar_month" xmlns:php="http://php.net/xsl">
+
+<div id="calNav">
+ <xsl:choose>
+ <xsl:when test="current_month_nr > 1">
+ <a class="showPrev month">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
+ <xsl:text>&year=</xsl:text>
+ <xsl:value-of select="current_year"/>
+ <xsl:text>&month=</xsl:text>
+ <xsl:value-of select="current_month_nr
- 1"/>
+ <xsl:text>&location_code=</xsl:text>
+ <xsl:value-of
select="//current_location/location_code"/>
+ </xsl:attribute>
+ <img height="17"
src="controller/images/left_arrow_simple_light_blue.png" />
+ <xsl:variable name="month_str">month
<xsl:value-of select="current_month_nr - 1"/> capitalized</xsl:variable>
+ <xsl:value-of select="php:function('lang',
$month_str)" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a class="showPrev month">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
+ <xsl:text>&year=</xsl:text>
+ <xsl:value-of select="current_year -
1"/>
+ <xsl:text>&month=12</xsl:text>
+ <xsl:text>&location_code=</xsl:text>
+ <xsl:value-of
select="//current_location/location_code"/>
+ </xsl:attribute>
+ <img height="17"
src="controller/images/left_arrow_simple_light_blue.png" />
+ <xsl:variable name="month_str">month 12
capitalized</xsl:variable>
+ <xsl:value-of select="php:function('lang',
$month_str)" />
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <span class="current">
+ <xsl:variable name="month_str">month <xsl:value-of
select="current_month_nr"/> capitalized</xsl:variable>
+ <xsl:value-of select="php:function('lang', $month_str)" />
+ </span>
+ <xsl:choose>
+ <xsl:when test="12 > current_month_nr">
+ <a class="showNext">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
+ <xsl:text>&year=</xsl:text>
+ <xsl:value-of select="current_year"/>
+ <xsl:text>&month=</xsl:text>
+ <xsl:value-of select="current_month_nr
+ 1"/>
+ <xsl:text>&location_code=</xsl:text>
+ <xsl:value-of
select="//current_location/location_code"/>
+ </xsl:attribute>
+ <xsl:variable name="month_str">month
<xsl:value-of select="current_month_nr + 1"/> capitalized</xsl:variable>
+ <xsl:value-of select="php:function('lang',
$month_str)" />
+ <img height="17"
src="controller/images/right_arrow_simple_light_blue.png" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a class="showNext">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
+ <xsl:text>&year=</xsl:text>
+ <xsl:value-of select="current_year +
1"/>
+ <xsl:text>&month=1</xsl:text>
+ <xsl:text>&location_code=</xsl:text>
+ <xsl:value-of
select="//current_location/location_code"/>
+ </xsl:attribute>
+ <xsl:variable name="month_str">month 1
capitalized</xsl:variable>
+ <xsl:value-of select="php:function('lang',
$month_str)" />
+ <img height="17"
src="controller/images/right_arrow_simple_light_blue.png" />
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</div>
+
+</xsl:template>
Property changes on:
trunk/controller/templates/base/calendar/nav_calendar_month.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/controller/templates/base/calendar/nav_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/calendar/nav_calendar_year.xsl
(rev 0)
+++ trunk/controller/templates/base/calendar/nav_calendar_year.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -0,0 +1,32 @@
+<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
+<xsl:template name="nav_calendar_year" xmlns:php="http://php.net/xsl">
+
+<div id="calNav">
+ <a class="showPrev">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
+ <xsl:text>&year=</xsl:text>
+ <xsl:value-of select="current_year - 1"/>
+ <xsl:text>&location_code=</xsl:text>
+ <xsl:value-of select="current_location/location_code"/>
+ </xsl:attribute>
+ <img height="17"
src="controller/images/left_arrow_simple_light_blue.png" />
+ <xsl:value-of select="current_year - 1"/>
+ </a>
+ <span class="current">
+ <xsl:value-of select="current_year"/>
+ </span>
+ <a class="showNext">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
+ <xsl:text>&year=</xsl:text>
+ <xsl:value-of select="current_year + 1"/>
+ <xsl:text>&location_code=</xsl:text>
+ <xsl:value-of select="current_location/location_code"/>
+ </xsl:attribute>
+ <xsl:value-of select="current_year + 1"/>
+ <img height="17"
src="controller/images/right_arrow_simple_light_blue.png" />
+ </a>
+</div>
+
+</xsl:template>
Property changes on:
trunk/controller/templates/base/calendar/nav_calendar_year.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/controller/templates/base/calendar/select_buildings_on_property.xsl
===================================================================
--- trunk/controller/templates/base/calendar/select_buildings_on_property.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++ trunk/controller/templates/base/calendar/select_buildings_on_property.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -1,6 +1,5 @@
<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
<xsl:template name="select_buildings_on_property"
xmlns:php="http://php.net/xsl">
-<xsl:variable name="loc_code"><xsl:value-of
select="current_location/location_code"/></xsl:variable>
<form action="#">
<input type="hidden" name="period_type" value="view_year" />
@@ -10,16 +9,16 @@
</xsl:attribute>
</input>
-
<select id="choose_building_on_property" class="selectLocation">
+ <option>Velg bygg</option>
<xsl:for-each select="buildings_on_property">
- <option>
- <xsl:if test="id = $loc_code">
- <xsl:attribute
name="selected">"selected"</xsl:attribute>
- </xsl:if>
- <xsl:attribute
name="value"><xsl:value-of select="id"/></xsl:attribute>
- <xsl:value-of select="name" />
- </option>
+ <option>
+ <xsl:if test="id =
//current_location/location_code">
+ <xsl:attribute
name="selected">selected</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="value"><xsl:value-of
select="id"/></xsl:attribute>
+ <xsl:value-of select="name" />
+ </option>
</xsl:for-each>
</select>
</form>
Modified: trunk/controller/templates/base/calendar/select_my_locations.xsl
===================================================================
--- trunk/controller/templates/base/calendar/select_my_locations.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++ trunk/controller/templates/base/calendar/select_my_locations.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -1,6 +1,5 @@
<!-- $Id: view_calendar_month.xsl 9200 2012-04-21 20:05:34Z vator $ -->
<xsl:template name="select_my_locations" xmlns:php="http://php.net/xsl">
-<xsl:variable name="loc_code"><xsl:value-of
select="../current_location/location_code"/></xsl:variable>
<form action="#">
<input type="hidden" name="period_type" value="view_year" />
@@ -11,9 +10,10 @@
</input>
<select id="choose_my_location" class="selectLocation">
+ <option>Velg bygg</option>
<xsl:for-each select="my_locations">
<option>
- <xsl:if test="location_code = loc_code">
+ <xsl:if test="location_code =
current_location/location_code">
<xsl:attribute
name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:attribute name="value"><xsl:value-of
disable-output-escaping="yes" select="location_code"/></xsl:attribute>
Modified: trunk/controller/templates/base/calendar/view_calendar_month.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_month.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++ trunk/controller/templates/base/calendar/view_calendar_month.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -98,10 +98,43 @@
<input type="text" value=""
id="search-location-name" />
</div>
- <!-- ===================== SELECT LIST FOR MY
LOCATIONS ================= -->
+ <!-- ===================== SELECT LIST FOR MY ASSIGNED
LOCATIONS ================= -->
<div id="choose-my-location" class="select-box">
<label>Velg et annet bygg du har ansvar
for</label>
- <xsl:call-template name="select_my_locations" />
+
+ <form action="#">
+ <input type="hidden" name="period_type"
value="view_month" />
+ <input type="hidden" name="year">
+ <xsl:attribute name="value">
+ <xsl:value-of select="current_year"/>
+ </xsl:attribute>
+ </input>
+ <input type="hidden" name="month">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="current_month_nr"/>
+ </xsl:attribute>
+ </input>
+
+ <select id="choose_my_location"
class="selectLocation">
+ <option>Velg bygg</option>
+ <xsl:for-each
select="my_locations">
+ <xsl:choose>
+
<xsl:when test="location_code = //current_location/location_code">
+
<option selected="SELECTED">
+
<xsl:attribute name="value"><xsl:value-of disable-output-escaping="yes"
select="location_code"/></xsl:attribute>
+
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+
</option>
+
</xsl:when>
+
<xsl:otherwise>
+
<option>
+
<xsl:attribute name="value"><xsl:value-of disable-output-escaping="yes"
select="location_code"/></xsl:attribute>
+
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+
</option>
+
</xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </select>
+ </form>
</div>
</div>
<div class="middle">
@@ -117,57 +150,7 @@
</xsl:attribute>
<img height="20"
src="controller/images/left_arrow_simple_light_blue.png" />Årsoversikt
</a>
-
- <!-- ===================== COLOR ICON MAP =================
-->
- <xsl:call-template name="icon_color_map" />
- <!-- ===================== FILTERS ================= -->
- <form id="filters" class="select-box"
action="index.php?menuaction=controller.uicalendar.view_calendar_for_year"
method="post">
- <input type="hidden" name="year">
- <xsl:attribute name="value">
- <xsl:value-of select="current_year"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="location_code">
- <xsl:attribute name="value">
- <xsl:value-of
select="current_location/location_code"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="repeat_type">
- <xsl:attribute name="value">
- <xsl:value-of
select="current_repeat_type"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="role">
- <xsl:attribute name="value">
- <xsl:value-of
select="current_role"/>
- </xsl:attribute>
- </input>
-
- <div class="filter first">
- <label>Filtrer på rolle</label>
- <select id="filter-role">
- <xsl:for-each
select="roles_array">
- <xsl:variable
name="role_id"><xsl:value-of select="id"/></xsl:variable>
- <option
value="{$role_id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:for-each>
- </select>
- </div>
- <div class="filter">
- <label>Filtrer på frekvenstype</label>
- <select class="required"
id="filter-repeat_type" name="repeat_type">
- <option value=""
selected="selected" >Velg frekvenstype</option>
- <xsl:for-each
select="repeat_type_array">
- <option value="{id}">
- <xsl:value-of
disable-output-escaping="yes" select="value"/>
- </option>
- </xsl:for-each>
- </select>
- </div>
- </form>
-
<!-- ===================== CHOOSE ANOTHER BUILDING ON PROPERTY
================= -->
<div id="choose-building" class="select-box">
<xsl:if test="location_level > 1">
@@ -187,80 +170,16 @@
<xsl:call-template
name="select_buildings_on_property" />
</div>
- <!-- ===================== CALENDAR NAVIGATION
================= -->
- <div id="calNav">
- <xsl:choose>
- <xsl:when test="current_month_nr > 1">
- <a class="showPrev month">
- <xsl:attribute
name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
-
<xsl:text>&year=</xsl:text>
- <xsl:value-of
select="current_year"/>
-
<xsl:text>&month=</xsl:text>
- <xsl:value-of
select="current_month_nr - 1"/>
-
<xsl:text>&location_code=</xsl:text>
- <xsl:value-of
select="//current_location/location_code"/>
- </xsl:attribute>
- <img height="17"
src="controller/images/left_arrow_simple_light_blue.png" />
- <xsl:variable
name="month_str">month <xsl:value-of select="current_month_nr - 1"/>
capitalized</xsl:variable>
- <xsl:value-of
select="php:function('lang', $month_str)" />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a class="showPrev month">
- <xsl:attribute
name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
-
<xsl:text>&year=</xsl:text>
- <xsl:value-of
select="current_year - 1"/>
-
<xsl:text>&month=12</xsl:text>
-
<xsl:text>&location_code=</xsl:text>
- <xsl:value-of
select="//current_location/location_code"/>
- </xsl:attribute>
- <img height="17"
src="controller/images/left_arrow_simple_light_blue.png" />
- <xsl:variable
name="month_str">month 12 capitalized</xsl:variable>
- <xsl:value-of
select="php:function('lang', $month_str)" />
- </a>
- </xsl:otherwise>
- </xsl:choose>
+ <!-- ===================== COLOR ICON MAP
================= -->
+ <xsl:call-template name="icon_color_map" />
+
+ <!-- ===================== FILTERS =================
-->
+ <xsl:call-template name="calendar_filters" >
+ <xsl:with-param
name="view_period">month</xsl:with-param>
+ </xsl:call-template>
- <span class="current">
- <xsl:variable name="month_str">month
<xsl:value-of select="current_month_nr"/> capitalized</xsl:variable>
- <xsl:value-of
select="php:function('lang', $month_str)" />
- </span>
- <xsl:choose>
- <xsl:when test="12 > current_month_nr">
- <a class="showNext">
- <xsl:attribute
name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
-
<xsl:text>&year=</xsl:text>
- <xsl:value-of
select="current_year"/>
-
<xsl:text>&month=</xsl:text>
- <xsl:value-of
select="current_month_nr + 1"/>
-
<xsl:text>&location_code=</xsl:text>
- <xsl:value-of
select="//current_location/location_code"/>
- </xsl:attribute>
- <xsl:variable
name="month_str">month <xsl:value-of select="current_month_nr + 1"/>
capitalized</xsl:variable>
- <xsl:value-of
select="php:function('lang', $month_str)" />
- <img height="17"
src="controller/images/right_arrow_simple_light_blue.png" />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a class="showNext">
- <xsl:attribute
name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
-
<xsl:text>&year=</xsl:text>
- <xsl:value-of
select="current_year + 1"/>
-
<xsl:text>&month=1</xsl:text>
-
<xsl:text>&location_code=</xsl:text>
- <xsl:value-of
select="//current_location/location_code"/>
- </xsl:attribute>
- <xsl:variable
name="month_str">month 1 capitalized</xsl:variable>
- <xsl:value-of
select="php:function('lang', $month_str)" />
- <img height="17"
src="controller/images/right_arrow_simple_light_blue.png" />
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </div>
+ <!-- ===================== CALENDAR NAVIGATION
================= -->
+ <xsl:call-template name="nav_calendar_month" />
</div>
<div id="cal_wrp">
Modified: trunk/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_year.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++ trunk/controller/templates/base/calendar/view_calendar_year.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -125,84 +125,16 @@
<xsl:call-template name="icon_color_map" />
<!-- ===================== FILTERS =================
-->
- <form id="filters" class="select-box"
action="index.php?menuaction=controller.uicalendar.view_calendar_for_year"
method="post">
- <input type="hidden" name="year">
- <xsl:attribute name="value">
- <xsl:value-of select="current_year"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="location_code">
- <xsl:attribute name="value">
- <xsl:value-of
select="current_location/location_code"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="repeat_type">
- <xsl:attribute name="value">
- <xsl:value-of
select="current_repeat_type"/>
- </xsl:attribute>
- </input>
- <input type="hidden" name="role">
- <xsl:attribute name="value">
- <xsl:value-of
select="current_role"/>
- </xsl:attribute>
- </input>
-
- <div class="filter first">
- <label>Filtrer på rolle</label>
- <select id="filter-role">
- <xsl:for-each
select="roles_array">
- <xsl:variable
name="role_id"><xsl:value-of select="id"/></xsl:variable>
- <option
value="{$role_id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:for-each>
- </select>
- </div>
- <div class="filter">
- <label>Filtrer på frekvenstype</label>
- <select class="required"
id="filter-repeat_type" name="repeat_type">
- <option value=""
selected="selected" >Velg frekvenstype</option>
- <xsl:for-each
select="repeat_type_array">
- <option value="{id}">
- <xsl:value-of
disable-output-escaping="yes" select="value"/>
- </option>
- </xsl:for-each>
- </select>
- </div>
- </form>
+ <xsl:call-template name="calendar_filters" >
+ <xsl:with-param
name="view_period">year</xsl:with-param>
+ </xsl:call-template>
<!-- ===================== CALENDAR NAVIGATION
================= -->
- <div id="calNav">
- <a class="showPrev">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
- <xsl:text>&year=</xsl:text>
- <xsl:value-of
select="current_year - 1"/>
-
<xsl:text>&location_code=</xsl:text>
- <xsl:value-of
select="current_location/location_code"/>
- </xsl:attribute>
- <img height="17"
src="controller/images/left_arrow_simple_light_blue.png" />
- <xsl:value-of select="current_year -
1"/>
- </a>
- <span class="current">
- <xsl:value-of
select="current_year"/>
- </span>
- <a class="showNext">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_year</xsl:text>
- <xsl:text>&year=</xsl:text>
- <xsl:value-of
select="current_year + 1"/>
-
<xsl:text>&location_code=</xsl:text>
- <xsl:value-of
select="current_location/location_code"/>
- </xsl:attribute>
- <xsl:value-of select="current_year +
1"/>
- <img height="17"
src="controller/images/right_arrow_simple_light_blue.png" />
- </a>
- </div>
-
+ <xsl:call-template name="nav_calendar_year" />
</div>
<div id="cal_wrp">
+ <h2>Bygg/eiendom</h2>
<table id="calendar" class="year">
<tr class="heading">
<th
class="title"><span>Tittel</span></th>
@@ -283,14 +215,23 @@
</xsl:choose>
</table>
- <h2>Komponenter</h2>
+ <h2 class="components">Komponenter</h2>
+
+
+
+ <xsl:for-each select="components_calendar_array">
+
+
+
+ <h3><xsl:value-of
select="component/xml_short_desc"/></h3>
+
<table id="calendar" class="year">
<tr class="heading">
<th
class="title"><span>Tittel</span></th>
<th
class="assigned"><span>Tildelt</span></th>
<th
class="frequency"><span>Frekvens</span></th>
- <xsl:for-each select="heading_array">
+ <xsl:for-each select="//heading_array">
<th>
<a>
<xsl:attribute
name="href">
@@ -298,7 +239,7 @@
<xsl:text>&year=</xsl:text>
<xsl:value-of select="//current_year"/>
<xsl:text>&location_code=</xsl:text>
-
<xsl:value-of select="current_location/location_code"/>
+
<xsl:value-of select="//current_location/location_code"/>
<xsl:text>&month=</xsl:text>
<xsl:number/>
</xsl:attribute>
@@ -309,14 +250,6 @@
</th>
</xsl:for-each>
</tr>
-
-
- <xsl:for-each select="components_calendar_array">
- <tr>
- <td>
- <h3><xsl:value-of select="component/xml"/></h3>
- </td>
- </tr>
<xsl:for-each select="controls_calendar">
<xsl:variable
name="control_id"><xsl:value-of select="control/id"/></xsl:variable>
@@ -362,12 +295,9 @@
</xsl:call-template>
</xsl:for-each>
</tr>
- </xsl:for-each>
-
+ </xsl:for-each>
+ </table>
</xsl:for-each>
-
-
- </table>
</div>
</div>
</div>
Modified: trunk/controller/templates/base/control_item/control_item.xsl
===================================================================
--- trunk/controller/templates/base/control_item/control_item.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++ trunk/controller/templates/base/control_item/control_item.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -41,7 +41,7 @@
</xsl:choose>
</dt>
<dt>
- <label for="required">Skal det være
obligatorisk å sjekke kontrollpunktet</label>
+ <label for="required" class="line">Skal
det være obligatorisk å sjekke kontrollpunktet</label>
<xsl:variable
name="required_item"><xsl:value-of select="control_item/required"
/></xsl:variable>
<xsl:choose>
<xsl:when test="editable">
@@ -188,33 +188,28 @@
</dt>
<dt>
<label for="what_to_do">Hva skal
utføres</label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea name="what_to_do"
id="what_to_do" rows="5" cols="60">
+ <xsl:choose>
+ <xsl:when test="editable">
+ <textarea
name="what_to_do" id="what_to_do" rows="5" cols="60">
+ <xsl:value-of
select="control_item/what_to_do" disable-output-escaping="yes" />
+ </textarea>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:value-of
select="control_item/what_to_do" disable-output-escaping="yes" />
- </textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control_item/what_to_do" disable-output-escaping="yes" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dt>
<dt>
<label
for="how_to_do">Utførelsesbeskrivelse</label>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <textarea
name="how_to_do" id="how_to_do" rows="5" cols="60"><xsl:value-of
select="control_item/how_to_do" disable-output-escaping="yes" /></textarea>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="control_item/how_to_do" disable-output-escaping="yes" />
+ </xsl:otherwise>
+ </xsl:choose>
</dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea name="how_to_do"
id="how_to_do" rows="5" cols="60"><xsl:value-of select="control_item/how_to_do"
disable-output-escaping="yes" /></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="control_item/how_to_do" disable-output-escaping="yes" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
-
</dl>
<div class="form-buttons">
Modified:
trunk/controller/templates/base/control_location/control_location_tabs.xsl
===================================================================
--- trunk/controller/templates/base/control_location/control_location_tabs.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++ trunk/controller/templates/base/control_location/control_location_tabs.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -3,44 +3,6 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<div class="yui-navset yui-navset-top" id="control_location_tabview">
-
-<div id="choose_control" class="select-box">
-
- <!-- When control area is chosen, an ajax
request is executed.
- The operation fetches controls from db
and populates the control list.
- The ajax operation is handled in
ajax.js
- -->
- <label>Velg kontrollen du vil vise bygg
for</label>
- <select id="control_area_list"
name="control_area_list">
- <option value="">Velg
kontrollområde</option>
- <xsl:for-each
select="control_areas_array">
- <option value="{id}">
- <xsl:value-of
disable-output-escaping="yes" select="name"/>
- </option>
- </xsl:for-each>
- </select>
-
- <form id="loc_form" action="" method="GET">
- <select id="control_id"
name="control_id">
- <xsl:choose>
- <xsl:when
test="control_array/child::node()">
- <xsl:for-each
select="control_array">
-
<xsl:variable name="control_id"><xsl:value-of select="id"/></xsl:variable>
- <option
value="{$control_id}">
-
<xsl:value-of select="title"/>
-
</option>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <option>
- Ingen
kontroller
- </option>
- </xsl:otherwise>
- </xsl:choose>
- </select>
- </form>
- </div>
-
<xsl:choose>
<xsl:when test="view = 'view_locations_for_control'">
<div class="identifier-header">
Modified:
trunk/controller/templates/base/control_location/register_control_to_component.xsl
===================================================================
---
trunk/controller/templates/base/control_location/register_control_to_component.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++
trunk/controller/templates/base/control_location/register_control_to_component.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -21,19 +21,7 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:call-template name="yui_phpgw_i18n"/>
- <style type="text/css">
- select { width: 100px; }
- </style>
- <div id="choose_control" class="select-box">
- <label>Velg kontrollen du vil vise komponent for</label>
- <select id="control_area_id" name="control_area_id">
- <xsl:apply-templates
select="control_area_list/options"/>
- </select>
- <select id="control_id" name="control_id">
- <xsl:apply-templates select="control/options"/>
- </select>
- </div>
-
+
<div class="yui-navset yui-navset-top" id="control_location_tabview">
<div class="identifier-header">
<h1><xsl:value-of select="php:function('lang', 'components for
control')"/></h1>
@@ -62,7 +50,21 @@
</xsl:when>
</xsl:choose>
<div class="body">
- <div id="voucher_details">
+
+ <style type="text/css">
+ select { width: 100px; }
+ </style>
+ <div id="choose_control">
+ <label>Velg kontrollen du vil
vise komponent for</label>
+ <select id="control_area_id"
name="control_area_id">
+ <xsl:apply-templates
select="control_area_list/options"/>
+ </select>
+ <select id="control_id"
name="control_id">
+ <xsl:apply-templates
select="control/options"/>
+ </select>
+ </div>
+
+ <div id="choose-location">
<table align = "center"
width="95%">
<xsl:apply-templates
select="filter_form" />
</table>
Modified:
trunk/controller/templates/base/control_location/register_control_to_location.xsl
===================================================================
---
trunk/controller/templates/base/control_location/register_control_to_location.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++
trunk/controller/templates/base/control_location/register_control_to_location.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -21,9 +21,9 @@
<xsl:call-template name="common"/>
<div class="yui-content">
- <div id="control_details">
+ <div>
<xsl:call-template name="yui_phpgw_i18n"/>
- <xsl:apply-templates select="control_filters" />
+ <xsl:call-template name="control_filters" />
<xsl:apply-templates select="filter_form" />
<xsl:apply-templates select="paging"/>
<xsl:apply-templates select="datatable"/>
@@ -32,7 +32,46 @@
</div>
</xsl:template>
-<xsl:template match="control_filters" name="control_filters"
xmlns:php="http://php.net/xsl"></xsl:template>
+<xsl:template name="control_filters" xmlns:php="http://php.net/xsl">
+
+ <div id="choose_control">
+ <!--
+ When control area is chosen, an ajax request is
executed.
+ The operation fetches controls from db and populates
the control list.
+ The ajax opearation is handled in ajax.js
+ -->
+ <div class="error_msg">Du må velge kontroll før du kan legge
til bygg</div>
+ <label>Velg kontroll</label>
+ <select id="control_area_list" name="control_area_list">
+ <option value="">Velg kontrollområde</option>
+ <xsl:for-each select="control_areas_array2">
+ <option value="{id}">
+ <xsl:value-of
disable-output-escaping="yes" select="name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+
+ <form id="loc_form" action="" method="GET">
+ <select id="control_id" name="control_id">
+ <xsl:choose>
+ <xsl:when
test="control_array/child::node()">
+ <xsl:for-each
select="control_array">
+ <xsl:variable
name="control_id"><xsl:value-of select="id"/></xsl:variable>
+ <option
value="{$control_id}">
+ <xsl:value-of
select="title"/>
+ </option>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <option>
+ Ingen kontroller
+ </option>
+ </xsl:otherwise>
+ </xsl:choose>
+ </select>
+ </form>
+ </div>
+</xsl:template>
<xsl:template match="filter_form" xmlns:php="http://php.net/xsl">
@@ -52,6 +91,8 @@
</xsl:template>
<xsl:template name="filter_list" xmlns:php="http://php.net/xsl">
+ <div id="choose-location">
+ <label>Velg bygg/eiendom</label>
<ul id="filters">
<li>
<input type="hidden" id="hidden_control_id"
name="control_id">
@@ -112,6 +153,7 @@
<input type="submit" name="search"
value="{$lang_search}" title = "{$lang_search}" />
</li>
</ul>
+ </div>
</xsl:template>
<xsl:template match="datatable" xmlns:php="http://php.net/xsl">
Modified:
trunk/controller/templates/base/control_location/view_locations_for_control.xsl
===================================================================
---
trunk/controller/templates/base/control_location/view_locations_for_control.xsl
2012-06-26 06:25:33 UTC (rev 9658)
+++
trunk/controller/templates/base/control_location/view_locations_for_control.xsl
2012-06-26 06:48:39 UTC (rev 9659)
@@ -22,8 +22,44 @@
<xsl:call-template name="common"/>
<div class="yui-content">
- <div id="control_location">
-
+ <div id="control_details">
+ <div id="choose_control">
+
+ <!-- When control area is chosen, an ajax
request is executed.
+ The operation fetches controls from db
and populates the control list.
+ The ajax operation is handled in
ajax.js
+ -->
+ <select id="control_area_list"
name="control_area_list">
+ <option value="">Velg
kontrollområde</option>
+ <xsl:for-each
select="control_areas_array">
+ <option value="{id}">
+ <xsl:value-of
disable-output-escaping="yes" select="name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+
+ <form id="loc_form" action="" method="GET">
+ <select id="control_id"
name="control_id">
+ <xsl:choose>
+ <xsl:when
test="control_array/child::node()">
+ <xsl:for-each
select="control_array">
+
<xsl:variable name="control_id"><xsl:value-of select="id"/></xsl:variable>
+ <option
value="{$control_id}">
+
<xsl:value-of select="title"/>
+
</option>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <option>
+ Ingen
kontroller
+ </option>
+ </xsl:otherwise>
+ </xsl:choose>
+ </select>
+ </form>
+ </div>
+ </div>
+
<div id="addedProperties">
<ul id="locations_for_control"
name="locations_for_control">
<xsl:for-each
select="locations_for_control">
@@ -43,7 +79,6 @@
<xsl:call-template name="yui_phpgw_i18n"/>
</div>
- </div>
</xsl:template>
<xsl:template match="locations_table" xmlns:php="http://php.net/xsl">
Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css 2012-06-26 06:25:33 UTC
(rev 9658)
+++ trunk/controller/templates/base/css/base.css 2012-06-26 06:48:39 UTC
(rev 9659)
@@ -491,10 +491,16 @@
width: 100%;
}
-#control_item_details label{
- margin-right: 10px;
+#control_item_details label {
+ display: block;
+ margin-bottom: 2px;
+ margin-right: 10px;
}
+#control_item_details label.line{
+ display: inline-block;
+}
+
#control_item_details label.top {
display: block;
margin-bottom: 7px;
@@ -1008,15 +1014,15 @@
/* ======================================= CHECK ITEM
========================================= */
.check_item div{
- margin: 5px 0;
- clear:left;
+ margin: 5px 0;
+ clear:left;
}
.check_item textarea {
- display: block;
- height: 100px;
- margin-top: 6px;
- width: 63%;
+ display: block;
+ height: 100px;
+ margin-top: 6px;
+ width: 63%;
}
.check_item label{
@@ -1024,9 +1030,8 @@
}
.new_item a#innertoolbar-button {
- background: none repeat scroll 0 0 grey;
- border: 1px solid #666666;
- font-weight: bold;
+ background: none repeat scroll 0 0 #F57056;
+ border: 1px solid #CB563F;
}
#frm_save_check_items input[type="submit"]{
@@ -1056,12 +1061,9 @@
float: left;
font-size: 19px;
margin: 0;
+ padding: 0;
}
-#control_plan .top h3 .year{
- margin-left:5px;
-}
-
#control_plan .middle {
background: none repeat scroll 0 0 #EDF5FF;
border-color: #DBE5EF;
@@ -1073,6 +1075,28 @@
padding: 1em 1em 0;
}
+#control_plan h2 {
+ background: none repeat scroll 0 0 #FFFFFF;
+ color: #000000;
+ display: inline-block;
+ font-size: 23px;
+ padding: 0.2em 0.5em;
+}
+
+#control_plan h2.components {
+ margin-top: 40px;
+}
+
+#control_plan h3 {
+ padding-left: 1em;
+}
+
+#cal-filters {
+ clear: left;
+ float: left;
+ margin-top: 1em;
+}
+
/* ============================= SEARCH LOCATION BOX =======================
*/
#search-location {
float: right;
@@ -1096,19 +1120,18 @@
#filters {
clear: left;
float: left;
- margin-top: 1em;
}
-#filters.select-box {
+#cal-filters.select-box {
background: none repeat scroll 0 0 #DEEAF8;
border: 1px solid #BDD3ED;
}
-#filters .filter {
+#cal-filters .filter {
float: left;
}
-#filters .filter.first {
+#cal-filters .filter.first {
margin-right: 1em;
}
@@ -1156,11 +1179,11 @@
/* ================== COLOR MAP ============================= */
ul#icon_color_map {
- background: none repeat scroll 0 0 #FEFBF4;
- border: 1px solid #DDDDDD;
- border-radius: 5px 5px 5px 5px;
- float: right;
- padding: 1em;
+ background: none repeat scroll 0 0 #FEFBF4;
+ border: 1px solid #DDDDDD;
+ border-radius: 5px 5px 5px 5px;
+ float: right;
+ padding: 1em;
}
ul#icon_color_map li {
@@ -1173,35 +1196,42 @@
}
#calendar {
- table-layout: fixed;
- width: 100%;
+ table-layout: fixed;
+ width: 100%;
}
#calendar th {
- font-weight: bold;
- font-size:15px;
- background:none;
+ font-weight: bold;
+ font-size:15px;
+ background:none;
}
#calendar th, #calendar td {
- padding: 10px;
- text-align: center;
+ padding: 10px;
+ text-align: center;
}
#calendar.month th, #calendar.month td {
- padding: 5px 3px;
+ padding: 5px 3px;
}
#calendar .even {
- background: none repeat scroll 0 0 #DEEAF8;
+ background: none repeat scroll 0 0 #DEEAF8;
}
+#calendar h3 {
+ padding-left: 1em;
+ text-align: left;
+}
+
#cal_wrp {
- border: 1px solid #DBE5EF;
background: none repeat scroll 0 0 #EDF5FF;
border-top: none;
+ border-style: solid;
+ border-width: 0 1px 1px 1px;
+ border-color: #DBE5EF;
clear: both;
- padding: 1em;
+ padding: 0 1em 1em;
}
.control_details_wrp div {
@@ -1366,32 +1396,46 @@
margin-left: 14px;
margin-top: 5px;
}
+
#data_paginator, #loc_paginator{
margin:8px;
clear:left;
}
+
ul#filters li, ul#search_list li{
float:left;
}
+
ul#filters input[type="text"], ul#filters select {
margin-right: 5px;
padding: 3px;
}
+
#choose_control select {
+ float: left;
margin-right: 5px;
}
+
+#choose_control form {
+ float: left;
+}
+
ul#search_list input[type="submit"] {
margin: 0;
padding: 2px 15px;
}
+
ul#search_list input[type="text"] {
margin: 0 5px 0 0;
padding: 3px;
}
-#queryForm{
- overflow:hidden;
- margin: 20px;
+
+#queryForm {
+ clear: both;
+ margin: 20px;
+ overflow: hidden;
}
+
fieldset.add_check_list div{
padding:2px;
}
@@ -1777,14 +1821,29 @@
/* ===================== CONTROL LOCATION ===================== */
#choose_control {
- float: right;
- width: 500px;
+ float: left;
+ margin: 20px;
+ width: 500px;
}
+#choose_control label {
+ display: block;
+ font-size: 17px;
+ margin: 5px 0;
+}
#choose_control select {
- width: 245px;
+ width: 245px;
}
+#choose-location {
+ clear:both;
+}
+#choose-location label{
+ display: block;
+ font-size: 17px;
+ margin: 5px 0;
+}
+
.error_msg {
color: red;
display: none;
@@ -1804,16 +1863,26 @@
margin:20px;
}
+#select_all {
+ float: right;
+ margin-right: 805px;
+}
+
+#save_location {
+ margin-left:20px;
+ margin-bottom:20px;
+}
+
/* ========================== CONTROL DETAILS ============================
*/
#control_details label {
- display: inline-block;
- font-weight: bold;
- width: 100px;
+ display: inline-block;
+ font-weight: bold;
+ width: 100px;
}
#control_details .date {
- margin-right:0;
+ margin-right:0;
}
#control_details #select_all{
@@ -1830,11 +1899,11 @@
}
.help_text {
- background: none repeat scroll 0 0 #CCDBED;
- display: none;
- margin-left: 5px;
- padding: 6px 10px;
- vertical-align: baseline;
+ background: none repeat scroll 0 0 #CCDBED;
+ display: none;
+ margin-left: 5px;
+ padding: 6px 10px;
+ vertical-align: baseline;
}
.help_text.ext {
margin-left: 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9659],
Torstein <=