Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIF
AKPlanning
Commits
151614c1
Commit
151614c1
authored
4 years ago
by
Benjamin Hättasch
Committed by
Nadja Geisler
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Show AK messages on event status page
parent
57814e22
No related branches found
No related tags found
1 merge request
!58
Introduce confident AK messages to organizers and improve wiki export
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AKModel/templates/admin/AKModel/status.html
+91
-74
91 additions, 74 deletions
AKModel/templates/admin/AKModel/status.html
AKModel/views.py
+2
-1
2 additions, 1 deletion
AKModel/views.py
with
93 additions
and
75 deletions
AKModel/templates/admin/AKModel/status.html
+
91
−
74
View file @
151614c1
...
...
@@ -7,88 +7,105 @@
{% block title %}{% trans "Status" %}: {{event}}{% endblock %}
{% block content %}
<h2><a
href=
"{% url 'admin:AKModel_event_change' event.pk %}"
>
{{event}}
</a></h2>
{% timezone event.timezone %}
<h5>
{{ event.start }} - {{ event.end }}
</h5>
<h2><a
href=
"{% url 'admin:AKModel_event_change' event.pk %}"
>
{{event}}
</a></h2>
<h5>
{{ event.start }} - {{ event.end }}
</h5>
<h3
class=
"block-header"
>
{% trans "Categories" %}
</h3>
{% if event.akcategory_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No categroies yet" %}
</p>
{% else %}
<p>
{{ event.akcategory_set.count }}:
{% for category in event.akcategory_set.all %}
{% if forloop.counter0 > 0 %}
·
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<h3
class=
"block-header"
>
{% trans "Categories" %}
</h3>
{% if event.akcategory_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No categroies yet" %}
</p>
{% else %}
<p>
{{ event.akcategory_set.count }}:
{% for category in event.akcategory_set.all %}
{% if forloop.counter0 > 0 %}
·
{% endif %}
<a
href=
"{% url 'admin:AKModel_akcategory_change' category.pk %}"
>
{{ category }}
</a>
({{ category.ak_set.count }})
{% endfor %}
</p>
{% endif %}
<a
href=
"{% url 'admin:AKModel_akcategory_change' category.pk %}"
>
{{ category }}
</a>
({{ category.ak_set.count }})
{% endfor %}
</p>
{% endif %}
<a
class=
"btn btn-success"
href=
"{% url 'admin:AKModel_akcategory_add' %}"
>
{% trans "Add category" %}
</a>
<a
class=
"btn btn-success"
href=
"{% url 'admin:AKModel_akcategory_add' %}"
>
{% trans "Add category" %}
</a>
<h3
class=
"block-header"
>
{% trans "Rooms" %}
</h3>
{% if event.room_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No rooms yet" %}
</p>
{% else %}
<p>
{{ event.room_set.count }}:
{% for room in event.room_set.all %}
{% if forloop.counter0 > 0 %}
·
<h3
class=
"block-header"
>
{% trans "Rooms" %}
</h3>
{% if event.room_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No rooms yet" %}
</p>
{% else %}
<p>
{{ event.room_set.count }}:
{% for room in event.room_set.all %}
{% if forloop.counter0 > 0 %}
·
{% endif %}
<a
href=
"{% url 'admin:AKModel_room_change' room.pk %}"
>
{{ room }}
</a>
{% endfor %}
</p>
{% endif %}
<a
href=
"{% url 'admin:AKModel_room_change' room.pk %}"
>
{{ room }}
</a>
{% endfor %}
</p>
{% endif %}
<a
class=
"btn btn-success"
href=
"{% url 'admin:AKModel_room_add' %}"
>
{% trans "Add Room" %}
</a>
<a
class=
"btn btn-success"
href=
"{% url 'admin:AKModel_room_add' %}"
>
{% trans "Add Room" %}
</a>
<h3
class=
"block-header"
>
{% trans "AKs" %}
</h3>
{% if event.ak_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No AKs yet" %}
</p>
{% else %}
<table>
<tbody>
<tr>
<td>
{% trans "AKs" %}
</td><td>
{{ event.ak_set.count }}
</td>
</tr>
<tr>
<td>
{% trans "Slots" %}
</td><td>
{{ event.akslot_set.count }}
</td>
</tr>
<tr>
<td>
{% trans "Unscheduled Slots" %}
</td><td>
{% if "AKScheduling"|check_app_installed %}
<a
href=
"{% url 'admin:slots_unscheduled' event_slug=event.slug %}"
>
{{ unscheduled_slots_count }}
</a>
{% else %}
{{ unscheduled_slots_count }}
{% endif %}
</td>
</tr>
</tbody>
</table>
<h3
class=
"block-header"
>
{% trans "AKs" %}
</h3>
{% if event.ak_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No AKs yet" %}
</p>
{% else %}
<table>
<tbody>
<tr>
<td>
{% trans "AKs" %}
</td><td>
{{ event.ak_set.count }}
</td>
</tr>
<tr>
<td>
{% trans "Slots" %}
</td><td>
{{ event.akslot_set.count }}
</td>
</tr>
<tr>
<td>
{% trans "Unscheduled Slots" %}
</td><td>
{% if "AKScheduling"|check_app_installed %}
<a
href=
"{% url 'admin:slots_unscheduled' event_slug=event.slug %}"
>
{{ unscheduled_slots_count }}
</a>
{% else %}
{{ unscheduled_slots_count }}
{% endif %}
</td>
</tr>
</tbody>
</table>
<a
class=
"btn btn-success"
href=
"{% url 'admin:ak_csv_export' event_slug=event.slug %}"
>
{% trans "Export AKs as CSV" %}
</a>
{% endif %}
<h3
class=
"block-header"
>
{% trans "Requirements" %}
</h3>
{% if event.akrequirement_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No requirements yet" %}
</p>
{% else %}
<p>
{{ event.akrequirement_set.count }}:
{% for requirement in event.akrequirement_set.all %}
{% if forloop.counter0 > 0 %}
·
<a
class=
"btn btn-success"
href=
"{% url 'admin:ak_csv_export' event_slug=event.slug %}"
>
{% trans "Export AKs as CSV" %}
</a>
{% endif %}
<a
href=
"{% url 'admin:AKModel_akrequirement_change' requirement.pk %}"
>
{{ requirement }}
</a>
({{ requirement.ak_set.count }})
{% endfor %}
</p>
{% endif %}
<a
class=
"btn btn-success"
href=
"{% url 'admin:AKModel_akrequirement_add' %}"
>
{% trans "Add Requirement" %}
</a>
<h3
class=
"block-header"
>
{% trans "Requirements" %}
</h3>
{% if event.akrequirement_set.count == 0 %}
<p
class=
"text-danger"
>
{% trans "No requirements yet" %}
</p>
{% else %}
<p>
{{ event.akrequirement_set.count }}:
{% for requirement in event.akrequirement_set.all %}
{% if forloop.counter0 > 0 %}
·
{% endif %}
<a
href=
"{% url 'admin:AKModel_akrequirement_change' requirement.pk %}"
>
{{ requirement }}
</a>
({{ requirement.ak_set.count }})
{% endfor %}
</p>
{% endif %}
<a
class=
"btn btn-success"
href=
"{% url 'admin:AKModel_akrequirement_add' %}"
>
{% trans "Add Requirement" %}
</a>
</div>
<div
class=
"col-md-4"
>
<h3
class=
"block-header"
>
{% trans "Messages" %}
</h3>
<table
class=
"table table-striped"
>
{% for message in ak_messages %}
<tr><td>
<span
class=
"text-secondary float-right"
>
{{ message.timestamp|date:"Y-m-d H:i:s" }}
</span>
<h5><a
href=
"{% url 'submit:ak_detail' event_slug=message.ak.event.slug pk=message.ak.pk %}"
>
{{ message.ak }}
</a></h5>
<p>
{{ message.text }}
</p>
</td></tr>
{% endfor %}
</table>
</div>
</div>
{% endtimezone %}
{% endblock %}
This diff is collapsed.
Click to expand it.
AKModel/views.py
+
2
−
1
View file @
151614c1
...
...
@@ -6,7 +6,7 @@ from django.utils.translation import gettext_lazy as _
from
django.views.generic
import
TemplateView
,
DetailView
,
ListView
from
rest_framework
import
viewsets
,
permissions
,
mixins
from
AKModel.models
import
Event
,
AK
,
AKSlot
,
Room
,
AKTrack
,
AKCategory
,
AKOwner
from
AKModel.models
import
Event
,
AK
,
AKSlot
,
Room
,
AKTrack
,
AKCategory
,
AKOwner
,
AKOrgaMessage
from
AKModel.serializers
import
AKSerializer
,
AKSlotSerializer
,
RoomSerializer
,
AKTrackSerializer
,
AKCategorySerializer
,
\
AKOwnerSerializer
...
...
@@ -132,6 +132,7 @@ class EventStatusView(AdminViewMixin, DetailView):
context
=
super
().
get_context_data
(
**
kwargs
)
context
[
"
unscheduled_slots_count
"
]
=
context
[
"
event
"
].
akslot_set
.
filter
(
start
=
None
).
count
context
[
"
site_url
"
]
=
reverse_lazy
(
"
dashboard:dashboard_event
"
,
kwargs
=
{
'
slug
'
:
context
[
"
event
"
].
slug
})
context
[
"
ak_messages
"
]
=
AKOrgaMessage
.
objects
.
filter
(
ak__event
=
context
[
"
event
"
])
return
context
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment