diff options
-rw-r--r-- | server/views.py | 12 | ||||
-rw-r--r-- | version.txt | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/server/views.py b/server/views.py index 09ab79a..c06046d 100644 --- a/server/views.py +++ b/server/views.py @@ -728,9 +728,6 @@ def doctype(request): if not selfsign:
public_types = public_types.filter(auto_sign=False)
selfsign_check = ""
- if not hidden:
- public_types = public_types.filter(enabled=True)
- hidden_check = ""
if not personal:
public_types = public_types.filter(personal_data=False)
personal_check = ""
@@ -747,16 +744,23 @@ def doctype(request): public_types = public_types.filter(custom_group=False)
group_check = ""
+ if not hidden:
+ hidden_check = ""
+
users_capi = User.objects.filter(groups__name__contains="capi")
docs = []
for doc in public_types:
- doc_count = str(Document.objects.filter(document_type=doc).count())
+ doc_count_int = Document.objects.filter(document_type=doc).count()
+ doc_count = str(doc_count_int)
ref_docs_archived = Document.objects.filter(document_type=doc, status="archive").count()
if ref_docs_archived > 0:
doc_count += "-" + str(ref_docs_archived)
if doc.max_instances != 0:
doc_count += "/" + str(doc.max_instances)
+ if not hidden and doc.enabled == False and doc_count_int == ref_docs_archived:
+ continue
+
doc_obj = Document.objects.filter(document_type=doc).exclude(status="archive").select_related(
"usercode", "usercode__branca__name", "usercode__user__groups__name"
)
diff --git a/version.txt b/version.txt index 84bab50..d4f35c8 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.7 -rev=11 +rev=12 |