Parent: [010337] (diff)

Child: [ddf08c] (diff)

Download this file

macros.py    20 lines (16 with data), 574 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import ew
class Include(ew.Widget):
template='jinja:allura:templates/widgets/include.html'
params=['artifact', 'attrs']
artifact=None
attrs = {
'style':'width:270px;float:right;background-color:#ccc'
}
class DownloadButton(ew.Widget):
template='jinja:allura:templates/widgets/download_button.html'
params=['project']
project=None
def resources(self):
yield ew.jinja2_ew.JSScript('''
$(function(){$(".download-button-%s").load("%s");
});''' % (self.project._id,self.project.best_download_url()))