<div class="tool"[% UNLESS !tool.name_lc %] id="[% tool.name_lc %]"[% END %]>
[% IF tool.is_online_tool %]
	<img class="img floatR" alt="Use tool online" src="[% install_dir %]images/tool-web.png" width="40" height="40">
[% END;
	IF tool.is_standalone_tool %]
	<img class="img floatR" alt="Download tool" src="[% install_dir %]images/tool-dl.png" width="40" height="40">
[%		IF tool.compatible_os %]
	<div class="os">
[% 		FOREACH os = tool.compatible_os;
				IF os == 'win' %]<img alt="Windows compatible" title="Windows compatible" src="[% install_dir %]images/os-win.png" width="20" height="20">[% 
				ELSIF os == 'mac' %]<img alt="Mac OS X compatible" title="Mac OS X compatible" src="[% install_dir %]images/os-osx.png">[% 
				ELSIF os == 'linux' %]<img alt="Linux compatible" title="Linux compatible" src="[% install_dir %]images/os-linux.png" width="17" height="20">[% 
				ELSIF os == 'unix' %]<img alt="Unix compatible" title="Unix compatible" src="[% install_dir %]images/os-unix.png" width="20" height="20">[% 
				END;
			END %]
	</div>
[% 	END;
	END;
	IF preview;
		err_list = [];
		IF !tool.is_online_tool && !tool.is_standalone_tool;
			err_list.push('Tool type (online or standalone) missing');
		ELSIF tool.is_standalone_tool && !tool.compatible_os;
			err_list.push('Compatible OS list missing');
		END;
		IF err_list.size > 0 %]
			<div class="os"><p class="floatR R err">[% err_list.join('<br>') %]</p></div>
[% 	END;
	END %]
	<h3>[% 
	IF tool.tool_url %]<a href="[% tool.tool_url %]">[% END;
	IF tool.name;
		tool.name;
	ELSIF preview
	%]Tool name unknown[%
	END;
	IF tool.tool_url
	%]</a>[% 
	ELSIF preview
	%] No URL supplied for the tool![%
	END;
	
	IF tool.name_abbr %] (<abbr title="[% tool.name %]">[% tool.name_abbr %]</abbr>)[% 
	ELSIF tool.name_acronym %] (<acronym title="[% tool.name %]">[% tool.name_acronym %]</acronym>)[% 
	END %]</h3>
[% IF preview && !tool.tool_url %]
<p>No URL supplied for the tool!</p>
[% END %]
	<p class="toolDetail vcard">
[% IF tool.developer;
		IF preview;
			tool.developer.join(', ');
		ELSE;
			FOREACH developer = tool.developer %]
		<a class="fn org url" href="[% developer.url %]" title="[% developer.fn %] [external website]">[% developer.fn %] <span class="extLink">[external website]</span></a>[% 
				FOREACH cat = [ 'locality', 'region', 'country-name' ];
					IF developer.$cat %], <span class="[% cat %]">[% developer.$cat %]</span>[% END;
				END;
			END;
		END %].
[% ELSE;
		'Missing the tool developer!';
	END;
	IF tool.email %]
	<br>
	<span class="email"><span class="addr"><span class="id">[% tool.email_id %]</span>@<span class="place">[% tool.email_place %]</span> (<span class="name">Contact tool developer</span>)</span></span>
[% ELSIF preview %]
	<br>
	Missing a contact email address!
[% END %]
	<br>
[% IF tool.publication;
		'Publications: ';
		IF preview;
			tool.publication.join(', ');
		ELSE;
			FOREACH p = tool.publication %]
		<cite><a href="[% p.url %]" title="Publication abstract of [% tool.name %] paper [% counter %] [external website]">[% p.db %]:[% p.key %] <span class="extLink">[external website]</span></a></cite>
[% 		END;
		END;
	ELSE;
	'No publications';
	END %]
	</p>
	<dl><dt>Tool Features</dt>
[% IF tool.feature;
		FOREACH f = tool.feature;
			'<dd>' _ proper_name.$f || f _ '</dd>';
		END;
	ELSE;
		'<dd>No features specified</dd>';
	END %]
	<dt>Description:</dt>
[%	IF tool.description;
		'<dd>' _ tool.description _ '</dd>';
	ELSE;
		'<dd>No description available</dd>';
	END %]
	</dl>
[% IF tool.license == 'proprietary' %]
<p>NOTE: this tool is NOT free. Those miserable bastards want you to pay for it!</p>
[% ELSIF !tool.license && preview %]
<p>Tool license not specified</p>
[% END %]
[% IF preview && tool.is_open_source %]
<p><a href="http://www.opensource.org/docs/definition.php"> <img src="http://www.opensource.org/trademarks/opensource/web/opensource-110x95.png" alt="Open Source (OSI) Logo" border="0" width="110" height="95"></a> This tool is open source.</p>
[% END %]

</div>
[%# USE Dumper; '<pre style="font-size: 0.6em">'; Dumper.dump(tool); '</pre>'; %]
