fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8467]


From: Torstein
Subject: [Fmsystem-commits] [8467]
Date: Mon, 02 Jan 2012 07:58:57 +0000

Revision: 8467
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8467
Author:   vator
Date:     2012-01-02 07:58:57 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/model/class.check_list.inc.php
    trunk/controller/js/controller/ajax.js
    trunk/controller/setup/phpgw_no.lang
    trunk/controller/setup/tables_current.inc.php
    trunk/controller/templates/base/create_error_report_message.xsl
    trunk/controller/templates/base/css/base.css
    trunk/controller/templates/base/edit_check_list.xsl
    trunk/controller/templates/base/view_error_report_message.xsl

Modified: trunk/controller/inc/model/class.check_list.inc.php
===================================================================
--- trunk/controller/inc/model/class.check_list.inc.php 2012-01-02 07:47:16 UTC 
(rev 8466)
+++ trunk/controller/inc/model/class.check_list.inc.php 2012-01-02 07:58:57 UTC 
(rev 8467)
@@ -43,6 +43,8 @@
                protected $completed_date;
                protected $location_code;
                protected $component_id;
+               
+               // Objects
                protected $check_item_array = array();
                protected $control;
                

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-01-02 07:47:16 UTC (rev 
8466)
+++ trunk/controller/js/controller/ajax.js      2012-01-02 07:58:57 UTC (rev 
8467)
@@ -257,4 +257,40 @@
                        });
        });
        
+       // file: edit_check_list.xsl
+       $("#frm_update_check_list").submit(function(e){
+               e.preventDefault();
+
+               var thisForm = $(this);
+               var submitBnt = $(thisForm).find("input[type='submit']");
+               var requestUrl = $(thisForm).attr("action");
+               
+               $.ajax({
+                         type: 'POST',
+                         url: requestUrl + "&phpgw_return_as=json&" + 
$(thisForm).serialize(),
+                         success: function(data) {
+                                 if(data){
+                                 var obj = jQuery.parseJSON(data);
+                               
+                                 if(obj.saveStatus == "updated"){
+                                         var submitBnt = 
$(thisForm).find("input[type='submit']");
+                                         $(submitBnt).val("Lagret");   
+                                                 
+                                         // Changes text on save button back 
to original
+                                         window.setTimeout(function() {
+                                                       $(submitBnt).val('Lagre 
sjekkpunkt');
+                                                       
$(submitBnt).addClass("not_active");
+                                         }, 1000);
+                                         }
+                                 }
+                               }
+               });
+       });
+       
+       // file: edit_check_list.xsl
+       $("#frm_update_check_list").click(function(e){
+               var thisForm = $(this);
+               var submitBnt = $(thisForm).find("input[type='submit']");
+               $(submitBnt).removeClass("not_active");
+       });
 });
\ No newline at end of file

Modified: trunk/controller/setup/phpgw_no.lang
===================================================================
--- trunk/controller/setup/phpgw_no.lang        2012-01-02 07:47:16 UTC (rev 
8466)
+++ trunk/controller/setup/phpgw_no.lang        2012-01-02 07:58:57 UTC (rev 
8467)
@@ -17,6 +17,7 @@
 DATATABLE_MSG_LOADING  controller      no      Laster data
 Sort_check_list        controller      no      Sorter sjekkliste
 Show_check_lists       controller      no      Vis sjekklister
+save_check_list        controller      no      Lagre sjekkliste
 title  controller      no      kontroll
 close  controller      no      Lukk
 clear  controller      no      Nullstill

Modified: trunk/controller/setup/tables_current.inc.php
===================================================================
--- trunk/controller/setup/tables_current.inc.php       2012-01-02 07:47:16 UTC 
(rev 8466)
+++ trunk/controller/setup/tables_current.inc.php       2012-01-02 07:58:57 UTC 
(rev 8467)
@@ -44,7 +44,8 @@
                                'what_to_do' => array('type' => 
'text','nullable' => false),
                                'how_to_do' => array('type' => 
'text','nullable' => false),
                                'control_group_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
-                               'control_area_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True)
+                               'control_area_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
+                               'type' => array('type' => 'varchar', 
'precision' => 255, 'nullable' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -58,7 +59,8 @@
                                'status' => array('type' => 'bool','nullable' 
=> true,'default' => 'false'),
                                'comment' => array('type' => 
'varchar','precision' => '255','nullable' => False),
                                'check_list_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
-                               'message_ticket_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True)
+                               'message_ticket_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => True),
+                               'measurement' => array('type' => 'int', 
'precision' => 4, 'nullable' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),

Modified: trunk/controller/templates/base/create_error_report_message.xsl
===================================================================
--- trunk/controller/templates/base/create_error_report_message.xsl     
2012-01-02 07:47:16 UTC (rev 8466)
+++ trunk/controller/templates/base/create_error_report_message.xsl     
2012-01-02 07:58:57 UTC (rev 8467)
@@ -4,12 +4,22 @@
 
 <div id="main_content">
        
-               <h1>Send avviksmelding på bygg: <xsl:value-of 
select="location_array/loc1_name"/></h1>
+               <h1>Send avviksmelding</h1>
                
-               <h2>Kontroll <xsl:value-of select="control_array/title"/></h2>
-               <h2>Utført dato <xsl:value-of select="php:function('date', 
$date_format, number(check_list/completed_date))"/></h2>
+               <div id="error_report_message_details">
+                       <h3>Bygg: <xsl:value-of 
select="location_array/loc1_name"/></h3>
+                       <h3>Tittel på kontroll: <xsl:value-of 
select="control_array/title"/></h3>
+                       <xsl:choose>
+                               <xsl:when test="check_list/completed_date != 0">
+                                       <h3>Kontroll ble utført dato: 
<xsl:value-of select="php:function('date', $date_format, 
number(check_list/completed_date))"/></h3>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <h3>Kontroll ble utført dato:  Ikke 
registrert utført</h3>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </div>
                                
-               <div id="error_report_message_details">
+               <fieldset id="error_report_message_details">
                        
 
                        <xsl:choose>
@@ -31,25 +41,30 @@
                                      </xsl:attribute>
                                    </input>
                                    
-                                       <label style="font-size: 
15px;font-weight: bold;">Tittel på melding</label>
-                                       <input name="message_title" type="text" 
/>
+                                   <div>
+                                               <label style="font-size: 
15px;font-weight: bold;">Tittel på melding</label>
+                                               <input name="message_title" 
type="text" />
+                                       </div>
                                        
-                                        <select>
-                                               <xsl:for-each 
select="categories/cat_list">
-                                                       <xsl:variable 
name="cat_id"><xsl:value-of select="./cat_id"/></xsl:variable>
-                                                       <option 
value="{$cat_id}">
-                                                               <xsl:value-of 
select="./name"/>
-                                                       </option>               
        
-                                               </xsl:for-each>
-                                       </select>
+                                       <div>
+                                               <label style="font-size: 
15px;font-weight: bold;">Kategori</label>
+                                                <select name="message_cat_id">
+                                                       <option value="0">Velg 
kategori</option>
+                                                       <xsl:for-each 
select="categories/cat_list">
+                                                               <xsl:variable 
name="cat_id"><xsl:value-of select="./cat_id"/></xsl:variable>
+                                                               <option 
value="{$cat_id}">
+                                                                       
<xsl:value-of select="./name"/>
+                                                               </option>       
                
+                                                       </xsl:for-each>
+                                               </select>
+                                       </div>
                        
-                       
                                        <h3 class="check_item_details">Velg 
sjekkpunkter som skal være med i avviksmelding</h3>                             
    
-                                       <ul class="check_items expand_list">
+                                       <ul class="check_items">
                                                <xsl:for-each 
select="check_list/check_item_array">
                                                        <li>
                                                                <xsl:variable 
name="check_item_id"><xsl:value-of select="id" /></xsl:variable>
-                                                               <h4><input 
type="checkbox" name="check_item_ids[]" value="{$check_item_id}" 
/><span><xsl:value-of select="control_item/title"/></span></h4>                 
                            
+                                                               <h5><input 
type="checkbox" name="check_item_ids[]" value="{$check_item_id}" 
/><span><xsl:value-of select="control_item/title"/></span></h5>                 
                            
                                                        </li>
                                                </xsl:for-each>
                                        </ul>
@@ -64,7 +79,7 @@
                                        Ingen sjekkpunkter
                                </xsl:otherwise>
                        </xsl:choose>
-               </div>
+               </fieldset>
                
                
                        

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-01-02 07:47:16 UTC 
(rev 8466)
+++ trunk/controller/templates/base/css/base.css        2012-01-02 07:58:57 UTC 
(rev 8467)
@@ -692,7 +692,7 @@
 }
 #main_content fieldset.check_list_details {
     background: none repeat scroll 0 0 #EDF5FF;
-    border: 1px solid #CCCCCC;
+    border: 1px solid #A3A3A3;
     padding: 15px;
 }
 #main_content fieldset.check_item_details{
@@ -775,8 +775,8 @@
     margin: 5px 0;
     clear:left;
 }
-h2.check_item_details{
-       margin-bottom:5px;      
+h3.check_item_details{
+       margin-bottom:0;        
 }
 .check_item textarea{
        width:400px;
@@ -969,7 +969,7 @@
     font-weight: normal;
     height: 22px;
     margin-right: 10px;
-    padding-top: 5px;
+    padding-top: 4px;
     text-align: center;
     width: 66px;
 }
@@ -1013,57 +1013,50 @@
 .frm_save_check_item input[type='submit']{
        width: 130px;   
 }
-ul.check_items{
-       width: 800px;
+ul.check_items {
+    width: 625px;
 }
+
+ul.check_items h5{
+       margin:10px;
+       font-size: 12px;
+}
 .tab_menu div.active{
-       background: url('../../../images/bg_tab_menu_active.png') no-repeat;
+       background: #2647A0;
+       border: none;
 }
 .tab_menu div.active a{
        color: #FFF;
 }
 .tab_menu {
     height: 29px;
-    margin: 15px 0 0;
     overflow: hidden;
 }
 .tab_menu div {
-    background: url("../../../images/bg_tab_menu_not_active.png") no-repeat 
scroll 0 0 transparent;
-    color: #000000;
-    cursor: pointer;
+    background: none repeat scroll 0 0 #FAFAFA;
+    border: 1px solid #A3A3A3;
     float: left;
     font-size: 12px;
     font-weight: normal;
+    margin-right: 3px;
+}
+.tab_menu div a {
+    color: #000000;
+    cursor: pointer;
+    display: block;
     height: 30px;
     padding-top: 9px;
     text-align: center;
-    width: 93px;
-    word-wrap: normal;
+    text-decoration: none;
+    width: 130px;
 }
-.tab_menu div.ext {
-    padding-top: 0px;
-}
-.tab_menu div a{
-    text-decoration:none;
-    color:#333;
-}
-.tab_menu div.ext a{
-       display:block;
-    font-size: 11px;
-    line-height: 12px;
-    margin: 0;
-    padding: 3px 0 0 9px;
-    text-align: center;
-    width: 75px;
-    text-decoration:none;
-}
 .tab_item {
-       display:none;
-       background: none repeat scroll 0 0 #EDF5FF;
-    border: 1px solid #ddd;
-    margin: 0;
+    background: none repeat scroll 0 0 #EDF5FF;
+    border: 1px solid #A3A3A3;
+    display: none;
+    margin: 0 318px 0 0;
     padding: 15px;
-    width: 800px;      
+    width: 625px;
 }
 .tab_item h2{
        margin:0 0 10px;
@@ -1112,10 +1105,46 @@
        position:absolute;
     z-index: 1;
 }
-#error_report_message_details{
-       background: none repeat scroll 0 0 #EDF5FF;
-    border: 1px solid #ddd;
-    margin: 0;
+#main_content #error_report_message_details {
+    background: none repeat scroll 0 0 #EDF5FF;
+    border: 1px solid #DDDDDD;
+    margin: 20px 0;
     padding: 15px;
-    width: 800px;      
+    width: 800px;
+}
+#error_report_message_details label{
+       display: inline-block;
+       width: 130px;   
+}
+.btn{
+       background: none repeat scroll 0 0 #2647A0;
+    color: #FFFFFF;
+    display: inline-block;
+    margin-right: 5px;
+    padding: 5px 10px;
+    text-decoration: none;
+    border: 1px solid #173073;
+    cursor: pointer;
+}
+#frm_update_check_list input[type="submit"]{
+       width: 140px;   
+}
+#error_message_menu {
+    float: left;
+    margin-top: 50px;
+}
+#error_message_menu a {
+    text-align: center;
+    width: 140px;
+    margin: 2px 0;   
+}
+
+#view_errors {
+       float:right;
+    margin: 20px 0;   
+}
+#register_errors {
+       display:none;
+    float: right;
+    margin-top: 20px;   
 }
\ No newline at end of file

Modified: trunk/controller/templates/base/edit_check_list.xsl
===================================================================
--- trunk/controller/templates/base/edit_check_list.xsl 2012-01-02 07:47:16 UTC 
(rev 8466)
+++ trunk/controller/templates/base/edit_check_list.xsl 2012-01-02 07:58:57 UTC 
(rev 8467)
@@ -36,15 +36,26 @@
                                
                                $(wrpDiv).addClass("active");
                                
+                               $(hideId).fadeOut('100', function(){
+                                       $(showId).fadeIn('100');
+                               });                     
+
+                               return false;
+                       });
+                                               
+                       $("#reg_errors").click(function(){
+                               var thisA = $(this);
+                               var showId = $(thisA).attr("href");
+                               var hideId = "#view_errors";
+                                                                       
                                $(hideId).fadeOut('1000', function(){
                                        $(showId).fadeIn('1000');
-                               });                     
-                                                       
-                                                       
-                       
+                               });     
+                               $(thisA).fadeOut('1000');
+
                                return false;
                        });
-                                               
+                       
                });
        </script>
                
@@ -52,37 +63,39 @@
                
                <fieldset class="check_list_details">
                
+               <form id="frm_update_check_list" 
action="index.php?menuaction=controller.uicheck_list.update_check_list" 
method="post">
+                               
                        <xsl:variable name="check_list_id"><xsl:value-of 
select="check_list/id"/></xsl:variable>
-                       <input type="hidden" name="check_list_id" 
value="{$check_list_id}" />   
+                       <input type="hidden" name="check_list_id" 
value="{$check_list_id}" />
                                
                        <div>
                                <label>ID</label>
                                <input>
                             <xsl:attribute 
name="name">check_list_id</xsl:attribute>
-                             <xsl:attribute name="value"><xsl:value-of 
select="check_list/id"/></xsl:attribute>
+                            <xsl:attribute name="value"><xsl:value-of 
select="check_list/id"/></xsl:attribute>
                            </input>
                    </div>
                        <div>
                                <label>Status</label>
-                                       <xsl:variable 
name="status"><xsl:value-of select="check_list/status"/></xsl:variable>
-                                       <select name="status">
-                                               <xsl:choose>
-                                                       <xsl:when 
test="check_list/status = 0">
-                                                               <option 
value="0" SELECTED="SELECTED">Ikke utført</option>
-                                                               <option 
value="1" >Utført</option>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="check_list/status = 1">
-                                                               <option 
value="0">Ikke utført</option>
-                                                               <option 
value="1" SELECTED="SELECTED">Utført</option>
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                       </select>
+                               <xsl:variable name="status"><xsl:value-of 
select="check_list/status"/></xsl:variable>
+                               <select name="status">
+                                       <xsl:choose>
+                                               <xsl:when 
test="check_list/status = 0">
+                                                       <option value="0" 
SELECTED="SELECTED">Ikke utført</option>
+                                                       <option value="1" 
>Utført</option>
+                                               </xsl:when>
+                                               <xsl:when 
test="check_list/status = 1">
+                                                       <option value="0">Ikke 
utført</option>
+                                                       <option value="1" 
SELECTED="SELECTED">Utført</option>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </select>
                        </div>
                        <div>
                                <label>Skal utføres innen</label>
                                <input>
-                             <xsl:attribute name="id">deadline</xsl:attribute>
-                             <xsl:attribute 
name="name">deadline</xsl:attribute>
+                             <xsl:attribute 
name="id">deadline_date</xsl:attribute>
+                             <xsl:attribute 
name="name">deadline_date</xsl:attribute>
                              <xsl:attribute name="type">text</xsl:attribute>
                              <xsl:if test="check_list/deadline != 0">
                                <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, 
number(check_list/deadline))"/></xsl:attribute>
@@ -114,28 +127,48 @@
                        <div>
                                <label class="comment">Kommentar</label>
                                <textarea>
-                                 <xsl:attribute 
name="name">check_list_comment</xsl:attribute>
+                                 <xsl:attribute 
name="name">comment</xsl:attribute>
                                  <xsl:value-of select="check_list/comment"/>
                                </textarea>
                        </div>
+                       
+                       <div class="form-buttons">
+                               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save_check_list')" /></xsl:variable>
+                               <input class="btn not_active" type="submit" 
name="save_control" value="{$lang_save}" title="{$lang_save}" />
+                       </div>
+                       </form>
                </fieldset>
                
-               <a>
-                       <xsl:attribute name="href">
-                               
<xsl:text>index.php?menuaction=controller.uierror_report_message.create_error_report_message</xsl:text>
-                               <xsl:text>&amp;check_list_id=</xsl:text>
-                               <xsl:value-of select="check_list/id"/>
-                       </xsl:attribute>
-                       Send avviksmelding
-               </a>
-               
-               <div class="tab_menu">
-                       <div class="active ext"><a 
href="#control_items_list">Registrer avvik</a></div>
-                       <div><a href="#check_list_not_fixed_list">Vis åpne 
avvik</a></div>
-                       <div><a href="#check_list_fixed_list">Vis håndterte 
avvik</a></div>
+               <div id="error_message_menu">
+                       <div>
+                               <a class="btn">
+                                       <xsl:attribute name="id">
+                                               <xsl:text>reg_errors</xsl:text>
+                                       </xsl:attribute>                        
                
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>#register_errors</xsl:text>
+                                       </xsl:attribute>
+                                       Registrer avvik
+                               </a>
+                       </div>
+                       <div>
+                               <a class="btn">
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uierror_report_message.create_error_report_message</xsl:text>
+                                               
<xsl:text>&amp;check_list_id=</xsl:text>
+                                               <xsl:value-of 
select="check_list/id"/>
+                                       </xsl:attribute>
+                                       Send avviksmelding
+                               </a>
+                       </div>
                </div>
                
-               <div id="control_items_list" class="tab_item active">
+               <div id="register_errors">
+                       <div class="tab_menu">
+                               <div class="active"><a>Registrer avvik</a></div>
+                       </div>
+                       
+                       <div class="tab_item active">
                        <h2 class="check_item_details">Velg sjekkpunkter som 
skal registreres som avvik</h2>
 
                        <xsl:choose>
@@ -144,7 +177,7 @@
                                        <ul id="control_items_list" 
class="check_items expand_list">
                                                <xsl:for-each 
select="control_items_list">
                                                        <li>
-                                                       <h4><img 
src="controller/images/arrow_right.png" width="14"/><xsl:number/>. 
<span><xsl:value-of select="title"/></span></h4>                                
            
+                                                       <h4><img 
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of 
select="title"/></span></h4>                                           
                                                                <form 
class="frm_save_control_item" 
action="index.php?menuaction=controller.uicheck_list.add_check_item_to_list" 
method="post">
                                                                        
<xsl:variable name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
                                                                        <input 
type="hidden" name="control_item_id" value="{$control_item_id}" /> 
@@ -203,11 +236,17 @@
                                        </xsl:otherwise>
                        </xsl:choose>
                </div>
+               </div>
                
+               <div id="view_errors">
                
-               <div id="check_list_not_fixed_list" class="tab_item">
-                       <h2 class="check_item_details">Åpne avvik</h2>
+               <div class="tab_menu">
+                       <div class="active"><a 
href="#check_list_not_fixed_list">Vis åpne avvik</a></div>
+                       <div><a href="#check_list_fixed_list">Vis håndterte 
avvik</a></div>
+                       <div><a href="#view_measurements">Vis målinger</a></div>
+               </div>  
                
+               <div id="check_list_not_fixed_list" class="tab_item active">
                        <xsl:choose>
                                <xsl:when 
test="check_list/check_item_array/child::node()">
                                        
@@ -217,7 +256,7 @@
                                                <xsl:for-each 
select="check_list/check_item_array">
                                                                <li>
                                                                <xsl:if 
test="status = 0">
-                                                                       
<h4><img src="controller/images/arrow_right.png" width="14"/><xsl:number />. 
<span><xsl:value-of select="control_item/title"/></span></h4>                   
                           
+                                                                       
<h4><img src="controller/images/arrow_right.png" 
width="14"/><span><xsl:value-of select="control_item/title"/></span></h4>       
                                       
                                                                        <form 
class="frm_save_check_item" 
action="index.php?menuaction=controller.uicheck_list.save_check_item" 
method="post">
                                                                                
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
                                                                                
<input type="hidden" name="check_item_id" value="{$check_item_id}" /> 
@@ -269,8 +308,6 @@
                </div>
                
                <div id="check_list_fixed_list" class="tab_item"> 
-                       <h2 class="check_item_details">Avvik som er 
håndterte</h2>
-               
                        <xsl:choose>
                                <xsl:when 
test="check_list/check_item_array/child::node()">
                                        
@@ -280,7 +317,7 @@
                                                <xsl:for-each 
select="check_list/check_item_array">
                                                                <xsl:if 
test="status = 1">
                                                                <li>
-                                                               <h4><img 
src="controller/images/arrow_right.png" width="14"/><xsl:number/>. 
<span><xsl:value-of select="control_item/title"/></span></h4>                   
                            
+                                                               <h4><img 
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of 
select="control_item/title"/></span></h4>                                       
       
                                                                        <form 
class="frm_save_check_item" 
action="index.php?menuaction=controller.uicheck_list.save_check_item" 
method="post">
                                                                                
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
                                                                                
<input type="hidden" name="check_item_id" value="{$check_item_id}" /> 
@@ -329,6 +366,7 @@
                                                Ingen sjekkpunkter
                                        </xsl:otherwise>
                        </xsl:choose>
-               </div>  
+               </div>
+               </div>
 </div>
 </xsl:template>

Modified: trunk/controller/templates/base/view_error_report_message.xsl
===================================================================
--- trunk/controller/templates/base/view_error_report_message.xsl       
2012-01-02 07:47:16 UTC (rev 8466)
+++ trunk/controller/templates/base/view_error_report_message.xsl       
2012-01-02 07:58:57 UTC (rev 8467)
@@ -4,14 +4,23 @@
 
 <div id="main_content">
        
-               <h1>Send avviksmelding på bygg: <xsl:value-of 
select="location_array/loc1_name"/></h1>
+               <h1>Send avviksmelding</h1>
                
-               <h2>Kontroll <xsl:value-of select="control_array/title"/></h2>
-               <h2>Utført dato <xsl:value-of select="php:function('date', 
$date_format, number(check_list/completed_date))"/></h2>
-                               
+               <h3>Følgende meldingsdata ble sendt</h3>
                <div id="error_report_message_details">
+                       <h3>Bygg: <xsl:value-of 
select="location_array/loc1_name"/></h3>
+                       <h3>Tittel på kontroll: <xsl:value-of 
select="control_array/title"/></h3>
+                       <xsl:choose>
+                               <xsl:when test="check_list/completed_date != 0">
+                                       <h3>Kontroll ble utført dato: 
<xsl:value-of select="php:function('date', $date_format, 
number(check_list/completed_date))"/></h3>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <h3>Kontroll ble utført dato:  Ikke 
registrert utført</h3>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </div>
                        
-
+               <div id="error_report_message_details">
                        <xsl:choose>
                                <xsl:when 
test="check_list/check_item_array/child::node()">
                                        
@@ -30,38 +39,27 @@
                                        <xsl:value-of 
select="location_array/location_code"/>
                                      </xsl:attribute>
                                    </input>
-                                   
-                                       <label style="font-size: 
15px;font-weight: bold;">Tittel på melding</label>
-                                       <xsl:value-of 
select="message_ticket/subject"/>
                        
-                                       <h3 class="check_item_details">Velg 
sjekkpunkter som skal være med i avviksmelding</h3>                             
    
-                                       <ul class="check_items expand_list">
+                                       <div>       
+                                               <label style="font-size: 
15px;font-weight: bold;">Tittel på melding</label>
+                                               <xsl:value-of 
select="message_ticket/subject"/>
+                                       </div>
+                                       
+                                       <div>
+                                               <label style="font-size: 
15px;font-weight: bold;">Kategori</label>
+                                               <span><xsl:value-of 
select="category"/></span> 
+                                       </div>
+                       
+                       
+                                       <h3 
class="check_item_details">Avviksmeldingen omfattet følgende sjekkpunkter</h3>  
                                    
+                                       <ul class="check_items">
                                                <xsl:for-each 
select="check_list/check_item_array">
                                                        <li>
                                                                <xsl:variable 
name="check_item_id"><xsl:value-of select="id" /></xsl:variable>
-                                                               
<h4><xsl:value-of select="control_item/title"/></h4>                            
                
+                                                               
<h5><xsl:value-of select="control_item/title"/></h5>                            
                
                                                        </li>
                                                </xsl:for-each>
                                        </ul>
-                                       
-                                       <a>
-                                               <xsl:attribute name="href">
-                                                       
<xsl:text>index.php?menuaction=controller.uierror_report_message.create_error_report_message</xsl:text>
-                                                       
<xsl:text>&amp;check_list_id=</xsl:text>
-                                                       <xsl:value-of 
select="check_list/id"/>
-                                               </xsl:attribute>
-                                     Registrer ny melding
-                                   </a>
-                                   
-                                   <a>
-                                               <xsl:attribute name="href">
-                                                       
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
-                                                       
<xsl:text>&amp;check_list_id=</xsl:text>
-                                                       <xsl:value-of 
select="check_list/id"/>
-                                               </xsl:attribute>
-                                     Endre sjekkliste
-                                   </a>
-                                       
                                </form>                 
                                </xsl:when>
                                <xsl:otherwise>
@@ -70,7 +68,21 @@
                        </xsl:choose>
                </div>
                
-               
-                       
+               <a class="btn">
+                       <xsl:attribute name="href">
+                               
<xsl:text>index.php?menuaction=controller.uierror_report_message.create_error_report_message</xsl:text>
+                               <xsl:text>&amp;check_list_id=</xsl:text>
+                               <xsl:value-of select="check_list/id"/>
+                       </xsl:attribute>
+             Registrer ny melding
+           </a>
+               <a class="btn">
+               <xsl:attribute name="href">
+                               
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
+                               <xsl:text>&amp;check_list_id=</xsl:text>
+                               <xsl:value-of select="check_list/id"/>
+                       </xsl:attribute>
+             Endre sjekkliste
+           </a>
 </div>
 </xsl:template>




reply via email to

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