Current autocomplete behaviour is unintuitive. It is a good idea to explain to users why it can suggest invalid identifiers.
65 lines
2.7 KiB
HTML
65 lines
2.7 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block title %}
|
|
{{ searched_ident|e }} identifier - {{ current_project|capitalize }} source code {{ current_tag }} - Bootlin Elixir Cross Referencer
|
|
{% endblock %}
|
|
|
|
{% block description -%}
|
|
Elixir Cross Referencer - {{ searched_ident|e }} identifier references search for {{ current_project|capitalize }} {{ current_tag }}.
|
|
{%- for section in symbol_sections -%}
|
|
{%- if 'symbols' in section -%}
|
|
{%- for type, symbols in (section['symbols'].items()) -%}
|
|
{%- if (symbols|length) == 1 %}
|
|
{{ section['title'] }} {{- ' as a '+type if type != '_unknown' else '' }} in {{ symbols[0].path }}.
|
|
{%- else %}
|
|
{{ section['title'] }} in {{ symbols|length }} files {{- ' as a '+type if type != '_unknown' else '' -}}: {{ symbols[0].path }}...
|
|
{%- endif %}
|
|
{%- endfor -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- endblock -%}
|
|
|
|
{% block main %}
|
|
|
|
<div class="lxrident">
|
|
{% if symbol_sections|length != 0 %}
|
|
{% for section in symbol_sections %}
|
|
{% if 'symbols' in section %}
|
|
{% for type, symbols in section['symbols'].items() %}
|
|
<h2>{{ section['title'] }} in {{ symbols|length }} files
|
|
{{- ' as a '+type if type != '_unknown' else '' -}}:</h2>
|
|
<ul>
|
|
{% for symbol in symbols %}
|
|
<li>
|
|
<a href="{{ symbol.lines[0].url }}">
|
|
<strong>{{ symbol.path }}</strong>
|
|
{%- if symbol.lines|length == 1 %},
|
|
line {{ symbol.lines[0].lineno }}
|
|
{%- elif symbols|length > 100 %},
|
|
<em>{{ symbol.lines|length }} times</em>
|
|
{% endif %}
|
|
{% if symbol.type is not none %}
|
|
<em>(as a {{ symbol.type }})</em>
|
|
{% endif %}
|
|
</a>
|
|
{% if symbol.lines|length > 1 and symbols|length <= 100 %}
|
|
<ul>
|
|
{% for line, url in symbol.lines %}
|
|
<li><a href="{{ url }}">line {{ line }}</a>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endfor %}
|
|
{% else %}
|
|
<h2>{{ section['message'] }}</h2>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
<h2>Identifier not used</h2>
|
|
<div id="error-details">Note: Autocomplete currently searches identifiers in all versions of the project.</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% endblock %}
|