{*
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| SIERRA : PHP Application Framework http://code.google.com/p/sierra-php |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Copyright 2005 Jason Read |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.|
| See the License for the specific language governing permissions and |
| limitations under the License. |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
*}
{*
Base class used to display an attribute value in a form "img" element. This
template is typically used in conjunction with sra-attr.tpl
PARAMS:
Key Type Value/Default Description
[attr] [element tag] (value|[cycle]) see sra-attr.tpl - may also be
used to define the input "type"
if not the standard "text"
[cycle] cycles [csv cycle vals] see sra-attr.tpl
showLabel (1|0)/0 whether or not to show the attribute label above this image followed by a newline
*}
{assign var="myParams" value=$Template->getVarByRef('params')}
{if $myParams->getParam('showLabel')}{$entity->getEntityLabel($attributeName)}<br />{/if}
{if $Util->isObject($attribute, 'SRA_FileAttribute')}{$Template->renderOpen($tplName, 'img', $myParams, '', 0)} src="{$attribute->getUri()}" />{/if}