fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11044] property: download agreement details


From: Sigurd Nes
Subject: [Fmsystem-commits] [11044] property: download agreement details
Date: Wed, 10 Apr 2013 07:15:02 +0000

Revision: 11044
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11044
Author:   sigurdne
Date:     2013-04-10 07:14:59 +0000 (Wed, 10 Apr 2013)
Log Message:
-----------
property: download agreement details

Modified Paths:
--------------
    trunk/property/inc/class.soagreement.inc.php
    trunk/property/inc/class.uiagreement.inc.php
    trunk/property/templates/base/agreement.xsl

Modified: trunk/property/inc/class.soagreement.inc.php
===================================================================
--- trunk/property/inc/class.soagreement.inc.php        2013-04-09 14:35:14 UTC 
(rev 11043)
+++ trunk/property/inc/class.soagreement.inc.php        2013-04-10 07:14:59 UTC 
(rev 11044)
@@ -386,14 +386,14 @@
 
                function read_details($data)
                {
-                               $start                  = isset($data['start']) 
&& $data['start'] ? $data['start']:0;
-                               $filter                 = 
isset($data['filter']) && $data['filter'] ? $data['filter']:'none';
-                               $query                  = isset($data['query']) 
? $data['query'] : '';
-                               $sort                   = isset($data['sort']) 
&& $data['sort'] ? $data['sort']:'DESC';
-                               $order                  = isset($data['order']) 
? $data['order'] : '';
-                               $cat_id                 = 
isset($data['cat_id']) ? $data['cat_id'] : '';
-                               $allrows                = 
isset($data['allrows']) ? $data['allrows'] : '';
-                               $agreement_id   = isset($data['agreement_id']) 
? $data['agreement_id'] : '';
+                       $start                  = isset($data['start']) && 
$data['start'] ? $data['start']:0;
+                       $filter                 = isset($data['filter']) && 
$data['filter'] ? $data['filter']:'none';
+                       $query                  = isset($data['query']) ? 
$data['query'] : '';
+                       $sort                   = isset($data['sort']) && 
$data['sort'] ? $data['sort']:'DESC';
+                       $order                  = isset($data['order']) ? 
$data['order'] : '';
+                       $cat_id                 = isset($data['cat_id']) ? 
$data['cat_id'] : '';
+                       $allrows                = isset($data['allrows']) ? 
$data['allrows'] : '';
+                       $agreement_id   = isset($data['agreement_id']) ? 
$data['agreement_id'] : '';
 
                        $allrows = true; // return all..
 

Modified: trunk/property/inc/class.uiagreement.inc.php
===================================================================
--- trunk/property/inc/class.uiagreement.inc.php        2013-04-09 14:35:14 UTC 
(rev 11043)
+++ trunk/property/inc/class.uiagreement.inc.php        2013-04-10 07:14:59 UTC 
(rev 11044)
@@ -1517,6 +1517,7 @@
                function download()
                {
                        $id     = phpgw::get_var('id', 'int');
+                       $this->bo->allrows      = true;
                        if($id)
                        {
                                $list = $this->bo->read_details($id);
@@ -2188,6 +2189,13 @@
                                        'values'        =>      
json_encode(array(array(key => 
file_name,label=>lang('Filename'),sortable=>false,resizeable=>true)))
                                );
 
+
+                       $link_download = array
+                               (
+                                       'menuaction'    => 
'property.uiagreement.download',
+                                       'id'            =>$agreement_id
+                               );
+
                        $data = array
                                (
                                        'property_js'                           
=> 
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
@@ -2256,7 +2264,13 @@
                                        'lang_status'                           
=> lang('Status'),
                                        'status_list'                           
=> $this->bo->select_status_list('select',$agreement['status']),
                                        'textareacols'                          
=> 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] : 40,
-                                       'textarearows'                          
=> 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] : 6
+                                       'textarearows'                          
=> 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] : 6,
+
+                                       'lang_download'                         
=> 'download',
+                                       'link_download'                         
=> $GLOBALS['phpgw']->link('/index.php',$link_download),
+                                       'lang_download_help'            => 
lang('Download table to your browser'),
+
+
                                );
 
                        //---datatable settings--------------------

Modified: trunk/property/templates/base/agreement.xsl
===================================================================
--- trunk/property/templates/base/agreement.xsl 2013-04-09 14:35:14 UTC (rev 
11043)
+++ trunk/property/templates/base/agreement.xsl 2013-04-10 07:14:59 UTC (rev 
11044)
@@ -1358,9 +1358,22 @@
                        <br/>
                        <xsl:choose>
                                <xsl:when test="values!=''">
-                                       <table align="center">
+                                       <table>
                                                <tr>
                                                        <td align="center">
+                                                               <xsl:variable 
name="link_download">
+                                                                       
<xsl:value-of select="link_download"/>
+                                                               </xsl:variable>
+                                                               <xsl:variable 
name="lang_download_help">
+                                                                       
<xsl:value-of select="lang_download_help"/>
+                                                               </xsl:variable>
+                                                               <xsl:variable 
name="lang_download">
+                                                                       
<xsl:value-of select="lang_download"/>
+                                                               </xsl:variable>
+                                                               <a 
href="javascript:var w=window.open('{$link_download}','','left=50,top=100')">
+                                                                       
<xsl:value-of select="lang_download"/>
+                                                               </a>
+                                                               <xsl:text> 
</xsl:text>
                                                                <xsl:value-of 
select="lang_total_records"/>
                                                                <xsl:text> 
</xsl:text>
                                                                <xsl:value-of 
select="num_records"/>




reply via email to

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