Commit ba253e46 authored by Mathieu Rodic's avatar Mathieu Rodic

[BUG] documents count is displayed again

parent cb6bc972
......@@ -102,6 +102,7 @@ def project(request, project_id):
sourcename2corpora = defaultdict(list)
for corpus in corpora:
# we only consider the first resource of the corpus to determine its type
corpus.count = corpus.children('DOCUMENT').count()
resource = corpus.resources()[0]
resource_type = RESOURCETYPES[resource['type']]
sourcename2corpora[resource_type['name']].append(corpus)
......
......@@ -81,7 +81,7 @@
<img width="20px" src="{% static "js/libs/img2/loading-bar.gif" %}">
Processing, drink a cup of tea, and refresh the page :)
{% else %}
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}"> {{corpus.name}} , {{ corpus.count }} Documents </a>
<a href="/projects/{{project.id}}/corpora/{{corpus.id}}"> {{corpus.name}} , {{ corpus.count }} documents</a>
{% endifequal %}
<button type="button" class="btn btn-xs btn-default" data-container="body" data-toggle="popover" data-placement="bottom"
data-content='
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment