aurweb/templates/partials/packages/widgets/updates.html
Kevin Morris 267f2cb2c4
fix(fastapi): remove trailing slashes from fastapi-driven links
With our FastAPI server, trailing slashes causes a 307 redirect
which ends up redirecting users to routes which do not contain
trailing slashes. This removes trailing slashes from our templates
where FastAPI is concerned to avoid unnecessary redirects.

There may still be links or usages around which have unnecessary
usages of a trailing slash; please keep a look out for these and
remove them where possible.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-18 22:42:40 -07:00

35 lines
1.1 KiB
HTML

<div id="pkg-updates" class="widget box">
<h3>
{{ "Recent Updates" | tr }}
<span class="more">
(<a href="/packages/?SB=l&SO=d">{{ "more" | tr }}</a>)
</span>
</h3>
<a class="rss-icon latest" href="/rss"
title="AUR Latest Packages RSS Feed">
<img src="/static/images/rss.svg" alt="RSS Feed" />
</a>
<a class="rss-icon" href="/rss/modified"
title="AUR Modified Packages RSS Feed">
<img src="/static/images/rss.svg" alt="RSS Feed" />
</a>
<table>
<tbody>
{% for pkg in package_updates %}
<tr>
<td class="pkg-name">
<a href="/packages/{{ pkg.Name }}">
{{ pkg.Name }} {{ pkg.Version }}
</a>
</td>
<td class="pkg-date">
{% set modified = pkg.PackageBase.ModifiedTS | dt | as_timezone(timezone) %}
{{ modified.strftime("%Y-%m-%d %H:%M") }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>