diff --git a/standards/models.py b/standards/models.py
index e0cb86f..bcc46eb 100644
--- a/standards/models.py
+++ b/standards/models.py
@@ -65,6 +65,8 @@ class Standards(models.Model):
# FIELD FOR AGENCYNETWORK
comments = models.ManyToManyField("StandardComments", blank=True, related_name='comments')
parent_standard = models.ForeignKey("Standards", related_name='partentedstandard', on_delete=models.PROTECT, blank=True, null=True, default=None)
+ shared_on = models.DateTimeField(default=timezone.now, blank=True)
+
#Counter, wie oft dieser Standard in eine andere Agentur kopiert wird
diff --git a/standards/templates/standards/agencynetwork_content.html b/standards/templates/standards/agencynetwork_content.html
index c7e3a6d..bf42b3b 100644
--- a/standards/templates/standards/agencynetwork_content.html
+++ b/standards/templates/standards/agencynetwork_content.html
@@ -1,9 +1,42 @@
+ {% load counter_tag %}
+
{{standard.name}}
+
+
+
+ {% if standard.addedfiles.all|length > 0 or standard.linked_standards.all|length > 0 or standard.authority.count > 0 or standard.executor.count > 0 or standard.representative.count > 0 or standard.addedfiles.all|length > 0 or standard.linked_standards.all|length > 0 or standard.freefield_title|length > 0 %}
+
+ {% else %}
+
+ {% endif %}
+
+
+
+ {{standard.media}}
+ {{standard.content|safe}}
+
+
+
+
+
+
+
+ {% if standard.freefield_title|length > 0 %}
+
+
+
{{standard.freefield_title}}
+
+ {{standard.freefield_content}}
+
+
+
+ {% endif %}
+
+
+
+
+
+
+
+ {% if standard.addedfiles.all|length > 0 %}
+
+
+
Dateien
+
+ {% for files in standard.addedfiles.all %}
+ {{files.name|truncatechars:30}}
+ {% endfor %}
+
+
+
+ {% endif %}
+
+
+
+
+
+ Erstellt in Agentur {{standard.agency.name}} und zuletzt bearbeitet am {{ standard.last_modified_on}}. Der Standard wurde bereits {{standard.agencynetworkcounter}} geteilt.
+
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/standards/urls.py b/standards/urls.py
index 013d97c..59ccdae 100644
--- a/standards/urls.py
+++ b/standards/urls.py
@@ -16,6 +16,8 @@ urlpatterns = [
path('standards/
/delete', StandardDeleteView.as_view(), name='standard-delete'),
path('standard//changestat', views.StandardChangePublic, name="standard-status"),
path('standard//single', views.StandardSingle, name="standard-single"),
+ path('standard//singleagn', views.StandardSingleAgn, name="standard-single-agn"),
path('standard//area', views.StandardArea, name="standard-area"),
- path('standard//task', views.StandardTask, name="standard-task")
+ path('standard//task', views.StandardTask, name="standard-task"),
+ path('standardsagn/', views.StandardFromAgn, name="standard-agn"),
]
\ No newline at end of file
diff --git a/standards/views.py b/standards/views.py
index 3055108..d637038 100644
--- a/standards/views.py
+++ b/standards/views.py
@@ -44,6 +44,7 @@ class StandardsManagement(LoginRequiredMixin, ListView):
+
context.update({'active_link' : 'standards', 'unpubstandards_of_user' : unpubstandards_of_user, 'areas' : areas, 'standards_of_user' : standards_of_user, 'standardcontent' : standardcontent, "agencynetworks" : agencynetworks})
return context
@@ -373,6 +374,15 @@ def StandardSingle(request, pk):
}
return render(request, 'standards/standards_noentrie.html', context)
+@login_required
+def StandardSingleAgn(request, pk):
+
+ context = {
+ 'active_link':'standards',
+ 'standard' : Standards.objects.get(pk=pk)
+ }
+ return render(request, 'standards/standards_single_agn.html', context)
+
@login_required
def StandardArea(request, pk):
@@ -463,3 +473,17 @@ def updatesbyajax(request, pk):
success = False
return JsonResponse({"success" : success})
+
+
+@login_required
+def StandardFromAgn(request, pk):
+
+ agn = AgencyNetwork.objects.get(pk=pk)
+
+ print(agn.standards.all())
+ context = {
+ 'active_link':'standards',
+ 'standards_of_agency_network' : agn.standards.all(),
+ 'agn' :agn,
+ }
+ return render(request, 'standards/standards_from_agn.html', context)