codepedia2/templates/projects/filesub/code-reading.html

53 lines
2.0 KiB
HTML

{% load base_filter %}
<div class="code_file">
{% formatText2Line project.name file.path as lines %}
{% for linenum,line in lines.items %}
{% if linenum in self_annos %}
<div class="codeline codelinebox">
<div class="sourcecode">
<pre class="mypre mypre newmypre hljs-comment {{fileid}}{{ linenum }}">
{{ self_annos | keyValue:linenum }}
</pre>
</div>
<!-- <div id="linestatus_{{fileid}}_{{ linenum }}" class="linestatus"> -->
<div class="linestatus">
</div>
</div>
{% endif %}
<div id="{{fileid}}_L{{ linenum }}" class="codeline codelinebox" onmouseover="show_currentLine('{{fileid}}_{{linenum}}')" onmouseout="hide_currentLine('{{fileid}}_{{linenum}}')">
<div class="linenum">{{ linenum }}</div>
<div class="sourcecode">
<pre class="mypre">
{{line}}
</pre>
</div>
<div id="linestatus_{{fileid}}_{{ linenum }}" class="linestatus">
<span class="codeopration" id="codeopration_anno_{{fileid}}_{{linenum}}">
{% if linenum in annos_count %}
<span class="annonums" onclick="show_annotation({{ file.id }},{{ linenum }})">
</span>
{% endif %}
</span>
<span class="codeopration" id="codeopration_question_{{fileid}}_{{linenum}}">
{% if linenum in issues_count %}
<span class="questionnums" onclick="show_issue_question({{ file.id }},{{ linenum }},'{{ issues|keyValue:linenum}}')"></span>
{% elif linenum in questions_count %}
<span class="questionnums" onclick="show_issue_question({{ file.id }},{{ linenum }},'[]')"></span>
{% endif %}
</span>
<span id="addanno_{{fileid}}_{{ linenum }}" class="addanno" onclick="inject_addnoPanel_html(this,{{fileid}},{{linenum}})">
{# <i class="fa fa-plus-circle color-grey-c"></i>#}
<img src="/static/image/newadd.png" class="mr3 rightimgcommentblue">
</span>
</div>
</div>
{% endfor %}
</div>