From d2883f3c274b7cd3e4ab2c2b0683e22f939c2547 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Fri, 22 Dec 2017 23:35:55 -0500 Subject: [PATCH 1/3] Wrap versions' list to look more consistent --- .../projects/project_version_list.html | 147 ++++++++++-------- 1 file changed, 79 insertions(+), 68 deletions(-) diff --git a/readthedocs/templates/projects/project_version_list.html b/readthedocs/templates/projects/project_version_list.html index 0b4b6b32b91..d91d4fc918c 100644 --- a/readthedocs/templates/projects/project_version_list.html +++ b/readthedocs/templates/projects/project_version_list.html @@ -21,45 +21,52 @@
-

{% trans "Active Versions" %}

-
-
    - {% for version in active_versions|sort_version_aware %} - {% block active-versions %} -
  • - {# Link to the docs #} - {{ version.slug }} - - {% if request.user|is_admin:project %} - - {{ version.get_privacy_level_display }} - - {% endif %} - - {% if not version.slug in version.identifier %} - {{ version.identifier_friendly|truncatechars:24 }} - {% endif %} - - {% if request.user|is_admin:project %} - - {% else %} - - {% endif %} - -
  • - {% endblock active-versions %} - - {% empty %} -

    - {% trans "No active versions." %} -

    - {% endfor %} -
+ +
+

{% trans "Active Versions" %}

+ +
+
+
    + {% for version in active_versions|sort_version_aware %} + {% block active-versions %} +
  • + {# Link to the docs #} + {{ version.slug }} + + {% if request.user|is_admin:project %} + + {{ version.get_privacy_level_display }} + + {% endif %} + + {% if not version.slug in version.identifier %} + {{ version.identifier_friendly|truncatechars:24 }} + {% endif %} + + {% if request.user|is_admin:project %} + + {% else %} + + {% endif %} + +
  • + {% endblock active-versions %} + + {% empty %} +

    + {% trans "No active versions." %} +

    + {% endfor %} +
+
+
+
@@ -68,42 +75,46 @@

{% trans "Active Versions" %}

{% if inactive_versions %} -

{% trans "Inactive Versions" %}

-
-
    - {% for version in inactive_versions|sort_version_aware %} +
    +

    {% trans "Inactive Versions" %}

    +
    - {% block inactive-versions %} -
  • - {# Link to the docs #} - {{ version.slug }} +
    +
    +
      + {% for version in inactive_versions|sort_version_aware %} + {% block inactive-versions %} +
    • + {# Link to the docs #} + {{ version.slug }} - {% if request.user|is_admin:project %} - - {{ version.get_privacy_level_display }} - - {% endif %} - {% if not version.slug in version.identifier_friendly %} - {{ version.identifier_friendly|truncatechars:24 }} - {% endif %} + {% if request.user|is_admin:project %} + + {{ version.get_privacy_level_display }} + + {% endif %} - {% if request.user|is_admin:project %} -
        - {% if version.built %} -
      • {% trans "Clean" %}
      • + {% if not version.slug in version.identifier_friendly %} + {{ version.identifier_friendly|truncatechars:24 }} {% endif %} -
      • {% trans "Edit" %}
      • -
      - {% endif %} - - -
    • - {% endblock inactive-versions %} - - {% endfor %} -
    + + {% if request.user|is_admin:project %} + + {% endif %} + +
  • + {% endblock inactive-versions %} + + {% endfor %} +
+
{% endif %} From 3f3d6b583e2b1a69b3f76a41038b0da3dcbbcf99 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Fri, 16 Feb 2018 12:13:38 -0500 Subject: [PATCH 2/3] Consistent empty state for lists --- readthedocs/templates/core/project_details.html | 8 +++++--- readthedocs/templates/core/project_downloads.html | 6 ++++-- readthedocs/templates/projects/project_version_list.html | 8 +++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/readthedocs/templates/core/project_details.html b/readthedocs/templates/core/project_details.html index c38253d06aa..ad23437c7d7 100644 --- a/readthedocs/templates/core/project_details.html +++ b/readthedocs/templates/core/project_details.html @@ -46,9 +46,11 @@

{% trans "Versions" %}

{% empty %} -

- {% trans "No active versions." %} -

+
  • +

    + {% trans "No active versions." %} +

    +
  • {% endfor %}
    diff --git a/readthedocs/templates/core/project_downloads.html b/readthedocs/templates/core/project_downloads.html index 7c850e05a28..4bfff7a7330 100644 --- a/readthedocs/templates/core/project_downloads.html +++ b/readthedocs/templates/core/project_downloads.html @@ -26,7 +26,9 @@ {% endif %} {% empty %} -

    - {% trans "No downloads for this project." %} +

  • +

    + {% trans "No downloads for this project." %}

    +
  • {% endfor %} diff --git a/readthedocs/templates/projects/project_version_list.html b/readthedocs/templates/projects/project_version_list.html index d91d4fc918c..c74595ef0f5 100644 --- a/readthedocs/templates/projects/project_version_list.html +++ b/readthedocs/templates/projects/project_version_list.html @@ -59,9 +59,11 @@

    {% trans "Active Versions" %}

    {% endblock active-versions %} {% empty %} -

    - {% trans "No active versions." %} -

    +
  • +

    + {% trans "No active versions." %} +

    +
  • {% endfor %} From 7b7ecb3bfc6fa37f56dc7eace19f8ce09f8233f4 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Fri, 16 Feb 2018 12:14:00 -0500 Subject: [PATCH 3/3] Wrap integration list --- readthedocs/templates/projects/integration_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/templates/projects/integration_list.html b/readthedocs/templates/projects/integration_list.html index 099538fdb55..089044b50a7 100644 --- a/readthedocs/templates/projects/integration_list.html +++ b/readthedocs/templates/projects/integration_list.html @@ -23,7 +23,7 @@ -
    +
      {% for integration in object_list %}