thirdculture-werc/apps/bridge/foot.tpl
Uriel 219ec79f69 Only allow comments for .md files, this avoids silly things like comments for
loggin form pages, but will need to be improved to become more general.

Simplify some code a bit and cosmetic improvements.
2009-01-26 04:56:05 +01:00

26 lines
873 B
Smarty

% cdir = $local_path^'_werc/comments'
% if(test -d $cdir) {
<hr /><h2>Comments</h2>
% for(c in `{ls $cdir/}) {
<div><b>By: <i>
% cat $c/user
</i></b>
<br />
% cat $c/body | escape_html | sed 's,$,<br />,'
<hr /></div>
% }
% }
<hr />
<form action="" method="post">
<textarea name="comment_text" id="comment_text" cols="80" rows="16"></textarea>
<br />
<input type="submit" name="post_comment" value="Post a comment" />
% if(! check_user) {
<label>User: <input type="text" name="comment_user_name" value="" /></label>
<label>Password: <input type="password" name="comment_user_password" value="" /></label>
<div style="font-size: 70%">If you are not registered enter your desired user/password and your account will be created when your comment is approved.</div>
% }
</form>