26 lines
677 B
Cheetah
26 lines
677 B
Cheetah
<%doc>
|
|
Return render button
|
|
|
|
Template engine: Mako
|
|
|
|
Usage:
|
|
|
|
{{% button link=<link> [img=<img>] [width=<width>] <text> %}}
|
|
|
|
where <link> is the destination of the button, <img> is a link to an optionma image to put inside the button, <width> is the optional width of the button and <text> is the text inside the button.
|
|
|
|
</%doc>
|
|
|
|
% if width is UNDEFINED:
|
|
<a href="${link}" class="btn btn-primary">
|
|
% else:
|
|
<a href="${link}" class="btn btn-primary" style="width:${width};">
|
|
% endif
|
|
% if img is UNDEFINED:
|
|
<img class="d-inline-block align-center">
|
|
% else:
|
|
<img src="${img}" width="35" height="35" class="d-inline-block align-center">
|
|
% endif
|
|
${_args[0]}
|
|
</a>
|