Fix Issue 3217: Remove download link for a "new version" of a deleted file.
Review Request #5377 — Created Feb. 1, 2014 and submitted
We don't show the orig revision or a download link for it for new files, so we probably shouldn't show the new revision or a download link for deleted files, either.
Created a review with a deleted file.
Download link for a new revision of a deleted file no longer appears in the file revision header.
Headers for modified and new files remain unchanged.
Description | From | Last Updated |
---|---|---|
In the case where we don't have a download URL and the file isn't deleted, we should still show the … |
david | |
The way we do alignment in templates is a weird, weird thing. You should think of the lines that have … |
david | |
The </th> and {% endif %} should be swapped (since the opening <th> is outside the conditional). |
david |
-
-
The way we do alignment in templates is a weird, weird thing.
You should think of the lines that have tags (the
{% ... %}
things) as being in an independent indentation namespace from the HTML. When there are tags, we put the{%
on the left-hand side, and indent using single spaces within the tag.HTML inside the tags should then be indented with 1 space. That means the
<a>
tag should remain where it was.The result would look something like this:
<th> {% if not file.deleted %} {% if download_modified_url %} <a class ... >...</a> {% endif %} {{file.dest_revision }} {% endif %} </th> {% endif %}{# num_changes and moved #}
The result is that if you just mentally filter out every line that starts with
{%
, you'd see a nicely indented HTML file. If you only look at the other lines, you'd see nicely indented logic.There are definitely several older templates that don't follow this pattern (or are inconsistent), but we're working to improve that.
-