| |
@@ -63,7 +63,7 @@
|
| |
<div class="card">
|
| |
<div class="card-header">
|
| |
<ol class="breadcrumb p-0 bg-transparent mb-0">
|
| |
- <li>
|
| |
+ <li class="breadcrumb-item">
|
| |
<a href="{{ url_for('ui_ns.view_tree',
|
| |
repo=repo.name,
|
| |
username=username,
|
| |
@@ -74,28 +74,22 @@
|
| |
</span> {{ branchname }}
|
| |
</a>
|
| |
</li>
|
| |
- {% set path = '' %}
|
| |
{% for file in filename.split('/') %}
|
| |
- {% if loop.first %}
|
| |
- {% set path = file %}
|
| |
+ {% set path = '/'.join(filename.split('/')[:loop.index]) %}
|
| |
+ {% if loop.last %}
|
| |
+ {% set path_type = 'file' %}
|
| |
{% else %}
|
| |
- {% set path = path + '/' + file %}
|
| |
+ {% set path_type = 'folder' %}
|
| |
{% endif %}
|
| |
- {% if loop.index != loop.length %}<li><a
|
| |
- href="{{ url_for('ui_ns.view_file',
|
| |
+ <li class="breadcrumb-item">
|
| |
+ <a href="{{ url_for('ui_ns.view_file',
|
| |
repo=repo.name,
|
| |
username=username,
|
| |
namespace=repo.namespace,
|
| |
identifier=branchname,
|
| |
filename=path | unicode)}}">
|
| |
- <span class="fa fa-folder"></span> {{ file }}</a>
|
| |
+ <span class="fa fa-{{ path_type }}"></span> {{ file }}</a>
|
| |
</li>
|
| |
- {% elif file %}
|
| |
- <li class="active">
|
| |
- <span class="fa {% if output_type == 'tree' %}fa-folder{% else %}fa-file{% endif %}">
|
| |
- </span> {{ file }}
|
| |
- </li>
|
| |
- {% endif %}
|
| |
{% endfor %}
|
| |
</ol>
|
| |
</div>
|
| |
This PR implements the following changes.
File history
page.usage
link in the breadcrumb opens a page with thePage not found (404)
error.File history
page to a link to the file. This fixes https://pagure.io/pagure/issue/4793.output_type
is hardcoded to"history"
in the view that uses thefile_history.html
template.Testing instructions:
/
.File history
page is a link to the file in the corresponding branch.