[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8828]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8828] |
Date: |
Thu, 09 Feb 2012 19:23:54 +0000 |
Revision: 8828
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8828
Author: vator
Date: 2012-02-09 19:23:52 +0000 (Thu, 09 Feb 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.socheck_item.inc.php
trunk/controller/inc/class.uicase.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/controller/inc/helper/class.status_checker.inc.php
trunk/controller/js/controller/ajax.js
trunk/controller/templates/base/check_list/view_control_details.xsl
trunk/controller/templates/base/check_list/view_open_cases.xsl
trunk/controller/templates/base/procedure/print_procedure.xsl
Modified: trunk/controller/inc/class.socheck_item.inc.php
===================================================================
--- trunk/controller/inc/class.socheck_item.inc.php 2012-02-09 18:11:33 UTC
(rev 8827)
+++ trunk/controller/inc/class.socheck_item.inc.php 2012-02-09 19:23:52 UTC
(rev 8828)
@@ -302,6 +302,8 @@
$sql .= "AND cic.status = 0 ";
else if($status == 'closed')
$sql .= "AND cic.status = 1 ";
+ else if($status == 'waiting')
+ $sql .= "AND cic.status = 2 ";
else if($status == 'open_or_waiting')
$sql .= "AND cic.status = 0 OR cic.status = 2";
Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php 2012-02-09 18:11:33 UTC (rev
8827)
+++ trunk/controller/inc/class.uicase.inc.php 2012-02-09 19:23:52 UTC (rev
8828)
@@ -103,7 +103,7 @@
$check_item =
$this->so_check_item->get_single($saved_check_item_id);
}
- $todays_date = mktime(0,0,0,date("m"), date("d"),
date("Y"));
+ $todays_date_ts = mktime(0,0,0,date("m"), date("d"),
date("Y"));
$user_id = $GLOBALS['phpgw_info']['user']['id'];
@@ -111,8 +111,8 @@
$case->set_check_item_id( $check_item->get_id() );
$case->set_descr($case_descr);
$case->set_user_id($user_id);
- $case->set_entry_date($todays_date);
- $case->set_modified_date($todays_date);
+ $case->set_entry_date($todays_date_ts);
+ $case->set_modified_date($todays_date_ts);
$case->set_modified_by($user_id);
$case->set_modified_by($user_id);
$case->set_measurement($measurement);
@@ -243,7 +243,7 @@
$botts = CreateObject('property.botts',true);
$message_ticket_id = $botts->add_ticket($ticket);
- $todays_date = mktime(0,0,0,date("m"), date("d"),
date("Y"));
+ $todays_date_ts = mktime(0,0,0,date("m"), date("d"),
date("Y"));
$user_id = $GLOBALS['phpgw_info']['user']['id'];
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2012-02-09 18:11:33 UTC
(rev 8827)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2012-02-09 19:23:52 UTC
(rev 8828)
@@ -362,7 +362,7 @@
$check_list = $this->so->get_single($check_list_id);
$control =
$this->so_control->get_single($check_list->get_control_id());
- $cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
+ $cats = CreateObject('phpgwapi.categories', -1,
'controller', '.control');
$cats->supress_info = true;
$control_areas =
$cats->formatted_xslt_list(array('format'=>'filter','selected' =>
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
@@ -554,11 +554,13 @@
$check_list = $this->so->get_single($check_list_id);
$open_check_items_and_cases =
$this->so_check_item->get_check_items_with_cases($check_list_id, 'open', null,
'return_array');
+ $open_check_items_and_measurements =
$this->so_check_item->get_check_items_with_cases($check_list_id, 'waiting',
null, 'return_array');
$data = array
(
- 'open_check_items_and_cases' =>
$open_check_items_and_cases,
- 'check_list'
=> $check_list->toArray()
+ 'open_check_items_and_cases' =>
$open_check_items_and_cases,
+ 'open_check_items_and_measurements' =>
$open_check_items_and_measurements,
+ 'check_list'
=> $check_list->toArray()
);
self::render_template_xsl(
array('check_list/cases_tab_menu', 'check_list/view_open_cases'), $data );
Modified: trunk/controller/inc/helper/class.status_checker.inc.php
===================================================================
--- trunk/controller/inc/helper/class.status_checker.inc.php 2012-02-09
18:11:33 UTC (rev 8827)
+++ trunk/controller/inc/helper/class.status_checker.inc.php 2012-02-09
19:23:52 UTC (rev 8828)
@@ -25,19 +25,18 @@
foreach($check_items as $check_item){
- if($check_item->get_control_item()->get_type() ==
"control_item_type_2" & $check_item->get_status() == 0){
- $num_open_cases++;
- }else{
- foreach($check_item->get_cases_array() as
$case){
- if($case->get_status() == 0){
- $num_open_cases++;
- }
- }
- }
+ foreach($check_item->get_cases_array() as $case){
+ if($case->get_status() == 0 |
$case->get_status() == 2){
+ $num_open_cases++;
+ }
+ }
}
$check_list->set_num_open_cases($num_open_cases);
+ if($num_open_cases > 0)
+ $check_list->set_status(1);
+
$this->so_check_list->store($check_list);
}
}
\ No newline at end of file
Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js 2012-02-09 18:11:33 UTC (rev
8827)
+++ trunk/controller/js/controller/ajax.js 2012-02-09 19:23:52 UTC (rev
8828)
@@ -516,22 +516,22 @@
});
function clear_form( form ){
- // Clear form
- $(form).find(':input').each(function() {
- switch(this.type) {
- case 'select-multiple':
- case 'select-one':
- case 'text':
- $(this).val('');
- break;
- case 'textarea':
- $(this).val('');
- break;
- case 'checkbox':
- case 'radio':
- this.checked = false;
- }
- });
+ // Clear form
+ $(form).find(':input').each(function() {
+ switch(this.type) {
+ case 'select-multiple':
+ case 'select-one':
+ case 'text':
+ $(this).val('');
+ break;
+ case 'textarea':
+ $(this).val('');
+ break;
+ case 'checkbox':
+ case 'radio':
+ this.checked = false;
+ }
+ });
}
Modified: trunk/controller/templates/base/check_list/view_control_details.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_control_details.xsl
2012-02-09 18:11:33 UTC (rev 8827)
+++ trunk/controller/templates/base/check_list/view_control_details.xsl
2012-02-09 19:23:52 UTC (rev 8828)
@@ -59,7 +59,7 @@
<dd>
<xsl:choose>
<xsl:when test="not(control/end_date = '0') or
not(control/end_date = '')">
- Dato ikke angitt
+ Løpende
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="php:function('date',
$date_format, number(control/end_date))"/>
@@ -70,13 +70,13 @@
<label>Frekvenstype</label>
</dt>
<dd>
- <select id="repeat_type" name="repeat_type">
- <option value="0">Ikke angitt</option>
- <option value="1">Dag</option>
- <option value="2">Uke</option>
- <option value="3">Måned</option>
- <option value="5">År</option>
- </select>
+
+ <xsl:choose>
+ <xsl:when test="control/repeat_type = 0">Dag</xsl:when>
+ <xsl:when test="control/repeat_type = 1">Uke</xsl:when>
+ <xsl:when test="control/repeat_type = 2">Måned</xsl:when>
+ <xsl:when test="control/repeat_type = 3">År</xsl:when>
+ </xsl:choose>
</dd>
<dt>
<label>Frekvens</label>
Modified: trunk/controller/templates/base/check_list/view_open_cases.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_open_cases.xsl
2012-02-09 18:11:33 UTC (rev 8827)
+++ trunk/controller/templates/base/check_list/view_open_cases.xsl
2012-02-09 19:23:52 UTC (rev 8828)
@@ -9,9 +9,84 @@
</xsl:call-template>
<div class="tab_item active">
+ <h2>Målinger</h2>
+ <xsl:choose>
+ <xsl:when
test="open_check_items_and_measurements/child::node()">
+
+ <ul class="check_items">
+ <xsl:for-each
select="open_check_items_and_measurements">
+ <xsl:choose>
+ <xsl:when
test="cases_array/child::node()">
+ <li
class="check_item_case">
+
<h4><span><xsl:value-of select="control_item/title"/></span></h4>
+ <ul>
+
<xsl:for-each select="cases_array">
+
<xsl:variable name="cases_id"><xsl:value-of select="id"/></xsl:variable>
+
<li><span class="order_nr"><xsl:number /></span>. <xsl:value-of select="descr"/>
+
<xsl:choose>
+
<xsl:when test="location_item_id > 0">
+
<div style="float:right;">
+
<a target="_blank">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
+
<xsl:text>&id=</xsl:text>
+
<xsl:value-of
select="location_item_id"/>
+
</xsl:attribute>
+
Vis melding
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:otherwise>
+
<div style="float:right;"><span style="color:red">Ingen
melding registrert</span></div>
+
</xsl:otherwise>
+
</xsl:choose>
+
<div class="quick_menu">
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.edit_case</xsl:text>
+
<xsl:text>&case_id=</xsl:text>
+
<xsl:value-of select="id"/>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="//check_list/id"/>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</xsl:attribute>
+
endre
+
</a>
+
<xsl:choose>
+
<xsl:when test="location_item_id = 0">
+
<a class="delete_case">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.delete_case</xsl:text>
+
<xsl:text>&case_id=</xsl:text>
+
<xsl:value-of select="id"/>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of
select="//check_list/id"/>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</xsl:attribute>
+
slett
+
</a>
+
</xsl:when>
+
</xsl:choose>
+
</div>
+
</li>
+
</xsl:for-each>
+ </ul>
+ </li>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </ul>
+
+ </xsl:when>
+ <xsl:otherwise>
+ <p>Ingen åpne målinger</p>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <h2>Saker</h2>
<xsl:choose>
<xsl:when
test="open_check_items_and_cases/child::node()">
-
+ <h2>Saker</h2>
<ul class="check_items">
<xsl:for-each
select="open_check_items_and_cases">
<xsl:choose>
@@ -75,21 +150,19 @@
</xsl:choose>
</xsl:for-each>
</ul>
-
- <a style="font-size: 11px;margin-top: 20px;padding: 3px
20px;" class="btn focus">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- </xsl:attribute>
- Registrer melding
- </a>
-
</xsl:when>
<xsl:otherwise>
- Ingen åpne saker
+ <p>Ingen åpne saker</p>
</xsl:otherwise>
</xsl:choose>
+ <a style="font-size: 11px;margin-top: 20px;padding: 3px 20px;"
class="btn focus">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ </xsl:attribute>
+ Registrer melding
+ </a>
</div>
</div>
</xsl:template>
Modified: trunk/controller/templates/base/procedure/print_procedure.xsl
===================================================================
--- trunk/controller/templates/base/procedure/print_procedure.xsl
2012-02-09 18:11:33 UTC (rev 8827)
+++ trunk/controller/templates/base/procedure/print_procedure.xsl
2012-02-09 19:23:52 UTC (rev 8828)
@@ -4,18 +4,10 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
-<div id="control_info" style="margin:40px 0 0 40px;">
- <h1 style="text-decoration: underline;text-transform:
uppercase;"><xsl:value-of select="control/title"/></h1>
- <h2 style="text-transform: uppercase;"><xsl:value-of
select="location/loc1_name"/></h2>
- <h3 style="text-transform: uppercase;"><xsl:value-of
select="control_group/group_name"/></h3>
-</div>
+<div id="procedure">
+ <h1><xsl:value-of select="procedure/title" /></h1>
-<div id="procedure" style="margin:40px 0 0 40px;">
<div>
- <label for="title"><xsl:value-of
select="php:function('lang','Procedure title')" /></label>
- <span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/title" /></span>
- </div>
- <div>
<label for="revision_no"><xsl:value-of
select="php:function('lang','Procedure revision')" /></label>
<span style="display: inline-block;width:
600px;"><xsl:value-of select="procedure/revision_no" /></span>
</div>
@@ -62,17 +54,23 @@
<div>
<label for="attachment"><xsl:value-of
select="php:function('lang','Procedure Attachment')" /></label>
<xsl:value-of select="procedure/attachment" />
- </div>
+ </div>
+ <a href="#print" class="btn" onClick="window.print()">Skriv
ut</a>
</div>
<style>
- #procedure{
- font-family: arial;
- font-size:16px;
+ #procedure {
+ font-family: arial;
+ font-size: 15px;
+ padding: 5px 25px;
}
- #procedure div{
- margin:10px 0;
- }
+ #procedure h1{
+ font-size: 24px;
+ margin-bottom: 25px;
+ }
+ #procedure div {
+ margin: 15px 0;
+ }
label{
display: inline-block;
font-weight: bold;
@@ -87,9 +85,9 @@
cursor: pointer;
display: inline-block;
font-family: arial;
- margin-right: 5px;
padding: 5px 20px;
text-decoration: none;
+ margin-top:20px;
}
ol{
@@ -115,5 +113,4 @@
}
</style>
-<a style="margin:20px 0 0 40px;" href="#print" class="btn"
onClick="window.print()">Skriv ut</a>
</xsl:template>
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8828],
Torstein <=