[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7098] Merge 7088:7097 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7098] Merge 7088:7097 from trunk |
Date: |
Wed, 09 Mar 2011 08:14:07 +0000 |
Revision: 7098
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7098
Author: sigurdne
Date: 2011-03-09 08:14:06 +0000 (Wed, 09 Mar 2011)
Log Message:
-----------
Merge 7088:7097 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/frontend/inc/class.uidrawings.inc.php
branches/Version-1_0-branch/frontend/inc/hook_config.inc.php
branches/Version-1_0-branch/frontend/setup/phpgw_no.lang
branches/Version-1_0-branch/frontend/templates/base/config.tpl
branches/Version-1_0-branch/frontend/templates/base/drawings.xsl
branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
branches/Version-1_0-branch/property/inc/class.sotts.inc.php
branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
Added Paths:
-----------
branches/Version-1_0-branch/frontend/js/yahoo/drawing.list.js
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097
Modified: branches/Version-1_0-branch/frontend/inc/class.uidrawings.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.uidrawings.inc.php
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/frontend/inc/class.uidrawings.inc.php
2011-03-09 08:14:06 UTC (rev 7098)
@@ -42,19 +42,104 @@
public function __construct()
{
+
phpgwapi_cache::session_set('frontend','tab',$GLOBALS['phpgw']->locations->get_id('frontend','.drawings'));
parent::__construct();
+ $this->location_code =
$this->header_state['selected_location'];
+// $this->location_code = '1102-01';
}
public function index()
{
+ $config = CreateObject('phpgwapi.config','frontend');
+ $config->read();
+ $doc_types =
isset($config->config_data['document_frontend_cat']) &&
$config->config_data['document_frontend_cat'] ?
$config->config_data['document_frontend_cat'] : array();
+
+ $allrows = true;
+ $sodocument = CreateObject('property.sodocument');
+
+ $document_list = array();
+ $total_records = 0;
+ if( $this->location_code )
+ {
+ foreach ($doc_types as $doc_type)
+ {
+ if($doc_type)
+ {
+ $document_list =
array_merge($document_list, $sodocument->read_at_location(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
+ 'filter' =>
$this->filter,'location_code' => $this->location_code,'doc_type' => $doc_type,
'allrows' => $allrows)));
+ }
+
+ $total_records = $total_records +
$sodocument->total_records;
+ }
+ }
+
+
+
//----------------------------------------------datatable settings--------
+
+ $content = array();
+ foreach($document_list as $entry)
+ {
+ $content[] = array
+ (
+ 'document_id' =>
$entry['document_id'],
+ 'document_name' =>
$entry['document_name'],
+ 'link'
=> $entry['link'],
+ 'title'
=> $entry['title'],
+ 'doc_type'
=> $entry['doc_type'],
+ 'document_date' =>
$GLOBALS['phpgw']->common->show_date($entry['document_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
+ );
+ }
+
+ $datavalues[0] = array
+ (
+ 'name' => "0",
+ 'values' =>
json_encode($content),
+ 'total_records' =>
count($content),
+ 'edit_action' =>
json_encode($GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uidocument.view_file'))),
+ 'is_paginator' => 1,
+ 'footer' => 0
+ );
+
+
+ $myColumnDefs[0] = array
+ (
+ 'name' => "0",
+ 'values' => json_encode(array(
array('key' =>
'document_name','label'=>lang('filename'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
+
array('key' =>
'document_id','label'=>lang('filename'),'sortable'=>false,'hidden' => true),
+
array('key' =>
'title','label'=>lang('name'),'sortable'=>true,'resizeable'=>true),
+
array('key' =>
'doc_type','label'=>'Type','sortable'=>true,'resizeable'=>true),
+
array('key' =>
'document_date','label'=>lang('date'),'sortable'=>true,'resizeable'=>true)
+
))
+ );
+
+
//----------------------------------------------datatable settings--------
+
+
+ $datatable = array
+ (
+ 'property_js' =>
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
+ 'datatable' =>
$datavalues,
+ 'myColumnDefs' => $myColumnDefs
+ );
+
$data = array
(
- 'header' =>$this->header_state,
- 'tabs' => $this->tabs,
- 'drawings' => lang('not_implemented')
+ 'header' =>
$this->header_state,
+ 'tabs' =>
$this->tabs,
+ 'drawings' =>
array('datatable' => $datatable),
);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('app_data' =>
$data));
$GLOBALS['phpgw']->xslttpl->add_file(array('frontend','drawings'));
+ $GLOBALS['phpgw']->js->validate_file( 'yahoo',
'drawing.list', 'frontend' );
+
+ phpgwapi_yui::load_widget('dragdrop');
+ phpgwapi_yui::load_widget('datatable');
+ phpgwapi_yui::load_widget('connection');
+ phpgwapi_yui::load_widget('loader');
+ phpgwapi_yui::load_widget('paginator');
+
+
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
+
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
}
}
Modified: branches/Version-1_0-branch/frontend/inc/hook_config.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/hook_config.inc.php
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/frontend/inc/hook_config.inc.php
2011-03-09 08:14:06 UTC (rev 7098)
@@ -191,3 +191,30 @@
}
return $out;
}
+
+ /**
+ * Get HTML checkbox with categories that are candidates for frontend
documents cat
+ *
+ * @param $config
+ * @return string options for selectbox
+ */
+ function document_frontend_cat($config)
+ {
+ $cats = CreateObject('phpgwapi.categories', -1, 'property',
'.document');
+ $cats->supress_info = true;
+ $values = $cats->return_sorted_array(0, false, '', '', '',
$globals = true, '', $use_acl = false);
+ $tts_frontend_cat_selected =
isset($config['document_frontend_cat']) ? $config['document_frontend_cat'] :
array();
+ $out = '';
+ foreach ( $values as $entry)
+ {
+ $checked = '';
+ if ( in_array($entry['id'], $tts_frontend_cat_selected))
+ {
+ $checked = ' checked';
+ }
+ $out .= <<<HTML
+ <tr><td><input type="checkbox"
name="newsettings[document_frontend_cat][]" value="{$entry['id']}"
{$checked}><label>{$entry['name']}</label></td></tr>
+HTML;
+ }
+ return $out;
+ }
Copied: branches/Version-1_0-branch/frontend/js/yahoo/drawing.list.js (from rev
7097, trunk/frontend/js/yahoo/drawing.list.js)
===================================================================
--- branches/Version-1_0-branch/frontend/js/yahoo/drawing.list.js
(rev 0)
+++ branches/Version-1_0-branch/frontend/js/yahoo/drawing.list.js
2011-03-09 08:14:06 UTC (rev 7098)
@@ -0,0 +1,38 @@
+var myPaginator_0, myDataTable_0
+
+/********************************************************************************/
+ YAHOO.widget.DataTable.formatLink = function(elCell, oRecord, oColumn,
oData)
+ {
+// console.log(oRecord._oData.document_id);
+ elCell.innerHTML = "<a
href="+datatable[0][0]["edit_action"]+"&id="+oRecord._oData.document_id+">" +
oData + "</a>";
+ };
+
+
+/********************************************************************************/
+ var FormatterRight = function(elCell, oRecord, oColumn, oData)
+ {
+ elCell.innerHTML = "<div align=\"right\">"+oData+"</div>";
+ }
+
+/********************************************************************************/
+ this.myParticularRenderEvent = function()
+ {
+ }
+
+/********************************************************************************/
+
+YAHOO.util.Event.addListener(window, "load", function()
+{
+ loader = new YAHOO.util.YUILoader();
+ loader.addModule({
+ name: "anyone",
+ type: "js",
+ fullpath: property_js
+ });
+
+ loader.require("anyone");
+ loader.insert();
+});
+
+
+
Modified: branches/Version-1_0-branch/frontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/frontend/setup/phpgw_no.lang 2011-03-09
08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/frontend/setup/phpgw_no.lang 2011-03-09
08:14:06 UTC (rev 7098)
@@ -117,11 +117,11 @@
delegates_for_res_unit frontend no Delegater for valgt
resultatenhet
delegates_for_user frontend no Dine delegater uavhengig av
resultatenhet
deletage_to_all_res_units frontend no Myndighet vil bli gitt
til alle resultateneheter du er leder for
-email_create_account_title frontend no BKBygg systemtilgang
+email_create_account_title common no BKBygg systemtilgang
email_create_account_message common no Systemmelding fra BKBygg til %1
%2:<br/>Det er opprettet en tilgang for deg i BKBygg<br/><br/>Du får tilgang
til systemet via kommunens intranett.<br/>Under verktøy i høyre kolonne, velg
BKBygg.<br/>Brukerveiledning finner du i systemet, ved å velge "Hjelp" i
toppmenyen.<br/>Har du spørsmål send en e-post til BKBygg brukerstøtte.<br/>
-email_remove_delegate_title frontend no BKBygg systemtilgang
+email_remove_delegate_title common no BKBygg systemtilgang
email_remove_delegate_message common no Systemmelding fra BKBygg til %1
%2:<br/>Din tilgang til BKBygg på vegne av %3 %4 er slettet.<br/>Har du
spørsmål send en e-post til BKBygg brukerstøtte.<br/>
-email_add_delegate_title frontend no BKBygg systemtilgang
+email_add_delegate_title common no BKBygg systemtilgang
email_add_delegate_message common no Systemmelding fra BKBygg til %1
%2:<br/>%3 %4 har gitt deg tilgang til BKBbygg for følgende
resultatenhet:<br/>%5<br/><br/>Du får tilgang til systemet via kommunens
intranett.<br/>Under verktøy i høyre kolonne, velg BKBygg.<br/>Brukerveiledning
finner du i systemet, ved å velge "Hjelp" i toppmenyen.<br/>Har du spørsmål
send en e-post til BKBygg brukerstøtte.<br/>
error_delegating_unit frontend no En feil oppstod når det skulle
under delegering til resultatenhet: %1
searching_for_self frontend no Vennligst søk etter et annet
brukernavn enn ditt eget
@@ -129,3 +129,4 @@
remove_delegate_error frontend no Fjerning av delegaten var
mislykket
message_empty frontend no Meldingen kan ikke være tom
upload_userdoc frontend no Last opp brukerveiledning
+filename frontend no Filnavn
Modified: branches/Version-1_0-branch/frontend/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/frontend/templates/base/config.tpl
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/frontend/templates/base/config.tpl
2011-03-09 08:14:06 UTC (rev 7098)
@@ -72,6 +72,16 @@
</td>
</tr>
<tr class="row_off">
+ <td>{lang_document_frontend_category}:</td>
+ <td>
+ <!--to be able to blank the setting - need an empty value-->
+ <input type = 'hidden'
name="newsettings[document_frontend_cat][]" value="">
+ <table>
+{hook_document_frontend_cat}
+ </table>
+ </td>
+ </tr>
+ <tr class="row_off">
<td>{lang_delegate_limit}:</td>
<td><input name="newsettings[delegate_limit]"
value="{value_delegate_limit}"></td>
</tr>
Modified: branches/Version-1_0-branch/frontend/templates/base/drawings.xsl
===================================================================
--- branches/Version-1_0-branch/frontend/templates/base/drawings.xsl
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/frontend/templates/base/drawings.xsl
2011-03-09 08:14:06 UTC (rev 7098)
@@ -1,8 +1,64 @@
-<xsl:template match="contract" xmlns:php="http://php.net/xsl">
- <div class="yui-navset" id="ticket_tabview">
+<!-- $Id: helpdesk.xsl 6663 2010-12-09 10:45:28Z sigurdne $ -->
+<xsl:template match="drawings" xmlns:php="http://php.net/xsl">
+ <xsl:variable name="form_action"><xsl:value-of
select="form_action"/></xsl:variable>
+ <div class="yui-navset" id="drawing_tabview">
+ <xsl:value-of disable-output-escaping="yes" select="tabs" />
<div class="yui-content">
- Kontraktsinformasjon
+ <xsl:choose>
+ <xsl:when
test="normalize-space(//header/selected_location) != ''">
+ <div class="toolbar-container">
+ <div class="toolbar">
+ <xsl:apply-templates
select="datatable/actions" />
+ </div>
+ </div>
+ <div class="tickets">
+ <table cellpadding="2" cellspacing="2"
width="95%" align="center">
+ <xsl:choose>
+ <xsl:when test="msgbox_data
!= ''">
+ <tr>
+ <td align="left"
colspan="3">
+
<xsl:call-template name="msgbox"/>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ </table>
+ <xsl:apply-templates select="datatable" />
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="tickets">
+ <xsl:value-of select="php:function('lang',
'no_buildings')"/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
</div>
</div>
</xsl:template>
+<xsl:template name="datatable" match="datatable">
+ <div id="paging_0"> </div>
+ <div id="datatable-container_0"></div>
+ <!-- DATATABLE DEFINITIONS-->
+ <script type="text/javascript">
+ var property_js = <xsl:value-of select="property_js" />;
+ var datatable = new Array();
+ var myColumnDefs = new Array();
+
+ <xsl:for-each select="datatable">
+ datatable[<xsl:value-of select="name"/>] = [
+ {
+ values : <xsl:value-of
select="values"/>,
+ total_records : <xsl:value-of
select="total_records"/>,
+ edit_action : <xsl:value-of
select="edit_action"/>,
+ is_paginator : <xsl:value-of
select="is_paginator"/>,
+ footer : <xsl:value-of
select="footer"/>
+ }
+ ]
+ </xsl:for-each>
+
+ <xsl:for-each select="myColumnDefs">
+ myColumnDefs[<xsl:value-of select="name"/>] =
<xsl:value-of select="values"/>
+ </xsl:for-each>
+ </script>
+</xsl:template>
Modified: branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
2011-03-09 08:14:06 UTC (rev 7098)
@@ -282,6 +282,11 @@
$location_code =
isset($data['location_code'])?$data['location_code']:'';
}
+ if( !$location_code )
+ {
+ return array();
+ }
+
$doc_types = $this->get_sub_doc_types($doc_type);
if ($order)
Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php
2011-03-09 08:14:06 UTC (rev 7098)
@@ -110,7 +110,7 @@
{
$this->db->query("SELECT descr FROM fm_tts_category
WHERE id='$cat_id' ");
$this->db->next_record();
- return stripslashes($this->db->f('descr'));
+ return $this->db->f('descr',true);
}
function read($data)
Modified: branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
2011-03-09 08:10:13 UTC (rev 7097)
+++ branches/Version-1_0-branch/rental/inc/class.uimakepdf.inc.php
2011-03-09 08:14:06 UTC (rev 7098)
@@ -344,15 +344,32 @@
$price_items =
rental_socontract_price_item::get_instance()->get(null, null, null, null, null,
null, array('contract_id' => $contract->get_id()));
-
+ $months =
rental_socontract::get_instance()->get_months_in_term($contract->get_term_id());
+
+
+
+ $one_time_price_items = array();
+ $termin_price_items = array();
+
+ foreach ($price_items as $item){
+ if($item->is_one_time()){
+
array_push($one_time_price_items, $item);
+ }else{
+
array_push($termin_price_items, $item);
+ }
+ }
+
$data = array
(
'contract' => $contract,
+ 'months' => $months,
'contract_party' => $party,
'contract_dates' =>
$contract_dates,
'composite' => $composite,
'units' => $units,
'price_items' =>$price_items,
+ 'one_time_price_items' =>
$one_time_price_items,
+ 'termin_price_items' =>
$termin_price_items,
'notification' => $notification,
'editable' => $editable,
'message' => isset($message) ?
$message : phpgw::get_var('message'),
@@ -362,7 +379,9 @@
);
$contract->check_consistency();
-
+
+
+
$this->get_pdf_templates();
$template_file =
'pdf/'.$this->pdf_templates[$_GET[pdf_template]][1];
$this->render($template_file, $data);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7098] Merge 7088:7097 from trunk,
Sigurd Nes <=