fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7221] bkbooking: added delete allocation


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [7221] bkbooking: added delete allocation
Date: Fri, 15 Apr 2011 10:36:31 +0000

Revision: 7221
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7221
Author:   kjell
Date:     2011-04-15 10:36:31 +0000 (Fri, 15 Apr 2011)
Log Message:
-----------
bkbooking: added delete allocation

Added Paths:
-----------
    trunk/booking/templates/base/allocation_delete.xsl
    trunk/booking/templates/base/allocation_delete_preview.xsl

Added: trunk/booking/templates/base/allocation_delete.xsl
===================================================================
--- trunk/booking/templates/base/allocation_delete.xsl                          
(rev 0)
+++ trunk/booking/templates/base/allocation_delete.xsl  2011-04-15 10:36:31 UTC 
(rev 7221)
@@ -0,0 +1,123 @@
+<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+    <div id="content">
+
+       <dl class="form">
+       <dt class="heading"><xsl:value-of select="php:function('lang', 'Delete 
allocation')"/></dt>
+       </dl>
+    <xsl:call-template name="msgbox"/>
+       <xsl:call-template name="yui_booking_i18n"/>
+
+    <form action="" method="POST">
+               <input type="hidden" name="application_id" 
value="{allocation/application_id}"/>
+        <input id="field_org_id" name="organization_id" type="hidden" 
value="{allocation/organization_id}" />
+        <input id="field_building_id" name="building_id" type="hidden" 
value="{allocation/building_id}" />
+        <input id="field_from" name="from_" type="hidden" 
value="{allocation/from_}" />
+        <input id="field_to" name="to_" type="hidden" value="{allocation/to_}" 
/>
+
+        <dl class="form-col">
+
+            <dt><label for="field_building"><xsl:value-of 
select="php:function('lang', 'Building')" /></label></dt>
+            <dd>
+                <div class="autocomplete">
+                        <xsl:value-of select="allocation/building_name"/>
+                </div>
+            </dd>
+
+
+            <dt><label for="field_from"><xsl:value-of 
select="php:function('lang', 'From')" /></label></dt>
+            <dd>
+                <div>
+                    <xsl:value-of select="allocation/from_"/>
+                </div>
+            </dd>
+                       <dd>
+                <div> </div>
+                       </dd>
+                       <dt><label for="field_repeat_until"><xsl:value-of 
select="php:function('lang', 'Recurring allocation deletion')" /></label></dt>
+                       <dd>
+                               <label>
+                                       <input type="checkbox" name="outseason" 
id="outseason">
+                                               <xsl:if test="outseason='on'">
+                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                               </xsl:if>
+                                       </input>
+                                       <xsl:value-of 
select="php:function('lang', 'Out season')" />
+                               </label>
+                       </dd>
+                       <dd>
+                               <label>
+                                       <input type="checkbox" name="recurring" 
id="recurring">
+                                               <xsl:if test="recurring='on'">
+                                                       <xsl:attribute 
name="checked">checked</xsl:attribute>
+                                               </xsl:if>
+                                       </input>
+                                       <xsl:value-of 
select="php:function('lang', 'Delete until')" />
+                               </label>
+                       </dd>
+                       <dd class="date-picker">
+                               <input id="field_repeat_until" 
name="repeat_until" type="text">
+                                       <xsl:attribute 
name="value"><xsl:value-of select="repeat_until"/></xsl:attribute>
+                               </input>
+                       </dd>
+                       <dt><xsl:value-of select="php:function('lang', 
'Interval')" /></dt>
+                       <dd>
+                               <xsl:value-of select="../field_interval" />
+                               <select id="field_interval" 
name="field_interval">
+                                       <option value="1">
+                                               <xsl:if test="interval=1">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               <xsl:value-of 
select="php:function('lang', '1 week')" />
+                                       </option>
+                                       <option value="2">
+                                               <xsl:if test="interval=2">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               <xsl:value-of 
select="php:function('lang', '2 weeks')" />
+                                       </option>
+                                       <option value="3">
+                                               <xsl:if test="interval=3">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               <xsl:value-of 
select="php:function('lang', '3 weeks')" />
+                                       </option>
+                                       <option value="4">
+                                               <xsl:if test="interval=4">
+                                                       <xsl:attribute 
name="selected">selected</xsl:attribute>
+                                               </xsl:if>
+                                               <xsl:value-of 
select="php:function('lang', '4 weeks')" />
+                                       </option>
+                               </select>
+                       </dd>
+        </dl>
+        <dl class="form-col">
+            <dt><label for="field_org"><xsl:value-of 
select="php:function('lang', 'Organization')" /></label></dt>
+            <dd>
+                <div class="autocomplete">
+                        <xsl:value-of select="allocation/organization_name"/>
+                </div>
+            </dd>
+            <dt><label for="field_to"><xsl:value-of 
select="php:function('lang', 'To')" /></label></dt>
+            <dd>
+                <div>
+                    <xsl:value-of select="allocation/to_"/>
+                </div>
+            </dd>
+        </dl>
+        <div class="form-buttons">
+            <input type="submit">
+                               <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Delete')"/></xsl:attribute>
+                       </input>
+            <a class="cancel">
+                <xsl:attribute name="href"><xsl:value-of 
select="allocation/cancel_link"/></xsl:attribute>
+                <xsl:value-of select="php:function('lang', 'Cancel')" />
+            </a>
+        </div>
+    </form>
+    </div>
+    <script type="text/javascript">
+        YAHOO.booking.season_id = '<xsl:value-of 
select="allocation/season_id"/>';
+        YAHOO.booking.initialSelection = <xsl:value-of 
select="allocation/resources_json"/>;
+               var lang = <xsl:value-of select="php:function('js_lang', 
'Resource Type')"/>;
+    </script>
+</xsl:template>

Added: trunk/booking/templates/base/allocation_delete_preview.xsl
===================================================================
--- trunk/booking/templates/base/allocation_delete_preview.xsl                  
        (rev 0)
+++ trunk/booking/templates/base/allocation_delete_preview.xsl  2011-04-15 
10:36:31 UTC (rev 7221)
@@ -0,0 +1,70 @@
+<xsl:template match="data" xmlns:php="http://php.net/xsl";>
+    <div id="content">
+
+       <dl class="form">
+       <dt class="heading"><xsl:value-of select="php:function('lang', 'Delete 
Allocations')"/></dt>
+       </dl>
+    <xsl:call-template name="msgbox"/>
+       <xsl:call-template name="yui_booking_i18n"/>
+
+       <!-- <xsl:call-template name="xmlsource"/> -->
+
+           <form action="" method="POST">
+                       <input type="hidden" name="organization_name" 
value="{allocation/organization_name}"/>
+                       <input type="hidden" name="organization_id" 
value="{allocation/organization_id}"/>
+                       <input type="hidden" name="building_name" 
value="{allocation/building_name}"/>
+                       <input type="hidden" name="building_id" 
value="{allocation/building_id}"/>
+                       <input type="hidden" name="from_" value="{from_date}"/>
+                       <input type="hidden" name="to_" value="{to_date}"/>
+                       <input type="hidden" name="building_id" 
value="{allocation/building_id}"/>
+                       <input type="hidden" name="cost" 
value="{allocation/cost}"/>
+                       <input type="hidden" name="season_id" 
value="{allocation/season_id}"/>
+                       <input type="hidden" name="field_building_id" 
value="{allocation/building_id}"/>
+                       <input type="hidden" name="step" value="{step}" />
+                       <input type="hidden" name="repeat_until" 
value="{repeat_until}" />
+                       <input type="hidden" name="field_interval" 
value="{interval}" />
+                       <input type="hidden" name="outseason" 
value="{outseason}" />
+                       <xsl:for-each select="allocation/resources">
+                               <input type="hidden" name="resources[]" 
value="{.}" />
+                       </xsl:for-each>
+
+                       <h4><xsl:value-of select="php:function('lang', 
'Allocations that will be deleted')" /></h4>
+                       <div class="allocation-list">
+                               <xsl:for-each select="valid_dates">
+                                       <li>
+                                               <xsl:value-of select="from_"/> 
- <xsl:value-of select="to_"/>
+                                       </li>
+                               </xsl:for-each>
+                       </div>
+
+                       <h4><xsl:value-of select="php:function('lang', 
'Allocations  with existing bookings (%1)', count(result/invalid[from_]))" 
/></h4>
+                       <div class="allocation-list">
+                               <xsl:for-each select="invalid_dates">
+                                       <li>
+                                               <xsl:value-of select="from_"/> 
- <xsl:value-of select="to_"/>
+                                       </li>
+                               </xsl:for-each>
+                       </div>
+               <div class="form-buttons">
+                   <input type="submit" name="create">
+                               <xsl:attribute name="value"><xsl:value-of 
select="php:function('lang', 'Delete')" /></xsl:attribute>
+                               </input>
+                   <a class="cancel">
+                       <xsl:attribute name="href"><xsl:value-of 
select="allocation/cancel_link"/></xsl:attribute>
+                       <xsl:value-of select="php:function('lang', 'Cancel')" />
+                   </a>
+               </div>
+               </form>
+
+    </div>
+    <script type="text/javascript">
+        YAHOO.booking.initialSelection = <xsl:value-of 
select="allocation/resources_json"/>;
+    </script>
+</xsl:template>
+<xsl:template name="xmlsource">
+  NODE <xsl:value-of select="name()"/>
+  ATTR { <xsl:for-each select="attribute::*"><xsl:value-of 
select="name()"/>=<xsl:value-of select="."/> </xsl:for-each> }
+  CHILDREN: { <xsl:for-each select="*"><xsl:call-template 
name="xmlsource"/></xsl:for-each> }
+  TEXT <xsl:value-of select="text()"/>
+  <br/>
+</xsl:template>




reply via email to

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