## This file is subject to the terms and conditions defined in ## file 'LICENSE', which is part of this source code package. ## Copyright (c) 2009 SKR Farms (P) LTD. <%inherit file="/base/basic1.html"/> <%namespace name="elements" file="/component/elements.html"/> <%namespace name="forms" file="/component/forms.html"/> <%! page_tooltips = [ [ 'Help', """License can be associated with a project (via project's admin page). In the page bar, along with the license name, (license-id) will be displayed in paranthesis. Use this 'id' when referring to license via Every attached file, will have its "id" in paranthesis. Use the 'id' when refering to the attachment. """ ], [ 'Tags', """Tag license by clicking on the iconized title. Delete tags by clicking on the cross-wire. Tag names should be 2 or more characters. """ ], [ 'Timeline', """Timeline gives a log of all updates done to license.""" ], ] %> <%def name="hd_script()"> ${parent.hd_script()} <%def name="licdetail( license )">
${license.summary}
${license.source}
<%def name="licprojects( projectnames )">
Projects
% if projectnames : ${ ', '.join([ '%s' % ( href, p ) for p, href in projectnames ]) | n} % else : - % endif
<%def name="bd_body()"> <% if c.license : pagebartext = "%s (%s)" % ( c.license.licensename, c.license.id ) else : pagebartext = "License:" searchbox = capture( forms.form_searchbox, c.authuser, 'searchlic', 'Search-license', h.suburl_search, c.searchfaces ) vbar = '|' attachs = '' + \ ( 'Attachments' % h.url_licattachs ) if c.license and c.liceditable : editlic = 'edit' creatlic = '' +\ ('create' \ % h.url_crlic) rmlic = '' +\ ('remove' \ % h.suburl_rmlicid ) pbar_spans = [ editlic, rmlic, vbar, creatlic, vbar, attachs ] else : pbar_spans = [ attachs ] charts = capture( elements.iconlink, h.url_licensecharts, 'barchart', title="Analytics on license" ) tline = capture( elements.iconlink, h.url_lictimeline, 'timeline', title="License Timeline" ) %> ${elements.pagebar( pagebartext, pbar_spans + \ [ capture( forms.form_licenselist, c.licenselist, c.license and c.license.licensename ), searchbox ], rspans=[ charts, tline ], tooltips=page_tooltips, )}
% if c.userpanes :
% else :
% endif % if c.license :
${licdetail( c.license )} ${licprojects( c.licprojects )}
## innerHTML for the following node must be exactly ## what is represented by c.license.text
${c.license.licensename}
${c.license.text}
${forms.form_updatelicense_h( c.authuser, c.license, h.suburl_uplic )}
% else :
${elements.lictable1( c.licensetable, c.liceditable )}
${forms.form_removelic_h( c.authuser, h.suburl_rmlic )}
% endif
% if c.userpanes :
${elements.user_panes( c.userpanes )}
% endif
<%def name="bd_script()"> ${parent.bd_script()}