Skip to content
This repository was archived by the owner on Mar 7, 2022. It is now read-only.

Commit b11a410

Browse files
committed
Issue print layout improved
1 parent e7c222a commit b11a410

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

registration/templates/registration/issue_print.html

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,32 @@
3535
border: 1px solid red;
3636
}
3737

38+
.btn {
39+
background: #3498db;
40+
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
41+
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
42+
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
43+
background-image: -o-linear-gradient(top, #3498db, #2980b9);
44+
background-image: linear-gradient(to bottom, #3498db, #2980b9);
45+
-webkit-border-radius: 28;
46+
-moz-border-radius: 28;
47+
border-radius: 28px;
48+
font-family: Arial;
49+
color: #ffffff;
50+
font-size: 20px;
51+
padding: 10px 20px 10px 20px;
52+
text-decoration: none;
53+
}
54+
55+
.btn:hover {
56+
background: #3cb0fd;
57+
background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
58+
background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
59+
background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
60+
background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
61+
background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
62+
text-decoration: none;
63+
}
3864

3965
@media print {
4066
.no-print {display:none}
@@ -50,12 +76,14 @@
5076
</head>
5177
<body>
5278
<div class='no-print'>
53-
현재 발권횟수: {{ registration.issueticket_set.count }}
79+
<div>
80+
현재 발권횟수: {{ registration.issueticket_set.count }}
81+
</div>
82+
<button id='ticket_issue' class='btn'>발권</button>
5483
</div>
55-
<button id='ticket_issue' class='no-print'>발권</button>
5684
<div class='print name-tag preview-border'>
57-
<div class='name'>{{ registration.name }}</div>
58-
<div class='org'>{{ registration.company }}</div>
85+
<div class='name'>{{ name }}</div>
86+
<div class='org'>{{ company }}</div>
5987
</div>
6088
<script src="{% static "components/jquery/dist/jquery.min.js" %}"></script>
6189
<script src="{% static "components/js-cookie/src/js.cookie.js" %}" charset="utf-8"></script>

registration/views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,13 @@ def issue(request):
365365
@group_required('admin', 'organizer', 'volunteer')
366366
def issue_print(request, registration_id):
367367
registration = get_object_or_404(Registration, id=registration_id)
368+
name = registration.user.profile.name if registration.user.profile.name != ''\
369+
else registration.name
370+
company = registration.user.profile.organization if \
371+
registration.user.profile.organization != '' else registration.company
368372
context = {
373+
'name': name,
374+
'company': company,
369375
'registration': registration,
370376
'title': _("Ticket Print"),
371377
}

0 commit comments

Comments
 (0)