Improvements to wiki and comments code, take advantage of improvements in user auth interfaca
This commit is contained in:
parent
746b70d971
commit
3d2be79505
1 changed files with 16 additions and 12 deletions
|
|
@ -26,8 +26,7 @@ gensidebar
|
|||
%}
|
||||
</div>
|
||||
|
||||
% # TODO: probably should check if we have the right perms
|
||||
% if (! ~ $#wiki 0 && test -f $body.md && get_user && ! ~ $#logged_user 0) {
|
||||
% if (! ~ $#wiki 0 && test -f $body.md && check_user $wiki_editors_group) {
|
||||
<div>
|
||||
<form action="/_apps/dirdir/edit" method="POST">
|
||||
<input type="hidden" name="edit_wiki_page" value="%($req_path%)" />
|
||||
|
|
@ -43,7 +42,6 @@ gensidebar
|
|||
% }
|
||||
|
||||
<div id="main-copy">
|
||||
|
||||
% genbody
|
||||
|
||||
% if (! ~ $#allowComments 0) {
|
||||
|
|
@ -52,20 +50,26 @@ gensidebar
|
|||
cdir = $body.md_werc/comments
|
||||
if (test -d $cdir) {
|
||||
echo '<hr /><h2>Comments</h2>'
|
||||
for(c in `{ls $cdir}) {
|
||||
parse_rec $c
|
||||
|
||||
echo '<div>'
|
||||
echo User: $rec_user_name '<br />'
|
||||
echo $rec_data | escape_html | sed 's,$,<br />,'
|
||||
echo '<hr /></div>'
|
||||
for(c in `{ls $cdir/}) {
|
||||
%}
|
||||
<div>
|
||||
% echo By: `{cat $c/user}
|
||||
<br />
|
||||
% cat $c/body | escape_html | sed 's,$,<br />,'
|
||||
<hr /></div>
|
||||
%{
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
<hr /><hr />
|
||||
<form action="" method="post">
|
||||
<input type="text" name="comment_user_name" value="Anonimous glenda" /><input type="submit" name="post_comment" value="Post a comment" />
|
||||
% if(! check_user) {
|
||||
User: <input type="text" name="comment_user_name" value="" /> Password:
|
||||
<input type="password" name="comment_user_password" value="" />
|
||||
<small>If you are not registered enter your desired user/password and your account will be created when your comment is approved.</small>
|
||||
% }
|
||||
<textarea name="comment_text" id="comment_text" cols="80" rows="16"></textarea>
|
||||
<input type="submit" name="post_comment" value="Post a comment" />
|
||||
</form>
|
||||
% }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue