- use always color black on projector, also in dark mode
- show border for projector preview
- Fix projector logo margin by using img instead of os-logo
- Use also 'username' in invitation email subject
This commit is contained in:
Emanuel Schütze 2019-02-25 16:40:55 +01:00
parent eb78c694fc
commit 4d62d99099
8 changed files with 20 additions and 4 deletions

View File

@ -347,7 +347,7 @@ _('Email');
_('Email sender'); _('Email sender');
_('Email subject'); _('Email subject');
_('Your login for {event_name}'); _('Your login for {event_name}');
_('You can use {event_name} as a placeholder.'); _('You can use {event_name} and {username} as placeholder.');
_('Email body'); _('Email body');
_( _(
'Dear {name},\n\nthis is your OpenSlides login for the event {event_name}:\n\n {url}\n username: {username}\n password: {password}\n\nThis email was generated automatically.' 'Dear {name},\n\nthis is your OpenSlides login for the event {event_name}:\n\n {url}\n username: {username}\n password: {password}\n\nThis email was generated automatically.'

View File

@ -2,7 +2,7 @@
<div id="projector" [ngStyle]="projectorStyle"> <div id="projector" [ngStyle]="projectorStyle">
<div id="header" [ngStyle]="headerFooterStyle" *ngIf="enableHeaderAndFooter"> <div id="header" [ngStyle]="headerFooterStyle" *ngIf="enableHeaderAndFooter">
<!-- projector logo --> <!-- projector logo -->
<os-logo *ngIf="enableLogo" inputAction="logo_projector_main" class="projector-logo-main"> </os-logo> <img *ngIf="enableLogo && projectorLogo" src="{{ projectorLogo }}" class="projector-logo-main" />
<div *ngIf="enableTitle" id="eventdata"> <div *ngIf="enableTitle" id="eventdata">
<div <div

View File

@ -133,6 +133,7 @@ export class ProjectorComponent extends BaseComponent implements OnDestroy {
public enableHeaderAndFooter = true; public enableHeaderAndFooter = true;
public enableTitle = true; public enableTitle = true;
public enableLogo = true; public enableLogo = true;
public projectorLogo;
public eventName; public eventName;
public eventDescription; public eventDescription;
public eventDate; public eventDate;
@ -177,6 +178,11 @@ export class ProjectorComponent extends BaseComponent implements OnDestroy {
// projector logo / background-image // projector logo / background-image
this.configService.get<boolean>('projector_enable_logo').subscribe(val => (this.enableLogo = val)); this.configService.get<boolean>('projector_enable_logo').subscribe(val => (this.enableLogo = val));
this.configService.get<{ path?: string }>('logo_projector_main').subscribe(val => {
if (val && val.path) {
this.projectorLogo = val.path;
}
});
this.configService.get<{ path?: string }>('logo_projector_header').subscribe(val => { this.configService.get<{ path?: string }>('logo_projector_header').subscribe(val => {
if (val && val.path) { if (val && val.path) {
this.headerFooterStyle['background-image'] = "url('" + val.path + "')"; this.headerFooterStyle['background-image'] = "url('" + val.path + "')";

View File

@ -1,4 +1,9 @@
.os-listview-table { .os-listview-table {
/** Projector button **/
.mat-column-projector {
padding-right: 15px;
}
/** Title */ /** Title */
.mat-column-title { .mat-column-title {
flex: 2 0 50px; flex: 2 0 50px;

View File

@ -1,8 +1,10 @@
#projector { #projector {
width: 100%; /*1000px;*/ width: 100%; /*1000px;*/
border: 1px solid lightgrey;
} }
.column-left { .column-left {
color: black;
display: inline-block; display: inline-block;
padding-top: 20px; padding-top: 20px;
width: 60%; width: 60%;

View File

@ -9,6 +9,7 @@
.projector { .projector {
width: 320px; width: 320px;
color: black;
} }
form { form {

View File

@ -121,7 +121,7 @@ def get_config_variables():
default_value="Your login for {event_name}", default_value="Your login for {event_name}",
input_type="string", input_type="string",
label="Email subject", label="Email subject",
help_text="You can use {event_name} as a placeholder.", help_text="You can use {event_name} and {username} as placeholder.",
weight=605, weight=605,
group="Participants", group="Participants",
subgroup="Email", subgroup="Email",

View File

@ -237,7 +237,9 @@ class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser):
except KeyError as err: except KeyError as err:
raise ValidationError({"detail": f"Invalid property {err}."}) raise ValidationError({"detail": f"Invalid property {err}."})
subject_format = format_dict({"event_name": config["general_event_name"]}) subject_format = format_dict(
{"event_name": config["general_event_name"], "username": self.username}
)
try: try:
subject = subject.format(**subject_format) subject = subject.format(**subject_format)
except KeyError as err: except KeyError as err: