fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17081] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [17081] more on eventplanner
Date: Sat, 16 Sep 2017 15:02:40 -0400 (EDT)

Revision: 17081
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17081
Author:   sigurdne
Date:     2017-09-16 15:02:40 -0400 (Sat, 16 Sep 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplanner/inc/class.sobooking.inc.php
    trunk/eventplanner/inc/class.uibooking.inc.php
    trunk/eventplanner/setup/phpgw_no.lang
    trunk/eventplanner/templates/base/application.xsl
    trunk/eventplannerfrontend/inc/class.menu.inc.php
    trunk/eventplannerfrontend/inc/class.uibooking.inc.php
    trunk/eventplannerfrontend/templates/base/application.xsl

Modified: trunk/eventplanner/inc/class.sobooking.inc.php
===================================================================
--- trunk/eventplanner/inc/class.sobooking.inc.php      2017-09-15 19:00:43 UTC 
(rev 17080)
+++ trunk/eventplanner/inc/class.sobooking.inc.php      2017-09-16 19:02:40 UTC 
(rev 17081)
@@ -55,6 +55,15 @@
                        return self::$so;
                }
 
+               function _get_conditions( $query, $filters )
+               {
+                       $clauses = parent::_get_conditions($query, $filters);
+
+                       $clauses .= ' AND customer_id IS NOT NULL';
+
+                       return $clauses;
+
+               }
                function get_acl_condition( )
                {
                        if($this->relaxe_acl)

Modified: trunk/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uibooking.inc.php      2017-09-15 19:00:43 UTC 
(rev 17080)
+++ trunk/eventplanner/inc/class.uibooking.inc.php      2017-09-16 19:02:40 UTC 
(rev 17081)
@@ -82,23 +82,6 @@
                                'form' => array(
                                        'toolbar' => array(
                                                'item' => array(
-//                                                     array(
-//                                                             'type' => 
'autocomplete',
-//                                                             'name' => 
'application',
-//                                                             'app' => 
$this->currentapp,
-//                                                             'ui' => 
'application',
-//                                                             'function' => 
'get_list',
-//                                                             'label_attr' => 
'title',
-//                                                             'text' => 
lang('application') . ':',
-//                                                             
'requestGenerator' => 'requestWithApplicationFilter'
-//                                                     ),
-                                                       array(
-                                                               'type' => 
'checkbox',
-                                                               'name' => 
'filter_active',
-                                                               'text' => 
lang('showall'),
-                                                               'value' => 1,
-                                                               'checked' => 1,
-                                                       )
                                                )
                                        )
                                ),

Modified: trunk/eventplanner/setup/phpgw_no.lang
===================================================================
--- trunk/eventplanner/setup/phpgw_no.lang      2017-09-15 19:00:43 UTC (rev 
17080)
+++ trunk/eventplanner/setup/phpgw_no.lang      2017-09-16 19:02:40 UTC (rev 
17081)
@@ -166,4 +166,5 @@
 default application category   eventplanner    no      Default søknadskategori
 vendor name    eventplanner    no      Artistnavn/utøver/gruppe
 sum    eventplanner    no      Sum
-active application year        eventplanner    no      Aktivt søknadsår
\ No newline at end of file
+active application year        eventplanner    no      Aktivt søknadsår
+my bookings    eventplanner    no      Mine bookinger
\ No newline at end of file

Modified: trunk/eventplanner/templates/base/application.xsl
===================================================================
--- trunk/eventplanner/templates/base/application.xsl   2017-09-15 19:00:43 UTC 
(rev 17080)
+++ trunk/eventplanner/templates/base/application.xsl   2017-09-16 19:02:40 UTC 
(rev 17081)
@@ -582,7 +582,9 @@
                                                                                
<thead>
                                                                                
        <tr>
                                                                                
                <th></th>
-                                                                               
                <th>Minutt</th>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'minute')"/>
+                                                                               
                </th>
                                                                                
        </tr>
                                                                                
</thead>
                                                                                
<tbody>
@@ -591,13 +593,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig up min 
before')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="3">
+                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig up min before')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>
@@ -606,13 +611,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig down 
min after')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="3">
+                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig down min after')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>

Modified: trunk/eventplannerfrontend/inc/class.menu.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.menu.inc.php   2017-09-15 19:00:43 UTC 
(rev 17080)
+++ trunk/eventplannerfrontend/inc/class.menu.inc.php   2017-09-16 19:02:40 UTC 
(rev 17081)
@@ -126,7 +126,7 @@
                                ),
                                'customer' => array(
                                        'text' => lang('customer'),
-                                       'url' =>  
phpgwapi_uicommon_jquery::link(  array('menuaction' => 
"eventplannerfrontend.uicustomer.index")),
+                                       'url' =>  
phpgwapi_uicommon_jquery::link( array('menuaction' => 
"eventplannerfrontend.uicustomer.index")),
                                        'image' => array('customer', 'navbar'),
                                ),
                                'new_user' => array(
@@ -135,6 +135,19 @@
                                        'image' => array('user', 'navbar'),
                                )
                );
+
+                       if ($GLOBALS['phpgw']->acl->check('.booking', 
PHPGW_ACL_READ, 'eventplannerfrontend'))
+                       {
+                               $menus['navigation']['customer']['children'] = 
array(
+                                               'booking' => array(
+                                                       'text' => lang('my 
bookings'),
+                                                       'url' => 
phpgwapi_uicommon_jquery::link( array('menuaction' => 
"eventplannerfrontend.uibooking.index")),
+                                                       'image' => 
array('customer', 'navbar'),
+                                               )
+                                       );
+
+                       }
+
                        $GLOBALS['phpgw_info']['flags']['currentapp'] = 
$incoming_app;
                        return $menus;
                }

Modified: trunk/eventplannerfrontend/inc/class.uibooking.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.uibooking.inc.php      2017-09-15 
19:00:43 UTC (rev 17080)
+++ trunk/eventplannerfrontend/inc/class.uibooking.inc.php      2017-09-16 
19:02:40 UTC (rev 17081)
@@ -10,10 +10,26 @@
                        parent::__construct();
                }
 
+               public function index( )
+               {
+                       if (empty($this->permissions[PHPGW_ACL_READ]))
+                       {
+                               phpgw::no_access();
+                       }
+
+                       if (phpgw::get_var('phpgw_return_as') == 'json')
+                       {
+                               return $this->query();
+                       }
+
+                       
self::set_active_menu("{$this->currentapp}::customer::booking");
+                       parent::index();
+               }
+
                public function query()
                {
                        $params = $this->bo->build_default_read_params();
-                       $params['filters']['status'] = 
eventplanner_application::STATUS_APPROVED;
+       //              $params['filters']['status'] = 
eventplanner_application::STATUS_APPROVED;
                        $values = $this->bo->read($params);
                        array_walk($values["results"], array($this, 
"_add_links"), "eventplannerfrontend.uibooking.edit");
 

Modified: trunk/eventplannerfrontend/templates/base/application.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application.xsl   2017-09-15 
19:00:43 UTC (rev 17080)
+++ trunk/eventplannerfrontend/templates/base/application.xsl   2017-09-16 
19:02:40 UTC (rev 17081)
@@ -542,7 +542,9 @@
                                                                                
<thead>
                                                                                
        <tr>
                                                                                
                <th></th>
-                                                                               
                <th>Minutt</th>
+                                                                               
                <th>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'minute')"/>
+                                                                               
                </th>
                                                                                
        </tr>
                                                                                
</thead>
                                                                                
<tbody>
@@ -551,13 +553,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig up min 
before')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="3">
+                                                                               
                        <input type="text" id="rig_up_min_before" 
name="rig_up_min_before" value="{application/rig_up_min_before}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig up min before')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>
@@ -566,13 +571,16 @@
                                                                                
                        <xsl:value-of select="php:function('lang', 'rig down 
min after')"/>
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="3">
+                                                                               
                        <input type="text" id="rig_down_min_after" 
name="rig_down_min_after" value="{application/rig_down_min_after}" size="5">
                                                                                
                                <xsl:attribute name="data-validation">
                                                                                
                                        <xsl:text>number</xsl:text>
                                                                                
                                </xsl:attribute>
-                                                                               
                                <xsl:attribute name="data-validation-optional">
-                                                                               
                                        <xsl:text>true</xsl:text>
+                                                                               
                                <xsl:attribute name="data-validation-error-msg">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'rig down min after')"/>
                                                                                
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="placeholder">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'integer')"/>
+                                                                               
                                </xsl:attribute>
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>




reply via email to

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