fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8516]


From: Torstein
Subject: [Fmsystem-commits] [8516]
Date: Sat, 07 Jan 2012 14:40:29 +0000

Revision: 8516
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8516
Author:   vator
Date:     2012-01-07 14:40:28 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/component/class.calendar_builder.inc.php

Added Paths:
-----------
    trunk/controller/templates/base/check_list/add_check_list_for_location.xsl

Removed Paths:
-------------
    trunk/controller/templates/base/add_check_list_for_location.xsl

Modified: trunk/controller/inc/component/class.calendar_builder.inc.php
===================================================================
--- trunk/controller/inc/component/class.calendar_builder.inc.php       
2012-01-07 14:08:08 UTC (rev 8515)
+++ trunk/controller/inc/component/class.calendar_builder.inc.php       
2012-01-07 14:40:28 UTC (rev 8516)
@@ -27,8 +27,14 @@
                        // Inserts dates on behalf of repeat type and repeat 
interval
                        foreach($dates_array as $date){
                                
-                               $status = "control_registered";
+                               $todays_date = mktime(0,0,0,date("m"), 
date("d"), date("Y"));
                                
+                               if($date < $todays_date){
+                                       $status = "control_canceled";
+                               }else{
+                                       $status = "control_registered";
+                               }
+                               
                                if( $period_type == "view_months" )
                                {
                                        $calendar_array[ date("n", $date) 
]["status"]  = $status;

Deleted: trunk/controller/templates/base/add_check_list_for_location.xsl
===================================================================
--- trunk/controller/templates/base/add_check_list_for_location.xsl     
2012-01-07 14:08:08 UTC (rev 8515)
+++ trunk/controller/templates/base/add_check_list_for_location.xsl     
2012-01-07 14:40:28 UTC (rev 8516)
@@ -1,91 +0,0 @@
-<!-- $Id$ -->
-<xsl:template match="data" xmlns:php="http://php.net/xsl";>
-<xsl:variable name="date_format">d/m-Y</xsl:variable>
-
-
-<script>
-       $(function() {
-               $( "#planned_date" ).datepicker({ 
-                       monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
-                       dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
-                       dateFormat: 'dd/mm-yy' 
-               });
-               $( "#completed_date" ).datepicker({ 
-                       monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
-                       dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
-                       dateFormat: 'dd/mm-yy' 
-               });
-       });
-</script>
-               
-
-<div id="main_content">
-       
-       <h1>Registrere sjekkliste for <xsl:value-of 
select="location_array/loc1_name"/></h1>
-       
-       <div class="tab_menu"><a class="active">Sjekklistedetaljer</a></div>
-       <fieldset class="check_list_details">
-               <form id="frm_add_check_list" 
action="index.php?menuaction=controller.uicheck_list_for_location.save_check_list_for_location"
 method="post">
-                                       
-                       <div id="calendar_dates">
-                               <xsl:for-each select="calendar_array">
-                                       <xsl:variable 
name="cal_date"><xsl:value-of select="."/></xsl:variable>
-                                               
-                                       <span><xsl:value-of 
select="php:function('date', $date_format, number( $cal_date ) )"/></span>
-                               </xsl:for-each>
-                       </div>
-               
-                       <xsl:variable name="location_code"><xsl:value-of 
select="location_array/location_code"/></xsl:variable>
-                       <xsl:variable name="control_id"><xsl:value-of 
select="control_array/id"/></xsl:variable>
-               
-                       <input type="hidden" name="control_id" 
value="{$control_id}" />
-                       <input type="hidden" name="location_code" 
value="{$location_code}" />
-
-                       <fieldset class="add_check_list">
-                               <div>
-                                       <label>Status</label>
-                                       <select name="status">
-                                               <option value="0" 
SELECTED="SELECTED">Ikke utført</option>
-                                               <option value="1" 
>Utført</option>
-                                       </select>
-                               </div>
-                               <div>
-                                       <label>Fristdato</label>
-                                       <input>
-                                     <xsl:attribute 
name="id">deadline_date</xsl:attribute>
-                                     <xsl:attribute 
name="name">deadline_date</xsl:attribute>
-                                     <xsl:attribute 
name="type">text</xsl:attribute>
-                                     <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, number(deadline))"/></xsl:attribute>
-                                   </input>
-                           </div>
-                               <div>
-                                       <label>Planlagt dato</label>
-                                       <input>
-                                     <xsl:attribute 
name="id">planned_date</xsl:attribute>
-                                     <xsl:attribute 
name="name">planned_date</xsl:attribute>
-                                     <xsl:attribute 
name="type">text</xsl:attribute>
-                                     <xsl:attribute 
name="value"></xsl:attribute>
-                                   </input>
-                           </div>
-                           <div>
-                                       <label>Utført dato</label>
-                                       <input>
-                                     <xsl:attribute 
name="id">completed_date</xsl:attribute>
-                                     <xsl:attribute 
name="name">completed_date</xsl:attribute>
-                                     <xsl:attribute 
name="type">text</xsl:attribute>
-                                         <xsl:if 
test="check_list/completed_date != ''">
-                                       <xsl:attribute 
name="value"><xsl:value-of select="php:function('date', $date_format, 
number(check_list/completed_date))"/></xsl:attribute>
-                                     </xsl:if>
-                                   </input>
-                           </div>
-                               <div><label>Utstyr</label><input 
name="equipment_id" /></div>
-                       </fieldset>
-                       <div class="form-buttons">
-                               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save_check_list')" /></xsl:variable>
-                               <input style="width: 170px;" class="btn 
not_active" type="submit" name="save_control" value="Lagre detaljer" />
-                       </div>
-               </form>
-       </fieldset>
-       
-        </div>
-</xsl:template>

Copied: 
trunk/controller/templates/base/check_list/add_check_list_for_location.xsl 
(from rev 8489, trunk/controller/templates/base/add_check_list_for_location.xsl)
===================================================================
--- trunk/controller/templates/base/check_list/add_check_list_for_location.xsl  
                        (rev 0)
+++ trunk/controller/templates/base/check_list/add_check_list_for_location.xsl  
2012-01-07 14:40:28 UTC (rev 8516)
@@ -0,0 +1,91 @@
+<!-- $Id$ -->
+<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+<xsl:variable name="date_format">d/m-Y</xsl:variable>
+
+
+<script>
+       $(function() {
+               $( "#planned_date" ).datepicker({ 
+                       monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
+                       dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
+                       dateFormat: 'dd/mm-yy' 
+               });
+               $( "#completed_date" ).datepicker({ 
+                       monthNames: 
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
+                       dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
+                       dateFormat: 'dd/mm-yy' 
+               });
+       });
+</script>
+               
+
+<div id="main_content">
+       
+       <h1>Registrere sjekkliste for <xsl:value-of 
select="location_array/loc1_name"/></h1>
+       
+       <div class="tab_menu"><a class="active">Sjekklistedetaljer</a></div>
+       <fieldset class="check_list_details">
+               <form id="frm_add_check_list" 
action="index.php?menuaction=controller.uicheck_list_for_location.save_check_list_for_location"
 method="post">
+                                       
+                       <div id="calendar_dates">
+                               <xsl:for-each select="calendar_array">
+                                       <xsl:variable 
name="cal_date"><xsl:value-of select="."/></xsl:variable>
+                                               
+                                       <span><xsl:value-of 
select="php:function('date', $date_format, number( $cal_date ) )"/></span>
+                               </xsl:for-each>
+                       </div>
+               
+                       <xsl:variable name="location_code"><xsl:value-of 
select="location_array/location_code"/></xsl:variable>
+                       <xsl:variable name="control_id"><xsl:value-of 
select="control_array/id"/></xsl:variable>
+               
+                       <input type="hidden" name="control_id" 
value="{$control_id}" />
+                       <input type="hidden" name="location_code" 
value="{$location_code}" />
+
+                       <fieldset class="add_check_list">
+                               <div>
+                                       <label>Status</label>
+                                       <select name="status">
+                                               <option value="0" 
SELECTED="SELECTED">Ikke utført</option>
+                                               <option value="1" 
>Utført</option>
+                                       </select>
+                               </div>
+                               <div>
+                                       <label>Fristdato</label>
+                                       <input>
+                                     <xsl:attribute 
name="id">deadline_date</xsl:attribute>
+                                     <xsl:attribute 
name="name">deadline_date</xsl:attribute>
+                                     <xsl:attribute 
name="type">text</xsl:attribute>
+                                     <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, number(deadline))"/></xsl:attribute>
+                                   </input>
+                           </div>
+                               <div>
+                                       <label>Planlagt dato</label>
+                                       <input>
+                                     <xsl:attribute 
name="id">planned_date</xsl:attribute>
+                                     <xsl:attribute 
name="name">planned_date</xsl:attribute>
+                                     <xsl:attribute 
name="type">text</xsl:attribute>
+                                     <xsl:attribute 
name="value"></xsl:attribute>
+                                   </input>
+                           </div>
+                           <div>
+                                       <label>Utført dato</label>
+                                       <input>
+                                     <xsl:attribute 
name="id">completed_date</xsl:attribute>
+                                     <xsl:attribute 
name="name">completed_date</xsl:attribute>
+                                     <xsl:attribute 
name="type">text</xsl:attribute>
+                                         <xsl:if 
test="check_list/completed_date != ''">
+                                       <xsl:attribute 
name="value"><xsl:value-of select="php:function('date', $date_format, 
number(check_list/completed_date))"/></xsl:attribute>
+                                     </xsl:if>
+                                   </input>
+                           </div>
+                               <div><label>Utstyr</label><input 
name="equipment_id" /></div>
+                       </fieldset>
+                       <div class="form-buttons">
+                               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save_check_list')" /></xsl:variable>
+                               <input style="width: 170px;" class="btn 
not_active" type="submit" name="save_control" value="Lagre detaljer" />
+                       </div>
+               </form>
+       </fieldset>
+       
+        </div>
+</xsl:template>


Property changes on: 
trunk/controller/templates/base/check_list/add_check_list_for_location.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Revision Author Id




reply via email to

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