26
itsm/structure/templates/structure/organization.html.j2
Normal file
26
itsm/structure/templates/structure/organization.html.j2
Normal file
@ -0,0 +1,26 @@
|
||||
{% extends 'base.html.j2' %}
|
||||
|
||||
{% block title %}{{ organization.name }}{% endblock %}
|
||||
|
||||
{% block body%}
|
||||
<section class="content-header">
|
||||
<fieldset><label>Name</label><input type="text" value="{{ organization.name }}" /></fieldset>
|
||||
<fieldset><label>Created</label><input type="text" value="{{ organization.created }}" readonly /></fieldset>
|
||||
<fieldset><label>Modified</label><input type="text" value="{{ organization.modified }}" readonly /></fieldset>
|
||||
</section>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Created</th>
|
||||
<th>Modified</th>
|
||||
</tr>
|
||||
{% for tm in organization.teams.all %}
|
||||
<tr>
|
||||
<td>{{ tm.name }}</td>
|
||||
<td>{{ tm.created }} </td>
|
||||
<td>{{ tm.modified }} </td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
@ -5,4 +5,5 @@ from . import views
|
||||
app_name = "structure"
|
||||
urlpatterns = [
|
||||
path("", views.IndexView.as_view(), name="index"),
|
||||
path("<int:pk>/", views.OrganizationView.as_view(), name="organization"),
|
||||
]
|
||||
|
@ -13,3 +13,17 @@ class IndexView(generic.ListView):
|
||||
def get_queryset(self):
|
||||
|
||||
return Organization.objects.filter(team=None)
|
||||
|
||||
|
||||
class OrganizationView(generic.DetailView):
|
||||
model = Organization
|
||||
template_name = "structure/organization.html.j2"
|
||||
|
||||
# context_object_name = Team
|
||||
|
||||
|
||||
def get_queryset(self):
|
||||
"""
|
||||
Excludes any questions that aren't published yet.
|
||||
"""
|
||||
return Organization.objects.filter()
|
||||
|
Reference in New Issue
Block a user