[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8415]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8415] |
Date: |
Fri, 23 Dec 2011 09:53:08 +0000 |
Revision: 8415
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8415
Author: vator
Date: 2011-12-23 09:53:08 +0000 (Fri, 23 Dec 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/templates/base/add_check_list_for_location.xsl
trunk/controller/templates/base/edit_check_list.xsl
trunk/controller/templates/base/view_calendar_month.xsl
trunk/controller/templates/base/view_calendar_year.xsl
Added Paths:
-----------
trunk/controller/templates/base/create_error_report_message.xsl
Modified: trunk/controller/templates/base/add_check_list_for_location.xsl
===================================================================
--- trunk/controller/templates/base/add_check_list_for_location.xsl
2011-12-23 09:52:46 UTC (rev 8414)
+++ trunk/controller/templates/base/add_check_list_for_location.xsl
2011-12-23 09:53:08 UTC (rev 8415)
@@ -15,11 +15,6 @@
dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
dateFormat: 'dd/mm-yy'
});
- $( "#deadline_date" ).datepicker({
- monthNames:
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
- dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
- dateFormat: 'dd/mm-yy'
- });
});
</script>
@@ -27,69 +22,69 @@
<div id="main_content">
<h1>Registrere sjekkliste for <xsl:value-of
select="location_array/loc1_name"/></h1>
-
- <h2>Tittel <xsl:value-of select="control_array/title"/></h2>
- <form id="frm_add_check_list"
action="index.php?menuaction=controller.uicheck_list_for_location.save_check_list_for_location"
method="post">
-
- <div id="calendar_dates">
- <xsl:for-each select="calendar_array">
- <xsl:variable name="cal_date"><xsl:value-of
select="."/></xsl:variable>
+ <fieldset class="check_list_details">
+ <form id="frm_add_check_list"
action="index.php?menuaction=controller.uicheck_list_for_location.save_check_list_for_location"
method="post">
- <span><xsl:value-of
select="php:function('date', $date_format, number( $cal_date ) )"/></span>
- </xsl:for-each>
- </div>
+ <div id="calendar_dates">
+ <xsl:for-each select="calendar_array">
+ <xsl:variable
name="cal_date"><xsl:value-of select="."/></xsl:variable>
+
+ <span><xsl:value-of
select="php:function('date', $date_format, number( $cal_date ) )"/></span>
+ </xsl:for-each>
+ </div>
+
+ <xsl:variable name="location_code"><xsl:value-of
select="location_array/location_code"/></xsl:variable>
+ <xsl:variable name="control_id"><xsl:value-of
select="control_array/id"/></xsl:variable>
+
+ <input type="hidden" name="control_id"
value="{$control_id}" />
+ <input type="hidden" name="location_code"
value="{$location_code}" />
-
- <xsl:variable name="location_code"><xsl:value-of
select="location_array/location_code"/></xsl:variable>
- <xsl:variable name="control_id"><xsl:value-of
select="control_array/id"/></xsl:variable>
-
- <input type="hidden" name="control_id" value="{$control_id}" />
- <input type="hidden" name="location_code"
value="{$location_code}" />
-
- <fieldset class="add_check_list">
+ <fieldset class="add_check_list">
+ <div>
+ <label>Status</label>
+ <select name="status">
+ <option value="0"
SELECTED="SELECTED">Ikke utført</option>
+ <option value="1"
>Utført</option>
+ </select>
+ </div>
+ <div>
+ <label>Fristdato</label>
+ <input>
+ <xsl:attribute
name="id">deadline_date</xsl:attribute>
+ <xsl:attribute
name="name">deadline_date</xsl:attribute>
+ <xsl:attribute
name="type">text</xsl:attribute>
+ <xsl:attribute name="value"><xsl:value-of
select="php:function('date', $date_format, number(deadline))"/></xsl:attribute>
+ </input>
+ </div>
+ <div>
+ <label>Planlagt dato</label>
+ <input>
+ <xsl:attribute
name="id">planned_date</xsl:attribute>
+ <xsl:attribute
name="name">planned_date</xsl:attribute>
+ <xsl:attribute
name="type">text</xsl:attribute>
+ <xsl:attribute
name="value"></xsl:attribute>
+ </input>
+ </div>
+ <div>
+ <label>Utført dato</label>
+ <input>
+ <xsl:attribute
name="id">completed_date</xsl:attribute>
+ <xsl:attribute
name="name">completed_date</xsl:attribute>
+ <xsl:attribute
name="type">text</xsl:attribute>
+ <xsl:if
test="check_list/completed_date != ''">
+ <xsl:attribute
name="value"><xsl:value-of select="php:function('date', $date_format,
number(check_list/completed_date))"/></xsl:attribute>
+ </xsl:if>
+ </input>
+ </div>
+ <div><label>Utstyr</label><input
name="equipment_id" /></div>
+ </fieldset>
<div>
- <label>Status</label>
- <select name="status">
- <option value="0">Utført</option>
- <option value="0">Ikke utført</option>
- </select>
+ <xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save')" /></xsl:variable>
+ <input type="submit" name="save"
value="{$lang_save}" title = "{$lang_save}" />
</div>
- <div>
- <label>Fristdato</label>
- <input>
- <xsl:attribute
name="id">deadline_date</xsl:attribute>
- <xsl:attribute
name="name">deadline_date</xsl:attribute>
- <xsl:attribute name="type">text</xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of
select="php:function('date', $date_format, number(deadline))"/></xsl:attribute>
- </input>
- </div>
- <div>
- <label>Planlagt dato</label>
- <input>
- <xsl:attribute
name="id">planned_date</xsl:attribute>
- <xsl:attribute
name="name">planned_date</xsl:attribute>
- <xsl:attribute name="type">text</xsl:attribute>
- </input>
- </div>
- <div>
- <label>Utført dato</label>
- <input>
- <xsl:attribute
name="id">completed_date</xsl:attribute>
- <xsl:attribute
name="name">completed_date</xsl:attribute>
- <xsl:attribute name="type">text</xsl:attribute>
- <xsl:if test="check_list/completed_date !=
''">
- <xsl:attribute name="value"><xsl:value-of
select="php:function('date', $date_format,
number(check_list/completed_date))"/></xsl:attribute>
- </xsl:if>
- </input>
- </div>
- <div><label>Utstyr</label><input name="equipment_id"
/></div>
- </fieldset>
- <div>
- <xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save')" /></xsl:variable>
- <input type="submit" name="save" value="{$lang_save}"
title = "{$lang_save}" />
- </div>
- </form>
+ </form>
+ </fieldset>
</div>
</xsl:template>
Added: trunk/controller/templates/base/create_error_report_message.xsl
===================================================================
--- trunk/controller/templates/base/create_error_report_message.xsl
(rev 0)
+++ trunk/controller/templates/base/create_error_report_message.xsl
2011-12-23 09:53:08 UTC (rev 8415)
@@ -0,0 +1,47 @@
+<!-- $Id: edit_check_list.xsl 8374 2011-12-20 07:45:04Z vator $ -->
+<xsl:template match="data" name="view_check_list"
xmlns:php="http://php.net/xsl">
+<xsl:variable name="date_format">d/m-Y</xsl:variable>
+
+<div id="main_content">
+
+ <h1>Send avviksmelding på bygg: <xsl:value-of
select="location_array/loc1_name"/></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 class="tab_menu">
+ <div class="active ext"><a
href="#control_items_list">1: Velg sjekkpunkter</a></div>
+ <div><a href="#check_list_not_fixed_list">2: Detaljer
for avviksmelding</a></div>
+ <div><a href="#check_list_fixed_list">3: Kvittering for
avviksmelding</a></div>
+ </div>
+
+ <div id="control_items_list" class="tab_item active">
+ <h2 class="check_item_details">Velg sjekkpunkter som
skal være med i avviksmelding</h2>
+
+ <xsl:choose>
+ <xsl:when
test="check_list/check_item_array/child::node()">
+
+ <form class="frm_save_check_item"
action="index.php?menuaction=controller.uicheck_list_for_location.register_error_report_message"
method="post">
+ <ul class="check_items expand_list">
+ <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_id[]" value="{$check_item_id}" /><xsl:number
/>. <span><xsl:value-of select="control_item/title"/></span></h4>
+ </li>
+ </xsl:for-each>
+ </ul>
+
+ <div class="form-buttons">
+ <xsl:variable
name="lang_save"><xsl:value-of select="php:function('lang', 'save')"
/></xsl:variable>
+ <input type="button"
name="save_control" value="{$lang_save}" title="{$lang_save}" />
+ </div>
+ </form>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen sjekkpunkter
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+
+</div>
+</xsl:template>
Property changes on:
trunk/controller/templates/base/create_error_report_message.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/controller/templates/base/edit_check_list.xsl
===================================================================
--- trunk/controller/templates/base/edit_check_list.xsl 2011-12-23 09:52:46 UTC
(rev 8414)
+++ trunk/controller/templates/base/edit_check_list.xsl 2011-12-23 09:53:08 UTC
(rev 8415)
@@ -9,22 +9,46 @@
$( "#planned_date" ).datepicker({
monthNames:
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To',
'Fr', 'Lø'],
- dateFormat: 'd/m-yy'
+ dateFormat: 'dd/mm-yy'
});
$( "#completed_date" ).datepicker({
monthNames:
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To',
'Fr', 'Lø'],
- dateFormat: 'd/m-yy'
+ dateFormat: 'dd/mm-yy'
});
- $( "#deadline" ).datepicker({
+ $( "#deadline_date" ).datepicker({
monthNames:
['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'],
dayNamesMin: ['Sø', 'Ma', 'Ti', 'On', 'To',
'Fr', 'Lø'],
- dateFormat: 'd/m-yy'
- });
+ dateFormat: 'dd/mm-yy'
+ });
+
+ $(".tab_menu a").click(function(){
+
+ var thisA = $(this);
+ var wrpDiv = $(this).parent();
+ var showId = $(thisA).attr("href");
+
+ var activeA = $(".tab_menu").find("div.active");
+ var hideId = $(activeA).find("a").attr("href");
+
+
+
$(".tab_menu").find("div.active").removeClass("active");
+
+ $(wrpDiv).addClass("active");
+
+ $(hideId).fadeOut('1000', function(){
+ $(showId).fadeIn('1000');
+ });
+
+
+
+ return false;
+ });
+
});
</script>
- <h1>Sjekkliste</h1>
+ <h1>Endre sjekkliste for <xsl:value-of
select="location_array/loc1_name"/></h1>
<fieldset class="check_list_details">
@@ -40,10 +64,19 @@
</div>
<div>
<label>Status</label>
- <input>
- <xsl:attribute
name="name">check_list_status</xsl:attribute>
- <xsl:attribute name="value"><xsl:value-of
select="check_list/status"/></xsl:attribute>
- </input>
+ <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>
@@ -85,207 +118,217 @@
<xsl:value-of select="check_list/comment"/>
</textarea>
</div>
-
</fieldset>
-
- <h2 class="check_item_details">Åpne sjekkpunkter</h2>
-
- <xsl:choose>
- <xsl:when
test="check_list/check_item_array/child::node()">
-
- <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
- <ul class="check_items expand_list">
- <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>
- <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}" />
- <div
class="check_item">
- <div>
-
<label>Status</label>
-
<select name="status">
-
<xsl:choose>
-
<xsl:when test="status = 0">
-
<option value="0" SELECTED="SELECTED">Feil på
sjekkpunkt</option>
-
<option value="1">Feil fikset</option>
-
</xsl:when>
-
<xsl:when test="status = 1">
-
<option value="0">Feil på sjekkpunkt</option>
-
<option value="1" SELECTED="SELECTED">Feil
fikset</option>
-
</xsl:when>
-
</xsl:choose>
-
</select>
- </div>
- <div>
- <label
class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
- </div>
- <div>
-
<label>Hva skal gjøres</label>
-
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
- </div>
- <div>
-
<label>Utførelsesbeskrivelse</label>
-
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
- </div>
- <div
class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
-
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
-
</div>
- </div>
- </form>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Ingen sjekkpunkter
- </xsl:otherwise>
- </xsl:choose>
+ <a>
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.create_error_report_message</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ </xsl:attribute>
+ Send avviksmelding
+ </a>
- <h2 class="check_item_details">Sjekkpunkter som er fikset</h2>
-
- <xsl:choose>
- <xsl:when
test="check_list/check_item_array/child::node()">
+ <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>
+
+ <div id="control_items_list" class="tab_item active">
+ <h2 class="check_item_details">Velg sjekkpunkter som
skal registreres som avvik</h2>
+
+ <xsl:choose>
+ <xsl:when
test="control_items_list/child::node()">
- <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
-
- <ul class="check_items expand_list">
- <xsl:for-each
select="check_list/check_item_array">
- <xsl:if test="status =
1">
+ <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="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}" />
+ <h4><img
src="controller/images/arrow_right.png" width="14"/><xsl:number/>.
<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}" />
+ <input>
+
<xsl:attribute name="name">check_list_id</xsl:attribute>
+
<xsl:attribute name="type">hidden</xsl:attribute>
+
<xsl:attribute name="value">
+
<xsl:value-of select="//check_list/id"/>
+
</xsl:attribute>
+ </input>
+ <input>
+
<xsl:attribute name="name">status</xsl:attribute>
+
<xsl:attribute name="type">hidden</xsl:attribute>
+
<xsl:attribute name="value">
+
<xsl:value-of select="0"/>
+
</xsl:attribute>
+ </input>
+
<div
class="check_item">
- <div>
-
<label>Status</label>
-
<select name="status">
-
<xsl:choose>
-
<xsl:when test="status = 0">
-
<option value="0" SELECTED="SELECTED">Feil på
sjekkpunkt</option>
-
<option value="1">Feil fikset</option>
-
</xsl:when>
-
<xsl:when test="status = 1">
-
<option value="0">Feil på sjekkpunkt</option>
-
<option value="1" SELECTED="SELECTED">Feil
fikset</option>
-
</xsl:when>
-
</xsl:choose>
-
</select>
+ <div>
+ <label
class="comment">Påkrevd</label>
+
<input>
+
<xsl:attribute name="name">required</xsl:attribute>
+
<xsl:attribute name="type">checkbox</xsl:attribute>
+
<xsl:attribute name="value">
+
<xsl:value-of select="required"/>
+
</xsl:attribute>
+
</input>
</div>
+ <div>
+
<label class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
<div>
- <label
class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
- </div>
- <div>
-
<label>Hva skal gjøres</label>
+ <label
style="vertical-align:top">Hva skal gjøres</label>
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
</div>
<div>
-
<label>Utførelsesbeskrivelse</label>
+ <label
style="vertical-align:top">Utførelsesbeskrivelse</label>
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
</div>
<div
class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
</div>
</div>
</form>
</li>
- </xsl:if>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Ingen sjekkpunkter
- </xsl:otherwise>
- </xsl:choose>
+ </xsl:for-each>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen sjekkpunkter
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
- <h2 class="check_item_details">Kontrollpunkter</h2>
-
- <xsl:choose>
- <xsl:when test="control_items_list/child::node()">
- <ul 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>
- <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}" />
- <input>
- <xsl:attribute
name="name">check_list_id</xsl:attribute>
- <xsl:attribute
name="type">hidden</xsl:attribute>
- <xsl:attribute
name="value">
- <xsl:value-of
select="//check_list/id"/>
- </xsl:attribute>
- </input>
- <input>
- <xsl:attribute
name="name">status</xsl:attribute>
- <xsl:attribute
name="type">hidden</xsl:attribute>
- <xsl:attribute
name="value">
- <xsl:value-of
select="0"/>
- </xsl:attribute>
- </input>
-
- <div
class="check_item">
- <div>
-
<label>Tittel</label>
- <input>
-
<xsl:attribute name="name">control_item_title</xsl:attribute>
-
<xsl:attribute name="type">text</xsl:attribute>
-
<xsl:attribute name="value">
-
<xsl:value-of select="title"/>
-
</xsl:attribute>
-
</input>
- </div>
- <div>
- <label
class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
- </div>
- <div>
- <label
class="comment">Påkrevd</label>
- <input>
-
<xsl:attribute name="name">required</xsl:attribute>
-
<xsl:attribute name="type">text</xsl:attribute>
-
<xsl:attribute name="value">
-
<xsl:value-of select="required"/>
-
</xsl:attribute>
-
</input>
- </div>
- <div>
- <label>Hva
skal gjøres</label>
-
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
- </div>
- <div>
-
<label>Utførelsesbeskrivelse</label>
-
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
- </div>
- <div
class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of select="php:function('lang',
'save_check_item')" /></xsl:variable>
-
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
- </div>
- </div>
- </form>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Ingen kontrollpunkter
- </xsl:otherwise>
- </xsl:choose>
+ <div id="check_list_not_fixed_list" class="tab_item">
+ <h2 class="check_item_details">Åpne avvik</h2>
+
+ <xsl:choose>
+ <xsl:when
test="check_list/check_item_array/child::node()">
+
+ <div class="expand_menu"><div
class="expand_all">Vis alle</div><div class="collapse_all focus">Skjul
alle</div></div>
+ <ul id="check_list_not_fixed_list"
class="check_items expand_list">
+ <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>
+ <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}" />
+
<div class="check_item">
+
<div>
+
<label>Status</label>
+
<select name="status">
+
<xsl:choose>
+
<xsl:when test="status = 0">
+
<option value="0" SELECTED="SELECTED">Feil på
sjekkpunkt</option>
+
<option value="1">Feil fikset</option>
+
</xsl:when>
+
<xsl:when test="status = 1">
+
<option value="0">Feil på sjekkpunkt</option>
+
<option value="1" SELECTED="SELECTED">Feil
fikset</option>
+
</xsl:when>
+
</xsl:choose>
+
</select>
+
</div>
+
<div>
+
<label class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<div>
+
<label>Hva skal gjøres</label>
+
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+
</div>
+
<div>
+
<label>Utførelsesbeskrivelse</label>
+
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+
</div>
+
<div class="form-buttons">
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
+
</div>
+
</div>
+ </form>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen sjekkpunkter
+ </xsl:otherwise>
+ </xsl:choose>
+ </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()">
+
+ <div class="expand_menu"><div
class="expand_all">Vis alle</div><div class="collapse_all focus">Skjul
alle</div></div>
+
+ <ul id="check_list_fixed_list"
class="check_items expand_list">
+ <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>
+ <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}" />
+
<div class="check_item">
+
<div>
+
<label>Status</label>
+
<select name="status">
+
<xsl:choose>
+
<xsl:when test="status = 0">
+
<option value="0" SELECTED="SELECTED">Feil på
sjekkpunkt</option>
+
<option value="1">Feil fikset</option>
+
</xsl:when>
+
<xsl:when test="status = 1">
+
<option value="0">Feil på sjekkpunkt</option>
+
<option value="1" SELECTED="SELECTED">Feil
fikset</option>
+
</xsl:when>
+
</xsl:choose>
+
</select>
+
</div>
+
<div>
+
<label class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<div>
+
<label>Hva skal gjøres</label>
+
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+
</div>
+
<div>
+
<label>Utførelsesbeskrivelse</label>
+
<textarea><xsl:value-of select="control_item/what_to_do"/></textarea>
+
</div>
+
<div class="form-buttons">
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
+
</div>
+
</div>
+ </form>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen sjekkpunkter
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
</div>
</xsl:template>
Modified: trunk/controller/templates/base/view_calendar_month.xsl
===================================================================
--- trunk/controller/templates/base/view_calendar_month.xsl 2011-12-23
09:52:46 UTC (rev 8414)
+++ trunk/controller/templates/base/view_calendar_month.xsl 2011-12-23
09:53:08 UTC (rev 8415)
@@ -4,52 +4,58 @@
<xsl:variable name="location_code"><xsl:value-of
select="location_array/location_code"/></xsl:variable>
<div id="main_content">
-
- <h1>Kalenderoversikt</h1>
- <fieldset class="check_list_details">
- <div><xsl:value-of
select="location_array/loc1_name"/></div>
- <div>Periode: <xsl:value-of select="period"/></div>
- </fieldset>
+
+ <h1>Kalenderoversikt for <xsl:value-of select="period"/></h1>
+
+ <div style="float:left;">
+ <fieldset class="location_details">
+ <h3
style="margin:0;font-size:19px;"><xsl:value-of
select="location_array/loc1_name"/></h3>
+ </fieldset>
+ </div>
+
+ <ul id="icon_color_map">
+ <li><img height="13"
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroll satt
opp</span></li>
+ <li><img height="13"
src="controller/images/status_icon_yellow.png" /><span>Kontroll har planlagt
dato</span></li>
+ <li><img height="13"
src="controller/images/status_icon_dark_green.png" /><span>Kontroll gjennomført
uten feil før frist</span></li>
+ <li><img height="13"
src="controller/images/status_icon_light_green.png" /><span>Kontroll
gjennomført uten feil etter frist</span></li>
+ <li><img height="13"
src="controller/images/status_icon_red_empty.png" /><span>Kontroll gjennomført
med rapporterte feil</span></li>
+ <li><img height="11"
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke
gjennomført</span></li>
+ </ul>
- <h2 style="float:left;">Sjekklister</h2>
- <div style="float:left;margin-top: 30px;margin-left: 636px;"><a
class="move_cal_right" href="#"><img src="controller/images/arrow_left.png"
width="16"/></a></div>
- <div style="float:left;margin-top: 30px;margin-left: 454px;"><a
class="move_cal_left" href="#"><img src="controller/images/arrow_right.png"
width="16"/></a></div>
+ <div style="float: left;margin-bottom: 10px;margin-left:
735px;margin-top: 30px;"><a class="move_cal_right" href="#"><img
src="controller/images/arrow_left.png" width="16"/></a></div>
+ <div style="float:left;margin-top: 30px;margin-left: 374px;"><a
class="move_cal_left" href="#"><img src="controller/images/arrow_right.png"
width="16"/></a></div>
<script>
$(document).ready(function() {
-
- $(".move_cal_left").click(function(){
+ $(".move_cal_left").click(function(){
var leftStrVal =
$("#days_view").css("left");
var leftNumVal =
leftStrVal.substring(0, leftStrVal.indexOf('px'));
- if(leftNumVal == -502){
+ if(leftNumVal == -417){
$("#days_view").animate({
- left: '-=110'
+ left: '-=93'
}, 800);
- }else if(leftNumVal > -502){
+ }else if(leftNumVal > -417){
$("#days_view").animate({
- left: '-=502'
+ left: '-=417'
}, 800);
}
});
$(".move_cal_right").click(function(){
-
var leftStrVal =
$("#days_view").css("left");
var leftNumVal =
leftStrVal.substring(0, leftStrVal.indexOf('px'));
- if(leftNumVal == -110){
- $("#days_view").animate({
- left: '+=110'
- }, 800);
- }else if(-502 == leftNumVal){
- $("#days_view").animate({
- left: '+=502'
- }, 800);
- }else if(-502 > leftNumVal){
- $("#days_view").animate({
- left: '+=502'
- }, 800);
+ if( leftNumVal != 0 ){
+ if(leftNumVal == -93){
+
$("#days_view").animate({
+ left: '+=93'
+ }, 800);
+ }else if( leftNumVal >= -510 ){
+
$("#days_view").animate({
+ left: '+=417'
+ }, 800);
+ }
}
});
});
@@ -57,7 +63,7 @@
<xsl:choose>
<xsl:when test="controls_calendar_array/child::node()">
- <ul style="clear:left;" class="calendar info">
+ <ul style="clear:left;" class="calendar info month">
<li class="heading">
<div class="id">ID</div>
<div class="title">Tittel</div>
@@ -122,7 +128,7 @@
<xsl:text>&location_code=</xsl:text>
<xsl:value-of select="$location_code"/>
</xsl:attribute>
-
<img height="15" src="controller/images/status_icon_yellow.png" />
+
<img height="15" src="controller/images/status_icon_yellow_ring.png" />
</a>
</div>
</xsl:when>
@@ -130,27 +136,22 @@
<div>
<a>
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.add_check_list_for_location</xsl:text>
-
<xsl:text>&date=</xsl:text>
-
<xsl:value-of select="info/date"/>
-
<xsl:text>&control_id=</xsl:text>
-
<xsl:value-of select="info/control_id"/>
-
<xsl:text>&location_code=</xsl:text>
-
<xsl:value-of select="$location_code"/>
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="info/check_list_id"/>
</xsl:attribute>
-
<img height="15" src="controller/images/status_icon_light_green.png" />
+
<img height="15" src="controller/images/status_icon_yellow.png" />
</a>
</div>
</xsl:when>
<xsl:when test="status = 'control_accomplished_in_time_without_errors'">
<div>
-
<a class="view_check_list">
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
-
<xsl:text>&phpgw_return_as=json</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/id"/>
-
</xsl:attribute>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="info/check_list_id"/>
+
</xsl:attribute>
<span style="display:none"><xsl:value-of
select="info/id"/></span>
<img height="15"
src="controller/images/status_icon_dark_green.png" />
</a>
@@ -159,13 +160,12 @@
<xsl:when test="status = 'control_accomplished_over_time_without_errors'">
<div style="position:relative;">
<div id="info_box" style="position:absolute;display:none;"></div>
-
<a class="view_check_list">
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
-
<xsl:text>&phpgw_return_as=json</xsl:text>
-
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/id"/>
-
</xsl:attribute>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="info/check_list_id"/>
+
</xsl:attribute>
<span style="display:none"><xsl:value-of
select="info/id"/></span>
<img height="15"
src="controller/images/status_icon_light_green.png" />
</a>
@@ -176,13 +176,15 @@
<div id="info_box" style="position:absolute;display:none;"></div>
<a class="view_check_list">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
-
<xsl:text>&phpgw_return_as=json</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/id"/>
+
<xsl:value-of select="info/check_list_id"/>
</xsl:attribute>
-
<span style="display:none"><xsl:value-of
select="info/id"/></span>
-
<img height="15" src="controller/images/status_icon_red.png" />
+
<span style="display:none">
+
<xsl:text>&check_list_id=</xsl:text><xsl:value-of
select="info/check_list_id"/>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</span>
+
<img height="15"
src="controller/images/status_icon_red_empty.png" />
</a>
</div>
</xsl:when>
Modified: trunk/controller/templates/base/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/view_calendar_year.xsl 2011-12-23
09:52:46 UTC (rev 8414)
+++ trunk/controller/templates/base/view_calendar_year.xsl 2011-12-23
09:53:08 UTC (rev 8415)
@@ -5,15 +5,25 @@
<xsl:variable name="location_code"><xsl:value-of
select="location_array/location_code"/></xsl:variable>
<div id="main_content">
-
- <h1>Kalenderoversikt</h1>
- <fieldset class="check_list_details">
- <div><xsl:value-of
select="location_array/loc1_name"/></div>
- <div>Periode: <xsl:value-of select="period"/></div>
- </fieldset>
-
- <h2>Sjekklister</h2>
+ <h1>Kalenderoversikt for <xsl:value-of select="period"/></h1>
+
+ <div style="float:left;">
+ <fieldset class="location_details">
+ <h3
style="margin:0;font-size:19px;"><xsl:value-of
select="location_array/loc1_name"/></h3>
+ </fieldset>
+ </div>
+
+ <ul id="icon_color_map">
+ <li><img height="15"
src="controller/images/status_icon_yellow.png" /><span>Kontroll satt
opp</span></li>
+ <li><img height="15"
src="controller/images/status_icon_light_green.png" /><span>Kontroll har
planlagt dato</span></li>
+ <li><img height="15"
src="controller/images/status_icon_dark_green.png" /><span>Kontroll gjennomført
uten feil</span></li>
+ <li><img height="15"
src="controller/images/status_icon_light_blue.png" /><span>Kontroll gjennomført
uten feil før frist</span></li>
+ <li><img height="15"
src="controller/images/status_icon_dark_blue.png" /><span>Kontroll gjennomført
uten feil etter frist</span></li>
+ <li><img height="15"
src="controller/images/status_icon_red.png" /><span>Kontroll gjennomført med
rapporterte feil</span></li>
+ <li><img height="12"
src="controller/images/status_icon_red_cross.png" /><span>Kontroll ikke
gjennomført</span></li>
+ </ul>
+
<ul class="calendar">
<xsl:choose>
<xsl:when
test="controls_calendar_array/child::node()">
@@ -30,7 +40,7 @@
<div>
<a>
<xsl:attribute
name="href">
-
<xsl:text>index.php?menuaction=controller.uilocation_check_list.view_calendar_for_month</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
<xsl:text>&year=</xsl:text>
<xsl:value-of select="$year"/>
<xsl:text>&month=</xsl:text>
@@ -73,55 +83,107 @@
</div>
<div class="months">
<xsl:for-each
select="calendar_array">
- <xsl:choose>
- <xsl:when
test="status = 0">
- <div>
- <a>
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.add_check_list_for_location</xsl:text>
-
<xsl:text>&date=</xsl:text>
-
<xsl:value-of select="info/date"/>
-
<xsl:text>&control_id=</xsl:text>
-
<xsl:value-of select="$control_id"/>
-
<xsl:text>&location_code=</xsl:text>
-
<xsl:value-of select="$location_code"/>
-
</xsl:attribute>
-
<img height="15" src="controller/images/status_icon_yellow.png" />
- </a>
- </div>
- </xsl:when>
- <xsl:when
test="status = 1">
- <div
style="position:relative;">
- <div
id="info_box" style="position:absolute;display:none;"></div>
-
<a class="view_check_list">
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
-
<xsl:text>&phpgw_return_as=json</xsl:text>
+ <xsl:choose>
+
<xsl:when test="status = 'control_registered'">
+
<div>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.add_check_list_for_location</xsl:text>
+
<xsl:text>&date=</xsl:text>
+
<xsl:value-of select="info/date"/>
+
<xsl:text>&control_id=</xsl:text>
+
<xsl:value-of select="info/control_id"/>
+
<xsl:text>&location_code=</xsl:text>
+
<xsl:value-of select="$location_code"/>
+
</xsl:attribute>
+
<img height="15" src="controller/images/status_icon_yellow.png" />
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_planned'">
+
<div>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/id"/>
+
<xsl:value-of select="info/check_list_id"/>
</xsl:attribute>
-
<span style="display:none"><xsl:value-of select="info/id"/></span>
-
<img height="15" src="controller/images/status_icon_red.png" />
+
<img height="15" src="controller/images/status_icon_light_green.png" />
</a>
- </div>
- </xsl:when>
- <xsl:when
test="status = 2">
- <div
style="background: url(controller/images/status_icon_red_empty.png) no-repeat
50% 50%;">
- <a
style="color:#fff;font-weight:bold;text-decoration: none;font-size:10px;"
class="view_check_list">
-
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
-
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_accomplished_in_time_without_errors'">
+
<div>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
-
<xsl:value-of select="info/id"/>
+
<xsl:value-of select="info/check_list_id"/>
</xsl:attribute>
-
<span><xsl:value-of select="info"/></span>
-
</a>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <div></div>
- </xsl:otherwise>
- </xsl:choose>
+
<span style="display:none"><xsl:value-of
select="info/id"/></span>
+
<img height="15"
src="controller/images/status_icon_dark_green.png" />
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_accomplished_over_time_without_errors'">
+
<div style="position:relative;">
+
<div id="info_box" style="position:absolute;display:none;"></div>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="info/check_list_id"/>
+
</xsl:attribute>
+
<span style="display:none"><xsl:value-of
select="info/id"/></span>
+
<img height="15"
src="controller/images/status_icon_light_green.png" />
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_accomplished_with_errors'">
+
<div style="position:relative;">
+
<div id="info_box" style="position:absolute;display:none;"></div>
+
<a class="view_check_list">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.edit_check_list_for_location</xsl:text>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="info/check_list_id"/>
+
</xsl:attribute>
+
<span style="display:none">
+
<xsl:text>&check_list_id=</xsl:text><xsl:value-of
select="info/check_list_id"/>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
</span>
+
<img height="15" src="controller/images/status_icon_red.png" />
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_agg_accomplished_with_errors'">
+
<div style="background: url(controller/images/status_icon_red_empty.png)
no-repeat 50% 50%;">
+
<a style="color:#fff;font-weight:bold;text-decoration: none;font-size:10px;"
class="view_check_list">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.get_check_list_info</xsl:text>
+
<xsl:text>&phpgw_return_as=json</xsl:text>
+
<xsl:text>&check_list_id=</xsl:text>
+
<xsl:value-of select="info/id"/>
+
</xsl:attribute>
+
<span><xsl:value-of select="info"/></span>
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_canceled'">
+
<div>
+
<img height="12" src="controller/images/status_icon_red_cross.png" />
+
</div>
+
</xsl:when>
+
<xsl:when test="status = 'control_not_accomplished'">
+
<div>
+
<img height="12" src="controller/images/status_icon_red_cross.png" />
+
</div>
+
</xsl:when>
+
<xsl:otherwise>
+
<div></div>
+
</xsl:otherwise>
+ </xsl:choose>
+
</xsl:for-each>
</div>
</li>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8415],
Torstein <=