fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16961] controller: FDV-211


From: sigurdne
Subject: [Fmsystem-commits] [16961] controller: FDV-211
Date: Wed, 9 Aug 2017 09:14:20 -0400 (EDT)

Revision: 16961
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16961
Author:   sigurdne
Date:     2017-08-09 09:14:19 -0400 (Wed, 09 Aug 2017)
Log Message:
-----------
controller: FDV-211

Modified Paths:
--------------
    trunk/controller/inc/class.uicheck_list.inc.php
    trunk/controller/inc/class.uicontrol_group.inc.php
    trunk/controller/templates/base/check_list/print_check_list.xsl
    trunk/controller/templates/base/control/control.xsl
    trunk/controller/templates/base/control_group/control_group.xsl
    trunk/controller/templates/base/procedure/procedure_item.xsl
    trunk/controller/templates/base/procedure/view_procedures_for_control.xsl

Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php     2017-08-09 09:37:20 UTC 
(rev 16960)
+++ trunk/controller/inc/class.uicheck_list.inc.php     2017-08-09 13:14:19 UTC 
(rev 16961)
@@ -1200,10 +1200,12 @@
 
                                $control_item = 
$this->so_control_item->get_single($control_item_id);
 
-                               $saved_groups_with_items_array[] = 
array("control_group" => $control_group->toArray(),
-                                       "control_items" => 
$saved_control_items);
+                               $saved_groups_with_items_array[] = array(
+                                       'control_group' => 
$control_group->toArray(),
+                                       'control_items' => $saved_control_items
+                                       );
                        }
-
+       
                        $data = array
                                (
                                'saved_groups_with_items_array' => 
$saved_groups_with_items_array,

Modified: trunk/controller/inc/class.uicontrol_group.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol_group.inc.php  2017-08-09 09:37:20 UTC 
(rev 16960)
+++ trunk/controller/inc/class.uicontrol_group.inc.php  2017-08-09 13:14:19 UTC 
(rev 16961)
@@ -196,6 +196,9 @@
 
                public function edit()
                {
+       //              
phpgwapi_jquery::formvalidator_generate(array('location','date', 'security', 
'file'));
+                       self::add_javascript('controller', 'controller', 
'ajax.js');
+
                        $tabs = array
                                (
                                'control_group' => array('label' => 
lang('Control_group'), 'link' => '#control_group'),
@@ -230,7 +233,7 @@
                                {
                                        
$control_group->set_group_name(phpgw::get_var('group_name'));
                                        
$control_group->set_procedure_id(phpgw::get_var('procedure'));
-                                       
$control_group->set_control_area_id(phpgw::get_var('control_area'));
+                                       
$control_group->set_control_area_id(phpgw::get_var('control_area_id'));
                                        
$control_group->set_building_part_id(phpgw::get_var('building_part'));
                                        
$control_group->set_component_location_id($component_location_id);
 
@@ -340,8 +343,9 @@
                                }
                                // END as categories
 
-                               $procedure_array = 
$this->so_procedure->get_procedures(0, 0, 'title', 'ASC', null, null, array(
-                                       'control_areas' => 
$control_group->get_control_area_id()));
+//                             $procedure_array = 
$this->so_procedure->get_procedures(0, 0, 'title', 'ASC', null, null, array(
+//                                     'control_areas' => 
$control_group->get_control_area_id()));
+                               $procedure_array = 
$this->so_procedure->get_procedures_by_control_area($control_group->get_control_area_id());
 
                                if ($this->flash_msgs)
                                {
@@ -355,9 +359,9 @@
                                        {
                                                $procedure_options[] = array
                                                        (
-                                                       'id' => 
$procedure->get_id(),
-                                                       'name' => 
$procedure->get_title(),
-                                                       'selected' => 'yes'
+                                                       'id' => 
$procedure['id'],
+                                                       'name' => 
$procedure['title'],
+                                                       'selected' => 1
                                                );
                                        }
                                        else
@@ -364,8 +368,9 @@
                                        {
                                                $procedure_options[] = array
                                                        (
-                                                       'id' => 
$procedure->get_id(),
-                                                       'name' => 
$procedure->get_title()
+                                                       'id' => 
$procedure['id'],
+                                                       'name' => 
$procedure['title'],
+                                                       'selected' => 0
                                                );
                                        }
                                }
@@ -464,9 +469,12 @@
                                }
                                // END as categories
 
-                               $procedure_array = 
$this->so_procedure->get_procedures(0, 0, 'title', 'ASC', null, null, array(
-                                       'control_areas' => 
$control_group->get_control_area_id()));
+//                             $procedure_array = 
$this->so_procedure->get_procedures(0, 0, 'title', 'ASC', null, null, array(
+//                                     'control_areas' => 
$control_group->get_control_area_id()));
+                               
+                               $procedure_array = 
$this->so_procedure->get_procedures_by_control_area($control_group->get_control_area_id());
 
+
                                if ($this->flash_msgs)
                                {
                                        $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
@@ -478,9 +486,9 @@
                                {
                                        $procedure_options[] = array
                                                (
-                                               'id' => $procedure->get_id(),
-                                               'name' => 
$procedure->get_title(),
-                                               'selected' => 
$procedure->get_id() == $control_group->get_procedure_id() ? 1 : 0
+                                               'id' => $procedure['id'],
+                                               'name' => $procedure['title'],
+                                               'selected' => $procedure['id'] 
== $control_group->get_procedure_id() ? 1 : 0
                                        );
                                }
                                array_unshift($procedure_options, array('id' => 
'', 'name' => lang('select value')));

Modified: trunk/controller/templates/base/check_list/print_check_list.xsl
===================================================================
--- trunk/controller/templates/base/check_list/print_check_list.xsl     
2017-08-09 09:37:20 UTC (rev 16960)
+++ trunk/controller/templates/base/check_list/print_check_list.xsl     
2017-08-09 13:14:19 UTC (rev 16961)
@@ -54,11 +54,9 @@
                                                        <br/>
                                                        <xsl:value-of 
select="what_to_do" disable-output-escaping="yes"/>
                                                        <br/>
-                                                       <br/>
                                                        
<i>Utførelsesbeskrivelse</i>
                                                        <br/>
                                                        <xsl:value-of 
select="how_to_do" disable-output-escaping="yes"/>
-                                                       <br/>
                                                </li>
                                        </xsl:for-each>
                                </ul>
@@ -75,15 +73,15 @@
                }
 
                @media print {
-                       li {page-break-inside: avoid;}
-                       h1, h2, h3, h4, h5 {
-                       page-break-after: avoid;
-                       }
+               li {page-break-inside: avoid;}
+               h1, h2, h3, h4, h5 {
+               page-break-after: avoid;
+               }
 
-                       table, figure {
-                       page-break-inside: avoid;
-                       }
+               table, figure {
+               page-break-inside: avoid;
                }
+               }
 
 
                @page:left{
@@ -93,11 +91,11 @@
                }
                @media print
                {
-                       .btn
-                       {
-                               display: none !important;
-                       }
+               .btn
+               {
+               display: none !important;
                }
+               }
 
                .btn{
                background: none repeat scroll 0 0 #2647A0;

Modified: trunk/controller/templates/base/control/control.xsl
===================================================================
--- trunk/controller/templates/base/control/control.xsl 2017-08-09 09:37:20 UTC 
(rev 16960)
+++ trunk/controller/templates/base/control/control.xsl 2017-08-09 13:14:19 UTC 
(rev 16961)
@@ -1,34 +1,50 @@
 <!-- $Id$ -->
 <xsl:template name="control" xmlns:php="http://php.net/xsl";>
 
-<xsl:variable name="control_id"><xsl:value-of 
select="control/id"/></xsl:variable>
-<xsl:variable name="control_area_id"><xsl:value-of 
select="control/control_area_id"/></xsl:variable>
-<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="php:function('get_phpgw_info', 'user|preferences|common|dateformat')" 
/></xsl:variable>
+       <xsl:variable name="control_id">
+               <xsl:value-of select="control/id"/>
+       </xsl:variable>
+       <xsl:variable name="control_area_id">
+               <xsl:value-of select="control/control_area_id"/>
+       </xsl:variable>
+       <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="php:function('get_phpgw_info', 
'user|preferences|common|dateformat')" />
+       </xsl:variable>
 
                
-               <xsl:variable name="action_url">
-                               <xsl:value-of 
select="php:function('get_phpgw_link', '/index.php', 
'menuaction:controller.uicontrol.save_control_details')" />
-                       </xsl:variable>
-               <form id="frm_save_control_details" action="{$action_url}" 
method="post">
-                       <input type="hidden" name="control_id" 
value="{$control_id}" />
-                       <input type="hidden" name="saved_control_area_id" 
value="{$control_area_id}" /> 
+       <xsl:variable name="action_url">
+               <xsl:value-of select="php:function('get_phpgw_link', 
'/index.php', 'menuaction:controller.uicontrol.save_control_details')" />
+       </xsl:variable>
+       <form id="frm_save_control_details" action="{$action_url}" 
method="post">
+               <input type="hidden" name="control_id" value="{$control_id}" />
+               <input type="hidden" name="saved_control_area_id" 
value="{$control_area_id}" />
        
-                       <dl class="proplist-col">
-                               <dt>
-                                       <label>Kontrollområde</label>
-                               </dt>
-                               <dd>
+               <dl class="proplist-col">
+                       <dt>
+                               <label>Kontrollområde</label>
+                       </dt>
+                       <dd>
                                <xsl:choose>
                                        <xsl:when test="editable">
                                                <xsl:if 
test="control/error_msg_array/control_area_id != ''">
-                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/control_area_id" 
/></xsl:variable>
-                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       <xsl:variable 
name="error_msg">
+                                                               <xsl:value-of 
select="control/error_msg_array/control_area_id" />
+                                                       </xsl:variable>
+                                                       <div 
class='input_error_msg'>
+                                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                                       </div>
                                                </xsl:if>
                                                <select class="required" 
id="control_area_id" name="control_area_id">
-                                               <option value="">Velg 
kontrollområde</option>
+                                                       <option value="">Velg 
kontrollområde</option>
                                                        <xsl:for-each 
select="control_areas_array">
                                                                <xsl:choose>
                                                                        
<xsl:when test="cat_id = $control_area_id">
@@ -50,16 +66,20 @@
                                                <xsl:value-of 
select="control/control_area_name" />
                                        </xsl:otherwise>
                                </xsl:choose>
-                               </dd>
-                               <dt>
-                                       <label>Prosedyre</label>
-                               </dt>
-                               <dd>
+                       </dd>
+                       <dt>
+                               <label>Prosedyre</label>
+                       </dt>
+                       <dd>
                                <xsl:choose>
                                        <xsl:when test="editable">
                                                <xsl:if 
test="control/error_msg_array/procedure_id != ''">
-                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/procedure_id" 
/></xsl:variable>
-                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       <xsl:variable 
name="error_msg">
+                                                               <xsl:value-of 
select="control/error_msg_array/procedure_id" />
+                                                       </xsl:variable>
+                                                       <div 
class='input_error_msg'>
+                                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                                       </div>
                                                </xsl:if>
                                                <select id="procedure_id" 
name="procedure_id">
                                                        <option value="">Velg 
prosedyre</option>
@@ -84,91 +104,115 @@
                                                <xsl:value-of 
select="control/procedure_name" />
                                        </xsl:otherwise>
                                </xsl:choose>
-                               </dd>   
-                               <dt>
-                                       <label for="title">Tittel</label>
-                               </dt>
-                               <dd>
-                                       <xsl:choose>
-                                               <xsl:when test="editable">
-                                                       <xsl:if 
test="control/error_msg_array/title != ''">
-                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/title" 
/></xsl:variable>
-                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
-                                                       </xsl:if>
-                                                       <input class="required" 
type="text" name="title" id="title" value="{control/title}" size="70"/>
-                                                       <div class="help_text 
below">Angi tittel på kontrollen</div>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <xsl:value-of 
select="control/title" />
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </dd>
-                               <dt>
-                                       <label 
for="start_date">Startdato</label>
-                               </dt>
-                               <dd>
-                                       <xsl:if 
test="control/error_msg_array/start_date != ''">
-                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/start_date" 
/></xsl:variable>
-                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                       </dd>
+                       <dt>
+                               <label for="title">Tittel</label>
+                       </dt>
+                       <dd>
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <xsl:if 
test="control/error_msg_array/title != ''">
+                                                       <xsl:variable 
name="error_msg">
+                                                               <xsl:value-of 
select="control/error_msg_array/title" />
+                                                       </xsl:variable>
+                                                       <div 
class='input_error_msg'>
+                                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                                       </div>
+                                               </xsl:if>
+                                               <input class="required" 
type="text" name="title" id="title" value="{control/title}" size="70"/>
+                                               <div class="help_text 
below">Angi tittel på kontrollen</div>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <xsl:value-of 
select="control/title" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </dd>
+                       <dt>
+                               <label for="start_date">Startdato</label>
+                       </dt>
+                       <dd>
+                               <xsl:if 
test="control/error_msg_array/start_date != ''">
+                                       <xsl:variable name="error_msg">
+                                               <xsl:value-of 
select="control/error_msg_array/start_date" />
+                                       </xsl:variable>
+                                       <div class='input_error_msg'>
+                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                       </div>
+                               </xsl:if>
+                               <input class="required date" id="start_date" 
name="start_date" type="text">
+                                       <xsl:if test="control/start_date != 0">
+                                               <xsl:attribute name="value">
+                                                       <xsl:value-of 
select="php:function('date', $date_format, number(control/start_date))"/>
+                                               </xsl:attribute>
                                        </xsl:if>
-                                       <input class="required date" 
id="start_date" name="start_date" type="text">
-                           <xsl:if test="control/start_date != 0">
-                             <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, 
number(control/start_date))"/></xsl:attribute>
-                           </xsl:if>
-                           </input>
-                           <span class="help_text line">Angi startdato for 
kontrollen</span>
-                               </dd>
-                               <dt>
-                                       <label for="end_date">Sluttdato</label>
-                               </dt>
-                               <dd>
-                                       <xsl:if 
test="control/error_msg_array/end_date != ''">
-                                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/end_date" 
/></xsl:variable>
-                                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                               </input>
+                               <span class="help_text line">Angi startdato for 
kontrollen</span>
+                       </dd>
+                       <dt>
+                               <label for="end_date">Sluttdato</label>
+                       </dt>
+                       <dd>
+                               <xsl:if test="control/error_msg_array/end_date 
!= ''">
+                                       <xsl:variable name="error_msg">
+                                               <xsl:value-of 
select="control/error_msg_array/end_date" />
+                                       </xsl:variable>
+                                       <div class='input_error_msg'>
+                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                       </div>
+                               </xsl:if>
+                               <input class="date" id="end_date" 
name="end_date" type="text">
+                                       <xsl:if test="control/end_date != 0">
+                                               <xsl:attribute name="value">
+                                                       <xsl:value-of 
select="php:function('date', $date_format, number(control/end_date))"/>
+                                               </xsl:attribute>
                                        </xsl:if>
-                                       <input class="date" id="end_date" 
name="end_date" type="text">
-                                 <xsl:if test="control/end_date != 0">
-                                       <xsl:attribute 
name="value"><xsl:value-of select="php:function('date', $date_format, 
number(control/end_date))"/></xsl:attribute>
-                                 </xsl:if>
-                                 </input>
-                                 <span class="help_text line">Angi sluttdato 
for kontrollen. Hvis kontrollen ikke har sluttdato, lar du feltet være 
tomt</span>
-                               </dd>
-                               <dt>
-                                       <label>Frekvenstype</label>
-                               </dt>
-                               <dd>
-                                       <xsl:if 
test="control/error_msg_array/repeat_type != ''">
-                                               <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/repeat_type" 
/></xsl:variable>
-                                               <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
-                                       </xsl:if>
-                                       <select class="required" 
id="repeat_type" name="repeat_type">
-                                               <option value="">Velg 
frekvenstype</option>
-                                               <xsl:for-each 
select="repeat_type_array">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="id = //control/repeat_type">
-                                                                       <option 
value="{id}" selected="selected">
-                                                                               
<xsl:value-of disable-output-escaping="yes" select="value"/>
-                                                                       
</option>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       <option 
value="{id}">
-                                                                               
<xsl:value-of disable-output-escaping="yes" select="value"/>
-                                                                       
</option>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>           
                                                
-                                               </xsl:for-each>
-                                       </select>
-                                       <span class="help_text line">Angi 
hvilken frekvenstype kontrollen skal ha</span>
-                               </dd>
-                               <dt>
-                                       <label>Frekvens</label>
-                               </dt>
-                               <dd>
+                               </input>
+                               <span class="help_text line">Angi sluttdato for 
kontrollen. Hvis kontrollen ikke har sluttdato, lar du feltet være tomt</span>
+                       </dd>
+                       <dt>
+                               <label>Frekvenstype</label>
+                       </dt>
+                       <dd>
+                               <xsl:if 
test="control/error_msg_array/repeat_type != ''">
+                                       <xsl:variable name="error_msg">
+                                               <xsl:value-of 
select="control/error_msg_array/repeat_type" />
+                                       </xsl:variable>
+                                       <div class='input_error_msg'>
+                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                       </div>
+                               </xsl:if>
+                               <select class="required" id="repeat_type" 
name="repeat_type">
+                                       <option value="">Velg 
frekvenstype</option>
+                                       <xsl:for-each 
select="repeat_type_array">
+                                               <xsl:choose>
+                                                       <xsl:when test="id = 
//control/repeat_type">
+                                                               <option 
value="{id}" selected="selected">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="value"/>
+                                                               </option>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <option 
value="{id}">
+                                                                       
<xsl:value-of disable-output-escaping="yes" select="value"/>
+                                                               </option>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:for-each>
+                               </select>
+                               <span class="help_text line">Angi hvilken 
frekvenstype kontrollen skal ha</span>
+                       </dd>
+                       <dt>
+                               <label>Frekvens</label>
+                       </dt>
+                       <dd>
                                <xsl:choose>
                                        <xsl:when test="editable">
                                                <xsl:if 
test="control/error_msg_array/repeat_interval != ''">
-                                                       <xsl:variable 
name="error_msg"><xsl:value-of select="control/error_msg_array/repeat_interval" 
/></xsl:variable>
-                                                       <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       <xsl:variable 
name="error_msg">
+                                                               <xsl:value-of 
select="control/error_msg_array/repeat_interval" />
+                                                       </xsl:variable>
+                                                       <div 
class='input_error_msg'>
+                                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                                       </div>
                                                </xsl:if>
                                                <input class="required" 
id="repeat_interval" size="2" type="text" name="repeat_interval" 
value="{control/repeat_interval}" />
                                                <span class="help_text 
line">Angi frekvensintervall. 2, betyr det eksempelvis at kontrollen 
gjennomføres annenhver dag</span>
@@ -177,16 +221,20 @@
                                                <xsl:value-of 
select="control/repeat_interval" />
                                        </xsl:otherwise>
                                </xsl:choose>
-                               </dd>
-                               <dt>
-                                       <label>Tildelt rolle</label>
-                               </dt>
-                               <dd>
+                       </dd>
+                       <dt>
+                               <label>Tildelt rolle</label>
+                       </dt>
+                       <dd>
                                <xsl:choose>
                                        <xsl:when test="editable">
                                                <xsl:if 
test="control/error_msg_array/responsibility_id != ''">
-                                                       <xsl:variable 
name="error_msg"><xsl:value-of 
select="control/error_msg_array/responsibility_id" /></xsl:variable>
-                                                       <div 
class='input_error_msg'><xsl:value-of select="php:function('lang', $error_msg)" 
/></div>
+                                                       <xsl:variable 
name="error_msg">
+                                                               <xsl:value-of 
select="control/error_msg_array/responsibility_id" />
+                                                       </xsl:variable>
+                                                       <div 
class='input_error_msg'>
+                                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                                       </div>
                                                </xsl:if>
                                                <select class="required" 
id="responsibility_id" name="responsibility_id">
                                                        <xsl:for-each 
select="role_array">
@@ -210,34 +258,40 @@
                                                <xsl:value-of 
select="control/role_name" />
                                        </xsl:otherwise>
                                </xsl:choose>
-                               </dd>
-                               <dt>
-                                       <label 
for="description">Beskrivelse</label>
-                               </dt>
-                               <dd>
+                       </dd>
+                       <dt>
+                               <label for="description">Beskrivelse</label>
+                       </dt>
+                       <dd>
                                <xsl:choose>
                                        <xsl:when test="editable">
-                                               <textarea cols="70" rows="5" 
name="description" id="description"><xsl:value-of select="control/description" 
/></textarea>
+                                               <textarea cols="70" rows="5" 
name="description" id="description">
+                                                       <xsl:value-of 
select="control/description" />
+                                               </textarea>
                                        </xsl:when>
                                        <xsl:otherwise>
                                                <xsl:value-of 
select="control/description" disable-output-escaping="yes"/>
                                        </xsl:otherwise>
                                </xsl:choose>
-                               </dd>
-                       </dl>
+                       </dd>
+               </dl>
                        
-                       <div class="form-buttons">
-                               <xsl:choose>
-                                       <xsl:when test="editable">
-                                               <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
-                                               <input type="submit" 
name="save_control" value="{$lang_save}" title = "{$lang_save}" />
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:variable 
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')" 
/></xsl:variable>
-                                               <input type="submit" 
name="edit_control" value="{$lang_edit}" title = "{$lang_edit}" />
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </div>
-               </form>                                 
+               <div class="form-buttons">
+                       <xsl:choose>
+                               <xsl:when test="editable">
+                                       <xsl:variable name="lang_save">
+                                               <xsl:value-of 
select="php:function('lang', 'save')" />
+                                       </xsl:variable>
+                                       <input type="submit" 
name="save_control" value="{$lang_save}" title = "{$lang_save}" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:variable name="lang_edit">
+                                               <xsl:value-of 
select="php:function('lang', 'edit')" />
+                                       </xsl:variable>
+                                       <input type="submit" 
name="edit_control" value="{$lang_edit}" title = "{$lang_edit}" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </div>
+       </form>
 
 </xsl:template>

Modified: trunk/controller/templates/base/control_group/control_group.xsl
===================================================================
--- trunk/controller/templates/base/control_group/control_group.xsl     
2017-08-09 09:37:20 UTC (rev 16960)
+++ trunk/controller/templates/base/control_group/control_group.xsl     
2017-08-09 13:14:19 UTC (rev 16961)
@@ -5,15 +5,15 @@
        <!--xsl:call-template name="jquery_phpgw_i18n"/-->
 
        <div id="details">
-                       <form action="#" method="post">
-                               <input type="hidden" name="id" value = 
"{value_id}">
-                               </input>
+               <form action="#" method="post">
+                       <input type="hidden" name="id" value = "{value_id}">
+                       </input>
                        <fieldset>
 
-                                       <dt>
-                                               <label 
for="title">Tittel</label>
-                                       </dt>
-                                       <dd>
+                               <dt>
+                                       <label for="title">Tittel</label>
+                               </dt>
+                               <dd>
                                        <xsl:choose>
                                                <xsl:when test="editable">
                                                        <input type="text" 
name="group_name" id="group_name" value="{control_group/group_name}" size="80"/>
@@ -22,26 +22,34 @@
                                                        <xsl:value-of 
select="control_group/group_name"/>
                                                </xsl:otherwise>
                                        </xsl:choose>
-                                       </dd>
-                                       <dt>
-                                               <label 
for="control_area">Kontrollområde</label>
-                                       </dt>
-                                       <dd>
+                               </dd>
+                               <dt>
+                                       <label 
for="control_area">Kontrollområde</label>
+                               </dt>
+                               <dd>
                                        <xsl:choose>
                                                <xsl:when test="editable">
-                                                       <select 
id="control_area_id" name="control_area">
+                                                       <select 
class="required" id="control_area_id" name="control_area_id">
+                                                               <xsl:attribute 
name="data-validation">
+                                                                       
<xsl:text>required</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="data-validation-error-msg">
+                                                                       
<xsl:value-of select="php:function('lang', 'Please enter a title !')"/>
+                                                               </xsl:attribute>
                                                                
<xsl:apply-templates select="control_area/options"/>
                                                        </select>
+                                                       <span class="help_text 
line">Angi hvilket kontrollområde kontrollen skal gjelde for</span>
+
                                                </xsl:when>
                                                <xsl:otherwise>
                                                        <xsl:value-of 
select="control_group/control_area_name" />
                                                </xsl:otherwise>
                                        </xsl:choose>
-                                       </dd>
-                                       <dt>
-                                               <label 
for="proecdure">Prosedyre</label>
-                                       </dt>
-                                       <dd>
+                               </dd>
+                               <dt>
+                                       <label for="proecdure">Prosedyre</label>
+                               </dt>
+                               <dd>
                                        <xsl:choose>
                                                <xsl:when test="editable">
                                                        <select 
id="procedure_id" name="procedure">
@@ -52,11 +60,11 @@
                                                        <xsl:value-of 
select="control_group/procedure_name" />
                                                </xsl:otherwise>
                                        </xsl:choose>
-                                       </dd>
-                                       <dt>
-                                               <label 
for="building_part">Bygningsdel</label>
-                                       </dt>
-                                       <dd>
+                               </dd>
+                               <dt>
+                                       <label 
for="building_part">Bygningsdel</label>
+                               </dt>
+                               <dd>
                                        <xsl:choose>
                                                <xsl:when test="editable">
                                                        <select 
id="building_part" name="building_part">
@@ -67,148 +75,148 @@
                                                        <xsl:value-of 
select="control_group/building_part_id" /> - <xsl:value-of 
select="control_group/building_part_descr" />
                                                </xsl:otherwise>
                                        </xsl:choose>
-                                       </dd>
-                                       <xsl:choose>
-                                               <xsl:when test="editable">
-                                                       <dt>
+                               </dd>
+                               <xsl:choose>
+                                       <xsl:when test="editable">
+                                               <dt>
                                                        <label>
                                                                <xsl:value-of 
select="php:function('lang', 'Entity')" />
                                                        </label>
-                                                       </dt>
-                                                       <dd>
-                                                               <select 
name="entity_id" id="entity_id">
-                                                                       
<xsl:apply-templates select="entities/options"/>
-                                                               </select>
-                                                       </dd>
-                                                       <dt>
+                                               </dt>
+                                               <dd>
+                                                       <select 
name="entity_id" id="entity_id">
+                                                               
<xsl:apply-templates select="entities/options"/>
+                                                       </select>
+                                               </dd>
+                                               <dt>
                                                        <label>
                                                                <xsl:value-of 
select="php:function('lang', 'Category')" />
                                                        </label>
-                                                       </dt>
-                                                       <dd>
-                                                               <select 
name="category_id" id="category_id">
-                                                                       
<xsl:apply-templates select="categories/options"/>
-                                                               </select>
-                                                       </dd>
-                                                       <dt>
+                                               </dt>
+                                               <dd>
+                                                       <select 
name="category_id" id="category_id">
+                                                               
<xsl:apply-templates select="categories/options"/>
+                                                       </select>
+                                               </dd>
+                                               <dt>
                                                        <label>
                                                                <xsl:value-of 
select="php:function('lang', 'Attributes')" />
                                                        </label>
-                                                       </dt>
-                                                       <dd>
-                                                               <div 
id="attributes">
-                                                                       <table>
-                                                                               
<xsl:for-each select="attributes">
+                                               </dt>
+                                               <dd>
+                                                       <div id="attributes">
+                                                               <table>
+                                                                       
<xsl:for-each select="attributes">
+                                                                               
<tr>
+                                                                               
        <td>
+                                                                               
                <xsl:value-of select="input_text" /> &nbsp;( <xsl:value-of 
select="trans_datatype" /> )
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <select name='attributes_operator[{id}]' id='attribute_{id}'>;
+                                                                               
                        <xsl:apply-templates select="operator/options"/>
+                                                                               
                </select>
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="choice!=''">
+                                                                               
                                <select name='attributes[{id}]' 
id='attribute_{id}'>;
+                                                                               
                                        <option value = ''>Velg</option>";
+                                                                               
                                        <xsl:for-each select="choice">
+                                                                               
                                                <option value="{id}">
+                                                                               
                                                        <xsl:if test="selected 
!= 0">
+                                                                               
                                                                <xsl:attribute 
name="selected" value="selected" />
+                                                                               
                                                        </xsl:if>
+                                                                               
                                                        <xsl:value-of 
disable-output-escaping="yes" select="value"/>
+                                                                               
                                                </option>
+                                                                               
                                        </xsl:for-each>
+                                                                               
                                </select>
+                                                                               
                        </xsl:when>
+                                                                               
                        <xsl:otherwise>
+                                                                               
                                <input type= 'text' name='attributes[{id}]' 
id='attribute_{id}' value = '{value}'>
+                                                                               
                                        <xsl:attribute name="title" 
value="selected" >
+                                                                               
                                                <xsl:text>Verdi eller formel - 
f.eks: date('Y') - 20</xsl:text>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                </input>
+                                                                               
                        </xsl:otherwise>
+                                                                               
                </xsl:choose>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                       
</xsl:for-each>
+                                                               </table>
+                                                       </div>
+                                               </dd>
+
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <dt>
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'Entity')" />
+                                                       </label>
+                                               </dt>
+                                               <dd>
+                                                       <xsl:value-of 
select="entity/name" />
+                                               </dd>
+                                               <dt>
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'Category')" />
+                                                       </label>
+                                               </dt>
+                                               <dd>
+                                                       <xsl:value-of 
select="category/name" />
+                                               </dd>
+                                               <dt>
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'Chosen attributes')" />
+                                                       </label>
+                                               </dt>
+                                               <dd>
+                                                       <table>
+                                                               <xsl:for-each 
select="attributes">
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="value!=''">
                                                                                
        <tr>
                                                                                
                <td>
                                                                                
                        <xsl:value-of select="input_text" /> &nbsp;( 
<xsl:value-of select="trans_datatype" /> )
                                                                                
                </td>
                                                                                
                <td>
-                                                                               
                        <select name='attributes_operator[{id}]' 
id='attribute_{id}'>;
-                                                                               
                                <xsl:apply-templates select="operator/options"/>
-                                                                               
                        </select>
+
+                                                                               
                        <xsl:choose>
+                                                                               
                                <xsl:when test="operator/options!=''">
+                                                                               
                                        <xsl:for-each select="operator/options">
+                                                                               
                                                <xsl:if test="selected != 0">
+                                                                               
                                                        <xsl:value-of 
disable-output-escaping="yes" select="name"/>
+                                                                               
                                                </xsl:if>
+                                                                               
                                        </xsl:for-each>
+                                                                               
                                </xsl:when>
+                                                                               
                        </xsl:choose>
+
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <xsl:choose>
                                                                                
                                <xsl:when test="choice!=''">
-                                                                               
                                        <select name='attributes[{id}]' 
id='attribute_{id}'>;
-                                                                               
                                                <option value = 
''>Velg</option>";
-                                                                               
                                                <xsl:for-each select="choice">
-                                                                               
                                                        <option value="{id}">
-                                                                               
                                                                <xsl:if 
test="selected != 0">
-                                                                               
                                                                        
<xsl:attribute name="selected" value="selected" />
-                                                                               
                                                                </xsl:if>
-                                                                               
                                                                <xsl:value-of 
disable-output-escaping="yes" select="value"/>
-                                                                               
                                                        </option>
-                                                                               
                                                </xsl:for-each>
-                                                                               
                                        </select>
+                                                                               
                                        <xsl:for-each select="choice">
+                                                                               
                                                <xsl:if test="selected != 0">
+                                                                               
                                                        <xsl:value-of 
disable-output-escaping="yes" select="value"/>
+                                                                               
                                                </xsl:if>
+                                                                               
                                        </xsl:for-each>
                                                                                
                                </xsl:when>
                                                                                
                                <xsl:otherwise>
-                                                                               
                                        <input type= 'text' 
name='attributes[{id}]' id='attribute_{id}' value = '{value}'>
-                                                                               
                                                <xsl:attribute name="title" 
value="selected" >
-                                                                               
                                                        <xsl:text>Verdi eller 
formel - f.eks: date('Y') - 20</xsl:text>
-                                                                               
                                                </xsl:attribute>
-                                                                               
                                        </input>                        
+                                                                               
                                        <xsl:value-of 
disable-output-escaping="yes" select="value"/>
                                                                                
                                </xsl:otherwise>
                                                                                
                        </xsl:choose>
                                                                                
                </td>
                                                                                
        </tr>
-                                                                               
</xsl:for-each>
-                                                                       </table>
-                                                               </div>
-                                                       </dd>
-
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <dt>
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'Entity')" />
-                                                       </label>
-                                                       </dt>
-                                                       <dd>
-                                                               <xsl:value-of 
select="entity/name" />
-                                                       </dd>
-                                                       <dt>
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'Category')" />
-                                                       </label>
-                                                       </dt>
-                                                       <dd>
-                                                               <xsl:value-of 
select="category/name" />
-                                                       </dd>
-                                                       <dt>
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'Chosen attributes')" />
-                                                       </label>
-                                                       </dt>
-                                                       <dd>
-                                                               <table>
-                                                                       
<xsl:for-each select="attributes">
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="value!=''">
-                                                                               
                <tr>
-                                                                               
                        <td>
-                                                                               
                                <xsl:value-of select="input_text" /> &nbsp;( 
<xsl:value-of select="trans_datatype" /> )
-                                                                               
                        </td>
-                                                                               
                         <td>
-
-                                                                               
                                <xsl:choose>
-                                                                               
                                        <xsl:when test="operator/options!=''">
-                                                                               
                                                <xsl:for-each 
select="operator/options">
-                                                                               
                                                        <xsl:if test="selected 
!= 0">
-                                                                               
                                                                <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                                                                               
                                                        </xsl:if>
-                                                                               
                                                </xsl:for-each>
-                                                                               
                                        </xsl:when>
-                                                                               
                                </xsl:choose>
-
-                                                                               
                         </td> 
-                                                                               
                        <td>
-                                                                               
                                <xsl:choose>
-                                                                               
                                        <xsl:when test="choice!=''">
-                                                                               
                                                <xsl:for-each select="choice">
-                                                                               
                                                        <xsl:if test="selected 
!= 0">
-                                                                               
                                                                <xsl:value-of 
disable-output-escaping="yes" select="value"/>
-                                                                               
                                                        </xsl:if>
-                                                                               
                                                </xsl:for-each>
-                                                                               
                                        </xsl:when>
-                                                                               
                                        <xsl:otherwise>
-                                                                               
                                                <xsl:value-of 
disable-output-escaping="yes" select="value"/>
-                                                                               
                                        </xsl:otherwise>
-                                                                               
                                </xsl:choose>
-                                                                               
                        </td>
-                                                                               
                </tr>
-                                                                               
        </xsl:when>
-                                                                               
</xsl:choose>
-                                                                       
</xsl:for-each>
-                                                               </table>
-                                                       </dd>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               </xsl:for-each>
+                                                       </table>
+                                               </dd>
+                                       </xsl:otherwise>
+                               </xsl:choose>
                        </fieldset>
-                               <div class="form-buttons">
-                                       <xsl:choose>
-                                               <xsl:when test="editable">
+                       <div class="form-buttons">
+                               <xsl:choose>
+                                       <xsl:when test="editable">
                                                <xsl:variable name="lang_save">
                                                        <xsl:value-of 
select="php:function('lang', 'save')" />
                                                </xsl:variable>
@@ -215,19 +223,19 @@
                                                <xsl:variable 
name="lang_cancel">
                                                        <xsl:value-of 
select="php:function('lang', 'cancel')" />
                                                </xsl:variable>
-                                                       <input type="submit" 
name="save_control_group" value="{$lang_save}" title = "{$lang_save}" />
-                                                       <input type="submit" 
name="cancel_control_group" value="{$lang_cancel}" title = "{$lang_cancel}" />
-                                               </xsl:when>
-                                               <xsl:otherwise>
+                                               <input type="submit" 
name="save_control_group" value="{$lang_save}" title = "{$lang_save}" />
+                                               <input type="submit" 
name="cancel_control_group" value="{$lang_cancel}" title = "{$lang_cancel}" />
+                                       </xsl:when>
+                                       <xsl:otherwise>
                                                <xsl:variable name="lang_edit">
                                                        <xsl:value-of 
select="php:function('lang', 'edit')" />
                                                </xsl:variable>
-                                                       <input type="submit" 
name="edit_control_group" value="{$lang_edit}" title = "{$lang_edit}" />
-                                               </xsl:otherwise>
-                                       </xsl:choose>
-                               </div>
+                                               <input type="submit" 
name="edit_control_group" value="{$lang_edit}" title = "{$lang_edit}" />
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </div>
                                
-                       </form>
+               </form>
        </div>
 </xsl:template>
        

Modified: trunk/controller/templates/base/procedure/procedure_item.xsl
===================================================================
--- trunk/controller/templates/base/procedure/procedure_item.xsl        
2017-08-09 09:37:20 UTC (rev 16960)
+++ trunk/controller/templates/base/procedure/procedure_item.xsl        
2017-08-09 13:14:19 UTC (rev 16961)
@@ -206,7 +206,6 @@
                                <xsl:when test="values != ''">
                                        <table class="pure-table">
                                                <thead>
-
                                                        <xsl:call-template 
name="table_header_history"/>
                                                </thead>
                                                <tbody>

Modified: 
trunk/controller/templates/base/procedure/view_procedures_for_control.xsl
===================================================================
--- trunk/controller/templates/base/procedure/view_procedures_for_control.xsl   
2017-08-09 09:37:20 UTC (rev 16960)
+++ trunk/controller/templates/base/procedure/view_procedures_for_control.xsl   
2017-08-09 13:14:19 UTC (rev 16961)
@@ -1,79 +1,118 @@
 <!-- $Id: procedure_item.xsl 8485 2012-01-05 08:21:03Z erikhl $ -->
 
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
-<xsl:variable name="session_url">&amp;<xsl:value-of 
select="php:function('get_phpgw_session_url')" /></xsl:variable>
+       <xsl:variable name="session_url">&amp;
+               <xsl:value-of select="php:function('get_phpgw_session_url')" />
+       </xsl:variable>
 
-<div id="view-procedures">
-       <h2>Prosedyrer</h2>
-       <div class="box">
-               <h3>Prosedyre for kontroll</h3>
-               <h4><xsl:value-of select="control_procedure/title"/>
-                       <a class="btn-sm" id="print-control-items" 
target="_blank">
-                               <xsl:attribute name="href">
-                                       
<xsl:text>index.php?menuaction=controller.uiprocedure.print_procedure</xsl:text>
-                                       <xsl:text>&amp;procedure_id=</xsl:text>
-                                       <xsl:value-of 
select="control_procedure/id"/>
-                                       <xsl:text>&amp;control_id=</xsl:text>
-                                       <xsl:value-of select="control/id"/>
-                                       <xsl:text>&amp;location_code=</xsl:text>
-                                       <xsl:value-of 
select="location/location_code"/>
-                                       
<xsl:text>&amp;phpgw_return_as=stripped_html</xsl:text>
-                                       <xsl:value-of select="$session_url"/>
-                               </xsl:attribute>
-                               Skriv ut
-                       </a>
-               </h4>
-                       
-               <xsl:if test="control_procedure/documents/child::node()">
-                       <h4>Dokumenter</h4>
-                       <xsl:for-each select="control_procedure/documents">
-                               <div class="doc">
-                                       <xsl:variable 
name="doc_link"><xsl:value-of select='document_link'/></xsl:variable>
-                                       <span><a 
href="{$doc_link}"><xsl:value-of select="title"/></a></span>
-                                       <span class="desc"><xsl:value-of 
select="description" disable-output-escaping="yes"/></span>
-                               </div>  
-                       </xsl:for-each>
-               </xsl:if>
-       </div>
-       
-       <div class="box">
-       <h3>Prosedyrer for grupper</h3>
-       <ul>
-               <xsl:for-each select="group_procedures_array">
-                       <li>
-                               <h4><xsl:value-of 
select="control_group/group_name"/>: <xsl:value-of select="procedure/title"/>
-                               
+       <div id="view-procedures">
+               <h2>Prosedyrer</h2>
+               <div class="box">
+                       <h3>Prosedyre for kontroll</h3>
+                       <h4>
+                               <xsl:value-of select="control_procedure/title"/>
                                <a class="btn-sm" id="print-control-items" 
target="_blank">
-                                               <xsl:attribute name="href">
-                                                       
<xsl:text>index.php?menuaction=controller.uiprocedure.print_procedure</xsl:text>
-                                                       
<xsl:text>&amp;procedure_id=</xsl:text>
-                                                       <xsl:value-of 
select="procedure/id"/>
-                                                       
<xsl:text>&amp;control_id=</xsl:text>
-                                                       <xsl:value-of 
select="//control/id"/>
-                                                       
<xsl:text>&amp;control_group_id=</xsl:text>
-                                                       <xsl:value-of 
select="control_group/id"/>
-                                                       
<xsl:text>&amp;location_code=</xsl:text>
-                                                       <xsl:value-of 
select="//location/location_code"/>
-                                                       
<xsl:text>&amp;phpgw_return_as=stripped_html</xsl:text>
-                                                       <xsl:value-of 
select="$session_url"/>
-                                               </xsl:attribute>
-                                               Skriv ut
-                                       </a>
-                               </h4>
+                                       <xsl:attribute name="href">
+                                               
<xsl:text>index.php?menuaction=controller.uiprocedure.print_procedure</xsl:text>
+                                               
<xsl:text>&amp;procedure_id=</xsl:text>
+                                               <xsl:value-of 
select="control_procedure/id"/>
+                                               
<xsl:text>&amp;control_id=</xsl:text>
+                                               <xsl:value-of 
select="control/id"/>
+                                               
<xsl:text>&amp;location_code=</xsl:text>
+                                               <xsl:value-of 
select="location/location_code"/>
+                                               
<xsl:text>&amp;phpgw_return_as=stripped_html</xsl:text>
+                                               <xsl:value-of 
select="$session_url"/>
+                                       </xsl:attribute>
+                                       Skriv ut
+                               </a>
+                       </h4>
                        
-                               <xsl:if test="documents/child::node()">
+                       <xsl:if 
test="control_procedure/documents/child::node()">
                                <h4>Dokumenter</h4>
-                                       <xsl:for-each select="documents">
-                                               <div class="doc">
-                                                       <xsl:variable 
name="doc_link"><xsl:value-of select='document_link'/></xsl:variable>
-                                                       <span><a 
href="{$doc_link}"><xsl:value-of select="title"/></a></span>
-                                                       <span 
class="desc"><xsl:value-of select="description" 
disable-output-escaping="yes"/></span>
-                                               </div>  
+                               <xsl:for-each 
select="control_procedure/documents">
+                                       <div class="doc">
+                                               <xsl:variable name="doc_link">
+                                                       <xsl:value-of 
select='document_link'/>
+                                               </xsl:variable>
+                                               <span>
+                                                       <a href="{$doc_link}">
+                                                               <xsl:value-of 
select="title"/>
+                                                       </a>
+                                               </span>
+                                               <span class="desc">
+                                                       <xsl:value-of 
select="description" disable-output-escaping="yes"/>
+                                               </span>
+                                       </div>
+                               </xsl:for-each>
+                       </xsl:if>
+               </div>
+       
+               <div class="box">
+                       <h3>Prosedyrer for grupper</h3>
+                       <table class="pure-table">
+                               <thead>
+                                       <tr>
+                                               <th>Gruppe</th>
+                                               <th>Prosedyre</th>
+                                               <th>Skriv ut</th>
+                                       </tr>
+                               </thead>
+                               <tbody>
+                                       <xsl:for-each 
select="group_procedures_array">
+                                               <tr>
+                                                       <td>
+                                                               <xsl:value-of 
select="control_group/group_name"/>
+                                                       </td>
+                                                       <td>
+                                                               <xsl:value-of 
select="procedure/title"/>
+                                                               <xsl:if 
test="documents/child::node()">
+                                                                       <br/>
+                                                                       
<h4>Dokumenter</h4>
+                                                                       <ul>
+                                                                               
<xsl:for-each select="documents">
+                                                                               
        <li>
+                                                                               
                <div class="doc">
+                                                                               
                        <xsl:variable name="doc_link">
+                                                                               
                                <xsl:value-of select='document_link'/>
+                                                                               
                        </xsl:variable>
+                                                                               
                        <span>
+                                                                               
                                <a href="{$doc_link}">
+                                                                               
                                        <xsl:value-of select="title"/>
+                                                                               
                                </a>
+                                                                               
                        </span>
+                                                                               
                        <span class="desc">
+                                                                               
                                <xsl:value-of select="description" 
disable-output-escaping="yes"/>
+                                                                               
                        </span>
+                                                                               
                </div>
+                                                                               
        </li>
+                                                                               
</xsl:for-each>
+                                                                       </ul>
+
+                                                               </xsl:if>
+                                                       </td>
+                                                       <td>
+                                                               <a 
class="btn-sm" id="print-control-items" target="_blank">
+                                                                       
<xsl:attribute name="href">
+                                                                               
<xsl:text>index.php?menuaction=controller.uiprocedure.print_procedure</xsl:text>
+                                                                               
<xsl:text>&amp;procedure_id=</xsl:text>
+                                                                               
<xsl:value-of select="procedure/id"/>
+                                                                               
<xsl:text>&amp;control_id=</xsl:text>
+                                                                               
<xsl:value-of select="//control/id"/>
+                                                                               
<xsl:text>&amp;control_group_id=</xsl:text>
+                                                                               
<xsl:value-of select="control_group/id"/>
+                                                                               
<xsl:text>&amp;location_code=</xsl:text>
+                                                                               
<xsl:value-of select="//location/location_code"/>
+                                                                               
<xsl:text>&amp;phpgw_return_as=stripped_html</xsl:text>
+                                                                               
<xsl:value-of select="$session_url"/>
+                                                                       
</xsl:attribute>
+                                                                       Skriv ut
+                                                               </a>
+                                                       </td>
+                                               </tr>
                                        </xsl:for-each>
-                               </xsl:if>
-                       </li>
-               </xsl:for-each>
-       </ul>
+                               </tbody>
+                       </table>
+
+               </div>
        </div>
-</div>
 </xsl:template>




reply via email to

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