diff --git a/swh/web/templates/branches.html b/swh/web/templates/branches.html index b12280f8c..b5a945d7a 100644 --- a/swh/web/templates/branches.html +++ b/swh/web/templates/branches.html @@ -1,64 +1,58 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %}

{{ swh_object_name }}

{% for branch in displayed_branches %} {% endfor %}
Name Revision Message Date
{{ branch.name }} {{ branch.revision|slice:":7" }} {{ branch.message }} {{ branch.date }}
{% endblock %} {% block swh-browse-after-content %} {% if prev_branches_url or next_branches_url %} {% endif %} {% endblock %} diff --git a/swh/web/templates/browse.html b/swh/web/templates/browse.html index 23897ccd4..80607f891 100644 --- a/swh/web/templates/browse.html +++ b/swh/web/templates/browse.html @@ -1,46 +1,50 @@ {% extends "browse-layout.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load swh_templatetags %} {% block title %}{{ heading }} – Software Heritage archive{% endblock %} {% block navbar-content %}

Browse the archive

{% endblock %} {% block browse-content %} {% if empty_browse %}

No Software Heritage object currently browsed.
To browse the content of the archive, you can either use the Search interface or refer to the URI scheme described in the Help page.

{% else %} - {% block swh-browse-before-content %}{% endblock %} + {% block swh-browse-before-content %} + {% if snapshot_context %} + {% include "includes/snapshot-context.html" %} + {% endif %} + {% endblock %}
{% block swh-browse-content %}{% endblock %}
{% block swh-browse-after-content %}{% endblock %} {% endif %} {% endblock %} diff --git a/swh/web/templates/content.html b/swh/web/templates/content.html index f627f8379..7fd562669 100644 --- a/swh/web/templates/content.html +++ b/swh/web/templates/content.html @@ -1,19 +1,13 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %} {% include "includes/top-navigation.html" %} {% include "includes/content-display.html" %} {% endblock %} diff --git a/swh/web/templates/directory.html b/swh/web/templates/directory.html index ba19415b2..04623c5a8 100644 --- a/swh/web/templates/directory.html +++ b/swh/web/templates/directory.html @@ -1,24 +1,17 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} - -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %} {% include "includes/top-navigation.html" %} {% include "includes/directory-display.html" %} {% endblock %} {% block swh-browse-after-content %} {% include "includes/readme-display.html" %} {% endblock %} diff --git a/swh/web/templates/person.html b/swh/web/templates/person.html index 68114c5e2..44ecb112c 100644 --- a/swh/web/templates/person.html +++ b/swh/web/templates/person.html @@ -1,37 +1,31 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load swh_templatetags %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %}

{{ swh_object_name }}

{% for key, val in swh_object_metadata.items|dictsort:"0.lower" %} {% endfor %}
{% endblock %} \ No newline at end of file diff --git a/swh/web/templates/release.html b/swh/web/templates/release.html index 123c6a4e7..eefef0b74 100644 --- a/swh/web/templates/release.html +++ b/swh/web/templates/release.html @@ -1,30 +1,24 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load swh_templatetags %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %} {% include "includes/top-navigation.html" %}
Release {{ swh_object_metadata.name }} created by {{ swh_object_metadata.author }} on {{ swh_object_metadata.date }}
 
{{ release_note_header }}
{{ release_note_body }}
{{ release_target_link }}
{% endblock %} diff --git a/swh/web/templates/releases.html b/swh/web/templates/releases.html index e7567cf62..47875d634 100644 --- a/swh/web/templates/releases.html +++ b/swh/web/templates/releases.html @@ -1,66 +1,60 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %}

{{ swh_object_name }}

{% for release in displayed_releases %} {% endfor %}
Name Target Message Date
{{ release.name }} {{ release.target_type }} {{ release.message }} {{ release.date }}
{% endblock %} {% block swh-browse-after-content %} {% if prev_releases_url or next_releases_url %} {% endif %} {% endblock %} diff --git a/swh/web/templates/revision-log.html b/swh/web/templates/revision-log.html index db1f1e61e..e7ff6c0b9 100644 --- a/swh/web/templates/revision-log.html +++ b/swh/web/templates/revision-log.html @@ -1,74 +1,68 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load render_bundle from webpack_loader %} {% block header %} {{ block.super }} {% render_bundle 'revision' %} {% endblock %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %} {% if snapshot_context %} {% include "includes/top-navigation.html" %} {% else %}

{{ swh_object_name }}

{% endif %}
{% for log in revision_log %} {% endfor %}
Revision Author Message Date
{{ log.revision }} {{ log.message }} {{ log.directory }}
{% endblock %} {% block swh-browse-after-content %} {% endblock %} diff --git a/swh/web/templates/revision.html b/swh/web/templates/revision.html index 9f0cfbc21..15b32e4b7 100644 --- a/swh/web/templates/revision.html +++ b/swh/web/templates/revision.html @@ -1,109 +1,103 @@ {% extends "browse.html" %} {% comment %} Copyright (C) 2017-2018 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load static %} {% load swh_templatetags %} {% load render_bundle from webpack_loader %} {% block header %} {{ block.super }} {% render_bundle 'revision' %} {% endblock %} -{% block swh-browse-before-content %} -{% if snapshot_context %} - {% include "includes/snapshot-context.html" %} -{% endif %} -{% endblock %} - {% block swh-browse-content %}
Revision {{ swh_object_metadata.id }} authored by {{ swh_object_metadata.author }} on {{ swh_object_metadata.date }}
{{ message_header }}
{% if message_body %}
{{ message_body }}
{% endif %}
{{ parents_links }}
{% include "includes/top-navigation.html" %} {% if content_size %} {% include "includes/content-display.html" %} {% else %} {% include "includes/directory-display.html" %} {% endif %}
{% endblock %} {% block swh-browse-after-content %} {% include "includes/readme-display.html" %} {% endblock %}