[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18560] make this a little nicer
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] [18560] make this a little nicer |
Date: |
Sun, 01 Jun 2008 01:16:59 +0000 |
Revision: 18560
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18560
Author: skwashd
Date: 2008-06-01 01:16:57 +0000 (Sun, 01 Jun 2008)
Log Message:
-----------
make this a little nicer
Modified Paths:
--------------
trunk/notes/inc/class.bonotes.inc.php
trunk/notes/inc/class.sonotes.inc.php
trunk/notes/inc/class.uinotes.inc.php
trunk/notes/templates/base/app_data.xsl
Added Paths:
-----------
trunk/notes/templates/base/images/pin.png
trunk/notes/templates/base/images/pin.svg
Modified: trunk/notes/inc/class.bonotes.inc.php
===================================================================
--- trunk/notes/inc/class.bonotes.inc.php 2008-06-01 01:09:18 UTC (rev
18559)
+++ trunk/notes/inc/class.bonotes.inc.php 2008-06-01 01:16:57 UTC (rev
18560)
@@ -88,13 +88,13 @@
//XXX Caeies : start could use the 'all' value,
perhaps think on using -1 ?
$start = phpgw::get_var('start');
- $query = phpgw::get_var('query');
- $sort = phpgw::get_var('sort');
- $order = phpgw::get_var('order');
- $filter = phpgw::get_var('filter');
+ $query = phpgw::get_var('query',
'string');
+ $sort = phpgw::get_var('sort',
'string');
+ $order = phpgw::get_var('order',
'string');
+ $filter = phpgw::get_var('filter',
'string');
$_cat_id = phpgw::get_var('cat_id',
'int');
- $this->start = (isset($start)?$start:0);
+ $this->start = $start;
if($this->start == 'all')
{
@@ -241,14 +241,12 @@
'lastmod' => $lastmod
));
$this->total_records = $this->sonotes->total_records;
- if($this->total_records)
+
+ foreach ( $notes as &$note )
{
- foreach($notes as &$note)
- {
- $note['owner'] =
$GLOBALS['phpgw']->accounts->id2name($note['owner']);
- }
- reset($notes);
+ $note['owner'] =
$GLOBALS['phpgw']->accounts->id2name($note['owner']);
}
+
return $notes;
}
Modified: trunk/notes/inc/class.sonotes.inc.php
===================================================================
--- trunk/notes/inc/class.sonotes.inc.php 2008-06-01 01:09:18 UTC (rev
18559)
+++ trunk/notes/inc/class.sonotes.inc.php 2008-06-01 01:16:57 UTC (rev
18560)
@@ -61,16 +61,16 @@
if ($order)
{
- $ordermethod = " order by $order $sort";
+ $ordermethod = " ORDER BY $order $sort";
}
else
{
- $ordermethod = ' order by note_date DESC';
+ $ordermethod = ' ORDER BY note_date DESC';
}
if ($filter == 'none')
{
- $filtermethod = ' ( note_owner=' .
$this->account;
+ $filtermethod = ' ( note_owner = ' .
$this->account;
if (is_array($this->grants))
{
$grants = $this->grants;
@@ -130,9 +130,10 @@
while ($this->db->next_record())
{
$ngrants =
$this->grants[$this->db->f('note_owner')];
- $notes[$this->db->f('note_id')] = array
+ $id = $this->db->f('note_id');
+ $notes[$id] = array
(
- 'note_id' =>
$this->db->f('note_id'),
+ 'note_id' => $id,
'owner_id' =>
$this->db->f('note_owner'),
'owner' =>
$this->db->f('note_owner'),
'access' =>
$this->db->f('note_access'),
@@ -147,7 +148,7 @@
function read_single($note_id)
{
- $this->db->query('select * from phpgw_notes where
note_id=' . intval($note_id),__LINE__,__FILE__);
+ $this->db->query('SELECT * FROM phpgw_notes WHERE
note_id=' . intval($note_id),__LINE__,__FILE__);
$note = array();
if ($this->db->next_record())
@@ -192,4 +193,3 @@
return $this->db->affected_rows() > 0;
}
}
-?>
Modified: trunk/notes/inc/class.uinotes.inc.php
===================================================================
--- trunk/notes/inc/class.uinotes.inc.php 2008-06-01 01:09:18 UTC (rev
18559)
+++ trunk/notes/inc/class.uinotes.inc.php 2008-06-01 01:16:57 UTC (rev
18560)
@@ -29,7 +29,7 @@
*
* @package notes
*/
- class uinotes
+ class notes_uinotes
{
var $grants;
var $cat_id;
@@ -41,19 +41,24 @@
var $public_functions = array
(
- 'index' => True,
- 'view' => True,
- 'edit' => True,
- 'delete' => True
+ 'index' => true,
+ 'view' => true,
+ 'edit' => true,
+ 'delete' => true
);
- function uinotes()
+ /**
+ * Constructor
+ *
+ * @return void
+ */
+ public function __construct()
{
$GLOBALS['phpgw_info']['flags'] = array
(
- 'xslt_app' => True,
- 'noheader' => True,
- 'nonavbar' => True,
+ 'xslt_app' => true,
+ 'noheader' => true,
+ 'nonavbar' => true,
'currentapp' => 'notes'
);
@@ -63,7 +68,7 @@
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('notes');
$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
- $this->bonotes =
CreateObject('notes.bonotes',True);
+ $this->bonotes =
CreateObject('notes.bonotes',true);
$this->start = $this->bonotes->start;
$this->query = $this->bonotes->query;
@@ -98,10 +103,15 @@
'menuaction' => 'notes.uinotes.index'
);
$content = array();
- while (is_array($notes_list) && list(,$note) =
each($notes_list))
+ foreach ( $notes_list as $note )
{
- $words = explode(' ', $note['content'], 4);
- $first = implode(' ', array_slice($words, 0,
3)) . ' ... ';
+ $words = explode(' ',
phpgw::strip_html($note['content']), 10);
+ $first = implode(' ', $words);
+ if ( count($words) > 10 )
+ {
+ $first .= ' ...';
+ }
+ unset($words);
$content[] = array
(
@@ -174,7 +184,7 @@
$data = array
(
'nm_data' =>
$this->nextmatchs->xslt_nm($nm),
- 'cat_filter' =>
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' =>
$this->cat_id,'globals' => True,'link_data' => $link_data)),
+ 'cat_filter' =>
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' =>
$this->cat_id,'globals' => true,'link_data' => $link_data)),
'filter_data' =>
$this->nextmatchs->xslt_filter(array('filter' => $this->filter,'link_data' =>
$link_data)),
'search_data' =>
$this->nextmatchs->xslt_search(array('query' => $this->query,'link_data' =>
$link_data)),
'table_header' =>
$table_header,
@@ -189,72 +199,107 @@
function edit()
{
$note_id = phpgw::get_var('note_id', 'int');
- $values = phpgw::get_var('values', 'string');
+ $values = phpgw::get_var('values', 'string',
'POST');
+ $save = phpgw::get_var('save', 'bool',
'POST');
+ $cancel = phpgw::get_var('cancel', 'bool',
'POST');
+ $apply = phpgw::get_var('apply', 'bool',
'POST');
+ $action = '';
- if (is_array($values))
+ if ( $save || $cancel || $apply )
{
- if (isset($values['save']) && $values['save'])
+ if ( $cancel )
{
- $values['note_id'] = $note_id;
- $note_id =
$this->bonotes->save($values);
- $this->cat_id =
($values['cat_id']?$values['cat_id']:$this->cat_id);
-
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'notes.uinotes.index'));
+
$GLOBALS['phpgw']->redirect_link('/index.php',
+ array('menuaction' =>
'notes.uinotes.index'));
}
- elseif(isset($values['cancel']) &&
$values['cancel'])
+
+ $values['note_id'] = $note_id;
+ $values['content'] =
phpgw::get_var('note_content', 'html', 'POST');
+ if ( $values['cat_id'] )
{
-
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'notes.uinotes.index'));
+ $this->cat_id = (int) $values['cat_id'];
}
- else
+ $note_id = $this->bonotes->save($values);
+
+ if ( $save )
{
- $values['note_id'] = $note_id;
- $note_id =
$this->bonotes->save($values);
- $action =
'apply';
+
$GLOBALS['phpgw']->redirect_link('/index.php',
+ array('menuaction' =>
'notes.uinotes.index'));
}
+
+ // Must be a reply request
+ $action = 'apply';
+ $GLOBALS['phpgw']->redirect_link('/index.php',
+ array('menuaction' =>
'notes.uinotes.edit', 'node_id' => $note_id));
}
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('notes') . ': ' . ($note_id?lang('edit note'):lang('add note'));
-
- if ($note_id)
+ if ( $note_id )
{
+ $lang_title = lang('edit note');
$note = $this->bonotes->read_single($note_id);
$this->cat_id =
($note['cat_id']?$note['cat_id']:$this->cat_id);
}
+ else
+ {
+ $lang_title = lang('add note');
+ $note = array
+ (
+ 'content' => '',
+ 'access' => '',
+ 'cat_id' => $this->cat_id
+ );
+ }
- $link_data = array
+ $note['content'] = phpgw::clean_html($note['content']);
+
+ $edit_url = $GLOBALS['phpgw']->link('/index.php', array
(
'menuaction' => 'notes.uinotes.edit',
'note_id' => $note_id
- );
+ ));
+ $msg_box = '';
+ if ( $action == 'apply' )
+ {
+ $msg_box =
$GLOBALS['phpgw']->common->msgbox('note has been saved', true);
+ }
+
+ $cats = $this->cats->formatted_xslt_list(array
+ (
+ 'select_name' =>
'values[cat_id]',
+ 'selected' =>
$note['cat_id']
+ ));
+
$data = array
(
- 'msgbox_data'
=> ((isset($action) &&
$action=='apply')?$GLOBALS['phpgw']->common->msgbox('note has been
saved',True):''),
- 'edit_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'msgbox_data'
=> $msg_box,
+ 'edit_url'
=> $edit_url,
'lang_content'
=> lang('content'),
'lang_category'
=> lang('category'),
'lang_access'
=> lang('private'),
'lang_save'
=> lang('save'),
'lang_cancel'
=> lang('cancel'),
'lang_apply'
=> lang('apply'),
- 'value_content'
=> isset($note['content']) ? $note['content'] : '',
- 'value_access'
=> isset($note['access']) ? $note['access'] : '',
- 'lang_content_statustext' =>
lang('Enter the content of the note'),
- 'lang_apply_statustext' =>
lang('Apply the values'),
- 'lang_cancel_statustext' =>
lang('Leave the note untouched and return back to the list'),
- 'lang_save_statustext' =>
lang('Save the note and return back to the list'),
- 'lang_access_off_statustext' => lang('The
note is public. If the note should be private, check this box'),
- 'lang_access_on_statustext' =>
lang('The note is private. If the note should be public, uncheck this box'),
+ 'value_content'
=> $note['content'],
+ 'value_access'
=> $note['access'],
'lang_no_cat'
=> lang('no category'),
- 'cat_select'
=> $this->cats->formatted_xslt_list(array('select_name' =>
'values[cat_id]','selected' => isset($note['cat_id']) ? $note['cat_id'] : ''))
+ 'cat_select'
=> $cats
);
+
+
$GLOBALS['phpgw']->richtext->replace_element('note_content');
+ $GLOBALS['phpgw']->richtext->generate_script();
+
+ $GLOBALS['phpgw']->xslttpl->add_file('msgbox');
+
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('notes') . ': ' . $lang_title;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
}
function delete()
{
$note_id = phpgw::get_var('note_id', 'int');
- $delete = phpgw::get_var('delete', 'bool');
- $cancel = phpgw::get_var('cancel', 'bool');
+ $delete = phpgw::get_var('delete', 'bool',
'POST');
+ $cancel = phpgw::get_var('cancel', 'bool',
'POST');
$link_data = array
(
@@ -294,28 +339,33 @@
function view()
{
- $note_id = phpgw::get_var('note_id', 'int');
- $action = phpgw::get_var('action', 'string');
+ $note_id = phpgw::get_var('note_id', 'int',
'GET');
+ $action = phpgw::get_var('action', 'string',
'GET');
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('notes') . ': ' . lang('view note');
$note = $this->bonotes->read_single($note_id);
+ $note['content'] = phpgw::clean_html($note['content']);
+ $cat = lang('unfiled');
+ if ( $note['cat_id'] )
+ {
+ $cat = lang('filed under: %1',
$this->cats->id2name($note['cat_id']));
+ }
+
+ $date =
$GLOBALS['phpgw']->common->show_date($note['date']);
+ $done = $GLOBALS['phpgw']->link('/index.php',
+ array('menuaction' =>
'notes.uinotes.index'));
+
$data = array
(
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'notes.uinotes.index')),
- 'lang_content' => lang('content'),
- 'lang_category' => lang('category'),
- 'lang_access' => lang('access'),
- 'lang_time_created' => lang('time created'),
+ 'done_action' => $done,
+ 'lang_category' => $cat,
+ 'lang_created' => lang('created at
%1', $date),
'lang_done' => lang('done'),
- 'value_content' => $note['content'],
- 'value_access' =>
lang(ucfirst($note['access'])),
- 'value_cat' =>
$this->cats->id2name($note['cat_id']),
- 'value_date' =>
$GLOBALS['phpgw']->common->show_date($note['date'])
+ 'value_content' => $note['content']
);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
}
}
-?>
Modified: trunk/notes/templates/base/app_data.xsl
===================================================================
--- trunk/notes/templates/base/app_data.xsl 2008-06-01 01:09:18 UTC (rev
18559)
+++ trunk/notes/templates/base/app_data.xsl 2008-06-01 01:16:57 UTC (rev
18560)
@@ -3,13 +3,13 @@
<xsl:template name="app_data">
<xsl:choose>
<xsl:when test="edit">
- <xsl:apply-templates select="edit"/>
+ <xsl:apply-templates select="edit" />
</xsl:when>
<xsl:when test="view">
- <xsl:apply-templates select="view"/>
+ <xsl:apply-templates select="view" />
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="list"/>
+ <xsl:apply-templates select="list" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -18,68 +18,60 @@
<table width="100%" cellpadding="2" cellspacing="2"
align="center">
<tr>
<td>
- <xsl:call-template name="categories"/>
+ <xsl:call-template name="categories" />
</td>
<td align="center">
- <xsl:call-template
name="filter_select"/>
+ <xsl:call-template name="filter_select"
/>
</td>
<td align="right">
- <xsl:call-template name="search_field"/>
+ <xsl:call-template name="search_field"
/>
</td>
</tr>
<tr>
<td colspan="3" width="100%">
- <xsl:call-template name="nextmatchs"/>
- <!-- <xsl:with-param
name="nextmatchs_params"/>
- </xsl:call-template> -->
+ <xsl:call-template name="nextmatchs" />
</td>
</tr>
</table>
<table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:apply-templates select="table_header"/>
- <xsl:apply-templates select="values"/>
- <xsl:apply-templates select="table_add"/>
+ <xsl:apply-templates select="table_header" />
+ <xsl:apply-templates select="values" />
</table>
+ <xsl:apply-templates select="table_add" />
</xsl:template>
<xsl:template match="table_header">
- <xsl:variable name="sort_time_created"
select="sort_time_created"/>
- <xsl:variable name="sort_note_id" select="sort_note_id"/>
+ <xsl:variable name="sort_time_created"
select="sort_time_created" />
+ <xsl:variable name="sort_note_id" select="sort_note_id" />
<tr class="th">
<td width="10%" align="right">
- <a href="{$sort_note_id}"
class="th_text"><xsl:value-of select="lang_note_id"/></a>
+ <a href="{$sort_note_id}"
class="th_text"><xsl:value-of select="lang_note_id" /></a>
</td>
<td width="40%">
- <xsl:value-of select="lang_content"/>
+ <xsl:value-of select="lang_content" />
</td>
<td width="20%" align="center">
- <a href="{$sort_time_created}"
class="th_text"><xsl:value-of select="lang_time_created"/></a>
+ <a href="{$sort_time_created}"
class="th_text"><xsl:value-of select="lang_time_created" /></a>
</td>
<td width="10%" align="center">
- <xsl:value-of select="lang_owner"/>
+ <xsl:value-of select="lang_owner" />
</td>
<td width="5%" align="center">
- <xsl:value-of select="lang_view"/>
+ <xsl:value-of select="lang_view" />
</td>
<td width="5%" align="center">
- <xsl:value-of select="lang_edit"/>
+ <xsl:value-of select="lang_edit" />
</td>
<td width="5%" align="center">
- <xsl:value-of select="lang_delete"/>
+ <xsl:value-of select="lang_delete" />
</td>
</tr>
</xsl:template>
<xsl:template match="values">
- <xsl:variable name="lang_view_statustext"><xsl:value-of
select="lang_view_statustext"/></xsl:variable>
- <xsl:variable name="lang_edit_statustext"><xsl:value-of
select="lang_edit_statustext"/></xsl:variable>
- <xsl:variable name="lang_delete_statustext"><xsl:value-of
select="lang_delete_statustext"/></xsl:variable>
<tr>
<xsl:attribute name="class">
<xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of
select="@class"/>
- </xsl:when>
<xsl:when test="position() mod
2 = 0">
<xsl:text>row_off</xsl:text>
</xsl:when>
@@ -90,193 +82,105 @@
</xsl:attribute>
<td align="right">
- <xsl:value-of select="note_id"/>
+ <xsl:value-of select="note_id" />
</td>
<td>
- <xsl:value-of select="first"/>
+ <xsl:value-of select="first" />
</td>
<td align="center">
- <xsl:value-of select="date"/>
+ <xsl:value-of select="date" />
</td>
<td align="center">
- <xsl:value-of select="owner"/>
+ <xsl:value-of select="owner" />
</td>
<td align="center">
- <xsl:variable
name="link_view"><xsl:value-of select="link_view"/></xsl:variable>
- <a href="{$link_view}"
onMouseover="window.status='{$lang_view_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="text_view"/></a>
+ <xsl:variable
name="link_view"><xsl:value-of select="link_view" /></xsl:variable>
+ <a href="{$link_view}"><xsl:value-of
select="text_view" /></a>
</td>
<td align="center">
- <xsl:variable
name="link_edit"><xsl:value-of select="link_edit"/></xsl:variable>
- <a href="{$link_edit}"
onMouseover="window.status='{$lang_edit_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="text_edit"/></a>
+ <xsl:variable
name="link_edit"><xsl:value-of select="link_edit" /></xsl:variable>
+ <a href="{$link_edit}"><xsl:value-of
select="text_edit" /></a>
</td>
<td align="center">
- <xsl:variable
name="link_delete"><xsl:value-of select="link_delete"/></xsl:variable>
- <a href="{$link_delete}"
onMouseover="window.status='{$lang_delete_statustext}';return true;"
onMouseout="window.status='';return true;" class="th_text"><xsl:value-of
select="text_delete"/></a>
+ <xsl:variable
name="link_delete"><xsl:value-of select="link_delete" /></xsl:variable>
+ <a href="{$link_delete}"><xsl:value-of
select="text_delete" /></a>
</td>
</tr>
</xsl:template>
<xsl:template match="table_add">
- <tr>
- <td height="50">
- <xsl:variable
name="add_action"><xsl:value-of select="add_action"/></xsl:variable>
- <xsl:variable
name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
- <form method="post"
action="{$add_action}">
- <input type="submit" name="add"
value="{$lang_add}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_add_statustext"/>
- <xsl:text>';
return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
+ <div>
+ <a href="{add_action}"><xsl:value-of select="lang_add"
/></a>
+ </div>
</xsl:template>
<!-- add / edit -->
<xsl:template match="edit">
- <xsl:variable name="edit_url"><xsl:value-of
select="edit_url"/></xsl:variable>
+ <xsl:variable name="edit_url"><xsl:value-of select="edit_url"
/></xsl:variable>
<form method="post" action="{$edit_url}">
- <table cellpadding="2" cellspacing="2" width="79%"
align="center">
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <tr>
- <td align="center"
colspan="3"><xsl:call-template name="msgbox"/></td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <tr class="row_off">
- <td colspan="2">
- <xsl:value-of select="lang_category"/>
- </td>
- <td>
- <xsl:call-template name="categories"/>
- </td>
- </tr>
- <tr class="row_on">
- <td valign="top" colspan="2">
- <xsl:value-of select="lang_content"/>
- </td>
- <td>
- <textarea cols="60" rows="10"
name="values[content]" wrap="virtual" onMouseout="window.status='';return
true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_content_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- <xsl:value-of
select="value_content"/>
- </textarea>
- </td>
- </tr>
- <tr class="row_off">
- <td colspan="2">
- <xsl:value-of select="lang_access"/>
- </td>
- <td>
- <xsl:choose>
- <xsl:when
test="value_access = 'private'">
- <input
type="checkbox" name="values[access]" value="True" checked="checked"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_access_on_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </xsl:when>
- <xsl:otherwise>
- <input
type="checkbox" name="values[access]" value="True"
onMouseout="window.status='';return true;">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_access_off_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
-
</xsl:attribute>
- </input>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- <tr height="50">
- <td valign="bottom">
- <xsl:variable
name="lang_save"><xsl:value-of select="lang_save"/></xsl:variable>
- <input type="submit"
name="values[save]" value="{$lang_save}" onMouseout="window.status='';return
true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_save_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- <td valign="bottom">
- <xsl:variable
name="lang_apply"><xsl:value-of select="lang_apply"/></xsl:variable>
- <input type="submit"
name="values[apply]" value="{$lang_apply}" onMouseout="window.status='';return
true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_apply_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- <td align="right" valign="bottom">
- <xsl:variable
name="lang_cancel"><xsl:value-of select="lang_cancel"/></xsl:variable>
- <input type="submit"
name="values[cancel]" value="{$lang_cancel}"
onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_cancel_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </td>
- </tr>
- </table>
+ <table cellpadding="2" cellspacing="2" width="79%"
align="center">
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <tr>
+ <td align="center"
colspan="3"><xsl:call-template name="msgbox" /></td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <tr class="row_off">
+ <td colspan="2">
+ <xsl:value-of
select="lang_category" />
+ </td>
+ <td>
+ <xsl:call-template
name="categories" />
+ </td>
+ </tr>
+ <tr class="row_on">
+ <td valign="top" colspan="2">
+ <xsl:value-of
select="lang_content" />
+ </td>
+ <td>
+ <textarea cols="100" rows="10"
name="note_content" id="note_content" wrap="soft">
+ <xsl:value-of
select="value_content" />
+ </textarea>
+ </td>
+ </tr>
+ <tr class="row_off">
+ <td colspan="2">
+ <xsl:value-of
select="lang_access" />
+ </td>
+ <td>
+ <input type="checkbox"
name="values[access]" value="True">
+ <xsl:if
test="value_access = 'private'">
+ <xsl:attribute
name="checked">
+ checked
+ </xsl:attribute>
+ </xsl:if>
+ </input>
+ </td>
+ </tr>
+ </table>
+ <div class="button_group">
+ <input type="submit" name="apply"
value="{lang_apply}" />
+
+ <input type="submit" name="cancel"
value="{lang_cancel}" />
+
+ <input type="submit" name="save"
value="{lang_save}" />
+ </div>
</form>
</xsl:template>
<!-- view -->
<xsl:template match="view">
- <table cellpadding="2" cellspacing="2" width="79%"
align="center">
- <tr class="row_off">
- <td width="19%">
- <xsl:value-of
select="lang_time_created"/>
- </td>
- <td width="81%">
- <xsl:value-of select="value_date"/>
- </td>
- </tr>
- <tr class="row_on">
- <td>
- <xsl:value-of select="lang_category"/>
- </td>
- <td>
- <xsl:value-of select="value_cat"/>
- </td>
- </tr>
- <tr class="row_off">
- <td valign="top">
- <xsl:value-of select="lang_content"/>
- </td>
- <td>
- <xsl:value-of select="value_content"/>
- </td>
- </tr>
- <tr class="row_on">
- <td>
- <xsl:value-of select="lang_access"/>
- </td>
- <td>
- <xsl:value-of select="value_access"/>
- </td>
- </tr>
- <tr height="50">
- <td>
- <xsl:variable
name="done_action"><xsl:value-of select="done_action"/></xsl:variable>
- <xsl:variable
name="lang_done"><xsl:value-of select="lang_done"/></xsl:variable>
- <form method="post"
action="{$done_action}">
- <input type="submit" class="forms"
name="done" value="{$lang_done}" onMouseover="window.status='Back to the
list.';return true;" onMouseout="window.status='';return true;"/>
- </form>
- </td>
- </tr>
- </table>
+ <div id="note_view">
+ <div id="note_content">
+ <xsl:value-of select="value_content"
disable-output-escaping="yes" />
+ <p><xsl:value-of select="lang_category" /></p>
+ </div>
+ <div id="note_created"><xsl:value-of
select="lang_created" /></div>
+ </div>
+ <div>
+ <a href="{done_action}"><xsl:value-of
select="lang_done" /></a>
+ </div>
</xsl:template>
Added: trunk/notes/templates/base/images/pin.png
===================================================================
(Binary files differ)
Property changes on: trunk/notes/templates/base/images/pin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/notes/templates/base/images/pin.svg
===================================================================
--- trunk/notes/templates/base/images/pin.svg (rev 0)
+++ trunk/notes/templates/base/images/pin.svg 2008-06-01 01:16:57 UTC (rev
18560)
@@ -0,0 +1,488 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<!-- Image sourced from http://openclipart.org/media/files/randoogle/8391 on
31May2008 -->
+<!-- Image is placed in the public domain -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="110.65163"
+ height="84.299751"
+ id="svg3253"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="thumb_tack.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3255">
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3228"
+ id="radialGradient2448"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(-0.7879742,0.5107254,-2.0451857,-3.1554214,1235.7385,709.11104)"
+ cx="537.7536"
+ cy="228.65007"
+ fx="537.7536"
+ fy="228.65007"
+ r="0.74645507" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3228">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3230" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3232" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3228"
+ id="radialGradient2469"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6288985,-1.2473361,4.9949231,6.5228797,-1652.775,-572.89743)"
+ cx="537.7536"
+ cy="228.65007"
+ fx="537.7536"
+ fy="228.65007"
+ r="0.74645507" />
+ <linearGradient
+ id="linearGradient3216">
+ <stop
+ style="stop-color:#d43500;stop-opacity:1;"
+ offset="0"
+ id="stop3218" />
+ <stop
+ id="stop3242"
+ offset="0.48051697"
+ style="stop-color:#d42400;stop-opacity:1;" />
+ <stop
+ id="stop3224"
+ offset="0.7361111"
+ style="stop-color:#d40000;stop-opacity:1;" />
+ <stop
+ style="stop-color:#b20000;stop-opacity:1;"
+ offset="1"
+ id="stop3236" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3216"
+ id="radialGradient2464"
+ gradientUnits="userSpaceOnUse"
+ cx="302.83102"
+ cy="4.6950564"
+ fx="302.83102"
+ fy="4.6950564"
+ r="8.9206038" />
+ <linearGradient
+ id="linearGradient3206">
+ <stop
+ id="stop3214"
+ offset="0"
+ style="stop-color:#7f0000;stop-opacity:1;" />
+ <stop
+ style="stop-color:#840000;stop-opacity:0.49803922;"
+ offset="0.66666669"
+ id="stop3828" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3210" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3206"
+ id="radialGradient3543"
+ gradientUnits="userSpaceOnUse"
+ cx="302.83102"
+ cy="4.6950564"
+ fx="302.83102"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3252"
+ id="radialGradient3541"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6668441,0.2502283,-0.4353502,1.442447,-180.07171,-76.257909)"
+ cx="278.53354"
+ cy="12.798131"
+ fx="278.53354"
+ fy="12.798131"
+ r="7.3867884" />
+ <linearGradient
+ id="linearGradient3384">
+ <stop
+ style="stop-color:#f60000;stop-opacity:1;"
+ offset="0"
+ id="stop3386" />
+ <stop
+ style="stop-color:#b30000;stop-opacity:1;"
+ offset="1"
+ id="stop3388" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3384"
+ id="radialGradient3539"
+ gradientUnits="userSpaceOnUse"
+ cx="305.97662"
+ cy="4.6950564"
+ fx="305.97662"
+ fy="4.6950564"
+ r="8.9206038" />
+ <filter
+ inkscape:collect="always"
+ id="filter3372"
+ x="-0.16439523"
+ width="1.3287905"
+ y="-0.21328184"
+ height="1.4265637">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="1.2413119"
+ id="feGaussianBlur3374" />
+ </filter>
+ <linearGradient
+ id="linearGradient3252">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.9910714;"
+ offset="0"
+ id="stop3254" />
+ <stop
+ id="stop3926"
+ offset="0.5138889"
+ style="stop-color:#000000;stop-opacity:0.6160714;" />
+ <stop
+ id="stop3260"
+ offset="1"
+ style="stop-color:#8d8d8d;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3252"
+ id="radialGradient3537"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6668441,0.2502283,-0.4353502,1.442447,-180.07171,-76.257909)"
+ cx="278.53354"
+ cy="12.798131"
+ fx="278.53354"
+ fy="12.798131"
+ r="7.3867884" />
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective3261" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3252"
+ id="radialGradient3985"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6668441,0.2502283,-0.4353502,1.442447,-180.07171,-76.257909)"
+ cx="278.53354"
+ cy="12.798131"
+ fx="278.53354"
+ fy="12.798131"
+ r="7.3867884" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3384"
+ id="radialGradient3987"
+ gradientUnits="userSpaceOnUse"
+ cx="305.97662"
+ cy="4.6950564"
+ fx="305.97662"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3252"
+ id="radialGradient3989"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6668441,0.2502283,-0.4353502,1.442447,-180.07171,-76.257909)"
+ cx="278.53354"
+ cy="12.798131"
+ fx="278.53354"
+ fy="12.798131"
+ r="7.3867884" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3206"
+ id="radialGradient3991"
+ gradientUnits="userSpaceOnUse"
+ cx="302.83102"
+ cy="4.6950564"
+ fx="302.83102"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3228"
+ id="radialGradient3993"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(-0.7879742,0.5107254,-2.0451857,-3.1554214,1235.7385,709.11104)"
+ cx="537.7536"
+ cy="228.65007"
+ fx="537.7536"
+ fy="228.65007"
+ r="0.74645507" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3216"
+ id="radialGradient3995"
+ gradientUnits="userSpaceOnUse"
+ cx="302.83102"
+ cy="4.6950564"
+ fx="302.83102"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3228"
+ id="radialGradient3997"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6288985,-1.2473361,4.9949231,6.5228797,-1652.775,-572.89743)"
+ cx="537.7536"
+ cy="228.65007"
+ fx="537.7536"
+ fy="228.65007"
+ r="0.74645507" />
+ <filter
+ inkscape:collect="always"
+ id="filter4036">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.52661716"
+ id="feGaussianBlur4038" />
+ </filter>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3252"
+ id="radialGradient4051"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6668441,0.2502283,-0.4353502,1.442447,-180.07171,-76.257909)"
+ cx="278.53354"
+ cy="12.798131"
+ fx="278.53354"
+ fy="12.798131"
+ r="7.3867884" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3384"
+ id="radialGradient4053"
+ gradientUnits="userSpaceOnUse"
+ cx="305.97662"
+ cy="4.6950564"
+ fx="305.97662"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3252"
+ id="radialGradient4055"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6668441,0.2502283,-0.4353502,1.442447,-180.07171,-76.257909)"
+ cx="278.53354"
+ cy="12.798131"
+ fx="278.53354"
+ fy="12.798131"
+ r="7.3867884" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3206"
+ id="radialGradient4057"
+ gradientUnits="userSpaceOnUse"
+ cx="302.83102"
+ cy="4.6950564"
+ fx="302.83102"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3228"
+ id="radialGradient4059"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(-0.7879742,0.5107254,-2.0451857,-3.1554214,1235.7385,709.11104)"
+ cx="537.7536"
+ cy="228.65007"
+ fx="537.7536"
+ fy="228.65007"
+ r="0.74645507" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3216"
+ id="radialGradient4061"
+ gradientUnits="userSpaceOnUse"
+ cx="302.83102"
+ cy="4.6950564"
+ fx="302.83102"
+ fy="4.6950564"
+ r="8.9206038" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3228"
+ id="radialGradient4063"
+ gradientUnits="userSpaceOnUse"
+
gradientTransform="matrix(1.6288985,-1.2473361,4.9949231,6.5228797,-1652.775,-572.89743)"
+ cx="537.7536"
+ cy="228.65007"
+ fx="537.7536"
+ fy="228.65007"
+ r="0.74645507" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="4.9283779"
+ inkscape:cx="53.09376"
+ inkscape:cy="37.269568"
+ inkscape:document-units="px"
+ inkscape:current-layer="g3244"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="744"
+ inkscape:window-x="-4"
+ inkscape:window-y="-4" />
+ <metadata
+ id="metadata3258">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Basic Thumb Tack</dc:title>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Randy Hunt</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title></dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>thumbtack office tack clipart red</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/publicdomain/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-352.52515,-462.42394)">
+ <g
+ transform="translate(27.292253,274.08237)"
+ id="g3244">
+ <g
+ id="g4040"
+ transform="matrix(2.8353579,0,0,2.8353579,-582.53598,-496.94258)">
+ <path
+ sodipodi:type="arc"
+
style="opacity:0.74519228;fill:url(#radialGradient4051);fill-opacity:1;stroke:none;stroke-width:0.829;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4036)"
+ id="path3250"
+ sodipodi:cx="278.789"
+ sodipodi:cy="14.556754"
+ sodipodi:rx="7.3867884"
+ sodipodi:ry="8.4657574"
+ d="M 286.17579,14.556754 A 7.3867884,8.4657574 0 1 1
271.40221,14.556754 A 7.3867884,8.4657574 0 1 1 286.17579,14.556754 z"
+
transform="matrix(0.7457248,1.2435531,-1.4018349,0.6779887,145.75216,-95.966064)"
/>
+ <g
+ transform="translate(-8.0346882,-1.7217189)"
+ id="g3934">
+ <path
+ sodipodi:type="arc"
+
style="fill:url(#radialGradient4053);fill-opacity:1;stroke:none;stroke-width:0.829;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3202"
+ sodipodi:cx="302.83102"
+ sodipodi:cy="4.6950564"
+ sodipodi:rx="8.9206038"
+ sodipodi:ry="8.9206038"
+ d="M 311.75163,4.6950564 A 8.9206038,8.9206038 0 1 1
293.91042,4.6950564 A 8.9206038,8.9206038 0 1 1 311.75163,4.6950564 z"
+ transform="matrix(1.2137189,0,0,1.2137189,-14.363085,252.21694)"
/>
+ <path
+ sodipodi:type="arc"
+
style="opacity:0.4182692;fill:url(#radialGradient4055);fill-opacity:1;stroke:none;stroke-width:0.829;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3372)"
+ id="path3474"
+ sodipodi:cx="278.789"
+ sodipodi:cy="14.556754"
+ sodipodi:rx="7.3867884"
+ sodipodi:ry="8.4657574"
+ d="M 286.17579,14.556754 A 7.3867884,8.4657574 0 1 1
271.40221,14.556754 A 7.3867884,8.4657574 0 1 1 286.17579,14.556754 z"
+
transform="matrix(0.4382828,0.7308701,-0.8238966,0.3984725,239.30215,48.62125)"
/>
+ <path
+ transform="matrix(0.748791,0,0,0.748791,127.83271,252.19712)"
+ d="M 311.75163,4.6950564 A 8.9206038,8.9206038 0 1 1
293.91042,4.6950564 A 8.9206038,8.9206038 0 1 1 311.75163,4.6950564 z"
+ sodipodi:ry="8.9206038"
+ sodipodi:rx="8.9206038"
+ sodipodi:cy="4.6950564"
+ sodipodi:cx="302.83102"
+ id="path3468"
+
style="fill:url(#radialGradient4057);fill-opacity:1;stroke:none;stroke-width:0.829;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+
style="fill:url(#radialGradient4059);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 345.61859,263.56868 C 344.36901,262.57056
344.03264,262.00509 344.22284,260.85727 C 344.76471,262.34423
345.56359,263.4838 345.61859,263.56868 z"
+ id="path3478"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ transform="translate(-8.0346882,-1.7217189)"
+ id="g3930">
+ <path
+ sodipodi:type="arc"
+
style="fill:url(#radialGradient4061);fill-opacity:1;stroke:none;stroke-width:0.829;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3204"
+ sodipodi:cx="302.83102"
+ sodipodi:cy="4.6950564"
+ sodipodi:rx="8.9206038"
+ sodipodi:ry="8.9206038"
+ d="M 311.75163,4.6950564 A 8.9206038,8.9206038 0 1 1
293.91042,4.6950564 A 8.9206038,8.9206038 0 1 1 311.75163,4.6950564 z"
+ transform="matrix(0.9413975,0,0,0.9413975,73.738358,247.39193)" />
+ <path
+ inkscape:transform-center-y="-4.327365"
+ inkscape:transform-center-x="-5.6687094"
+ sodipodi:nodetypes="ccc"
+ id="path3226"
+ d="M 362.31982,245.18084 C 365.2125,247.14098 366.04196,248.31508
365.82417,250.84778 C 364.38933,247.70172 362.45417,245.3563
362.31982,245.18084 z"
+
style="fill:url(#radialGradient4063);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18560] make this a little nicer,
Dave Hall <=