Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
6223798a
Commit
6223798a
authored
Aug 13, 2012
by
Baptiste Mouterde
Committed by
ikoalaz
Aug 13, 2012
Browse files
comment : add no js support, fix div/span issue, add the missing div that screws up the validator
parent
02509671
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/templates/comments/comments.mako
View file @
6223798a
# -*- coding: utf-8 -*-
<%page args='id,package_version_id,comment=None,filename=""'/>
<
span
id='comments${id}'>
<%page args='id,package_version_id,comment=None,filename=""
,nojs=False
'/>
<
div
id='comments${id}'>
%if not nojs:
<script type="text/javascript">
$(document).ready(function () {
highlight(null);
$(".idlink").click(function (event) {
...
...
@@ -23,36 +23,38 @@
});
});
</script>
%endif
%if comment is not None:
<%include file='./comment.mako' args='id=id,comment=comment,main_page=True'/>
</
span
>
</
div
>
%else:
%if not hasattr(c,'comments'):
<
span
>no Comments yet,
<
div
>no Comments yet,
%else:
<
span
>
<
div
>
%endif
%if 'user_id' in session:
<button class="toggle" id='first.form'>comment!</button> </
span
>
<button class="toggle" id='first.form'>comment!</button> </
div
>
%endif
%if hasattr(c,'comments'):
%for comment in c.comments:
<%include file='./comment.mako' args='id=id,comment=comment'/>
%endfor
%endif
</
span
>
</
div
>
%if 'user_id' in session:
<div id="form${id}">
<% print filename %>
<%include file='./form.mako' args='id=id,package_version_id=package_version_id,filename=filename'/>
</div>
%if not nojs:
<script type="text/javascript">
$(document).ready(function () {
console.log('loading comment ${id}')
comments(${id}, "${h.url(controller='comments',action='reload_comments')}", '${h.url(controller='comments', action='ajax_call')}', "${h.url(controller='comments',action='score_ajax')}",${package_version_id}, '${filename}');
comment_form(${id}, '${h.url(controller='comments', action='ajax_call')}', "${h.url(controller='comments',action='reload_comments')}",${package_version_id}, '${filename}', '')
})
</script>
%endif
%endif
</div>
%endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment