fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8861]


From: Torstein
Subject: [Fmsystem-commits] [8861]
Date: Tue, 14 Feb 2012 12:29:42 +0000

Revision: 8861
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8861
Author:   vator
Date:     2012-02-14 12:29:41 +0000 (Tue, 14 Feb 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/component/class.calendar_builder.inc.php
    trunk/controller/templates/base/calendar/view_calendar_month.xsl
    trunk/controller/templates/base/calendar/view_calendar_year.xsl
    trunk/controller/templates/base/css/base.css

Modified: trunk/controller/inc/component/class.calendar_builder.inc.php
===================================================================
--- trunk/controller/inc/component/class.calendar_builder.inc.php       
2012-02-14 12:23:45 UTC (rev 8860)
+++ trunk/controller/inc/component/class.calendar_builder.inc.php       
2012-02-14 12:29:41 UTC (rev 8861)
@@ -19,7 +19,6 @@
 
                        $calendar_array = $this->init_calendar( $control, 
$calendar_array, $num, $period_type );
 
-                       // Inserts check_list object on deadline month in 
twelve_months_array
                        foreach($control->get_check_lists_array() as 
$check_list){
                                
                                $check_list_status_info = new 
check_list_status_info();
@@ -90,10 +89,12 @@
                        $to_month = 12;
                }
                
+               /*
                $todays_date_ts = mktime(0,0,0,date("m"), date("d"), date("Y"));
                
                $twelve_month_array = array();
                
+               
                for($i=1;$i<=12;$i++){
                        $trail_date_ts = strtotime("$i/01/$year");
 
@@ -105,7 +106,8 @@
 
                        $twelve_month_array[$i-1]["status"] = $status;
                }
-                       
+               */
+               
                for($from_month;$from_month<=$to_month;$from_month++){
        
                        $trail_from_date_ts = strtotime("$from_month/01/$year");
@@ -142,7 +144,7 @@
                $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 on behalf of repeat type and repeat interval
+               // Inserts dates 
                foreach($dates_array as $date){
                        
                        $todays_date = mktime(0,0,0,date("m"), date("d"), 
date("Y"));

Modified: trunk/controller/templates/base/calendar/view_calendar_month.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_month.xsl    
2012-02-14 12:23:45 UTC (rev 8860)
+++ trunk/controller/templates/base/calendar/view_calendar_month.xsl    
2012-02-14 12:29:41 UTC (rev 8861)
@@ -146,99 +146,13 @@
                                        </li>
                                        <xsl:choose>    
                                        <xsl:when 
test="controls_calendar_array/child::node()">
-                                       <xsl:for-each 
select="controls_calendar_array">
-                                       <li>
-                                               <xsl:for-each 
select="calendar_array">
-                                                       <xsl:choose>
-                                                                       
<xsl:when test="status = 'control_registered'">
-                                                                               
<div>
-                                                                               
<a>
-                                                                               
        <xsl:attribute name="href">
-                                                                               
                
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
-                                                                               
                <xsl:text>&amp;date=</xsl:text>
-                                                                               
                <xsl:value-of select="info/date"/>
-                                                                               
                <xsl:text>&amp;control_id=</xsl:text>
-                                                                               
                <xsl:value-of select="info/control_id"/>
-                                                                               
                <xsl:text>&amp;location_code=</xsl:text>
-                                                                               
                <xsl:value-of select="$location_code"/>
-                                                                               
        </xsl:attribute>
-                                                                               
        <img height="15" src="controller/images/status_icon_yellow_ring.png" />
-                                                                               
</a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_planned'">
-                                                                               
<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>
-                                                                               
        <img height="15" src="controller/images/status_icon_yellow.png" />
-                                                                               
</a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_accomplished_in_time_without_errors'">
-                                                                               
<div>
+                                               <xsl:for-each 
select="controls_calendar_array">
+                                               <li>
+                                                       <xsl:for-each 
select="calendar_array">
+                                                               <xsl:choose>
+                                                                               
<xsl:when test="status = 'control_registered'">
+                                                                               
        <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_dark_green.png" />
-                                                                               
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_accomplished_over_time_without_errors'">
-                                                                               
<div style="position:relative;">
-                                                                               
<div id="info_box" style="position:absolute;display:none;"></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_accomplished_with_errors'">
-                                                                               
<div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
-                                                                               
        <div id="info_box" style="position:absolute;display:none;"></div>
-                                                                               
<a class="view_check_list">
-                                                                               
                <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>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_not_accomplished_with_info'">
-                                                                               
<div style="position:relative;">
-                                                                               
<div id="info_box" style="position:absolute;display:none;"></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_red_cross.png" />
-                                                                               
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_not_accomplished'">
-                                                                               
<div>
-                                                                               
        <a>
                                                                                
                <xsl:attribute name="href">
                                                                                
                        
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
                                                                                
                        <xsl:text>&amp;date=</xsl:text>
@@ -248,23 +162,108 @@
                                                                                
                        <xsl:text>&amp;location_code=</xsl:text>
                                                                                
                        <xsl:value-of select="$location_code"/>
                                                                                
                </xsl:attribute>
-                                                                               
                <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                                                               
                <img height="15" 
src="controller/images/status_icon_yellow_ring.png" />
                                                                                
        </a>
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:when test="status = 'control_canceled'">
-                                                                               
<div>
-                                                                               
        <img height="15" src="controller/images/status_icon_red_cross.png" />
-                                                                               
</div>
-                                                                       
</xsl:when>
-                                                                       
<xsl:otherwise>
-                                                                       
<div></div>
-                                                                       
</xsl:otherwise>
-                                                               </xsl:choose>
-                                                       </xsl:for-each>
-                                               </li>
-                                               
-                                       </xsl:for-each>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_planned'">
+                                                                               
        <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>
+                                                                               
                <img height="15" src="controller/images/status_icon_yellow.png" 
/>
+                                                                               
        </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_accomplished_in_time_without_errors'">
+                                                                               
        <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_dark_green.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_accomplished_over_time_without_errors'">
+                                                                               
        <div style="position:relative;">
+                                                                               
        <div id="info_box" style="position:absolute;display:none;"></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_accomplished_with_errors'">
+                                                                               
        <div style="position:relative;background: 
url(controller/images/status_icon_red_empty.png) no-repeat 50% 50%;">
+                                                                               
                <div id="info_box" 
style="position:absolute;display:none;"></div>
+                                                                               
        <a class="view_check_list">
+                                                                               
                        <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>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_not_accomplished_with_info'">
+                                                                               
        <div style="position:relative;">
+                                                                               
        <div id="info_box" style="position:absolute;display:none;"></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_red_cross.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_not_accomplished'">
+                                                                               
        <div>
+                                                                               
                <a>
+                                                                               
                        <xsl:attribute name="href">
+                                                                               
                                
<xsl:text>index.php?menuaction=controller.uicheck_list.add_check_list</xsl:text>
+                                                                               
                                <xsl:text>&amp;date=</xsl:text>
+                                                                               
                                <xsl:value-of select="info/date"/>
+                                                                               
                                <xsl:text>&amp;control_id=</xsl:text>
+                                                                               
                                <xsl:value-of select="info/control_id"/>
+                                                                               
                                <xsl:text>&amp;location_code=</xsl:text>
+                                                                               
                                <xsl:value-of select="$location_code"/>
+                                                                               
                        </xsl:attribute>
+                                                                               
                        <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                                                               
                </a>
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:when test="status = 'control_canceled'">
+                                                                               
        <div>
+                                                                               
                <img height="15" 
src="controller/images/status_icon_red_cross.png" />
+                                                                               
        </div>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
<div></div>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </xsl:for-each>
+                                                       </li>
+                                               </xsl:for-each>
                                        </xsl:when>
                                        <xsl:otherwise>
                                                <div>Ingen sjekklister for bygg 
i angitt periode</div>

Modified: trunk/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_year.xsl     
2012-02-14 12:23:45 UTC (rev 8860)
+++ trunk/controller/templates/base/calendar/view_calendar_year.xsl     
2012-02-14 12:29:41 UTC (rev 8861)
@@ -53,10 +53,12 @@
                        </xsl:choose>
                                        
                        <ul id="icon_color_map">
-                               <li><img height="15" 
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroller satt 
opp</span></li>
-                               <li><img height="15" 
src="controller/images/status_icon_dark_green.png" /><span>Kontroller 
gjennomført uten feil</span></li>
-                               <li><img height="15" 
src="controller/images/status_icon_red_empty.png" /><span>Kontroller 
gjennomført med rapporterte feil</span></li>
-                               <li><img height="15" 
src="controller/images/status_icon_red_cross.png" /><span>Kontroller ikke 
gjennomført</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt 
opp</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt 
dato</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_dark_green.png" /><span>Kontroll gjennomført 
uten feil før frist</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_light_green.png" /><span>Kontroll 
gjennomført uten feil etter frist</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_red_empty.png" /><span>Kontroll gjennomført 
med rapporterte feil</span></li>
+                               <li><img height="15" 
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke 
gjennomført</span></li>
                        </ul>
                </div>
                

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-02-14 12:23:45 UTC 
(rev 8860)
+++ trunk/controller/templates/base/css/base.css        2012-02-14 12:29:41 UTC 
(rev 8861)
@@ -868,6 +868,7 @@
     width: 37%;
 }
 ul.calendar.days li div {
+    height: 17px;
     width: 24px;
 }
 ul.calendar.days {




reply via email to

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