Skip to content

Instantly share code, notes, and snippets.

@Eugeny
Created July 8, 2010 10:24
Show Gist options
  • Save Eugeny/467856 to your computer and use it in GitHub Desktop.
Save Eugeny/467856 to your computer and use it in GitHub Desktop.
<%def name="pluginpanel()">
<div class="ui-el-pluginpanel">
<div class="ui-el-pluginpanel-head">
<%
hcontainer([
image(file=icon),
vcontainer([
label(text=title, size=5),
select(status, '')
])
])
%>
</div>
<div class="ui-el-pluginpanel-content">
${content}
</div>
</div>
</%def>
<%def name="hcontainer(elements)">
<table cellspacing="0" cellpadding="0" style="width: ${select(width, 'auto')}; height: ${select(height, 'auto')};">
<tr>
% for x in elements:
<td>${x}</td>
% endfor
</tr>
</table>
</%def>
<%def name="vcontainer(elements)">
<table cellspacing="0" cellpadding="0" style="width: ${select(width, 'auto')}; height: ${select(height, 'auto')};">
% for x in elements:
<tr><td>${x}</td></tr>
% endfor
</table>
</%def>
<%def name="label(text, size=1)">
<span class="ui-el-label-${select(size, '1')}" style="${iif(select(bold, False)==True, 'font-weight: bold;', '')}">
${text}
</span>
</%def>
<%def name="image(file)">
<img class="ui-el-image" src="${file}" />
</%def>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment