From c51ffa07fc46eeab001b1e71ebc0cee1d408aaea Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 4 Aug 2012 15:28:53 -0500 Subject: Adjust depends & required by templates to spew less whitespace Use the spaceless tag and structure the {% if %} blocks smartly so spaceless actually works and we aren't outputting one blank line per if statement. Signed-off-by: Dan McGee --- templates/packages/details_depend.html | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'templates/packages/details_depend.html') diff --git a/templates/packages/details_depend.html b/templates/packages/details_depend.html index a26d67bd..420af93c 100644 --- a/templates/packages/details_depend.html +++ b/templates/packages/details_depend.html @@ -1,18 +1,14 @@ -{% load package_extras %} -
  • +{% load package_extras %}{% spaceless %}
  • {% ifequal depend.pkg None %} -{% if depend.providers %} -{{ depend.dep.name }}{{ depend.dep.comparison|default:"" }}{{ depend.dep.version|default:"" }} ({% multi_pkg_details depend.providers %}) -{% else %} -{{ depend.dep.name }}{{ depend.dep.comparison|default:"" }}{{ depend.dep.version|default:"" }} (virtual) -{% endif %} -{% else %} +{% if depend.providers %}{{ depend.dep.name }}{{ depend.dep.comparison|default:"" }}{{ depend.dep.version|default:"" }} ({% multi_pkg_details depend.providers %}) +{% else %}{{ depend.dep.name }}{{ depend.dep.comparison|default:"" }}{{ depend.dep.version|default:"" }} (virtual) +{% endif %}{% else %} {% pkg_details_link depend.pkg %}{{ depend.dep.comparison|default:"" }}{{ depend.dep.version|default:"" }} -{% if depend.pkg.repo.testing %} (testing){% endif %} -{% if depend.pkg.repo.staging %} (staging){% endif %} -{% endifequal %} -{% if depend.dep.deptype == 'O' %} (optional){% endif %} -{% if depend.dep.deptype == 'M' %} (make){% endif %} -{% if depend.dep.deptype == 'C' %} (check){% endif %} -{% if depend.dep.description %}- {{ depend.dep.description }}{% endif %} -
  • +{% if depend.pkg.repo.testing %} (testing) +{% endif %}{% if depend.pkg.repo.staging %} (staging) +{% endif %}{% endifequal %} +{% if depend.dep.deptype == 'O' %} (optional) +{% endif %}{% if depend.dep.deptype == 'M' %} (make) +{% endif %}{% if depend.dep.deptype == 'C' %} (check) +{% endif %}{% if depend.dep.description %}- {{ depend.dep.description }} +{% endif %}{% endspaceless %} -- cgit v1.2.3-54-g00ecf