show group in passwordlist
This commit is contained in:
parent
90991f62e7
commit
450190e603
@ -151,7 +151,7 @@ stylesheet.add(ParagraphStyle(name = 'Ballot_option_YNA',
|
|||||||
leading = 15,
|
leading = 15,
|
||||||
leftIndent = 49,
|
leftIndent = 49,
|
||||||
spaceAfter = 18),
|
spaceAfter = 18),
|
||||||
)
|
)
|
||||||
stylesheet.add(ParagraphStyle(name = 'Ballot_option_group_right',
|
stylesheet.add(ParagraphStyle(name = 'Ballot_option_group_right',
|
||||||
parent = stylesheet['Normal'],
|
parent = stylesheet['Normal'],
|
||||||
fontSize = 8,
|
fontSize = 8,
|
||||||
@ -284,18 +284,18 @@ def print_passwords(request):
|
|||||||
cell = []
|
cell = []
|
||||||
cell.append(Spacer(0,0.8*cm))
|
cell.append(Spacer(0,0.8*cm))
|
||||||
cell.append(Paragraph(_("Your Account for OpenSlides"), stylesheet['Ballot_title']))
|
cell.append(Paragraph(_("Your Account for OpenSlides"), stylesheet['Ballot_title']))
|
||||||
cell.append(Paragraph("%s %s %s" % (_("for"), user.first_name, user.last_name), stylesheet['Ballot_subtitle']))
|
cell.append(Paragraph(_("for %s") % (user.profile), stylesheet['Ballot_subtitle']))
|
||||||
cell.append(Spacer(0,0.5*cm))
|
cell.append(Spacer(0,0.5*cm))
|
||||||
cell.append(Paragraph("%s: %s" % (_("Username"), user.username), stylesheet['Ballot_option']))
|
cell.append(Paragraph(_("User: %s") % (user.username), stylesheet['Ballot_option']))
|
||||||
cell.append(Paragraph("%s: %s" % (_("Password"), user.profile.firstpassword), stylesheet['Ballot_option']))
|
cell.append(Paragraph(_("Password: %s") % (user.profile.firstpassword), stylesheet['Ballot_option']))
|
||||||
cell.append(Spacer(0,0.5*cm))
|
cell.append(Spacer(0,0.5*cm))
|
||||||
cell.append(Paragraph("%s: %s" % (_("URL"), system_url), stylesheet['Ballot_option']))
|
cell.append(Paragraph(_("URL: %s") % (system_url), stylesheet['Ballot_option']))
|
||||||
cell.append(Spacer(0,0.5*cm))
|
cell.append(Spacer(0,0.5*cm))
|
||||||
cell2 = []
|
cell2 = []
|
||||||
cell2.append(Spacer(0,0.8*cm))
|
cell2.append(Spacer(0,0.8*cm))
|
||||||
if system_welcometext is not None:
|
if system_welcometext is not None:
|
||||||
cell2.append(Paragraph(system_welcometext.replace('\r\n','<br/>'), stylesheet['Ballot_subtitle']))
|
cell2.append(Paragraph(system_welcometext.replace('\r\n','<br/>'), stylesheet['Ballot_subtitle']))
|
||||||
|
|
||||||
data.append([cell,cell2])
|
data.append([cell,cell2])
|
||||||
except Profile.DoesNotExist:
|
except Profile.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
@ -343,7 +343,7 @@ def print_application(request, application_id=None):
|
|||||||
doc = SimpleDocTemplate(response)
|
doc = SimpleDocTemplate(response)
|
||||||
doc.title = None
|
doc.title = None
|
||||||
story = [Spacer(1,2*cm)]
|
story = [Spacer(1,2*cm)]
|
||||||
|
|
||||||
if application_id is None: #print all applications
|
if application_id is None: #print all applications
|
||||||
doc.title = _("Applications")
|
doc.title = _("Applications")
|
||||||
# List of applications
|
# List of applications
|
||||||
@ -353,13 +353,13 @@ def print_application(request, application_id=None):
|
|||||||
for application in Application.objects.exclude(number=None).order_by('number'):
|
for application in Application.objects.exclude(number=None).order_by('number'):
|
||||||
story.append(PageBreak())
|
story.append(PageBreak())
|
||||||
story = get_application(application, story)
|
story = get_application(application, story)
|
||||||
|
|
||||||
else: # print selected application
|
else: # print selected application
|
||||||
application = Application.objects.get(id=application_id)
|
application = Application.objects.get(id=application_id)
|
||||||
filename = u'filename=%s%s.pdf;' % (_("Application"), str(application.number))
|
filename = u'filename=%s%s.pdf;' % (_("Application"), str(application.number))
|
||||||
response['Content-Disposition'] = filename.encode('utf-8')
|
response['Content-Disposition'] = filename.encode('utf-8')
|
||||||
story = get_application(application, story)
|
story = get_application(application, story)
|
||||||
|
|
||||||
doc.build(story, onFirstPage=firstPage, onLaterPages=laterPages)
|
doc.build(story, onFirstPage=firstPage, onLaterPages=laterPages)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@ -371,7 +371,7 @@ def print_application_poll(request, poll_id=None):
|
|||||||
response['Content-Disposition'] = filename.encode('utf-8')
|
response['Content-Disposition'] = filename.encode('utf-8')
|
||||||
doc = SimpleDocTemplate(response, pagesize=A4, topMargin=-6, bottomMargin=-6, leftMargin=0, rightMargin=0, showBoundary=False)
|
doc = SimpleDocTemplate(response, pagesize=A4, topMargin=-6, bottomMargin=-6, leftMargin=0, rightMargin=0, showBoundary=False)
|
||||||
story = [Spacer(0,0*cm)]
|
story = [Spacer(0,0*cm)]
|
||||||
|
|
||||||
imgpath = os.path.join(SITE_ROOT, 'static/images/circle.png')
|
imgpath = os.path.join(SITE_ROOT, 'static/images/circle.png')
|
||||||
circle = "<img src='%s' width='15' height='15'/> " % imgpath
|
circle = "<img src='%s' width='15' height='15'/> " % imgpath
|
||||||
cell = []
|
cell = []
|
||||||
@ -404,7 +404,7 @@ def print_assignment_poll(request, poll_id=None):
|
|||||||
response['Content-Disposition'] = filename.encode('utf-8')
|
response['Content-Disposition'] = filename.encode('utf-8')
|
||||||
doc = SimpleDocTemplate(response, pagesize=A4, topMargin=-6, bottomMargin=-6, leftMargin=0, rightMargin=0, showBoundary=False)
|
doc = SimpleDocTemplate(response, pagesize=A4, topMargin=-6, bottomMargin=-6, leftMargin=0, rightMargin=0, showBoundary=False)
|
||||||
story = [Spacer(0,0*cm)]
|
story = [Spacer(0,0*cm)]
|
||||||
|
|
||||||
imgpath = os.path.join(SITE_ROOT, 'static/images/circle.png')
|
imgpath = os.path.join(SITE_ROOT, 'static/images/circle.png')
|
||||||
circle = "<img src='%s' width='15' height='15'/> " % imgpath
|
circle = "<img src='%s' width='15' height='15'/> " % imgpath
|
||||||
cell = []
|
cell = []
|
||||||
@ -414,7 +414,7 @@ def print_assignment_poll(request, poll_id=None):
|
|||||||
options = poll.get_options().order_by('user__user__first_name')
|
options = poll.get_options().order_by('user__user__first_name')
|
||||||
cell.append(Paragraph(str(poll.ballot)+". "+_("ballot")+", "+str(len(options))+" "+ ungettext("candidate", "candidates", len(options))+", "+str(poll.assignment.posts)+" "+_("available posts"), stylesheet['Ballot_description']))
|
cell.append(Paragraph(str(poll.ballot)+". "+_("ballot")+", "+str(len(options))+" "+ ungettext("candidate", "candidates", len(options))+", "+str(poll.assignment.posts)+" "+_("available posts"), stylesheet['Ballot_description']))
|
||||||
cell.append(Spacer(0,0.4*cm))
|
cell.append(Spacer(0,0.4*cm))
|
||||||
|
|
||||||
if poll.optiondecision:
|
if poll.optiondecision:
|
||||||
for option in options:
|
for option in options:
|
||||||
o = str(option).rsplit("(",1)
|
o = str(option).rsplit("(",1)
|
||||||
@ -450,7 +450,7 @@ def print_assignment_poll(request, poll_id=None):
|
|||||||
t=Table(data, 10.5*cm, 14.84*cm)
|
t=Table(data, 10.5*cm, 14.84*cm)
|
||||||
else:
|
else:
|
||||||
t=Table(data, 10.5*cm, 29.7*cm)
|
t=Table(data, 10.5*cm, 29.7*cm)
|
||||||
|
|
||||||
t.setStyle(TableStyle([ ('GRID', (0,0), (-1,-1), 0.25, colors.grey),
|
t.setStyle(TableStyle([ ('GRID', (0,0), (-1,-1), 0.25, colors.grey),
|
||||||
('VALIGN', (0,0), (-1,-1), 'TOP'),
|
('VALIGN', (0,0), (-1,-1), 'TOP'),
|
||||||
]))
|
]))
|
||||||
|
Loading…
Reference in New Issue
Block a user