fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17404] booking: organization documents


From: sigurdne
Subject: [Fmsystem-commits] [17404] booking: organization documents
Date: Wed, 6 Dec 2017 10:21:28 -0500 (EST)

Revision: 17404
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17404
Author:   sigurdne
Date:     2017-12-06 10:21:27 -0500 (Wed, 06 Dec 2017)
Log Message:
-----------
booking: organization documents

Modified Paths:
--------------
    trunk/booking/setup/setup.inc.php
    trunk/booking/setup/tables_current.inc.php
    trunk/booking/setup/tables_update.inc.php
    trunk/booking/templates/base/organization.xsl

Modified: trunk/booking/setup/setup.inc.php
===================================================================
--- trunk/booking/setup/setup.inc.php   2017-12-06 15:20:53 UTC (rev 17403)
+++ trunk/booking/setup/setup.inc.php   2017-12-06 15:21:27 UTC (rev 17404)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.28';
+       $setup_info['booking']['version'] = '0.2.29';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';
@@ -40,6 +40,7 @@
                'bb_document_building',
                'bb_document_resource',
                'bb_document_application',
+               'bb_document_organization',
                'bb_permission',
                'bb_permission_root',
                'bb_organization_contact',

Modified: trunk/booking/setup/tables_current.inc.php
===================================================================
--- trunk/booking/setup/tables_current.inc.php  2017-12-06 15:20:53 UTC (rev 
17403)
+++ trunk/booking/setup/tables_current.inc.php  2017-12-06 15:21:27 UTC (rev 
17404)
@@ -568,6 +568,21 @@
                        'ix' => array(),
                        'uc' => array()
                ),
+               'bb_document_organization' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'nullable' => 
false),
+                               'name' => array('type' => 'varchar', 
'precision' => '255', 'nullable' => false),
+                               'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                               'category' => array('type' => 'varchar', 
'precision' => '150', 'nullable' => false),
+                               'description' => array('type' => 'text', 
'nullable' => true),
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array(
+                               "bb_organization" => array('owner_id' => 'id'),
+                       ),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
                'bb_permission' => array(
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
false),

Modified: trunk/booking/setup/tables_update.inc.php
===================================================================
--- trunk/booking/setup/tables_update.inc.php   2017-12-06 15:20:53 UTC (rev 
17403)
+++ trunk/booking/setup/tables_update.inc.php   2017-12-06 15:21:27 UTC (rev 
17404)
@@ -3623,3 +3623,38 @@
                        return $GLOBALS['setup_info']['booking']['currentver'];
                }
        }
+
+       /**
+        * Update booking version from 0.2.28 to 0.2.29
+        *
+        */
+       $test[] = '0.2.28';
+       function booking_upgrade0_2_28()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'bb_document_organization', array(
+                               'fd' => array(
+                                       'id' => array('type' => 'auto', 
'nullable' => false),
+                                       'name' => array('type' => 'varchar', 
'precision' => '255', 'nullable' => false),
+                                       'owner_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
+                                       'category' => array('type' => 
'varchar', 'precision' => '150', 'nullable' => false),
+                                       'description' => array('type' => 
'text', 'nullable' => true),
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(
+                                       "bb_organization" => array('owner_id' 
=> 'id'),
+                               ),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+               if ($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.29';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+

Modified: trunk/booking/templates/base/organization.xsl
===================================================================
--- trunk/booking/templates/base/organization.xsl       2017-12-06 15:20:53 UTC 
(rev 17403)
+++ trunk/booking/templates/base/organization.xsl       2017-12-06 15:21:27 UTC 
(rev 17404)
@@ -131,6 +131,24 @@
                                                        <xsl:value-of 
select="organization/district"/>
                                                </span>
                                        </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'Documents')" />
+                                               </label>
+                                               <div class="pure-custom">
+                                                       <div 
id="documents_container" class="custom-container"></div>
+                                                       <div>
+                                                               <a 
class='button'>
+                                                                       
<xsl:attribute name="href">
+                                                                               
<xsl:value-of select="organization/add_document_link"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="organization/permission/write">
+                                                                               
<xsl:value-of select="php:function('lang', 'Add Document')" />
+                                                                       
</xsl:if>
+                                                               </a>
+                                                       </div>
+                                               </div>
+                                       </div>
                                </fieldset>
                        </div>
                </div>
@@ -146,4 +164,16 @@
                        </xsl:attribute>
                </input>                
        </div>
+       <script type="text/javascript">
+               var organization_id = <xsl:value-of select="organization/id"/>;
+               var lang = <xsl:value-of select="php:function('js_lang', 
'Name', 'Category', 'Actions', 'Account', 'Role', 'Edit', 'Delete', 'Resource 
Type', 'Sort order')"/>;
+
+    <![CDATA[
+        var documentsURL     = 
'index.php?menuaction=booking.uidocument_organization.index&sort=name&filter_owner_id='
 + organization_id + '&phpgw_return_as=json&';
+        ]]>
+               var colDefsDocuments = [{key: 'name', label: lang['Name'], 
formatter: genericLink}, {key: 'category', label: lang['Category']}, {key: 
'actions', label: lang['Actions'], formatter: genericLink({name: 'edit', 
label:lang['Edit']}, {name: 'delete', label:lang['Delete']})}];
+
+               
createTable('documents_container',documentsURL,colDefsDocuments);
+       </script>
+
 </xsl:template>




reply via email to

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