Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
AlekSIS®
Official
AlekSIS-Core
Commits
cca0ca61
Commit
cca0ca61
authored
5 years ago
by
Julian
Committed by
root
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request
#274
from Katharineum/refactor/rebus_new_mails
Refactor/rebus new mails
parents
ad700fa9
34fbc38d
No related branches found
No related tags found
1 merge request
!86
Merge school-apps
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
schoolapps/support/templates/support/mail/rebus.html
+1
-1
1 addition, 1 deletion
schoolapps/support/templates/support/mail/rebus.html
schoolapps/support/views.py
+6
-4
6 additions, 4 deletions
schoolapps/support/views.py
with
7 additions
and
5 deletions
schoolapps/support/templates/support/mail/rebus.html
+
1
−
1
View file @
cca0ca61
...
...
@@ -2,7 +2,7 @@
<main>
<blockquote>
<p>
{{ a
}} → {{ b }} → {{ c
}}
</p>
<p>
{{ a
rrow_list
}}
</p>
<p>
{{ short_desc }}
</p>
<p>
{{ long_desc }}
</p>
<p>
Übermittelt von {{ user.get_full_name }} ({{ user.username }})
</p>
...
...
This diff is collapsed.
Click to expand it.
schoolapps/support/views.py
+
6
−
4
View file @
cca0ca61
...
...
@@ -8,6 +8,10 @@ from .forms import FeedbackForm
from
dashboard.models
import
Activity
def
add_arrows
(
array
:
list
):
return
"
→
"
.
join
([
item
for
item
in
array
if
item
])
def
rebus
(
request
):
if
request
.
method
==
'
POST
'
:
form
=
REBUSForm
(
request
.
POST
)
...
...
@@ -20,16 +24,14 @@ def rebus(request):
long_description
=
form
.
cleaned_data
[
'
long_description
'
]
# Register activity
desc_act
=
"
{}
→ {} → {}
| {}
"
.
format
(
a
,
b
,
c
,
short_description
)
desc_act
=
"
{} | {}
"
.
format
(
add_arrows
([
a
,
b
,
c
])
,
short_description
)
act
=
Activity
(
title
=
"
Du hast uns ein Problem gemeldet.
"
,
description
=
desc_act
,
app
=
"
REBUS
"
,
user
=
request
.
user
)
act
.
save
()
# Send mail
context
=
{
"
a
"
:
a
,
"
b
"
:
b
,
"
c
"
:
c
,
"
arrow_list
"
:
add_arrows
([
a
,
b
,
c
]),
"
short_desc
"
:
short_description
,
"
long_desc
"
:
long_description
,
"
user
"
:
request
.
user
...
...
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