[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10335] Controller: Moved setting of date format for
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10335] Controller: Moved setting of date format for user to xsl-file |
Date: |
Wed, 24 Oct 2012 13:20:53 +0000 |
Revision: 10335
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10335
Author: vator
Date: 2012-10-24 13:20:52 +0000 (Wed, 24 Oct 2012)
Log Message:
-----------
Controller: Moved setting of date format for user to xsl-file
Modified Paths:
--------------
trunk/controller/inc/class.uicalendar.inc.php
trunk/controller/inc/class.uicase.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/controller/templates/base/calendar/view_calendar_year.xsl
trunk/controller/templates/base/case/create_case_message.xsl
trunk/controller/templates/base/case/view_case_message.xsl
trunk/controller/templates/base/control/control.xsl
trunk/controller/templates/base/control/control_details.xsl
trunk/controller/templates/base/control_item/control_item_option.xsl
trunk/controller/templates/base/procedure/print_procedure.xsl
trunk/controller/templates/base/procedure/procedure_documents.xsl
trunk/controller/templates/base/procedure/procedure_item.xsl
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2012-10-24 13:18:51 UTC
(rev 10334)
+++ trunk/controller/inc/class.uicalendar.inc.php 2012-10-24 13:20:52 UTC
(rev 10335)
@@ -207,7 +207,6 @@
'heading_array'
=> $heading_array,
'controls_calendar_array' =>
$controls_calendar_array,
'components_calendar_array' =>
$components_calendar_array,
- 'date_format'
=> $date_format,
'location_level'
=> $level,
'roles_array'
=> $roles_array,
'repeat_type_array'
=> $repeat_type_array,
@@ -392,7 +391,6 @@
'heading_array'
=> $heading_array,
'controls_calendar_array' =>
$controls_calendar_array,
'components_calendar_array' =>
$components_calendar_array,
- 'date_format'
=> $date_format,
'location_level'
=> $level,
'roles_array'
=> $roles_array,
'repeat_type_array'
=> $repeat_type_array,
@@ -528,7 +526,6 @@
'heading_array'
=> $heading_array,
'locations_with_calendar_array' =>
$locations_with_calendar_array,
'components_with_calendar_array' =>
$components_with_calendar_array,
- 'date_format'
=> $date_format,
'current_year'
=> $year,
);
@@ -613,7 +610,6 @@
'heading_array'
=> $heading_array,
'locations_with_calendar_array' =>
$locations_with_calendar_array,
'components_with_calendar_array' =>
$components_with_calendar_array,
- 'date_format'
=> $date_format,
'current_year'
=> $year,
'current_month_nr'
=> $month,
);
Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php 2012-10-24 13:18:51 UTC (rev
10334)
+++ trunk/controller/inc/class.uicase.inc.php 2012-10-24 13:20:52 UTC (rev
10335)
@@ -181,8 +181,6 @@
$control_id = $check_list->get_control_id();
$control = $this->so_control->get_single( $control_id );
- $date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-
$catsObj = CreateObject('phpgwapi.categories', -1,
'property', '.ticket');
$catsObj->supress_info = true;
@@ -262,8 +260,6 @@
$control_id = $check_list->get_control_id();
$control = $this->so_control->get_single( $control_id );
- $date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-
$message_details = "Kontroll: " .
$control->get_title() . "\n";
$cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2012-10-24 13:18:51 UTC
(rev 10334)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2012-10-24 13:20:52 UTC
(rev 10335)
@@ -261,7 +261,6 @@
'location_array'
=> $location_array,
'component_array'
=> $component_array,
'control'
=> $control->toArray(),
- 'date_format'
=> $date_format,
'check_list'
=> $check_list->toArray(),
'type'
=> $type,
'current_year'
=> $year,
@@ -296,8 +295,6 @@
$control =
$this->so_control->get_single($check_list->get_control_id());
- $date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-
$component_id = $check_list->get_component_id();
if($component_id > 0)
@@ -333,7 +330,6 @@
'check_list'
=> $check_list->toArray(),
'location_array'
=> $location_array,
'component_array'
=> $component_array,
- 'date_format'
=> $date_format,
'type'
=> $type,
'current_year'
=> $year,
'current_month_nr'
=> $month,
@@ -448,8 +444,6 @@
$check_list = $this->so->get_single($check_list_id);
$control =
$this->so_control->get_single($check_list->get_control_id());
- $date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-
$component_id = $check_list->get_component_id();
if($component_id > 0)
@@ -486,7 +480,6 @@
'check_list'
=> $check_list->toArray(),
'location_array'
=> $location_array,
'component_array'
=> $component_array,
- 'date_format'
=> $date_format,
'type'
=> $type,
'current_year'
=> $year,
'current_month_nr'
=> $month,
Modified: trunk/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_year.xsl
2012-10-24 13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/calendar/view_calendar_year.xsl
2012-10-24 13:20:52 UTC (rev 10335)
@@ -1,6 +1,5 @@
<!-- $Id$ -->
<xsl:template match="data" xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
<xsl:variable name="session_url">&<xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:variable>
<script>
Modified: trunk/controller/templates/base/case/create_case_message.xsl
===================================================================
--- trunk/controller/templates/base/case/create_case_message.xsl
2012-10-24 13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/case/create_case_message.xsl
2012-10-24 13:20:52 UTC (rev 10335)
@@ -1,6 +1,5 @@
<!-- $Id: edit_check_list.xsl 8374 2011-12-20 07:45:04Z vator $ -->
<xsl:template match="data" name="view_check_list"
xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
<div id="main_content" class="medium">
Modified: trunk/controller/templates/base/case/view_case_message.xsl
===================================================================
--- trunk/controller/templates/base/case/view_case_message.xsl 2012-10-24
13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/case/view_case_message.xsl 2012-10-24
13:20:52 UTC (rev 10335)
@@ -1,6 +1,5 @@
<!-- $Id: edit_check_list.xsl 8374 2011-12-20 07:45:04Z vator $ -->
<xsl:template match="data" name="view_check_list"
xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format"><xsl:value-of
select="dateformat"/></xsl:variable>
<div id="main_content" class="medium">
Modified: trunk/controller/templates/base/control/control.xsl
===================================================================
--- trunk/controller/templates/base/control/control.xsl 2012-10-24 13:18:51 UTC
(rev 10334)
+++ trunk/controller/templates/base/control/control.xsl 2012-10-24 13:20:52 UTC
(rev 10335)
@@ -6,7 +6,7 @@
<xsl:variable name="control_procedure_id"><xsl:value-of
select="control/procedure_id"/></xsl:variable>
<xsl:variable name="control_repeat_type"><xsl:value-of
select="control/repeat_type"/></xsl:variable>
<xsl:variable name="control_role"><xsl:value-of
select="control/responsibility_id"/></xsl:variable>
-<xsl:variable name="date_format"><xsl:value-of
select="dateformat"/></xsl:variable>
+<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
<div class="yui-content">
<div id="control_details">
Modified: trunk/controller/templates/base/control/control_details.xsl
===================================================================
--- trunk/controller/templates/base/control/control_details.xsl 2012-10-24
13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/control/control_details.xsl 2012-10-24
13:20:52 UTC (rev 10335)
@@ -1,41 +1,40 @@
<!-- $Id: control.xsl 9951 2012-08-31 10:14:12Z vator $ -->
<xsl:template match="data" name="control_details"
xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format"><xsl:value-of
select="dateformat"/></xsl:variable>
+<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
<div id="show-control-details-box">
<h3>Detaljer for kontroll</h3>
<ul class='elem-wrp'>
-
-
<li><label>Kontrollområde</label><xsl:value-of
select="control/control_area_name" /></li>
- <li><label>Prosedyre</label><xsl:value-of
select="control/procedure_name" /></li>
- <li><label for="start_date">Startdato</label>
- <xsl:value-of
select="php:function('date', $date_format, number(control/start_date))"/>
- </li>
- <li>
- <label for="end_date">Sluttdato</label>
- <xsl:choose>
- <xsl:when
test="control/end_date != 0">
-
<xsl:value-of select="php:function('date', $date_format,
number(control/end_date))"/>
- </xsl:when>
- <xsl:otherwise>
- Løpende
- </xsl:otherwise>
- </xsl:choose>
- </li>
- <li><label>Frekvens</label>
- <xsl:choose>
-
<xsl:when test="control/repeat_interval = 1">
- <span
class="pre">Hver</span>
- </xsl:when>
- <xsl:when
test="control/repeat_interval = 2">
- <span
class="pre">Annenhver</span>
- </xsl:when>
- <xsl:when
test="control/repeat_interval > 2">
- <span
class="pre">Hver</span><span><xsl:value-of
select="control/repeat_interval"/>.</span>
- </xsl:when>
- </xsl:choose>
- <span
class="val"><xsl:value-of select="control/repeat_type_label"/></span>
- </li>
- </ul>
- </div>
+ <li><label>Kontrollområde</label><xsl:value-of
select="control/control_area_name" /></li>
+ <li><label>Prosedyre</label><xsl:value-of
select="control/procedure_name" /></li>
+ <li><label for="start_date">Startdato</label>
+ <xsl:value-of select="php:function('date',
$date_format, number(control/start_date))"/>
+ </li>
+ <li>
+ <label for="end_date">Sluttdato</label>
+ <xsl:choose>
+ <xsl:when test="control/end_date != 0">
+ <xsl:value-of
select="php:function('date', $date_format, number(control/end_date))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ Løpende
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ <li><label>Frekvens</label>
+ <xsl:choose>
+ <xsl:when test="control/repeat_interval = 1">
+ <span class="pre">Hver</span>
+ </xsl:when>
+ <xsl:when test="control/repeat_interval = 2">
+ <span class="pre">Annenhver</span>
+ </xsl:when>
+ <xsl:when test="control/repeat_interval > 2">
+ <span class="pre">Hver</span><span><xsl:value-of
select="control/repeat_interval"/>.</span>
+ </xsl:when>
+ </xsl:choose>
+ <span class="val"><xsl:value-of
select="control/repeat_type_label"/></span>
+ </li>
+ </ul>
+ </div>
</xsl:template>
Modified: trunk/controller/templates/base/control_item/control_item_option.xsl
===================================================================
--- trunk/controller/templates/base/control_item/control_item_option.xsl
2012-10-24 13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/control_item/control_item_option.xsl
2012-10-24 13:20:52 UTC (rev 10335)
@@ -2,9 +2,6 @@
<!-- item -->
<xsl:template match="data" xmlns:php="http://php.net/xsl">
-
-
-
<xsl:call-template name="yui_phpgw_i18n"/>
<div id="main_wrp">
Modified: trunk/controller/templates/base/procedure/print_procedure.xsl
===================================================================
--- trunk/controller/templates/base/procedure/print_procedure.xsl
2012-10-24 13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/procedure/print_procedure.xsl
2012-10-24 13:20:52 UTC (rev 10335)
@@ -2,7 +2,7 @@
<!-- item -->
<xsl:template match="data" xmlns:php="http://php.net/xsl">
-<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
+<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
<div id="procedure">
<h1><xsl:value-of select="procedure/title" /></h1>
@@ -18,13 +18,13 @@
<div>
<label for="start_date"><xsl:value-of
select="php:function('lang','Procedure valid from date')" /></label>
<xsl:variable name="startdate"><xsl:value-of
select="procedure/start_date" /></xsl:variable>
- <xsl:value-of select="php:function('date', $dateformat,
$startdate)" />
+ <xsl:value-of select="php:function('date',
$date_format, $startdate)" />
</div>
<div>
<label for="revision_date"><xsl:value-of
select="php:function('lang','Procedure revision date')" /></label>
<xsl:if test="procedure/revision_date != 0">
<xsl:variable name="revisiondate"><xsl:value-of
select="procedure/revision_date" /></xsl:variable>
- <xsl:value-of select="php:function('date',
$dateformat, $revisiondate)" />
+ <xsl:value-of select="php:function('date',
$date_format, $revisiondate)" />
</xsl:if>
</div>
<div>
@@ -32,7 +32,7 @@
<label for="end_date"><xsl:value-of
select="php:function('lang','Procedure end date')" /></label>
<xsl:variable name="enddate"><xsl:value-of
select="procedure/end_date" /></xsl:variable>
- <xsl:value-of select="php:function('date',
$dateformat, $enddate)" />
+ <xsl:value-of select="php:function('date',
$date_format, $enddate)" />
</xsl:if>
</div>
<div>
Modified: trunk/controller/templates/base/procedure/procedure_documents.xsl
===================================================================
--- trunk/controller/templates/base/procedure/procedure_documents.xsl
2012-10-24 13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/procedure/procedure_documents.xsl
2012-10-24 13:20:52 UTC (rev 10335)
@@ -3,8 +3,6 @@
<xsl:template name="view_procedure_documents" xmlns:php="http://php.net/xsl">
-<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
-
<div class="yui-content">
<div id="details">
<xsl:variable name="action_url"><xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:controller.uidocument.add')" /></xsl:variable>
Modified: trunk/controller/templates/base/procedure/procedure_item.xsl
===================================================================
--- trunk/controller/templates/base/procedure/procedure_item.xsl
2012-10-24 13:18:51 UTC (rev 10334)
+++ trunk/controller/templates/base/procedure/procedure_item.xsl
2012-10-24 13:20:52 UTC (rev 10335)
@@ -4,7 +4,7 @@
<xsl:template name="view_procedure" xmlns:php="http://php.net/xsl">
<xsl:call-template name="yui_phpgw_i18n"/>
-<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
+<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
<div class="yui-content">
<div id="details">
@@ -56,7 +56,7 @@
</xsl:when>
<xsl:otherwise>
<xsl:variable
name="startdate"><xsl:value-of select="procedure/start_date" /></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $startdate)" />
+ <xsl:value-of
select="php:function('date', $date_format, $startdate)" />
</xsl:otherwise>
</xsl:choose>
</dd>
@@ -71,7 +71,7 @@
<xsl:otherwise>
<xsl:if
test="procedure/revision_date != 0">
<xsl:variable
name="revisiondate"><xsl:value-of select="procedure/revision_date"
/></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $revisiondate)" />
+ <xsl:value-of
select="php:function('date', $date_format, $revisiondate)" />
</xsl:if>
</xsl:otherwise>
</xsl:choose>
@@ -87,7 +87,7 @@
</xsl:when>
<xsl:otherwise>
<xsl:variable
name="enddate"><xsl:value-of select="procedure/end_date" /></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $enddate)" />
+ <xsl:value-of
select="php:function('date', $date_format, $enddate)" />
</xsl:otherwise>
</xsl:choose>
</dd>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10335] Controller: Moved setting of date format for user to xsl-file,
Torstein <=