X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=torrus%2Ftemplates%2Fhtml-incblocks.txt;fp=torrus%2Ftemplates%2Fhtml-incblocks.txt;h=ca5540e6944943721f414e939f84776f9ea829c5;hp=0000000000000000000000000000000000000000;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=35359a73152b3d7a9ad5e3d37faf81f6fedb76e8 diff --git a/torrus/templates/html-incblocks.txt b/torrus/templates/html-incblocks.txt new file mode 100644 index 000000000..ca5540e69 --- /dev/null +++ b/torrus/templates/html-incblocks.txt @@ -0,0 +1,356 @@ +[%# + $Id: html-incblocks.txt,v 1.1 2010-12-27 00:04:03 ivan Exp $ + All BLOCK statements are defined here +%] + +[%# ########### Initialize globals ################ %] +[% global.setDateDialog = 0; %] + + +[%# ########### Print the starting HTML blahblah ################ %] + +[% BLOCK htmlstart; + IF ! contentClass; contentClass="Content"; END %] + + + + + +[% title %] + +[% IF expires %][% END %] + + + + +
+ + +[% IF companyLogo %][% ELSE; companyName; END %] + + +[% IF siteInfo %] + +[% siteInfo %] + +[% END %] + +[% IF treeName and treeInfo %] + +[% treeInfo %] + +[% END %] + +[% IF userAuth and uid; + commonname = userAttr('cn'); + IF commonname == ''; commonname = uid; END; %] +
+[% commonname %] +Logout +
+[% END %] +
+
[% timestamp %]
+[% IF printpath %] +
+ [% INCLUDE treename %] +
+ Current path: + [% splitUrls(token) %] +
+
+[% END %] +[% IF not noTopMenu %] +
+[% INCLUDE shortcut url=topURL text="Top" + title="Choose from the list of trees"%] +[% theParent=parent(token); + IF theParent and theParent != token; + INCLUDE shortcut url=url(theParent) text="Up" + title="Climb up the tree"; + END %] +[% INCLUDE helpshortcut %] +[% IF mayDisplayAdmInfo(token); + INCLUDE shortcut url=url(token,'adminfo') + text="AdmInfo" + title="Administrative details" + newwindow=1; + END +%] + +
+[% END %] +
+[% global.contentFinished = 0 %] +[% IF global.printError %] +
[% global.printError %]
+[% global.printError = '' %] +[% END %] +[% END %] + +[%# ########### Print the legend ################ %] + +[% BLOCK legend %] +[% legend = nodeParam(token, 'legend') %] +[% IF legend.length > 0 %] +
+[% FOREACH legpairstring = legend.split(';') %] +[% SET legpair = legpairstring.split(':') %] +
+ [% xmlnorm(legpair.0) %]: + [% xmlnorm(legpair.1) %] +
+[% END %] +
+[% END %] +[% END %] + +[%# ########### Print the TZ and NOW variables ################ %] + +[% BLOCK variables %] +[% IF variables.TZ or variables.NOW %] +

+[% IF variables.TZ %] + Timezone: + [% variables.TZ %]. +[% END %] +[% IF variables.NOW %] + Report date: + [% variables.NOW %]. +[% END %] +

+[% END %] +[% END %] + + +[%# ########### Print the current tree name ################ %] + +[% BLOCK treename %] +
+ Tree: + [% treeName %] +
+[% END %] + +[%# ########### Print the shortcut ################ %] + +[% BLOCK shortcut %] + + [ [%text%] ] + +[% END %] + +[%# ########### Print the Help shortcut ################ %] +[% BLOCK helpshortcut; + IF nodeParam(token, 'help-text', 1); + INCLUDE shortcut + url="javascript:helpwindow()" + text="Help" + title="Open a help window for this page"; + END; + END %] + +[%# ########### Print the common bottomline ################ %] + +[% BLOCK bottomline %] +
[% global.contentFinished = 1 %] +
+[% INCLUDE shortcut url=persistentUrl(token,view,global.bookmarkVars) + text="Bookmark" + title="Permanent link to this page"%] +[% INCLUDE shortcut url=url('SS') text="Tokensets" + title="List of non-empty tokensets"%] +[% INCLUDE shortcut url=url(token,view,'MEDIA','printer','OVS',ovs) + text="Printable view" + title="Prepare this page for printing" + newwindow=1%] +[% IF mayDisplayReports(); + INCLUDE shortcut url=reportsUrl + text="Reports" + title="Show reports page" + newwindow=1; + END %] +[% IF global.setDateDialog; INCLUDE enterdate; END %] +[% INCLUDE searchdialog %] +
+[% END %] + +[%# ########### Print the Tokensets bottomline ################ %] + +[% BLOCK tsetbottomline %] +[% global.contentFinished = 1 %] +
+[% INCLUDE shortcut url=url(pathToken('/')) text="Datasources tree" + title="Back to the datasources tree" %] +[% INCLUDE shortcut url=url(token,view,'MEDIA','printer') + text="Printable view" + title="Prepare this page for printing" + newwindow=1%] +[% INCLUDE helpshortcut %] +[% INCLUDE searchdialog %] +
+[% END %] + + +[%# ########### Print the ending HTML blahblah ################ %] + +[% BLOCK htmlend %] +[% IF ! global.contentFinished %][% END %] + + + +[% END %] + +[%# ######## Print the RRD graph image ####### %] + +[% BLOCK rrgraph %] +
+[% param(view, 'description') %] +
+[% END %] + + +[%# ######## Print the short-term RRD graph image ####### %] + +[% BLOCK shortgraph %] +[% + hidden = 0; + IF nodeParam(token,'hidden') == 'yes'; + hidden = 1; + END; + IF not hidden or variables.SHOWHIDDEN +%] +
+ [% IF not urltoken; urltoken = token; END %] + [% hidden ? '':'' %] + + [%IF comment%]
[%xmlnorm(comment)%]
[%END%] + [% hidden ? '
':'' %] + + [% + shortView = nodeParam(token,'rrgraph-views').split(',').0; + shortvars = []; + IF nodeParam(token, 'rrd-hwpredict') == 'enabled' and + param(view, 'rrd-hwpredict') != 'disabled'; + global.hwpredict = 1; + IF variables.NOHW; + shortvars = ['NOHW', 1]; + ELSE; + shortvars = ['NOHW', '']; + END; + END + %] +
+ + [% param(shortView, 'description') %] + +
+
+ [% END %] +[% END %] + + +[%# ######## Print the overview shortcuts ####### %] +[% BLOCK overviewShortcuts %] +[% + IF nodeParam(token, 'has-overview-shortcuts', 1) == 'yes'; + FOREACH ovs = nodeParam(token,'overview-shortcuts').split('\s*,\s*'); + p1 = 'overview-shortcut-text-' _ ovs; + p2 = 'overview-shortcut-title-' _ ovs; + INCLUDE shortcut + url=url(token, 'overview-subleaves-html', 'OVS', ovs) + text=nodeParam(token, p1, 1) + title=nodeParam(token, p2, 1); + END; + END %] +[% END %] + + +[%# ######## Set the date variable ####### %] +[% BLOCK setdate %] +[% IF variables.SETDATE == 1; + thedate = verifyDate( variables.SETDATEV ); + IF thedate.length == 0; + global.printError = 'Incorrect date format'; + clearVar('SETDATE'); + ELSE; + variables.NOW = thedate; + END; + ELSE; + clearVar('NOW'); + clearVar('SETDATE'); + clearVar('SETDATEV'); + END; + global.setDateDialog = 1; +%] +[% END %] + + +[%# ######## Print the date selection elements ####### %] +[% BLOCK enterdate %] + +
+ + +[% IF ovs %][% END %] + + + +
+
+[% END %] + + +[%# ######## Print the searchform HTML ####### %] +[% BLOCK searchdialog %] +[% IF searchEnabled %] + +
+ + + + + +
+
+[% END %] +[% END %] + +[%# ######## Print the Global searchform HTML ####### %] +[% BLOCK globalsearchdialog %] +[% IF mayGlobalSearch() %] + +
+ + + +
+
+[% END %] +[% END %]