1 # ===================================================================== 2 # sourceList: list source files of the current W-TW instance. 3 # 4 # Copyright (c) 2008,2009 Carlo Strozzi 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; version 2 dated June, 1991. 9 # 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with this program; if not, write to the Free Software 17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 # 19 # ===================================================================== 20 21 # ===================================================================== 22 # Local variables and functions 23 # ===================================================================== 24 25 cgi.group = () 26 cgi.group.literal = () 27 28 # ===================================================================== 29 # Main program 30 # ===================================================================== 31 32 # Load call arguments. 33 csaGetArgs GET 34 35 . $CSA_ROOT/lib/group-stuff.rc 36 37 . $CSA_ROOT/lib/group-editor.rc 38 39 # Set template vars to their final values. 40 tpl.var.tw.page = tw-group-sourcelist 41 tpl.var.tw.page.object = $'tpl.var.tw.page' 42 tpl.var.html.title = $'tpl.var.tw.group'/$'tpl.var.tw.page' 43 44 if (csaIsFullPath --exists --quiet $CSA_TPL_ROOT/tw-group-sourcelist.txt) { 45 # custom template. 46 tpl.include.html.body = $CSA_TPL_ROOT/tw-group-sourcelist.txt 47 } else { 48 # default template. 49 tpl.include.html.body = $tw_dstem/tw-group-sourcelist.txt 50 } 51 52 . $CSA_ROOT/lib/tpl-stuff.rc 53 54 csaMkTemp tpl.include.tw.page 55 56 # Static views do not correspond to actual pages on disk, 57 # so we need to toggle unapplicable sections in templates. 58 59 tpl.if.tw.ispage = '(::DEL:)' 60 tpl.fi.tw.ispage = '(:DEL::)' 61 tpl.if.tw.printable = '(::DEL:)' 62 tpl.fi.tw.printable = '(:DEL::)' 63 tpl.if.tw.isview = () 64 tpl.fi.tw.isview = () 65 66 csaExit.ok --table $CSA_ROOT/lib/source.dat $tpl_file 67 68 # End of program.