fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9359] Merge 9349:9358 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [9359] Merge 9349:9358 from trunk
Date: Thu, 10 May 2012 11:50:22 +0000

Revision: 9359
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9359
Author:   sigurdne
Date:     2012-05-10 11:50:22 +0000 (Thu, 10 May 2012)
Log Message:
-----------
Merge 9349:9358 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
    branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang
    
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new.php
    
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new_org.php
    branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
    
branches/Version-1_0-branch/controller/inc/component/class.month_calendar.inc.php
    
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
    
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
    branches/Version-1_0-branch/controller/templates/base/css/base.css
    branches/Version-1_0-branch/frontend/templates/base/config.tpl
    branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
    branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-1_0-branch/property/inc/export/default/Basware_X114
    branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
    branches/Version-1_0-branch/rental/templates/base/config.tpl

Removed Paths:
-------------
    
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2012-05-10 11:50:22 UTC (rev 9359)
@@ -445,12 +445,18 @@
                if($activity->get_group_id() && $activity->get_group_id() > 0)
                {
                        
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_group_id(),
 true));
-                       
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
 $subject, $body);
+                       if($activity->get_contact_person_2() && 
$activity->get_contact_person_2()->get_email())
+                               
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
 $subject, $body);
+                       else if($activity->get_contact_person_1() && 
$activity->get_contact_person_1()->get_email())
+                               
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_1(),
 $subject, $body);
                }
                else if($activity->get_organization_id() && 
$activity->get_organization_id() > 0)
                {
                        
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_organization_id()));
-                       
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
 $subject, $body);
+                       if($activity->get_contact_person_2() && 
$activity->get_contact_person_2()->get_email())
+                               
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
 $subject, $body);
+                       else if($activity->get_contact_person_1() && 
$activity->get_contact_person_1()->get_email())
+                               
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_1(),
 $subject, $body);
                }
            }
        
@@ -487,13 +493,19 @@
        {
                //$contact_person2 = 
activitycalendar_socontactperson::get_instance()->get_group_contact2($activity>get_group_id());
                
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_group_id(),
 true));
-               
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
 $subject, $body);
+               if($activity->get_contact_person_2() && 
$activity->get_contact_person_2()->get_email())
+                       
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
 $subject, $body);
+               else if($activity->get_contact_person_1() && 
$activity->get_contact_person_1()->get_email())
+                       
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_1(),
 $subject, $body);
        }
        else if($activity->get_organization_id() && 
$activity->get_organization_id() > 0)
        {
                //$contact_person2 = 
activitycalendar_socontactperson::get_instance()->get_oup_contact2($activity>get_group_id());
                
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_organization_id()));
-               
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
 $subject, $body);
+               if($activity->get_contact_person_2() && 
$activity->get_contact_person_2()->get_email())
+                               
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
 $subject, $body);
+               else if($activity->get_contact_person_1() && 
$activity->get_contact_person_1()->get_email())
+                       
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_1(),
 $subject, $body);
        }
        
        $GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 
'activitycalendar.uiactivities.index', 'message' => 'E-post sendt'));

Modified: 
branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang    
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang    
2012-05-10 11:50:22 UTC (rev 9359)
@@ -97,4 +97,5 @@
 mail_subject_update    activitycalendarfrontend        no      Melding fra 
AktivBy - Aktivitetsoversikt
 save_organization_next activitycalendarfrontend        no      Lagre 
organisasjon og gå videre til Ny aktivitet
 new_organization       activitycalendarfrontend        no      Ny organisasjon
-organization_saved_form        activitycalendarfrontend        no      
Organisasjonen er opprettet i aktivitetsoversikten.<br/>Du kan nå registrere en 
aktivitet tilknyttet den nye organisasjonen.
\ No newline at end of file
+organization_saved_form        activitycalendarfrontend        no      
Organisasjonen er opprettet i aktivitetsoversikten.<br/>Du kan nå registrere en 
aktivitet tilknyttet den nye organisasjonen.
+required_fields        activitycalendarfrontend        no      Felter merket 
med (*) er påkrevde felt.
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new.php
        2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new.php
        2012-05-10 11:50:22 UTC (rev 9359)
@@ -188,19 +188,22 @@
        <?php }?>
        </div>
                <h1><?php echo lang('new_activity') ?></h1>
+               <div>
+                       <?php echo lang('required_fields')?>
+               </div>
                <form action="#" method="post">
                        <input type="hidden" name="id" value="<?php 
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; }  ?>"/>
                        <dl class="proplist-col" style="width: 200%">
                                <h2><?php echo lang('what')?></h2>
                                <dt>
-                                       <label for="title"><?php echo 
lang('title') ?></label>
+                                       <label for="title"><?php echo 
lang('title') ?> (*)</label>
                                </dt>
                                <dd>
                                        <?php echo lang('title_helptext')?><br/>
                                        <input type="text" name="title" 
id="title" value="<?php echo $activity->get_title() ?>" size="60"/>
                                </dd>
                                <dt>
-                                       <label for="category"><?php echo 
lang('category') ?></label>
+                                       <label for="category"><?php echo 
lang('category') ?> (*)</label>
                                </dt>
                                <dd>
                                        <?php
@@ -217,7 +220,7 @@
                                        </select>
                                </dd>
                                <dt>
-                                       <label for="target"><?php echo 
lang('target') ?></label>
+                                       <label for="target"><?php echo 
lang('target') ?> (*)</label>
                                </dt>
                                <dd>
                                        <?php
@@ -232,7 +235,7 @@
                                        ?>
                                </dd>
                                <dt>
-                                       <label for="district"><?php echo 
lang('district') ?></label>
+                                       <label for="district"><?php echo 
lang('district') ?> (*)</label>
                                </dt>
                                <dd>
                                        <?php
@@ -255,7 +258,7 @@
                                <hr />
                                <h2><?php echo lang('where_when')?></h2>
                                <dt>
-                                       <label for="arena"><?php echo 
lang('arena') ?></label>
+                                       <label for="arena"><?php echo 
lang('arena') ?> (*)</label>
                                        <br/><?php echo lang('arena_helptext')?>
                                </dt>
                                <dt>
@@ -308,13 +311,13 @@
                                        <input type="text" 
name="arena_postaddress"/></dd>
                                </span>
                                <dt>
-                                       <label for="time"><?php echo 
lang('time') ?></label>
+                                       <label for="time"><?php echo 
lang('time') ?> (*)</label>
                                </dt>
                                <dd>
                                        <input type="text" name="time" 
id="time" value="<?php echo $activity->get_time() ?>" />
                                </dd>
                                <dt>
-                                       <label for="office"><?php echo 
lang('office') ?></label>
+                                       <label for="office"><?php echo 
lang('office') ?> (*)</label>
                                </dt>
                                <dd>
                                        <?php
@@ -330,7 +333,7 @@
                                                ?>
                                        </select>
                                </dd>
-                               <dt>Kontaktinformasjon for kulturkontoret</dt>
+                               <dt>Kontaktinformasjon for kulturkontoret 
(*)</dt>
                                <dt><label 
for="contact2_address">Adresse</label>
                                <dd><input type="text" 
name="contact2_address_txt" id="contact2_address_txt" 
onkeyup="javascript:get_address_search_cp2()"/>
                                <div id="contact2_address_container"></div></dd>
@@ -341,7 +344,7 @@
                                <hr />
                                <h2><?php echo lang('who')?></h2>
                                <dt>
-                                       <label for="organization_id"><?php echo 
lang('organization') ?></label>
+                                       <label for="organization_id"><?php echo 
lang('organization') ?> (*)</label>
                                </dt>
                                <?php if($new_organization){?>
                                        <input type="hidden" name="new_org" 
id="new_org" value="yes" />
@@ -392,17 +395,17 @@
                                        </select>
                                </dd>
                                <span id="new_group_fields" style="display: 
none;">
-                                       <dt><label 
for="groupname">Navn</label></dt>
+                                       <dt><label for="groupname">Navn 
(*)</label></dt>
                                        <dd><input type="text" name="groupname" 
size="100"/><br/></dd>
-                                       <dt><label 
for="group_description">Beskrivelse av aktiviteten</label></dt>
+                                       <dt><label 
for="group_description">Beskrivelse av aktiviteten (*)</label></dt>
                                        <dd><textarea rows="10" cols="100" 
name="group_description"></textarea></dd>
                                        <hr/>
                                        <dt>Kontaktperson 1</dt>
-                                       <dt><label 
for="contact1_name">Navn</label></dt>
+                                       <dt><label for="contact1_name">Navn 
(*)</label></dt>
                                        <dd><input type="text" 
name="group_contact1_name" value="<?php echo 
isset($contact1)?$contact1->get_name():''?>"/></dd>
-                                       <dt><label 
for="contact1_phone">Telefon</label></dt>
+                                       <dt><label for="contact1_phone">Telefon 
(*)</label></dt>
                                        <dd><input type="text" 
name="group_contact1_phone" value="<?php echo 
isset($contact1)?$contact1->get_phone():''?>"/></dd>
-                                       <dt><label 
for="contact1_mail">E-post</label></dt>
+                                       <dt><label for="contact1_mail">E-post 
(*)</label></dt>
                                        <dd><input type="text" 
name="group_contact1_mail" value="<?php echo 
isset($contact1)?$contact1->get_email():''?>"/></dd>
                                        <dt>Kontaktperson 2</dt>
                                        <dt><label 
for="contact2_name">Navn</label></dt>

Modified: 
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new_org.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new_org.php
    2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/activitycalendarfrontend/templates/base/activity_new_org.php
    2012-05-10 11:50:22 UTC (rev 9359)
@@ -108,15 +108,18 @@
        <?php }?>
        </div>
                <h1><?php echo lang('new_organization') ?></h1>
+               <div>
+                       <?php echo lang('required_fields')?>
+               </div>
                <form action="#" method="post">
                        <input type="hidden" name="activity" value="<?php 
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; }  ?>"/>
                        <dl class="proplist-col" style="width: 200%">
                                <input type="hidden" name="organization_id" 
id="organization_id" value="new_org" />
-                               <dt><label 
for="orgname">Organisasjonsnavn</label></dt>
+                               <dt><label for="orgname">Organisasjonsnavn 
(*)</label></dt>
                                <dd><input type="text" name="orgname" 
size="100"/></dd>
                                <dt><label 
for="orgno">Organisasjonsnummer</label></dt>
                                <dd><input type="text" name="orgno"/></dd>
-                               <dt><label for="district">Bydel</label></dt>
+                               <dt><label for="district">Bydel (*)</label></dt>
                                <dd><select name="org_district">
                                                <option value="0">Ingen bydel 
valgt</option>
                                <?php 
@@ -129,26 +132,26 @@
                                </select></dd>
                                <dt><label 
for="homepage">Hjemmeside</label></dt>
                                <dd><input type="text" name="homepage" 
size="100"/></dd>
-                               <dt><label for="email">E-post</label></dt>
+                               <dt><label for="email">E-post (*)</label></dt>
                                <dd><input type="text" name="email"/></dd>
-                               <dt><label for="phone">Telefon</label></dt>
+                               <dt><label for="phone">Telefon (*)</label></dt>
                                <dd><input type="text" name="phone"/></dd>
-                               <dt><label for="street">Gate</label></dt>
+                               <dt><label for="street">Gate (*)</label></dt>
                                <dd><input type="text" name="address_txt" 
id="address_txt" onkeyup="javascript:get_address_search()"/>
                                <div id="address_container"></div></dd>
                                <dt><label for="number">Husnummer</label></dt>
                                <dd><input type="text" name="number"/><br/></dd>
-                               <dt><label for="postaddress">Postnummer og 
Sted</label></dt>
+                               <dt><label for="postaddress">Postnummer og Sted 
(*)</label></dt>
                                <dd><input type="text" name="postaddress" 
size="100"/></dd>
-                               <dt><label 
for="org_description">Beskrivelse</label></dt>
+                               <dt><label for="org_description">Beskrivelse 
(*)</label></dt>
                                <dd><textarea rows="10" cols="100" 
name="org_description"></textarea></dd>
                                <hr/>
                                <b>Kontaktperson 1</b><br/>
-                               <dt><label for="contact1_name">Navn</label>
+                               <dt><label for="contact1_name">Navn (*)</label>
                                <input type="text" name="org_contact1_name" 
size="100"/></dt>
-                               <dt><label for="contact1_phone">Telefon</label>
+                               <dt><label for="contact1_phone">Telefon 
(*)</label>
                                <input type="text" 
name="org_contact1_phone"/></dt>
-                               <dt><label for="contact1_mail">E-post</label>
+                               <dt><label for="contact1_mail">E-post 
(*)</label>
                                <input type="text" 
name="org_contact1_mail"/></dt><br/><br/><br/>
                                <b>Kontaktperson 2</b><br/>
                                <dt><label for="contact2_name">Navn</label>

Modified: 
branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php    
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_group.inc.php    
2012-05-10 11:50:22 UTC (rev 9359)
@@ -103,7 +103,6 @@
                                'building_part_id = ' . 
$this->marshal($control_group->get_building_part_id(), 'string')
                        );
 
-                       //var_dump('UPDATE activity_activity SET ' . join(',', 
$values) . " WHERE id=$id");
                        $result = $this->db->query('UPDATE 
controller_control_group SET ' . join(',', $values) . " WHERE id=$id", 
__LINE__,__FILE__);
 
                        return isset($result);
@@ -121,7 +120,6 @@
 
                        $joins = "      {$this->left_join} fm_building_part ON 
(p.building_part_id = fm_building_part.id)";
                        $joins .= "     {$this->left_join} controller_procedure 
ON (p.procedure_id = controller_procedure.id)";
-                       //$joins .= "   {$this->left_join} 
controller_control_area ON (p.control_area_id = controller_control_area.id)";
 
                        $sql = "SELECT p.*, fm_building_part.descr AS 
building_part_descr, controller_procedure.title as procedure_title FROM 
controller_control_group p {$joins} WHERE p.id = " . $id;
                        $this->db->limit_query($sql, 0, __LINE__, __FILE__, 1);
@@ -134,7 +132,6 @@
                        
$control_group->set_control_area_id($this->unmarshal($this->db->f('control_area_id'),
 'int'));
                        $category = 
execMethod('phpgwapi.categories.return_single', 
$this->unmarshal($this->db->f('control_area_id', 'int')));
                        
$control_group->set_control_area_name($category[0]['name']);
-                       
//$control_group->set_control_area_name($this->unmarshal($this->db->f('control_area_name'),
 'string'));
                        
$control_group->set_building_part_id($this->unmarshal($this->db->f('building_part_id'),
 'string'));
                        
$control_group->set_building_part_descr($this->unmarshal($this->db->f('building_part_descr'),
 'string'));
 

Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-05-10 11:50:22 UTC (rev 9359)
@@ -35,7 +35,6 @@
        include_class('controller', 'check_item', 'inc/model/');
        include_class('controller', 'check_list_status_info', 'inc/helper/');
        include_class('controller', 'status_agg_month_info', 'inc/helper/');
-       include_class('controller', 'calendar_builder', 'inc/component/');
        include_class('controller', 'location_finder', 'inc/helper/');
        include_class('controller', 'year_calendar', 'inc/component/');
        include_class('controller', 'month_calendar', 'inc/component/');
@@ -49,7 +48,6 @@
                private $so_control_item;
                private $so_check_list;
                private $so_check_item;
-               private $calendar_builder;
                                
                public $public_functions = array
                (
@@ -90,18 +88,9 @@
                        $year = intval( $year );
                        $from_month = intval( $month );
                                
-                       $from_date_ts = strtotime("$from_month/01/$year");
-                       
-                       if(($from_month + 1) > 12){
-                               $to_month = 1;
-                               $to_year = $year + 1;
-                       }else{
-                               $to_month = $from_month + 1;
-                               $to_year = $year;
-                       }
-                       
-                       $to_date_ts = strtotime("$to_month/01/$to_year");
-                                                                               
                
+                       $from_date_ts = 
month_calendar::get_start_month_date_ts($year, $month);
+                       $to_date_ts = 
month_calendar::get_end_month_date_ts($year, $month);
+                                                                               
                                        
                        $criteria = array
                        (
                                'user_id' => 
$GLOBALS['phpgw_info']['user']['account_id'],
@@ -176,7 +165,7 @@
                        $to_year = $year + 1;
                        $to_date_ts = strtotime("01/01/$to_year");
                        
-                       $manage=false;
+                       $manage = false;
                
                        if($manage)
             {
@@ -198,13 +187,12 @@
                        if(empty($location_code)){
                                $location_code = 
$my_locations[0]["location_code"];
                        }
-                                               
+                       
                        // Fetches all controls for the location within time 
period
                        $controls_for_location_array = 
$this->so_control->get_controls_by_location($location_code, $from_date_ts, 
$to_date_ts,  $repeat_type = null);
-
-                       // Creates a calendar object for time period
-                       $this->calendar_builder = new 
calendar_builder($from_date_ts, $to_date_ts);
                        
+                       $controls_calendar_array = array();
+                       
                        // Loops through controls with repeat type day or week 
in controls_for_location_array
                        // and populates array that contains aggregate open 
cases pr month.             
                        foreach($controls_for_location_array as $control){
@@ -212,8 +200,11 @@
                                        
                                        // Loops through controls in 
controls_for_location_array and populates aggregate open cases pr month array.
                                        $agg_open_cases_pr_month_array = 
$this->build_agg_open_cases_pr_month_array($control, $location_code, $year);
-                                                                               
-                                       
$control->set_agg_open_cases_pr_month_array( $agg_open_cases_pr_month_array );
+                                       
+                                       $year_calendar = new 
year_calendar($control, $year);
+                                       $calendar_array = 
$year_calendar->build_agg_calendar($agg_open_cases_pr_month_array);
+                                               
+                                       $controls_calendar_array[] = 
array("control" => $control->toArray(), "calendar_array" => $calendar_array);
                                }
                        }
                        
@@ -230,8 +221,16 @@
                        
                        // 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);
-       
-                       $controls_calendar_array = 
$this->calendar_builder->build_calendar_array( $controls_for_location_array, 
12, "view_months" );
+
+                       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);
+                                       $calendar_array = 
$year_calendar->build_calendar( $control->get_check_lists_array() );
+                                                                               
        
+                                       $controls_calendar_array[] = 
array("control" => $control->toArray(), "calendar_array" => $calendar_array);
+                               }
+                       }
                        
                        $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$location_code));
                        
@@ -284,7 +283,7 @@
                                        
                                        $year_calendar = new 
year_calendar($control, $year);
                                        $calendar_array = 
$year_calendar->build_agg_calendar($agg_open_cases_pr_month_array);
-                                       $locations_with_calendar_array[] = 
array("location" => $curr_location_code, "calendar_array" => $calendar_array);
+                                       $locations_with_calendar_array[] = 
array("location" => $location, "calendar_array" => $calendar_array);
                                }
                        }else if($control->get_repeat_type() > 1){
                                foreach($locations_for_control_array as 
$location){
@@ -297,8 +296,8 @@
                                        
                                        $year_calendar = new 
year_calendar($control, $year);
                                        $calendar_array = 
$year_calendar->build_calendar( $check_lists_array );
-                                               
-                                       $locations_with_calendar_array[] = 
array("location" => $curr_location_code, "calendar_array" => $calendar_array);
+
+                                       $locations_with_calendar_array[] = 
array("location" => $location, "calendar_array" => $calendar_array);
                                }
                        }
                        
@@ -342,7 +341,7 @@
                        {
                                $locations_for_control_array = 
$this->so_control->get_locations_for_control($control_id);
                        }
-                                               
+
                        if(empty($year)){
                                $year = intval( date("Y") );
                        }
@@ -351,20 +350,9 @@
                                $month = date("n");
                        }
                        
-                       $from_month = $month;
+                       $from_date_ts = 
month_calendar::get_start_month_date_ts($year, $month);
+                       $to_date_ts = 
month_calendar::get_end_month_date_ts($year, $month);
                        
-                       $from_date_ts = strtotime("$from_month/01/$year");
-                       
-                       if(($from_month + 1) > 12){
-                               $to_month = 1;
-                               $to_year = $year + 1;
-                       }else{
-                               $to_month = $from_month + 1;
-                               $to_year = $year;
-                       }
-                       
-                       $to_date_ts = strtotime("$to_month/01/$to_year");
-                                               
                        $locations_with_calendar_array = array();
                        
                        foreach($locations_for_control_array as $location){
@@ -377,8 +365,8 @@
                                        
                                $month_calendar = new month_calendar($control, 
$year, $month);
                                $calendar_array = 
$month_calendar->build_calendar( $check_lists_array );
-                                               
-                               $locations_with_calendar_array[] = 
array("location" => $curr_location_code, "calendar_array" => $calendar_array);
+
+                               $locations_with_calendar_array[] = 
array("location" => $location, "calendar_array" => $calendar_array);
                        }
                        
                        $criteria = array
@@ -394,6 +382,7 @@
                        
                        $data = array
                        (               
+                               'control'                                       
        => $control->toArray(),
                                'my_locations'                                  
=> $my_locations,
                                'view_location_code'                    => 
$location_code,
                                'property_array'                                
=> $property_array,

Deleted: 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
===================================================================
--- 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
 2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
 2012-05-10 11:50:22 UTC (rev 9359)
@@ -1,112 +0,0 @@
-<?php
-phpgw::import_class('controller.socheck_list');
-include_class('controller', 'date_generator', 'inc/component/');
-include_class('controller', 'check_list_status_info', 'inc/helper/');
-include_class('controller', 'check_list_status_manager', 'inc/helper/');
-               
-/* This class transforms controls with checklists or controls with aggregated 
number of open cases, 
-*  and puts these values in a calendar array for each control
-*/  
-
-class calendar_builder {
-       
-       private $period_start_date;
-       private $period_end_date;
-
-       public function __construct($period_start_date, $period_end_date){
-        $this->period_start_date = $period_start_date;
-        $this->period_end_date = $period_end_date;
-       }
-       
-       function init_calendar( $control, $num, $period_type ){
-
-               $calendar_array = array();
-               
-               for($i=1;$i<=$num;$i++){
-                       $calendar_array[$i] = null;
-               }
-               
-               $date_generator = new 
date_generator($control->get_start_date(), $control->get_end_date(), 
$this->period_start_date, $this->period_end_date, $control->get_repeat_type(), 
$control->get_repeat_interval());
-               $dates_array = $date_generator->get_dates();
-               
-               // Inserts dates
-               foreach($dates_array as $date){
-                       
-                       $todays_date = mktime(0,0,0,date("m"), date("d"), 
date("Y"));
-                       
-                       if($date < $todays_date){
-                               $status = "CONTROL_NOT_DONE";
-                       }else{
-                               $status = "CONTROL_REGISTERED";
-                       }
-                       
-                       if( $period_type == "view_months" )
-                       {
-                               $calendar_array[ date("n", $date) ]["status"]  
= $status;
-                               $calendar_array[ date("n", $date) ]["info"]  = 
array("date" => $date, "control_id" => $control->get_id());
-                       }
-                       else if( $period_type == "view_days" )
-                       {
-                               $calendar_array[ date("j", $date) ]["status"]  
= $status;
-                               $calendar_array[ date("j", $date) ]["info"]  = 
array("date" => $date, "control_id" => $control->get_id());      
-                       }
-               }
-               
-               return $calendar_array; 
-       }
-       
-       // Function that puts checklists into a twelve months array for 
displaying a year or a days array for displaying a month
-       public function build_calendar_array( $controls_with_check_lists_array, 
$num, $period_type ){
-               
-               foreach($controls_with_check_lists_array as $control){
-                       
-                       // ========================  DISPLAY STATUS FOR A MONTH 
OR DAYS IN A MONTH  ==========================
-                       if($period_type == "view_days" | ($period_type == 
"view_months" & $control->get_repeat_type() == 2 | $control->get_repeat_type() 
== 3))
-                       {
-                               $check_list_array = 
$control->get_check_lists_array();
-                               
-                               $calendar_array = $this->init_calendar( 
$control, $num, $period_type );
-                                                               
-                               foreach($control->get_check_lists_array() as 
$check_list)
-                               {
-                                       $check_list_status_manager = new 
check_list_status_manager( $check_list );
-                                       
-                                       $check_list_status_info = 
$check_list_status_manager->get_status_for_check_list(); 
-                                       
-                                       if( $period_type == "view_months" )
-                                       {
-                                               $calendar_array[ date("n", 
$check_list_status_info->get_deadline_date_ts()) ]["status"]  = 
$check_list_status_info->get_status();
-                                               $calendar_array[ date("n", 
$check_list_status_info->get_deadline_date_ts()) ]["info"]  = 
$check_list_status_info->serialize();
-                                       }
-                                       else if( $period_type == "view_days" )
-                                       {
-                                               $calendar_array[ date("j", 
$check_list->get_deadline()) ]["status"] = 
$check_list_status_info->get_status();
-                                               $calendar_array[ date("j", 
$check_list->get_deadline()) ]["info"] = $check_list_status_info->serialize();
-                                       }
-                               }
-                               
-                               $controls_calendar_array[] = array("control" => 
$control->toArray(), "calendar_array" => $calendar_array);
-                       }
-                       // ========================  DISPLAY AGGREGATE STATUS 
FOR A MONTH  ==========================
-                       else if($period_type == "view_months" & 
($control->get_repeat_type() == 0 | $control->get_repeat_type() == 1))
-                       {
-                               $calendar_array = array();
-                               
-                               for($i=1;$i<=12;$i++)
-                                       $calendar_array[$i] = "";
-                               
-                               
foreach($control->get_agg_open_cases_pr_month_array() as $status_agg_month_info)
-                               {
-                                       $status = "CONTROLS_DONE_WITH_ERRORS";
-                                       
-                                       
$calendar_array[$status_agg_month_info->get_month_nr()]["status"] = $status;
-                                       
$calendar_array[$status_agg_month_info->get_month_nr()]["info"] = 
$status_agg_month_info->get_agg_open_cases();
-                               }
-                                       
-                               $controls_calendar_array[] = array("control" => 
$control->toArray(), "calendar_array" => $calendar_array);
-                       }
-               }
-
-               return $controls_calendar_array;
-       }
-}
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/controller/inc/component/class.month_calendar.inc.php
===================================================================
--- 
branches/Version-1_0-branch/controller/inc/component/class.month_calendar.inc.php
   2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/inc/component/class.month_calendar.inc.php
   2012-05-10 11:50:22 UTC (rev 9359)
@@ -69,6 +69,19 @@
                }
        }
        
+       public function build_calendar( $check_lists_array ){
+               
+               foreach($check_lists_array as $check_list){
+                       $check_list_status_manager = new 
check_list_status_manager( $check_list );
+                       $check_list_status_info = 
$check_list_status_manager->get_status_for_check_list(); 
+                                                       
+                       $this->calendar_array[ date("j", 
$check_list->get_deadline()) ]["status"] = 
$check_list_status_info->get_status();
+                       $this->calendar_array[ date("j", 
$check_list->get_deadline()) ]["info"] = $check_list_status_info->serialize();
+               }
+               
+               return $this->calendar_array;
+       }
+       
        public static function get_heading_array($year, $month){
                $num_days_in_month = cal_days_in_month(CAL_GREGORIAN, $month, 
$year);           
                $heading_array = array();
@@ -80,24 +93,28 @@
                return $heading_array;
        }
        
+       public static function get_start_month_date_ts($year, $from_month){
+               return strtotime("$from_month/01/$year");
+       }
+       
+       public static function get_end_month_date_ts($year, $from_month){
+               if(($from_month + 1) > 12){
+                       $to_month = 1;
+                       $to_year = $year + 1;
+               }else{
+                       $to_month = $from_month + 1;
+                       $to_year = $year;
+               }
+               
+               $to_date_ts = strtotime("$to_month/01/$to_year");
+               
+               return $to_date_ts; 
+       }
+       
        public static function get_month_name($month){
        
                $month_array = array("Januar", "Februar", "Mars", "April", 
"Mai", "Juni", "Juli", "August", "September", "Oktober", "November", 
"Desember");
                
                return $month_array[$month]; 
        }
-               
-       // Function that puts checklists into a twelve months array for 
displaying a year or a days array for displaying a month
-       public function build_calendar( $check_lists_array ){
-               
-               foreach($check_lists_array as $check_list){
-                       $check_list_status_manager = new 
check_list_status_manager( $check_list );
-                       $check_list_status_info = 
$check_list_status_manager->get_status_for_check_list(); 
-                                                       
-                       $this->calendar_array[ date("j", 
$check_list->get_deadline()) ]["status"] = 
$check_list_status_info->get_status();
-                       $this->calendar_array[ date("j", 
$check_list->get_deadline()) ]["info"] = $check_list_status_info->serialize();
-               }
-               
-               return $this->calendar_array;
-       }
 }
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
        2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/check_list_status_checker.xsl
        2012-05-10 11:50:22 UTC (rev 9359)
@@ -6,7 +6,7 @@
  
                <xsl:choose>
                        <xsl:when test="status = 'CONTROL_REGISTERED'">
-                               <div>
+                               <td>
                                <a>
                                        <xsl:attribute name="href">
                                                
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
@@ -19,10 +19,10 @@
                                        </xsl:attribute>
                                        <img height="15" 
src="controller/images/status_icon_yellow_ring.png" />
                                </a>
-                               </div>
+                               </td>
                        </xsl:when>
                        <xsl:when test="status = 'CONTROL_PLANNED'">
-                               <div>
+                               <td>
                                <a>
                                        <xsl:attribute name="href">
                                                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
@@ -31,10 +31,10 @@
                                        </xsl:attribute>
                                        <img height="15" 
src="controller/images/status_icon_yellow.png" />
                                </a>
-                               </div>
+                               </td>
                        </xsl:when>
                        <xsl:when test="status = 'CONTROL_NOT_DONE'">
-                               <div>
+                               <td>
                                        <a>
                                                <xsl:attribute name="href">
                                                        
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
@@ -47,10 +47,10 @@
                                                </xsl:attribute>
                                                <img height="15" 
src="controller/images/status_icon_red_cross.png" />
                                        </a>
-                               </div>
+                               </td>
                        </xsl:when>
                        <xsl:when test="status = 
'CONTROL_NOT_DONE_WITH_PLANNED_DATE'">
-                               <div>
+                               <td>
                                <a>
                                        <xsl:attribute name="href">
                                                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
@@ -59,10 +59,10 @@
                                        </xsl:attribute>
                                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
                                </a>
-                               </div>
+                               </td>
                </xsl:when>
                        <xsl:when test="status = 
'CONTROL_DONE_IN_TIME_WITHOUT_ERRORS'">
-                               <div>
+                               <td>
                                        <a>
                                        <xsl:attribute name="href">
                                                
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
@@ -72,63 +72,70 @@
                                                <span 
style="display:none"><xsl:value-of select="info/id"/></span>
                                                <img height="15" 
src="controller/images/status_icon_dark_green.png" />
                                        </a>
-                               </div>
+                               </td>
                        </xsl:when>
                        <xsl:when test="status = 
'CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS'">
-                               <div style="position:relative;">
-                                       <div id="info_box"></div>
-                                       <a>
-                                       <xsl:attribute name="href">
-                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                               
<xsl:text>&amp;check_list_id=</xsl:text>
-                                               <xsl:value-of 
select="info/check_list_id"/>
-                                       </xsl:attribute>
-                                               <span 
style="display:none"><xsl:value-of select="info/id"/></span>
-                                               <img height="15" 
src="controller/images/status_icon_light_green.png" />
-                                       </a>
-                               </div>
-                       </xsl:when>
-                       <xsl:when test="status = 'CONTROL_DONE_WITH_ERRORS'">
-                               <div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-                                       <div id="info_box"></div>
-                                       <a class="view_info_box">
-                                               <xsl:attribute name="href">
+                               <td>
+                                       <div style="position:relative;">
+                                       
+                                               <div id="info_box"></div>
+                                               <a>
+                                               <xsl:attribute name="href">
                                                        
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
                                                        
<xsl:text>&amp;check_list_id=</xsl:text>
                                                        <xsl:value-of 
select="info/check_list_id"/>
                                                </xsl:attribute>
-                                               <span style="display:none">
-                                                       
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
-                                                       
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
-                                               </span>
-                                               <xsl:value-of 
select="info/num_open_cases"/>
-                                       </a>
-                               </div>
+                                                       <span 
style="display:none"><xsl:value-of select="info/id"/></span>
+                                                       <img height="15" 
src="controller/images/status_icon_light_green.png" />
+                                               </a>
+                                       </div>
+                               </td>
                        </xsl:when>
+                       <xsl:when test="status = 'CONTROL_DONE_WITH_ERRORS'">
+                               <td>
+                                       <div class="info_box_wrp">
+                                               <div id="info_box"></div>
+                                               <a class="view_info_box">
+                                                       <xsl:attribute 
name="href">
+                                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                                               <xsl:value-of 
select="info/check_list_id"/>
+                                                       </xsl:attribute>
+                                                       <span 
style="display:none">
+                                                               
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
+                                                               
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                                       </span>
+                                                       <xsl:value-of 
select="info/num_open_cases"/>
+                                               </a>
+                                       </div>
+                               </td>
+                       </xsl:when>
                        <xsl:when test="status = 'CONTROLS_DONE_WITH_ERRORS'">
-                               <div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-                                       <div id="info_box"></div>
-                                       <a class="view_info_box">
-                                               <xsl:attribute name="href">
-                                                       
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
-                                                       
<xsl:text>&amp;check_list_id=</xsl:text>
-                                                       <xsl:value-of 
select="info/check_list_id"/>
-                                               </xsl:attribute>
-                                               <span style="display:none">
-                                                       
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
-                                                       
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
-                                               </span>
-                                               <xsl:value-of select="info"/>
-                                       </a>
-                               </div>
+                               <td>
+                                       <div class="info_box_wrp">
+                                               <div id="info_box"></div>
+                                               <a class="view_info_box">
+                                                       <xsl:attribute 
name="href">
+                                                               
<xsl:text>index.php?menuaction=controller.uicheck_list.edit_check_list</xsl:text>
+                                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                                               <xsl:value-of 
select="info/check_list_id"/>
+                                                       </xsl:attribute>
+                                                       <span 
style="display:none">
+                                                               
<xsl:text>&amp;check_list_id=</xsl:text><xsl:value-of 
select="info/check_list_id"/>
+                                                               
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                                       </span>
+                                                       <xsl:value-of 
select="info"/>
+                                               </a>
+                                       </div>
+                               </td>
                        </xsl:when>
                        <xsl:when test="status = 'CONTROL_CANCELED'">
-                               <div>
+                               <td>
                                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
-                               </div>
+                               </td>
                        </xsl:when>
                        <xsl:otherwise>
-                               <div></div>
+                               <td></td>
                        </xsl:otherwise>
                </xsl:choose>
                                

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
      2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month.xsl
      2012-05-10 11:50:22 UTC (rev 9359)
@@ -75,24 +75,20 @@
                
                
                <div id="cal_wrp">
-                       <ul class="calendar month">
-                               <li class="heading">
-                                       <div class="control_details_wrp">
-                                               <div 
class="title"><span>Tittel</span></div>
-                                               <div 
class="assigned"><span>Tildelt</span></div>
-                                               <div 
class="frequency"><span>Frekvens</span></div>
-                                       </div>
-                                       <div class="days_wrp">
+                       <table id="calendar" class="month">
+                               <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">
-                                                       
<div><span><xsl:value-of select="."/></span></div>
+                                                       <th><span><xsl:value-of 
select="."/></span></th>
                                                </xsl:for-each>
-                                       </div>
-                               </li>
+                               </tr>
                                <xsl:choose>    
                                        <xsl:when 
test="controls_calendar_array/child::node()">
                                <xsl:for-each select="controls_calendar_array">
 
-                                       <li>                            
+                                       <tr>                            
                                        <xsl:choose>
                                        <xsl:when test="(position() mod 2) != 
1">
                                            <xsl:attribute 
name="class">odd</xsl:attribute>
@@ -102,22 +98,19 @@
                                        </xsl:otherwise>
                                    </xsl:choose>
                                        
-                                       <div class="control_details_wrp">
-                                               <div class="title">
+                                               <td class="title">
                                                <span><xsl:value-of 
select="control/title"/></span>
-                                               </div>
-                                               <div class="assigned">
+                                               </td>
+                                               <td class="assigned">
                                                <span><xsl:value-of 
select="control/responsibility_name"/></span>
-                                               </div>
-                                               <div class="frequency">
+                                               </td>
+                                               <td class="frequency">
                                                <span>
                                                        <xsl:value-of 
select="control/repeat_type_label"/>
                                                        <xsl:value-of 
select="control/repeat_interval"/>
                                                </span>
-                                               </div>
+                                               </td>
                                
-                       </div>
-                       <div class="days_wrp">
                                <xsl:for-each select="calendar_array">
                                        
                                        <xsl:call-template 
name="check_list_status_checker" >
@@ -125,17 +118,16 @@
                                        </xsl:call-template>
                                        
                                </xsl:for-each>
-                               </div>
-                               </li>
+                               </tr>
                                </xsl:for-each>
                                
                                        </xsl:when>
                                        <xsl:otherwise>
-                                               <div class="cal_info_msg">Ingen 
sjekklister for bygg i angitt periode</div>
+                                               <tr class="cal_info_msg"><td 
colspan="3">Ingen sjekklister for bygg i angitt periode</td></tr>
                                        </xsl:otherwise>
                                </xsl:choose>
                        
-                       </ul>
+                       </table>
                </div>
        </div>
 </div>

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
        2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_month_for_locations.xsl
        2012-05-10 11:50:22 UTC (rev 9359)
@@ -30,36 +30,39 @@
                </div>
                <div class="middle">
                        <xsl:call-template name="icon_color_map" />
+                       
+                       <a style="display:block;font-weight: bold;font-size: 
14px;float:left;">
+                               <xsl:attribute name="href">
+                                       
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_year_for_locations</xsl:text>
+                                       <xsl:text>&amp;year=</xsl:text>
+                                       <xsl:value-of select="year"/>
+                                       <xsl:text>&amp;control_id=</xsl:text>
+                                       <xsl:value-of select="control/id"/>
+                               </xsl:attribute>
+                               Årsoversikt
+                       </a>
                </div>
                <div id="cal_wrp">
-                       <ul class="calendar">
-                               <li class="heading">
-                                       <div class="control_details_wrp">
-                                               <div 
class="location">Lokasjon</div>
-                                       </div>
-                                       <div class="days_wrp">
-                                               <xsl:for-each 
select="heading_array">
-                                                       <div>
-                                                               <a>
-                                                                       
<xsl:attribute name="href">
-                                                                               
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
-                                                                               
<xsl:text>&amp;year=</xsl:text>
-                                                                               
<xsl:value-of select="$year"/>
-                                                                               
<xsl:text>&amp;month=</xsl:text>
-                                                                               
<xsl:number/>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:value-of select="."/>
-                                                               </a>            
                
-                                                       </div>
-                                               </xsl:for-each>
-                                       </div>
-                               </li>
+                       <table id="calendar" class="month">
+                               <tr>
+                                       <th>
+                                               <span 
class="location_code">Lokasjonskode</span>
+                                       </th>
+                                       <th>
+                                               <span 
class="location_name">Lokasjonsnavn</span>
+                                       </th>
+                                       <xsl:for-each select="heading_array">
+                                               <th>
+                                                       <xsl:value-of 
select="."/>
+                                               </th>
+                                       </xsl:for-each>
+                               </tr>
                        
                        <xsl:choose>
                                <xsl:when 
test="locations_with_calendar_array/child::node()">
                                
                                <xsl:for-each 
select="locations_with_calendar_array">
-                                       <li>                            
+                                       <tr>                            
                                                <xsl:choose>
                                                <xsl:when test="(position() mod 
2) != 1">
                                                    <xsl:attribute 
name="class">odd</xsl:attribute>
@@ -68,27 +71,27 @@
                                                    <xsl:attribute 
name="class">even</xsl:attribute>
                                                </xsl:otherwise>
                                            </xsl:choose>
-                                   
-                                           <div class="control_details_wrp">
-                                                       <div class="location">
-                                                               <xsl:value-of 
select="location"/>
-                                                       </div>
-                                               </div>          
-                                               <div class="days_wrp">
-                                                       <xsl:for-each 
select="calendar_array">
-                                                               
<xsl:call-template name="check_list_status_checker" >
-                                                                       
<xsl:with-param name="location_code"><xsl:value-of 
select="//location"/></xsl:with-param>
-                                                               
</xsl:call-template>
-                                                       </xsl:for-each>
-                                               </div>
-                                       </li>   
+                                           
+                                           <td>
+                                                       <xsl:value-of 
select="location/location_code"/>
+                                               </td>
+                                               <td class="location_name">
+                                                       <xsl:value-of 
select="location/loc1_name"/>
+                                               </td>
+
+                                               <xsl:for-each 
select="calendar_array">
+                                                       <xsl:call-template 
name="check_list_status_checker" >
+                                                               <xsl:with-param 
name="location_code"><xsl:value-of select="//location"/></xsl:with-param>
+                                                       </xsl:call-template>
+                                               </xsl:for-each>
+                                       </tr>   
                                </xsl:for-each> 
                        </xsl:when>
                        <xsl:otherwise>
-                               <div class="cal_info_msg">Ingen sjekklister for 
bygg i angitt periode</div>
+                               <tr class="cal_info_msg"><td colspan="3">Ingen 
sjekklister for bygg i angitt periode</td></tr>
                        </xsl:otherwise>
                </xsl:choose>
-       </ul>
+       </table>
        </div>
 </div>
 </div>

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
       2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year.xsl
       2012-05-10 11:50:22 UTC (rev 9359)
@@ -45,16 +45,13 @@
                </div>
                 
                <div id="cal_wrp">
-               <ul class="calendar">
-                               <li class="heading">
-                               <div class="control_details_wrp">
-                                       <div 
class="title"><span>Tittel</span></div>
-                                       <div 
class="assigned"><span>Tildelt</span></div>
-                                       <div 
class="frequency"><span>Frekvens</span></div>
-                                       </div>
-                                       <div class="months_wrp">
+               <table id="calendar">
+                               <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">
-                                               <div>
+                                               <th>
                                                        <a>
                                                                <xsl:attribute 
name="href">
                                                                        
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
@@ -67,10 +64,9 @@
                                                                </xsl:attribute>
                                                                <xsl:value-of 
select="."/>
                                                        </a>                    
        
-                                               </div>
+                                               </th>
                                        </xsl:for-each>
-                                       </div>
-                               </li>
+                               </tr>
                        
                        <xsl:choose>
                                <xsl:when 
test="controls_calendar_array/child::node()">
@@ -78,7 +74,7 @@
                                <xsl:for-each select="controls_calendar_array">
                                        <xsl:variable 
name="control_id"><xsl:value-of select="control/id"/></xsl:variable>
                                
-                                       <li>                            
+                                       <tr>                            
                                                <xsl:choose>
                                                <xsl:when test="(position() mod 
2) != 1">
                                                    <xsl:attribute 
name="class">odd</xsl:attribute>
@@ -87,38 +83,28 @@
                                                    <xsl:attribute 
name="class">even</xsl:attribute>
                                                </xsl:otherwise>
                                            </xsl:choose>
-                                   
-                                           <div class="control_details_wrp">
-                                                       <xsl:if 
test="//show_location">
-                                                               <div 
class="location">
-                                                                       
<xsl:value-of select="control/location_name"/>
-                                                               </div>
-                                                       </xsl:if>
-                                                       <div class="title">
+                                                       <td class="title">
                                                        <span><xsl:value-of 
select="control/title"/></span>
-                                                       </div>
-                                                       <div class="assigned">
+                                                       </td>
+                                                       <td class="assigned">
                                                        <span><xsl:value-of 
select="control/responsibility_name"/></span>
-                                                       </div>
-                                                       <div class="frequency">
+                                                       </td>
+                                                       <td class="frequency">
                                                        <span><xsl:value-of 
select="control/repeat_type_label"/></span>
-                                                       </div>
-                                               </div>          
-                                               <div class="months_wrp">
+                                                       </td>
                                                        <xsl:for-each 
select="calendar_array">
                                                                
<xsl:call-template name="check_list_status_checker" >
                                                                        
<xsl:with-param name="location_code"><xsl:value-of 
select="$view_location_code"/></xsl:with-param>
                                                                
</xsl:call-template>
                                                        </xsl:for-each>
-                                               </div>
-                                       </li>   
+                                       </tr>   
                                </xsl:for-each> 
                        </xsl:when>
                        <xsl:otherwise>
-                               <div class="cal_info_msg">Ingen sjekklister for 
bygg i angitt periode</div>
+                               <tr class="cal_info_msg"><td colspan="3">Ingen 
sjekklister for bygg i angitt periode</td></tr>
                        </xsl:otherwise>
                </xsl:choose>
-       </ul>
+       </table>
        </div>
 </div>
 </div>

Modified: 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
 2012-05-10 11:39:08 UTC (rev 9358)
+++ 
branches/Version-1_0-branch/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
 2012-05-10 11:50:22 UTC (rev 9359)
@@ -32,34 +32,37 @@
                        <xsl:call-template name="icon_color_map" />
                </div>
                <div id="cal_wrp">
-                       <ul class="calendar">
-                               <li class="heading">
-                                       <div class="control_details_wrp">
-                                               <div 
class="location">Lokasjon</div>
-                                       </div>
-                                       <div class="months_wrp">
-                                               <xsl:for-each 
select="heading_array">
-                                                       <div>
-                                                               <a>
-                                                                       
<xsl:attribute name="href">
-                                                                               
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
-                                                                               
<xsl:text>&amp;year=</xsl:text>
-                                                                               
<xsl:value-of select="$year"/>
-                                                                               
<xsl:text>&amp;month=</xsl:text>
-                                                                               
<xsl:number/>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:value-of select="."/>
-                                                               </a>            
                
-                                                       </div>
-                                               </xsl:for-each>
-                                       </div>
-                               </li>
+                       <table id="calendar">
+                               <tr>
+                                       <th>
+                                               <span 
class="location_code">Lokasjonskode</span>
+                                       </th>
+                                       <th>
+                                               <span 
class="location_name">Lokasjonsnavn</span>
+                                       </th>
+                                       <xsl:for-each select="heading_array">
+                                               <th>
+                                                       <a>
+                                                               <xsl:attribute 
name="href">
+                                                                       
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_month_for_locations</xsl:text>
+                                                                       
<xsl:text>&amp;year=</xsl:text>
+                                                                       
<xsl:value-of select="$year"/>
+                                                                       
<xsl:text>&amp;month=</xsl:text>
+                                                                       
<xsl:number/>
+                                                                       
<xsl:text>&amp;control_id=</xsl:text>
+                                                                       
<xsl:value-of select="//control/id"/>
+                                                               </xsl:attribute>
+                                                               <xsl:value-of 
select="."/>
+                                                       </a>                    
        
+                                               </th>
+                                       </xsl:for-each>
+                               </tr>
                        
                        <xsl:choose>
                                <xsl:when 
test="locations_with_calendar_array/child::node()">
                                
                                <xsl:for-each 
select="locations_with_calendar_array">
-                                       <li>                            
+                                       <tr>                            
                                                <xsl:choose>
                                                <xsl:when test="(position() mod 
2) != 1">
                                                    <xsl:attribute 
name="class">odd</xsl:attribute>
@@ -69,26 +72,26 @@
                                                </xsl:otherwise>
                                            </xsl:choose>
                                    
-                                           <div class="control_details_wrp">
-                                                       <div class="location">
-                                                               <xsl:value-of 
select="location"/>
-                                                       </div>
-                                               </div>          
-                                               <div class="months_wrp">
-                                                       <xsl:for-each 
select="calendar_array">
-                                                               
<xsl:call-template name="check_list_status_checker" >
-                                                                       
<xsl:with-param name="location_code"><xsl:value-of 
select="//location"/></xsl:with-param>
-                                                               
</xsl:call-template>
-                                                       </xsl:for-each>
-                                               </div>
-                                       </li>   
+                                               <td>
+                                                       <xsl:value-of 
select="location/location_code"/>
+                                               </td>
+                                               <td class="location_name">
+                                                       <xsl:value-of 
select="location/loc1_name"/>
+                                               </td>
+                                                       
+                                               <xsl:for-each 
select="calendar_array">
+                                                       <xsl:call-template 
name="check_list_status_checker" >
+                                                               <xsl:with-param 
name="location_code"><xsl:value-of select="//location"/></xsl:with-param>
+                                                       </xsl:call-template>
+                                               </xsl:for-each>
+                                       </tr>   
                                </xsl:for-each> 
                        </xsl:when>
                        <xsl:otherwise>
-                               <div class="cal_info_msg">Ingen sjekklister for 
bygg i angitt periode</div>
+                               <tr class="cal_info_msg"><td colspan="3">Ingen 
sjekklister for bygg i angitt periode</td></tr>
                        </xsl:otherwise>
                </xsl:choose>
-       </ul>
+       </table>
        </div>
 </div>
 </div>

Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-05-10 11:50:22 UTC (rev 9359)
@@ -949,42 +949,22 @@
 ul#icon_color_map span{
        margin-left: 10px;
 }
-
-
-
-
-
-
-ul.calendar li{
-       clear:left;     
+#calendar {
+    width: 100%
 }
-ul.calendar li.heading {
+#calendar th {
     font-weight: bold;
     font-size:15px;
+    background:none;
 }
-.days_wrp div {
-    float: left;
-    font-size: 13px;
-    height: 30px;
+#calendar th, #calendar td {
+    padding: 10px;
     text-align: center;
-    width: 21px;
 }
-.months_wrp div {
-    float: left;
-    height: 30px;
-    text-align: center;
-    width: 40px;
+#calendar.month th, #calendar.month td {
+    padding: 5px;
 }
-.months_wrp div a, .days_wrp div a, .control_details_wrp span, .days_wrp div 
span {
-    display: block;
-    padding: 8px 0;
-}
-ul.calendar li {
-    height: 30px;
-    padding: 7px 0;
-}
-
-ul.calendar li.even {
+#calendar .even {
     background: none repeat scroll 0 0 #DEEAF8;
 }
 #cal_wrp {
@@ -1000,32 +980,18 @@
     padding: 0 10px;
     width: 100px;
 }
-.control_details_wrp div.title {
-    width: 200px;
-}
-ul.calendar div.location {
-    text-align: left;
-    width: 100px;
-}
-.control_details_wrp div.assigned {
-    text-align: left;
-    width: 115px;
-}
-.control_details_wrp div.frequency {
-       width: 130x;
-}
 
-ul.calendar div.title {
+#calendar .title, #calendar .location_name {
        text-align: left;
 }
-ul.calendar .heading div.title {
+#calendar .heading .title {
        text-align: center;
 }
-ul.calendar div.frequency {
+#calendar .frequency {
     margin-right: 10px;
     width: 65px;
 }
-.cal_info_msg{
+.cal_info_msg {
        font-size: 16px;
     padding: 40px 20px;        
 }
@@ -1037,8 +1003,20 @@
     display: block;
     font-size: 10px;
     font-weight: bold;
+    padding-left: 3px;
+    text-align: center;
     text-decoration: none;
 }
+.info_box_wrp {
+       background: url("../../../images/status_icon_red_empty.png") no-repeat 
scroll 50% 50% transparent;
+    height: 15px;
+    position: relative;
+    text-align: center;
+    width: 15px;
+}
+#calendar.month a.view_info_box {
+    padding-left: 5px;
+}
 .days_wrp a.view_info_box {
     left: 8px;
 }

Modified: branches/Version-1_0-branch/frontend/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/frontend/templates/base/config.tpl      
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/frontend/templates/base/config.tpl      
2012-05-10 11:50:22 UTC (rev 9359)
@@ -125,6 +125,10 @@
                        <td><input name="newsettings[external_db_host]" 
value="{value_external_db_host}"></td>
                </tr>
                <tr class="row_on">
+                       <td>{lang_login_external_db_port}:</td>
+                       <td><input name="newsettings[external_db_port]" 
value="{value_external_db_port}"></td>
+               </tr>
+               <tr class="row_on">
                        <td>{lang_type}:</td>
                        <td>
                                <select name="newsettings[external_db_type]">

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php   2012-05-10 
11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.db.inc.php   2012-05-10 
11:50:22 UTC (rev 9359)
@@ -84,6 +84,11 @@
                var $Password;
 
                /**
+               * @var integer $Port Port used to connect to database
+               */
+               var $Port;
+
+               /**
                * @var bool $debug enable debugging
                */
                var $debug = false;
@@ -200,8 +205,9 @@
                * @param string $Host database host to connect to (optional)
                * @param string $User name of database user (optional)
                * @param string $Password password for database user (optional)
+               * @param int    $Port Port for database host (optional)
                */
-               abstract public function connect($Database = null, $Host = 
null, $User = null, $Password = null);
+               abstract public function connect($Database = null, $Host = 
null, $User = null, $Password = null, $Port = null);
 
 
                /**

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php       
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.db_pdo.inc.php       
2012-05-10 11:50:22 UTC (rev 9359)
@@ -76,8 +76,9 @@
                * @param string $Host database host to connect to (optional)
                * @param string $User name of database user (optional)
                * @param string $Password password for database user (optional)
+               * @param int    $Port Port for database host (optional)
                */
-               public function connect($Database = null, $Host = null, $User = 
null, $Password = null)
+               public function connect($Database = null, $Host = null, $User = 
null, $Password = null, $Port = null)
                {
                        if ( !is_null($Database) )
                        {
@@ -99,6 +100,11 @@
                                $this->Password = $Password;
                        }
 
+                       if ( !is_null($Port) )
+                       {
+                               $this->Port = $Port;
+                       }
+
                        switch ( $this->Type )
                        {
                                case 'postgres':
@@ -131,9 +137,27 @@
                                case 'oracle':
                                        try
                                        {
+
+/*
+                                               $this->debug = true;
+                                               $tns = " 
+                                                       (DESCRIPTION =
+                                                           (ADDRESS_LIST =
+                                                             (ADDRESS = 
(PROTOCOL = TCP)(HOST = {$this->Host})(PORT = 21521))
+                                                           )
+                                                           (CONNECT_DATA =
+                                                             (SERVICE_NAME = 
FELPROD)
+                                                           )
+                                                         )
+                                      ";
+
+                                           $this->db = new 
PDO("oci:dbname=".$tns,$this->User,$this->Password);
+*/
+                                               $port = $this->Port ? 
$this->Port : 1521;
+
                                                $_charset = ';charset=AL32UTF8';
                                //              $_charset = '';
-                                               $this->db = new 
PDO("oci:dbname={$this->Host}/{$this->Database}{$_charset}", $this->User, 
$this->Password);
+                                               $this->db = new 
PDO("oci:dbname={$this->Host}:{$port}/{$this->Database}{$_charset}", 
$this->User, $this->Password);
                                                unset($_charset);
                                        }
                                        catch(PDOException $e){}

Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-05-10 11:50:22 UTC (rev 9359)
@@ -1828,14 +1828,15 @@
                public function get_deposition()
                {
                        $sql = "SELECT "
+                       . "dimb as kostnadssted,"
                        . "spbudact_code as art,"
+                       . "project_group as prosjekt,"
                        . "sum(belop) as belop,"
-                       . "dimb as kostnadssted,"
                        . "currency"
                        . ' FROM fm_workorder'
                        . " {$this->join} fm_project ON 
(fm_workorder.project_id = fm_project.id)"
                        . " {$this->join} fm_ecobilag ON (fm_workorder.id = 
fm_ecobilag.pmwrkord_code)"
-                       . " GROUP BY kostnadssted, art, currency ORDER BY 
kostnadssted, art, currency ASC";
+                       . " GROUP BY art, kostnadssted, project_group, currency 
ORDER BY kostnadssted,project_group, art, currency ASC";
                        $this->db->query($sql,__LINE__,__FILE__);
                        
                        $values = array();

Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-05-10 11:50:22 UTC (rev 9359)
@@ -1533,40 +1533,70 @@
                                        'project_id'    => (isset($id)?$id:'')
                                );
 
-                       $supervisor_id = 0;
-
-                       if ( 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'])
-                               && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'] )
-                       {
-                               $supervisor_id = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'];
-                       }
-
-                       $need_approval = 
isset($config->config_data['project_approval'])?$config->config_data['project_approval']:'';
                        $supervisor_email = array();
-                       if ($supervisor_id && $need_approval)
+                       if($need_approval = 
isset($config->config_data['project_approval']) ? 
$config->config_data['project_approval'] : '')
                        {
-                               $prefs = 
$this->bocommon->create_preferences('property',$supervisor_id);
-                               $supervisor_email[] = array
+                               $invoice        = 
CreateObject('property.soinvoice');
+                               if(isset($config->config_data['invoice_acl']) 
&& $config->config_data['invoice_acl'] == 'dimb')
+                               {
+                                       $supervisor_id = 
$invoice->get_default_dimb_role_user(2, $values['ecodimb']);
+                                       $prefs = 
$this->bocommon->create_preferences('property',$supervisor_id);                 
               
+                                       $supervisor_email[] = array
                                        (
                                                'id'      => $supervisor_id,
                                                'address' => $prefs['email'],
                                        );
-                               if ( isset($prefs['approval_from']) )
+
+                                       $supervisor2_id = 
$invoice->get_default_dimb_role_user(3, $values['ecodimb']);
+                                       $prefs2 = 
$this->bocommon->create_preferences('property', $supervisor2_id);
+                                       $supervisor_email[] = array
+                                       (
+                                               'id'      => $supervisor2_id,
+                                               'address' => $prefs2['email'],
+                                       );
+                                       $supervisor_email = 
array_reverse($supervisor_email);
+                                       unset($prefs);
+                                       unset($prefs2);
+                                       unset($invoice);
+                               }
+                               else
                                {
-                                       $prefs2 = 
$this->bocommon->create_preferences('property', $prefs['approval_from']);
+                                       $supervisor_id = 0;
 
-                                       if(isset($prefs2['email']))
+                                       if ( 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'])
+                                               && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'] )
                                        {
+                                               $supervisor_id = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'];
+                                       }
+
+
+                                       if ($supervisor_id )
+                                       {
+                                               $prefs = 
$this->bocommon->create_preferences('property',$supervisor_id);
                                                $supervisor_email[] = array
-                                                       (
-                                                               'id'      => 
$prefs['approval_from'],
-                                                               'address' => 
$prefs2['email'],
-                                                       );
-                                               $supervisor_email = 
array_reverse($supervisor_email);
+                                               (
+                                                       'id'      => 
$supervisor_id,
+                                                       'address' => 
$prefs['email'],
+                                               );
+
+                                               if ( 
isset($prefs['approval_from']) )
+                                               {
+                                                       $prefs2 = 
$this->bocommon->create_preferences('property', $prefs['approval_from']);
+
+                                                       
if(isset($prefs2['email']))
+                                                       {
+                                                               
$supervisor_email[] = array
+                                                               (
+                                                                       'id'    
  => $prefs['approval_from'],
+                                                                       
'address' => $prefs2['email'],
+                                                               );
+                                                               
$supervisor_email = array_reverse($supervisor_email);
+                                                       }
+                                                       unset($prefs2);
+                                               }
+                                               unset($prefs);
                                        }
-                                       unset($prefs2);
                                }
-                               unset($prefs);
                        }
 
                        
$project_status=(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['project_status'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['project_status']:'');

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-05-10 11:50:22 UTC (rev 9359)
@@ -1477,48 +1477,76 @@
                        $values['actual_cost']  = 
number_format($values['actual_cost'], 2, ',', '');
 
                        $link_data = array
-                               (
-                                       'menuaction'    => 
'property.uiworkorder.edit',
-                                       'id'            => $id
-                               );
+                       (
+                               'menuaction'    => 'property.uiworkorder.edit',
+                               'id'                    => $id
+                       );
 
-                       $supervisor_id = 0;
-
-                       if ( 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'])
-                               && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'] )
-                       {
-                               $supervisor_id = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'];
-                       }
-
-                       $need_approval = 
isset($config->config_data['workorder_approval']) ? 
$config->config_data['workorder_approval'] : '';
-
                        $supervisor_email = array();
-                       if ($supervisor_id && $need_approval)
+                       if($need_approval = 
isset($config->config_data['workorder_approval']) ? 
$config->config_data['workorder_approval'] : '')
                        {
-                               $prefs = 
$this->bocommon->create_preferences('property',$supervisor_id);
-                               $supervisor_email[] = array
+                               $invoice        = 
CreateObject('property.soinvoice');
+                               if(isset($config->config_data['invoice_acl']) 
&& $config->config_data['invoice_acl'] == 'dimb')
+                               {
+                                       $supervisor_id = 
$invoice->get_default_dimb_role_user(2, $values['ecodimb']);
+                                       $prefs = 
$this->bocommon->create_preferences('property',$supervisor_id);                 
               
+                                       $supervisor_email[] = array
                                        (
                                                'id'      => $supervisor_id,
                                                'address' => $prefs['email'],
                                        );
-                               if ( isset($prefs['approval_from']) )
+
+                                       $supervisor2_id = 
$invoice->get_default_dimb_role_user(3, $values['ecodimb']);
+                                       $prefs2 = 
$this->bocommon->create_preferences('property', $supervisor2_id);
+                                       $supervisor_email[] = array
+                                       (
+                                               'id'      => $supervisor2_id,
+                                               'address' => $prefs2['email'],
+                                       );
+                                       $supervisor_email = 
array_reverse($supervisor_email);
+                                       unset($prefs);
+                                       unset($prefs2);
+                                       unset($invoice);
+                               }
+                               else
                                {
-                                       $prefs2 = 
$this->bocommon->create_preferences('property', $prefs['approval_from']);
+                                       $supervisor_id = 0;
 
-                                       if(isset($prefs2['email']))
+                                       if ( 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'])
+                                               && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'] )
                                        {
+                                               $supervisor_id = 
$GLOBALS['phpgw_info']['user']['preferences']['property']['approval_from'];
+                                       }
+
+
+                                       if ($supervisor_id )
+                                       {
+                                               $prefs = 
$this->bocommon->create_preferences('property',$supervisor_id);
                                                $supervisor_email[] = array
-                                                       (
-                                                               'id'      => 
$prefs['approval_from'],
-                                                               'address' => 
$prefs2['email'],
-                                                       );
-                                               $supervisor_email = 
array_reverse($supervisor_email);
+                                               (
+                                                       'id'      => 
$supervisor_id,
+                                                       'address' => 
$prefs['email'],
+                                               );
+
+                                               if ( 
isset($prefs['approval_from']) )
+                                               {
+                                                       $prefs2 = 
$this->bocommon->create_preferences('property', $prefs['approval_from']);
+
+                                                       
if(isset($prefs2['email']))
+                                                       {
+                                                               
$supervisor_email[] = array
+                                                               (
+                                                                       'id'    
  => $prefs['approval_from'],
+                                                                       
'address' => $prefs2['email'],
+                                                               );
+                                                               
$supervisor_email = array_reverse($supervisor_email);
+                                                       }
+                                                       unset($prefs2);
+                                               }
+                                               unset($prefs);
                                        }
-                                       unset($prefs2);
                                }
-                               unset($prefs);
                        }
-
                        
$workorder_status=(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['workorder_status'])?$GLOBALS['phpgw_info']['user']['preferences']['property']['workorder_status']:'');
                        if(!$values['status'])
                        {

Modified: branches/Version-1_0-branch/property/inc/export/default/Basware_X114
===================================================================
--- branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2012-05-10 11:50:22 UTC (rev 9359)
@@ -125,6 +125,59 @@
                                }
                        }
 
+
+                       //Add vouchers with split-line and approved amount = 
0.00
+                       $extra_candidates = array();
+                       $sql = "SELECT DISTINCT bilagsnr FROM fm_ecobilag WHERE 
(godkjentbelop = '0' OR godkjentbelop = '0.00') AND budsjettsigndato IS NULL";
+                       $this->db->query($sql,__LINE__,__FILE__);
+                       while( $this->db->next_record() )
+                       {
+                               $extra_candidates[]     = 
$this->db->f('bilagsnr');
+                       }
+
+                       foreach($extra_candidates as $extra_candidate)
+                       {
+                               if(in_array($extra_candidate, $vouchers))
+                               {
+                                       continue;
+                               }
+
+                               $sql = "SELECT 
bilagsnr,oppsynsigndato,saksigndato,budsjettsigndato FROM fm_ecobilag WHERE 
bilagsnr = {$extra_candidate} AND (godkjentbelop > 0 OR godkjentbelop < 0)";
+
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $transfer_extra         = true;
+                               while( $this->db->next_record() )
+                               {
+                                       $oppsynsigndato         = 
$this->db->f('oppsynsigndato');
+                                       $saksigndato            = 
$this->db->f('saksigndato');
+                                       $budsjettsigndato       = 
$this->db->f('budsjettsigndato');
+
+                                       
if(isset($this->config->config_data['common']['invoice_approval']) && 
$this->config->config_data['common']['invoice_approval']== 1)
+                                       {
+                                               if(!$budsjettsigndato)
+                                               {
+                                                       $transfer_extra = false;
+                                               }
+                                       }
+                                       else
+                                       {
+                                               if (!$budsjettsigndato)
+                                               {
+                                                       $transfer_extra = false;
+                                               }
+                                               else if ($budsjettsigndato && 
!$saksigndato && !$oppsynsigndato)
+                                               {
+                                                       $transfer_extra = false;
+                                               }
+                                       }
+                               }
+
+                               if($transfer_extra)
+                               {
+                                       $vouchers[] = $extra_candidate;
+                               }
+                       }
+
                        return $vouchers;
                }
 

Modified: branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php   
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php   
2012-05-10 11:50:22 UTC (rev 9359)
@@ -29,6 +29,7 @@
 
                        $db->debug = 
!!$config->config_data['external_db_debug'];
                        $db->Host = $config->config_data['external_db_host'];
+                       $db->Port = $config->config_data['external_db_port'];
                        $db->Type = $config->config_data['external_db_type'];
                        $db->Database = 
$config->config_data['external_db_name'];
                        $db->User = $config->config_data['external_db_user'];

Modified: branches/Version-1_0-branch/rental/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/rental/templates/base/config.tpl        
2012-05-10 11:39:08 UTC (rev 9358)
+++ branches/Version-1_0-branch/rental/templates/base/config.tpl        
2012-05-10 11:50:22 UTC (rev 9359)
@@ -124,6 +124,10 @@
                        <td>{lang_login_external_db_host}:</td>
                        <td><input name="newsettings[external_db_host]" 
value="{value_external_db_host}"></td>
                </tr>
+               <tr class="row_on">
+                       <td>{lang_login_external_db_port}:</td>
+                       <td><input name="newsettings[external_db_port]" 
value="{value_external_db_port}"></td>
+               </tr>
                <tr class="row_off">
                        <td>{lang_type}:</td>
                        <td>




reply via email to

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