Commit f8c51b29 authored by Michal Čihař's avatar Michal Čihař

Edit links from Zen mode keep search results

Fixes #556
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 6d2d970f
......@@ -13,7 +13,7 @@
{% endif %}
</td>
<td>
<a href="{{ unit.0.get_absolute_url }}" class="btn btn-xs btn-default pull-right flip" title="{% trans "Open in full editor" %}"><span class="glyphicon glyphicon-edit"></span> {% trans "Edit" %}</a>
<a href="{% url 'translate' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code %}?search_id={{ search_id }}&amp;offset={{ unit.2 }}" class="btn btn-xs btn-default pull-right flip" title="{% trans "Open in full editor" %}"><span class="glyphicon glyphicon-edit"></span> {% trans "Edit" %}</a>
</td>
</tr>
<tr id="row-source-{{ unit.0.checksum }}">
......
......@@ -742,8 +742,8 @@ def get_zen_unitdata(translation, request):
translation,
unit,
tabindex=100 + (unit.position * 10),
))
for unit in units
), offset + pos)
for pos, unit in enumerate(units)
]
return search_result, unitdata
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment