85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
if started then list:lpush('</ol>') end
end
local terra
render_docpage(co: &lib.srv.convo, pg: pref)
var nullprivs: lib.store.powerset nullprivs:clear()
if not pg then -- display index
var list: lib.str.acc list:compose('<ul>')
var [pages] = array([allpages])
for i=0,[pages.type.N] do
if pages[i].parent == 0 and (pages[i].priv:sz() == 0 or
(co.aid ~= 0 and (co.who.rights.powers
and pages[i].priv):sz() > 0)) then
list:lpush('<li><a href="/doc/'):rpush(pages[i].name):lpush('">')
:rpush(pages[i].title):lpush('</a>')
................................................................................
pushbranches(&list, i, nullprivs)
end
list:lpush('</li>')
end
end
list:lpush('</ul>')
var bp = list:finalize()
co:stdpage(page {
title = 'documentation';
body = bp;
class = P'doc listing';
cache = false;
})
bp:free()
else showpage(co, pg) end
end
return render_docpage
|
|
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
if started then list:lpush('</ol>') end
end
local terra
render_docpage(co: &lib.srv.convo, pg: pref)
var nullprivs: lib.store.powerset nullprivs:clear()
if not pg then -- display index
var list = co:stra(256)
list:lpush('<ul>')
var [pages] = array([allpages])
for i=0,[pages.type.N] do
if pages[i].parent == 0 and (pages[i].priv:sz() == 0 or
(co.aid ~= 0 and (co.who.rights.powers
and pages[i].priv):sz() > 0)) then
list:lpush('<li><a href="/doc/'):rpush(pages[i].name):lpush('">')
:rpush(pages[i].title):lpush('</a>')
................................................................................
pushbranches(&list, i, nullprivs)
end
list:lpush('</li>')
end
end
list:lpush('</ul>')
co:stdpage(page {
title = 'documentation';
body = list:finalize();
class = P'doc listing';
cache = false;
})
else showpage(co, pg) end
end
return render_docpage
|