[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8485] moved procedure-templates to new template-fold
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [8485] moved procedure-templates to new template-folder |
Date: |
Thu, 05 Jan 2012 08:21:04 +0000 |
Revision: 8485
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8485
Author: erikhl
Date: 2012-01-05 08:21:03 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
moved procedure-templates to new template-folder
Modified Paths:
--------------
trunk/controller/inc/class.uiprocedure.inc.php
Added Paths:
-----------
trunk/controller/templates/base/procedure/
trunk/controller/templates/base/procedure/procedure_documents.xsl
trunk/controller/templates/base/procedure/procedure_item.xsl
trunk/controller/templates/base/procedure/procedure_tabs.xsl
Removed Paths:
-------------
trunk/controller/templates/base/procedure_documents.xsl
trunk/controller/templates/base/procedure_item.xsl
trunk/controller/templates/base/procedure_tabs.xsl
Modified: trunk/controller/inc/class.uiprocedure.inc.php
===================================================================
--- trunk/controller/inc/class.uiprocedure.inc.php 2012-01-04 15:32:58 UTC
(rev 8484)
+++ trunk/controller/inc/class.uiprocedure.inc.php 2012-01-05 08:21:03 UTC
(rev 8485)
@@ -290,9 +290,18 @@
}
$procedure_array = $procedure->toArray();
//_debug_array($procedure_array);
+
+ $tabs = array( array(
+ 'label' => lang('Procedure')
+ ), array(
+ 'label' =>
lang('View_documents_for_procedure')
+ ));
+
$data = array
(
+ 'tabs'
=> $GLOBALS['phpgw']->common->create_tabs($tabs, 0),
+ 'view'
=> "view_procedure",
'value_id'
=> !empty($procedure) ? $procedure->get_id() : 0,
'start_date' =>
$GLOBALS['phpgw']->yuical->add_listener('start_date',date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
($procedure->get_start_date())?$procedure->get_start_date():time())),
'end_date'
=>
$GLOBALS['phpgw']->yuical->add_listener('end_date',date($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'],
($procedure->get_end_date())?$procedure->get_end_date():'')),
@@ -308,7 +317,7 @@
$this->use_yui_editor(array('responsibility','description'));
- self::render_template_xsl('procedure_item',
$data);
+
self::render_template_xsl(array('procedure/procedure_tabs', 'common',
'procedure/procedure_item'), $data);
}
}
@@ -420,7 +429,7 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('controller') . '::' . lang('Procedure');
//self::render_template_xsl('procedure_item',
$data);
-
self::render_template_xsl(array('procedure_tabs', 'common', 'procedure_item'),
$data);
+
self::render_template_xsl(array('procedure/procedure_tabs', 'common',
'procedure/procedure_item'), $data);
}
}
Copied: trunk/controller/templates/base/procedure/procedure_documents.xsl (from
rev 8469, trunk/controller/templates/base/procedure_documents.xsl)
===================================================================
--- trunk/controller/templates/base/procedure/procedure_documents.xsl
(rev 0)
+++ trunk/controller/templates/base/procedure/procedure_documents.xsl
2012-01-05 08:21:03 UTC (rev 8485)
@@ -0,0 +1,61 @@
+<!-- $Id$ -->
+<!-- document -->
+
+<xsl:template name="view_procedure_documents" xmlns:php="http://php.net/xsl">
+
+<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
+
+<div class="yui-content">
+ <div id="details">
+ <form enctype="multipart/form-data"
action="?menuaction=controller.uidocument.add" method="POST">
+ <xsl:variable name="lang_upload"><xsl:value-of
select="php:function('lang', 'upload')" /></xsl:variable>
+ <input type="hidden" name="procedure_id" value
= "{procedure_id}" />
+ <input type="hidden" name="document_type"
value="1" />
+ <fieldset>
+ <h3><xsl:value-of
select="php:function('lang','upload')" /></h3>
+ <input type="file" id="file_path"
name="file_path" />
+ <xsl:value-of
select="php:function('lang','title')" />:
+ <input type="text" id="document_title"
name="document_title" /><br/>
+ <xsl:value-of
select="php:function('lang','description')" />:
+ <textarea id="document_description"
name="document_description" rows="5" cols="60"></textarea>
+ <input type="submit" id="upload_button"
value="{$lang_upload}" />
+ </fieldset>
+ </form>
+ </div>
+ <div id="details">
+ <table cellpadding="10" cellspacing="10" align="left"
style="margin-left: 1em;">
+ <xsl:call-template
name="table_header_documents"/>
+ <xsl:call-template name="values_documents"/>
+ </table>
+ </div>
+ </div>
+</xsl:template>
+
+<xsl:template name="table_header_documents">
+ <tr class="th">
+ <xsl:for-each select="table_header" >
+ <td class="th_text" style="padding-right: 10px;">
+ <xsl:value-of select="header"/>
+ </td>
+ </xsl:for-each>
+ </tr>
+</xsl:template>
+
+<xsl:template name="values_documents">
+ <xsl:for-each select="values" >
+ <tr>
+ <xsl:for-each select="document" >
+ <xsl:variable name="doc_link"><xsl:value-of
select='link'/></xsl:variable>
+ <td align="left" style="padding-right: 10px;">
+ <a href="{$doc_link}"><xsl:value-of
select="title"/></a>
+ </td>
+ <td align="left" style="padding-right: 10px;">
+ <xsl:value-of select="name"/>
+ </td>
+ <td align="left" style="padding-right: 10px;">
+ <xsl:value-of select="description"
disable-output-escaping="yes"/>
+ </td>
+ </xsl:for-each>
+ </tr>
+ </xsl:for-each>
+</xsl:template>
\ No newline at end of file
Property changes on:
trunk/controller/templates/base/procedure/procedure_documents.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/controller/templates/base/procedure/procedure_item.xsl (from rev
8469, trunk/controller/templates/base/procedure_item.xsl)
===================================================================
--- trunk/controller/templates/base/procedure/procedure_item.xsl
(rev 0)
+++ trunk/controller/templates/base/procedure/procedure_item.xsl
2012-01-05 08:21:03 UTC (rev 8485)
@@ -0,0 +1,235 @@
+<!-- $Id$ -->
+<!-- item -->
+
+<xsl:template name="view_procedure" xmlns:php="http://php.net/xsl">
+
+<xsl:call-template name="yui_booking_i18n"/>
+<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
+
+<div class="yui-content">
+ <div id="details">
+ <form action="#" method="post">
+ <input type="hidden" name="id" value =
"{value_id}">
+ </input>
+ <dl class="proplist-col">
+ <dt>
+ <label
for="title"><xsl:value-of select="php:function('lang','Procedure title')"
/></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <input type="text"
name="title" id="title" value="{procedure/title}" size="100"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/title" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="revision_no"><xsl:value-of select="php:function('lang','Procedure
revision')" /></label>
+ </dt>
+ <dd>
+ <xsl:value-of
select="procedure/revision_no" />
+ </dd>
+ <dt>
+ <label
for="control_area"><xsl:value-of select="php:function('lang','Control area')"
/></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <select
id="control_area" name="control_area">
+ <option
value="0">Ingen valgt</option>
+
<xsl:apply-templates select="control_area/options"/>
+ </select>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/control_area_name" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="start_date"><xsl:value-of select="php:function('lang','Procedure start
date')" /></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <xsl:value-of
disable-output-escaping="yes" select="start_date"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable
name="startdate"><xsl:value-of select="procedure/start_date" /></xsl:variable>
+ <xsl:value-of
select="php:function('date', $dateformat, $startdate)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="revision_date"><xsl:value-of select="php:function('lang','Procedure
revision date')" /></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <xsl:value-of
disable-output-escaping="yes" select="revision_date"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if
test="procedure/revision_date != 0">
+ <xsl:variable
name="revisiondate"><xsl:value-of select="procedure/revision_date"
/></xsl:variable>
+ <xsl:value-of
select="php:function('date', $dateformat, $revisiondate)" />
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <xsl:if test="procedure/end_date != 0">
+ <dt>
+ <label
for="end_date"><xsl:value-of select="php:function('lang','Procedure end date')"
/></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <xsl:value-of
disable-output-escaping="yes" select="end_date"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable
name="enddate"><xsl:value-of select="procedure/end_date" /></xsl:variable>
+ <xsl:value-of
select="php:function('date', $dateformat, $enddate)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ </xsl:if>
+ <dt>
+ <label
for="purpose"><xsl:value-of select="php:function('lang','Procedure purpose')"
/></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <textarea id="purpose"
name="purpose" rows="5" cols="60"><xsl:value-of select="procedure/purpose"
disable-output-escaping="yes"/></textarea>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/purpose" disable-output-escaping="yes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="responsibility"><xsl:value-of select="php:function('lang','Procedure
responsibility')" /></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <textarea
id="responsibility" name="responsibility" rows="5" cols="60"><xsl:value-of
select="procedure/responsibility" /></textarea>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/responsibility" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="description"><xsl:value-of select="php:function('lang','Procedure
description')" /></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <textarea
id="description" name="description" rows="5" cols="60"><xsl:value-of
select="procedure/description" disable-output-escaping="yes"/></textarea>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/description" disable-output-escaping="yes"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label
for="reference"><xsl:value-of select="php:function('lang','Procedure
Reference')" /></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <input type="text"
name="reference" id="reference" value="{procedure/reference}" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/reference" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </dd>
+ <dt>
+ <label for="attachment"><xsl:value-of
select="php:function('lang','Procedure Attachment')" /></label>
+ </dt>
+ <dd>
+ <xsl:choose>
+ <xsl:when test="editable">
+ <input type="text"
name="attachment" id="attachment" value="{procedure/attachment}" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
select="procedure/attachment" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </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>
+ <xsl:variable
name="lang_revisit"><xsl:value-of select="php:function('lang', 'revisit')"
/></xsl:variable>
+ <xsl:variable
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')"
/></xsl:variable>
+ <input type="submit"
name="save_procedure" value="{$lang_save}" title = "{$lang_save}" />
+ <input type="submit"
name="revisit_procedure" value="{$lang_revisit}" title = "{$lang_revisit}" />
+ <input type="submit"
name="cancel_procedure" value="{$lang_cancel}" title = "{$lang_cancel}" />
+ </xsl:when>
+ <xsl:when test="inactive">
+ <xsl:variable
name="lang_back"><xsl:value-of select="php:function('lang', 'back')"
/></xsl:variable>
+ <input type="button"
value="{$lang_back}" title="{$lang_back}" onclick="javascript: history.go(-1);"
style="margin: 0 0 15px 15px; padding: 1px 15px;"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')"
/></xsl:variable>
+ <input type="submit"
name="edit_procedure" value="{$lang_edit}" title = "{$lang_edit}" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </form>
+ <xsl:choose>
+ <xsl:when test="values != ''">
+ <table cellpadding="10"
cellspacing="10" align="left" style="margin-left: 1em;">
+ <xsl:call-template
name="table_header_history"/>
+ <xsl:call-template
name="values_history"/>
+ </table>
+ </xsl:when>
+ </xsl:choose>
+ </div>
+ </div>
+</xsl:template>
+
+<xsl:template name="table_header_history">
+ <tr class="th">
+ <xsl:for-each select="table_header" >
+ <td class="th_text" style="padding-right:
10px;">
+ <xsl:value-of select="header"/>
+ </td>
+ </xsl:for-each>
+ </tr>
+ </xsl:template>
+
+ <xsl:template name="values_history">
+ <xsl:for-each select="values" >
+ <tr>
+ <xsl:for-each select="row" >
+ <xsl:variable
name="proc_link"><xsl:value-of select='link'/></xsl:variable>
+ <td align="right" style="padding-right:
10px;">
+ <a
href="{$proc_link}"><xsl:value-of select="revision_no"/></a>
+ </td>
+ <td align="left" style="padding-right:
10px;">
+ <xsl:value-of select="title"/>
+ </td>
+ <td align="left" style="padding-right:
10px;">
+ <xsl:value-of
select="start_date"/>
+ </td>
+ <td align="left" style="padding-right:
10px;">
+ <xsl:value-of
select="end_date"/>
+ </td>
+ </xsl:for-each>
+ </tr>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"
/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes"
select="name"/>
+ </option>
+ </xsl:template>
Property changes on:
trunk/controller/templates/base/procedure/procedure_item.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Author Id
Copied: trunk/controller/templates/base/procedure/procedure_tabs.xsl (from rev
8469, trunk/controller/templates/base/procedure_tabs.xsl)
===================================================================
--- trunk/controller/templates/base/procedure/procedure_tabs.xsl
(rev 0)
+++ trunk/controller/templates/base/procedure/procedure_tabs.xsl
2012-01-05 08:21:03 UTC (rev 8485)
@@ -0,0 +1,32 @@
+<!-- $Id$ -->
+<!-- separate tabs and inline tables-->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+<xsl:call-template name="yui_booking_i18n"/>
+<div class="yui-navset yui-navset-top" id="procedure_tabview">
+ <xsl:choose>
+ <xsl:when test="view = 'view_procedure'">
+ <div class="identifier-header">
+ <h1><img src="{img_go_home}" />
+ <xsl:value-of
select="php:function('lang', 'Procedure')" />
+ </h1>
+ </div>
+ <!-- Prints tabs array -->
+ <xsl:value-of disable-output-escaping="yes"
select="tabs" />
+
+ <xsl:call-template name="view_procedure" />
+ </xsl:when>
+ <xsl:when test="view = 'view_documents_for_procedure'">
+ <div class="identifier-header">
+ <h1><img src="{img_go_home}" />
+ <xsl:value-of
select="php:function('lang', 'Procedure')" />
+ </h1>
+ </div>
+ <!-- Prints tabs array -->
+ <xsl:value-of disable-output-escaping="yes"
select="tabs" />
+ <xsl:call-template name="view_procedure_documents" />
+ </xsl:when>
+ </xsl:choose>
+</div>
+
+</xsl:template>
\ No newline at end of file
Property changes on:
trunk/controller/templates/base/procedure/procedure_tabs.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/controller/templates/base/procedure_documents.xsl
===================================================================
--- trunk/controller/templates/base/procedure_documents.xsl 2012-01-04
15:32:58 UTC (rev 8484)
+++ trunk/controller/templates/base/procedure_documents.xsl 2012-01-05
08:21:03 UTC (rev 8485)
@@ -1,61 +0,0 @@
-<!-- $Id$ -->
-<!-- document -->
-
-<xsl:template name="view_procedure_documents" xmlns:php="http://php.net/xsl">
-
-<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
-
-<div class="yui-content">
- <div id="details">
- <form enctype="multipart/form-data"
action="?menuaction=controller.uidocument.add" method="POST">
- <xsl:variable name="lang_upload"><xsl:value-of
select="php:function('lang', 'upload')" /></xsl:variable>
- <input type="hidden" name="procedure_id" value
= "{procedure_id}" />
- <input type="hidden" name="document_type"
value="1" />
- <fieldset>
- <h3><xsl:value-of
select="php:function('lang','upload')" /></h3>
- <input type="file" id="file_path"
name="file_path" />
- <xsl:value-of
select="php:function('lang','title')" />:
- <input type="text" id="document_title"
name="document_title" /><br/>
- <xsl:value-of
select="php:function('lang','description')" />:
- <textarea id="document_description"
name="document_description" rows="5" cols="60"></textarea>
- <input type="submit" id="upload_button"
value="{$lang_upload}" />
- </fieldset>
- </form>
- </div>
- <div id="details">
- <table cellpadding="10" cellspacing="10" align="left"
style="margin-left: 1em;">
- <xsl:call-template
name="table_header_documents"/>
- <xsl:call-template name="values_documents"/>
- </table>
- </div>
- </div>
-</xsl:template>
-
-<xsl:template name="table_header_documents">
- <tr class="th">
- <xsl:for-each select="table_header" >
- <td class="th_text" style="padding-right: 10px;">
- <xsl:value-of select="header"/>
- </td>
- </xsl:for-each>
- </tr>
-</xsl:template>
-
-<xsl:template name="values_documents">
- <xsl:for-each select="values" >
- <tr>
- <xsl:for-each select="document" >
- <xsl:variable name="doc_link"><xsl:value-of
select='link'/></xsl:variable>
- <td align="left" style="padding-right: 10px;">
- <a href="{$doc_link}"><xsl:value-of
select="title"/></a>
- </td>
- <td align="left" style="padding-right: 10px;">
- <xsl:value-of select="name"/>
- </td>
- <td align="left" style="padding-right: 10px;">
- <xsl:value-of select="description"
disable-output-escaping="yes"/>
- </td>
- </xsl:for-each>
- </tr>
- </xsl:for-each>
-</xsl:template>
\ No newline at end of file
Deleted: trunk/controller/templates/base/procedure_item.xsl
===================================================================
--- trunk/controller/templates/base/procedure_item.xsl 2012-01-04 15:32:58 UTC
(rev 8484)
+++ trunk/controller/templates/base/procedure_item.xsl 2012-01-05 08:21:03 UTC
(rev 8485)
@@ -1,235 +0,0 @@
-<!-- $Id$ -->
-<!-- item -->
-
-<xsl:template name="view_procedure" xmlns:php="http://php.net/xsl">
-
-<xsl:call-template name="yui_booking_i18n"/>
-<xsl:variable name="dateformat"><xsl:value-of select="dateformat"
/></xsl:variable>
-
-<div class="yui-content">
- <div id="details">
- <form action="#" method="post">
- <input type="hidden" name="id" value =
"{value_id}">
- </input>
- <dl class="proplist-col">
- <dt>
- <label
for="title"><xsl:value-of select="php:function('lang','Procedure title')"
/></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text"
name="title" id="title" value="{procedure/title}" size="100"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/title" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="revision_no"><xsl:value-of select="php:function('lang','Procedure
revision')" /></label>
- </dt>
- <dd>
- <xsl:value-of
select="procedure/revision_no" />
- </dd>
- <dt>
- <label
for="control_area"><xsl:value-of select="php:function('lang','Control area')"
/></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <select
id="control_area" name="control_area">
- <option
value="0">Ingen valgt</option>
-
<xsl:apply-templates select="control_area/options"/>
- </select>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/control_area_name" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="start_date"><xsl:value-of select="php:function('lang','Procedure start
date')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:value-of
disable-output-escaping="yes" select="start_date"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="startdate"><xsl:value-of select="procedure/start_date" /></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $startdate)" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="revision_date"><xsl:value-of select="php:function('lang','Procedure
revision date')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:value-of
disable-output-escaping="yes" select="revision_date"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if
test="procedure/revision_date != 0">
- <xsl:variable
name="revisiondate"><xsl:value-of select="procedure/revision_date"
/></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $revisiondate)" />
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <xsl:if test="procedure/end_date != 0">
- <dt>
- <label
for="end_date"><xsl:value-of select="php:function('lang','Procedure end date')"
/></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <xsl:value-of
disable-output-escaping="yes" select="end_date"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="enddate"><xsl:value-of select="procedure/end_date" /></xsl:variable>
- <xsl:value-of
select="php:function('date', $dateformat, $enddate)" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- </xsl:if>
- <dt>
- <label
for="purpose"><xsl:value-of select="php:function('lang','Procedure purpose')"
/></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea id="purpose"
name="purpose" rows="5" cols="60"><xsl:value-of select="procedure/purpose"
disable-output-escaping="yes"/></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/purpose" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="responsibility"><xsl:value-of select="php:function('lang','Procedure
responsibility')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea
id="responsibility" name="responsibility" rows="5" cols="60"><xsl:value-of
select="procedure/responsibility" /></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/responsibility" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="description"><xsl:value-of select="php:function('lang','Procedure
description')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <textarea
id="description" name="description" rows="5" cols="60"><xsl:value-of
select="procedure/description" disable-output-escaping="yes"/></textarea>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/description" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label
for="reference"><xsl:value-of select="php:function('lang','Procedure
Reference')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text"
name="reference" id="reference" value="{procedure/reference}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/reference" />
- </xsl:otherwise>
- </xsl:choose>
- </dd>
- <dt>
- <label for="attachment"><xsl:value-of
select="php:function('lang','Procedure Attachment')" /></label>
- </dt>
- <dd>
- <xsl:choose>
- <xsl:when test="editable">
- <input type="text"
name="attachment" id="attachment" value="{procedure/attachment}" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="procedure/attachment" />
- </xsl:otherwise>
- </xsl:choose>
- </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>
- <xsl:variable
name="lang_revisit"><xsl:value-of select="php:function('lang', 'revisit')"
/></xsl:variable>
- <xsl:variable
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')"
/></xsl:variable>
- <input type="submit"
name="save_procedure" value="{$lang_save}" title = "{$lang_save}" />
- <input type="submit"
name="revisit_procedure" value="{$lang_revisit}" title = "{$lang_revisit}" />
- <input type="submit"
name="cancel_procedure" value="{$lang_cancel}" title = "{$lang_cancel}" />
- </xsl:when>
- <xsl:when test="inactive">
- <xsl:variable
name="lang_back"><xsl:value-of select="php:function('lang', 'back')"
/></xsl:variable>
- <input type="button"
value="{$lang_back}" title="{$lang_back}" onclick="javascript: history.go(-1);"
style="margin: 0 0 15px 15px; padding: 1px 15px;"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')"
/></xsl:variable>
- <input type="submit"
name="edit_procedure" value="{$lang_edit}" title = "{$lang_edit}" />
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </form>
- <xsl:choose>
- <xsl:when test="values != ''">
- <table cellpadding="10"
cellspacing="10" align="left" style="margin-left: 1em;">
- <xsl:call-template
name="table_header_history"/>
- <xsl:call-template
name="values_history"/>
- </table>
- </xsl:when>
- </xsl:choose>
- </div>
- </div>
-</xsl:template>
-
-<xsl:template name="table_header_history">
- <tr class="th">
- <xsl:for-each select="table_header" >
- <td class="th_text" style="padding-right:
10px;">
- <xsl:value-of select="header"/>
- </td>
- </xsl:for-each>
- </tr>
- </xsl:template>
-
- <xsl:template name="values_history">
- <xsl:for-each select="values" >
- <tr>
- <xsl:for-each select="row" >
- <xsl:variable
name="proc_link"><xsl:value-of select='link'/></xsl:variable>
- <td align="right" style="padding-right:
10px;">
- <a
href="{$proc_link}"><xsl:value-of select="revision_no"/></a>
- </td>
- <td align="left" style="padding-right:
10px;">
- <xsl:value-of select="title"/>
- </td>
- <td align="left" style="padding-right:
10px;">
- <xsl:value-of
select="start_date"/>
- </td>
- <td align="left" style="padding-right:
10px;">
- <xsl:value-of
select="end_date"/>
- </td>
- </xsl:for-each>
- </tr>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="options">
- <option value="{id}">
- <xsl:if test="selected != 0">
- <xsl:attribute name="selected" value="selected"
/>
- </xsl:if>
- <xsl:value-of disable-output-escaping="yes"
select="name"/>
- </option>
- </xsl:template>
Deleted: trunk/controller/templates/base/procedure_tabs.xsl
===================================================================
--- trunk/controller/templates/base/procedure_tabs.xsl 2012-01-04 15:32:58 UTC
(rev 8484)
+++ trunk/controller/templates/base/procedure_tabs.xsl 2012-01-05 08:21:03 UTC
(rev 8485)
@@ -1,32 +0,0 @@
-<!-- $Id$ -->
-<!-- separate tabs and inline tables-->
-
-<xsl:template match="data" xmlns:php="http://php.net/xsl">
-<xsl:call-template name="yui_booking_i18n"/>
-<div class="yui-navset yui-navset-top" id="procedure_tabview">
- <xsl:choose>
- <xsl:when test="view = 'view_procedure'">
- <div class="identifier-header">
- <h1><img src="{img_go_home}" />
- <xsl:value-of
select="php:function('lang', 'Procedure')" />
- </h1>
- </div>
- <!-- Prints tabs array -->
- <xsl:value-of disable-output-escaping="yes"
select="tabs" />
-
- <xsl:call-template name="view_procedure" />
- </xsl:when>
- <xsl:when test="view = 'view_documents_for_procedure'">
- <div class="identifier-header">
- <h1><img src="{img_go_home}" />
- <xsl:value-of
select="php:function('lang', 'Procedure')" />
- </h1>
- </div>
- <!-- Prints tabs array -->
- <xsl:value-of disable-output-escaping="yes"
select="tabs" />
- <xsl:call-template name="view_procedure_documents" />
- </xsl:when>
- </xsl:choose>
-</div>
-
-</xsl:template>
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8485] moved procedure-templates to new template-folder,
Erik Holm-Larsen <=