summaryrefslogtreecommitdiff
path: root/objectapp/templates/objectapp/sitemap.html
blob: 32c9e03f5d92c72c5f772207eebd6e07a89b85df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends "objectapp/base.html" %}
{% load i18n objectapp_tags mptt_tags %}

{% block title %}{% trans "Sitemap" %}{% endblock %}

{% block content %}
<h2>{% trans "Sitemap" %}</h2>

<div class="gbobjectsbyobjecttypes">
  <h3>{% trans "Gbobjects per objecttypes" %}</h3>
  {% for Objecttype in objecttypes %}
  <h4>{{ Objecttype }}</h4>
  <ul>
    {% for gbobject in Objecttype.gbobjects_published.all %}
    <li>
      <a href="{{ gbobject.get_absolute_url }}" title="{{ gbobject.title }}" rel="bookmark">{{ gbobject.title }}</a>
      {% with gbobject.comments.count as comment_count %}
      - {{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }}
      {% endwith %}
    </li>
    {% empty %}
    <li>
      {% trans "No gbobjects yet." %}
    </li>
    {% endfor %}
  </ul>
  {% endfor %}
</div>

<div class="allgbobjects">
  <h3>{% trans "All the gbobjects" %}</h3>
  <ul>
    {% for gbobject in gbobjects %}
    <li>
      <a href="{{ gbobject.get_absolute_url }}" title="{{ gbobject.title }}" rel="bookmark">{{ gbobject.title }}</a>
      - {{ gbobject.creation_date|date:"SHORT_DATE_FORMAT" }}
      {% with gbobject.comments.count as comment_count %}
      - {{ comment_count }} {% trans "comment" %}{{ comment_count|pluralize }}
      {% endwith %}
    </li>
    {% empty %}
    <li>
      {% trans "No gbobjects yet." %}
    </li>
    {% endfor %}
  </ul>
</div>

<div class="objecttypes">
  <h3>{% trans "Objecttypes" %}</h3>
  {% for Objecttype, structure in objecttypes|tree_info %}
    {% if structure.new_level %}<ul><li>{% else %}</li><li>{% endif %}
      <a href="{{ Objecttype.get_absolute_url }}" title="{{ Objecttype.title }}">{{ Objecttype.title }}</a>
      -
      {% blocktrans count Objecttype.gbobjects_published.count as gbobject_count %}{{ gbobject_count }} gbobject{% plural %}{{ gbobject_count }} gbobjects{% endblocktrans %}
    {% for level in structure.closed_levels %}</li></ul>{% endfor %}
    {% empty %}
  <ul>
    <li>
      {% trans "No objecttypes yet." %}
    </li>
  </ul>
  {% endfor %}
</div>

<div class="montharchives">
  <h3>{% trans "Monthly archives" %}</h3>
  {% get_archives_gbobjects %}
</div>
{% endblock %}