Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-FiBu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Katharineum zu Lübeck
AlekSIS-App-FiBu
Commits
767d80b6
Commit
767d80b6
authored
5 years ago
by
Frank Poetzsch-Heffter
Browse files
Options
Downloads
Patches
Plain Diff
some changes in index template
parent
43792212
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
biscuit/apps/fibu/models.py
+1
-0
1 addition, 0 deletions
biscuit/apps/fibu/models.py
biscuit/apps/fibu/templates/fibu/index.html
+23
-12
23 additions, 12 deletions
biscuit/apps/fibu/templates/fibu/index.html
biscuit/apps/fibu/views.py
+1
-1
1 addition, 1 deletion
biscuit/apps/fibu/views.py
with
25 additions
and
13 deletions
biscuit/apps/fibu/models.py
+
1
−
0
View file @
767d80b6
...
...
@@ -13,6 +13,7 @@ class Status:
status_list
=
[
Status
(
name
=
'
beantragt
'
,
style_class
=
'
red
'
),
Status
(
name
=
'
bewilligt
'
,
style_class
=
'
orange
'
),
Status
(
name
=
'
abgelehnt
'
,
style_class
=
'
black
'
),
Status
(
name
=
'
bestellt
'
,
style_class
=
'
yellow
'
),
Status
(
name
=
'
bezahlt
'
,
style_class
=
'
green
'
),
]
...
...
This diff is collapsed.
Click to expand it.
biscuit/apps/fibu/templates/fibu/index.html
+
23
−
12
View file @
767d80b6
...
...
@@ -17,22 +17,33 @@
</button>
</form>
<h
5
>
Laufende Anträge
</h
5
>
<h
4
>
Laufende Anträge
</h
4
>
<div
class=
"collection"
>
{% for booking in bookings %}
{#
<div
class=
"collection-item row"
>
#}
<a
href=
"{% url 'booking_edit' booking.id %}"
class=
"collection-item row"
>
STATUS_ID: {% booking.status.id %}
<div
class=
"collection-item row"
>
{#
<a
href=
"{% url 'booking_edit' booking.id %}"
class=
"collection-item row"
>
#}
<span
class=
"col s12 m8"
>
{{ booking.description }}
</span>
<span
class=
"col s12 m
3
flushright"
>
{{ booking.planned_amount }} €
</span>
<span
class=
"col s12 m
2
flushright"
>
{{ booking.planned_amount }} €
</span>
<span
class=
"col s12 m1 badge new {{ booking.getStatus.style_class }}"
>
{{ booking.getStatus.name }}
</span>
{#
<form
action=
"{% url 'booking_edit' booking.id %}"
class=
"col s12 m2"
>
#}
{# {% csrf_token %}#}
{#
<button
type=
"submit"
name=
"edit"
class=
"waves-effect waves-light btn-flat btn-flat-medium"
title=
"Bearbeiten"
>
#}
{#
<i
class=
"material-icons center green-text"
>
create
</i>
#}
{#
</button>
#}
{#
</form>
#}
</a>
{#
</div>
#}
<form
action=
"{% url 'booking_edit' booking.id %}"
class=
"col s12 m1"
>
{% csrf_token %}
<input
type=
"hidden"
value=
"{{ booking.id }}"
name=
"booking-id"
>
{% if booking.status.id == 0 %}
<button
type=
"submit"
name=
"edit"
class=
"waves-effect waves-light btn-flat btn-flat-large"
title=
"Bearbeiten"
>
<i
class=
"material-icons center green-text"
>
create
</i>
</button>
{% endif %}
{% if booking.status.id == 1 %}
<button
type=
"submit"
name=
"order"
class=
"waves-effect waves-light btn-flat btn-flat-large"
title=
"Ware ist bestellt"
>
<i
class=
"material-icons center red-text"
>
shopping-cart
</i>
</button>
{% endif %}
</form>
{#
</a>
#}
</div>
{% endfor %}
</div>
{% endblock %}
...
...
This diff is collapsed.
Click to expand it.
biscuit/apps/fibu/views.py
+
1
−
1
View file @
767d80b6
...
...
@@ -75,7 +75,7 @@ def check(request):
if
'
allow
'
in
request
.
POST
:
Booking
.
objects
.
filter
(
id
=
booking_id
).
update
(
status
=
1
)
elif
'
deny
'
in
request
.
POST
:
Booking
.
objects
.
filter
(
id
=
booking_id
).
update
(
status
=
3
)
Booking
.
objects
.
filter
(
id
=
booking_id
).
update
(
status
=
2
)
# Notify user
# register_notification(title="Ihr Antrag auf Unterrichtsbefreiung wurde abgelehnt",
# description="Ihr Antrag auf Unterrichtsbefreiung vom {}, {} Uhr bis {}, {} Uhr wurde von der "
...
...
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