final PC Version ready

main
Samuel Zielke 2 years ago
parent 6239f730ec
commit c40e8abdb7

@ -30,102 +30,8 @@ def separate_string(input_string):
return separated_string[:8] return separated_string[:8]
def createApi_1():
# Aktuellen Montag abfragen und das Model.week übergeben
actual = actualMonday()
weeks = MainModel.week.objects
# Datenbank Abfragen vorbereiten
db_info = MainModel.info.objects.all()
db_service = MainModel.service.objects.all()
db_steward = MainModel.steward.objects.all()
db_regie = MainModel.regie.objects.all()
# Leeres Dict für die Übergabe an TheoDocs
my_list = {}
# Wir wollen 8 Wochen übertragen (Wenn so viele gepflegt sind)
for i in range(0, 8):
# Aktuelle Woche abfragen und String generieren
new_actual = actual + datetime.timedelta(weeks=+i)
new_actual = new_actual.strftime("%d.%m.%y")
# Wenn kein Eintrag vorhanden ist
if weeks.filter(date_of_monday=new_actual).count() > 0:
week = weeks.get(date_of_monday=new_actual)
else:
break
# ANPASSEN/VERTIEGEN DER ABFRAGEN VON DEN VERSCHIEDENEN MODELS
# Predigtdienst DB abfragen
db_service_weekly = db_service.get(week=week)
db_steward_weekly = db_steward.get(week=week)
db_regie_weekly = db_regie.get(week=week)
# PREDIGTDIENST VORBEREITUNG
# Leeres Dict für die eintragung des einzelnen Treffpunktes und der Informationen
DatesOfService = {}
# Dict füllen mit den entsprechenden Informationen aus dem Laptop
for i in range(1, 7):
DatesOfServiceWeek = []
date = db_service_weekly.__getattribute__("date_"+str(i)).weekday() if db_service_weekly.__getattribute__("date_"+str(i)) != None else ""
DatesOfServiceWeek.append(date)
time = " - " + db_service_weekly.__getattribute__("time_"+str(i)).strftime("%H:%M Uhr") if db_service_weekly.__getattribute__("time_"+str(i)) != None else ""
DatesOfServiceWeek.append(time)
type = str(db_service_weekly.__getattribute__("type_"+str(i))+1) if db_service_weekly.__getattribute__("type_"+str(i)) != None else ""
DatesOfServiceWeek.append(type)
if db_service_weekly.__getattribute__("speaker_"+str(i)) != None:
name = " - " + str(db_service_weekly.__getattribute__("speaker_"+str(i)).first_name[:3]) + ". " + str(db_service_weekly.__getattribute__("speaker_"+str(i)).name)
else:
name = ""
DatesOfServiceWeek.append(name)
DatesOfService[i] = DatesOfServiceWeek
# FERTIG
# Das fertige Array zusammenstellen für den Druck dieser Woche
week_array = [
# INFO
str(db_info.get(week=week).gast.Name) if db_info.get(week=week).gast != None else "",
str(db_info.get(week=week).cleaning.Name) if db_info.get(week=week).cleaning != None else "",
# PREDIGTDIENST
DatesOfService[1][0] + DatesOfService[1][1],
DatesOfService[1][2] + DatesOfService[1][3],
DatesOfService[2][0] + DatesOfService[2][1],
DatesOfService[2][2] + DatesOfService[2][3],
DatesOfService[3][0] + DatesOfService[3][1],
DatesOfService[3][2] + DatesOfService[3][3],
DatesOfService[4][0] + DatesOfService[4][1],
DatesOfService[4][2] + DatesOfService[4][3],
DatesOfService[5][0] + DatesOfService[5][1],
DatesOfService[5][2] + DatesOfService[5][3],
DatesOfService[6][0] + DatesOfService[6][1],
DatesOfService[6][2] + DatesOfService[6][3],
# ORDNER
str(db_steward_weekly.hall_1.first_name[:3]) + ". " + str(db_steward_weekly.hall_1.name) if db_steward_weekly.hall_1 != None else "",
str(db_steward_weekly.hall_2.first_name[:3]) + ". " + str(db_steward_weekly.hall_2.name) if db_steward_weekly.hall_2 != None else "",
str(db_steward_weekly.foyer_1.first_name[:3]) + ". " + str(db_steward_weekly.foyer_1.name) if db_steward_weekly.foyer_1 != None else "",
str(db_steward_weekly.foyer_2.first_name[:3]) + ". " + str(db_steward_weekly.foyer_2.name) if db_steward_weekly.foyer_2 != None else "",
# ANLAGE
str(db_regie_weekly.regie_1.first_name[:3]) + ". " + str(db_regie_weekly.regie_1.name) if db_regie_weekly.regie_1 != None else "",
str(db_regie_weekly.regie_2.first_name[:3]) + ". " + str(db_regie_weekly.regie_2.name) if db_regie_weekly.regie_2 != None else "",
str(db_regie_weekly.zoom_1.first_name[:3]) + ". " + str(db_regie_weekly.zoom_1.name) if db_regie_weekly.zoom_1 != None else "",
str(db_regie_weekly.zoom_2.first_name[:3]) + ". " + str(db_regie_weekly.zoom_2.name) if db_regie_weekly.zoom_2 != None else "",
str(db_regie_weekly.stage.first_name[:3]) + ". " + str(db_regie_weekly.stage.name) if db_regie_weekly.stage != None else "",
]
# Dict erstellen mit dem Array hinter dem Datum des Montags der Woche
my_list[str(week.date_of_monday)] = week_array
return my_list
def createApi_2(): def createApi():
# Aktuellen Montag abfragen und das Model.week übergeben # Aktuellen Montag abfragen und das Model.week übergeben
actual = actualMonday() actual = actualMonday()
weeks = MainModel.week.objects weeks = MainModel.week.objects
@ -164,14 +70,14 @@ def createApi_2():
# Dict füllen mit den entsprechenden Informationen aus dem Laptop # Dict füllen mit den entsprechenden Informationen aus dem Laptop
for i in range(1, 7): for i in range(1, 7):
DatesOfServiceWeek = [] DatesOfServiceWeek = []
date = db_service_weekly.__getattribute__("date_"+str(i)).weekday() if db_service_weekly.__getattribute__("date_"+str(i)) != None else "" date = str(db_service_weekly.__getattribute__("date_"+str(i)).weekday()) if db_service_weekly.__getattribute__("date_"+str(i)) != None else ""
DatesOfServiceWeek.append(date) DatesOfServiceWeek.append(date)
time = db_service_weekly.__getattribute__("time_"+str(i)).strftime("%H:%M Uhr") if db_service_weekly.__getattribute__("time_"+str(i)) != None else "" time = " - " + db_service_weekly.__getattribute__("time_"+str(i)).strftime("%H:%M Uhr") if db_service_weekly.__getattribute__("time_"+str(i)) != None else ""
DatesOfServiceWeek.append(time) DatesOfServiceWeek.append(time)
type = db_service_weekly.__getattribute__("type_"+str(i)) if db_service_weekly.__getattribute__("type_"+str(i)) != None else "" type = str(db_service_weekly.__getattribute__("type_"+str(i))) if db_service_weekly.__getattribute__("type_"+str(i)) != None else ""
DatesOfServiceWeek.append(str(type)) DatesOfServiceWeek.append(str(type))
if db_service_weekly.__getattribute__("speaker_"+str(i)) != None: if db_service_weekly.__getattribute__("speaker_"+str(i)) != None:
name = str(db_service_weekly.__getattribute__("speaker_"+str(i)).first_name[:3]) + ". " + str(db_service_weekly.__getattribute__("speaker_"+str(i)).name) name = " - " + str(db_service_weekly.__getattribute__("speaker_"+str(i)).first_name[:3]) + ". " + str(db_service_weekly.__getattribute__("speaker_"+str(i)).name)
else: else:
name = "" name = ""
DatesOfServiceWeek.append(name) DatesOfServiceWeek.append(name)
@ -222,7 +128,7 @@ def createApi_2():
def api(request): def api(request):
return JsonResponse(createApi_2(), safe=False) return JsonResponse(createApi(), safe=False)
@login_required @login_required
def index(request): def index(request):

@ -67,7 +67,6 @@
#technik { margin: 0 3.000rem; } #technik { margin: 0 3.000rem; }
#week { page-break-after: always; } #week { page-break-after: always; }
div#outgoing:not(:first-child) { display: none; } div#outgoing:not(:first-child) { display: none; }
/* div#technik:not(:first-child) { display: none; } */
</style> </style>
</head> </head>
@ -87,9 +86,6 @@
<table style="margin-top: 2.000rem;"> <table style="margin-top: 2.000rem;">
<tr> <tr>
<td style="width: 2.750rem; background-color: rgba(210, 214, 214, 0.373);"> <td style="width: 2.750rem; background-color: rgba(210, 214, 214, 0.373);">
<!-- <svg style="width:24px;height:24px" viewBox="0 0 24 24">
<path fill="#ffffff" d="M12.075,10.812c1.358-0.853,2.242-2.507,2.242-4.037c0-2.181-1.795-4.618-4.198-4.618S5.921,4.594,5.921,6.775c0,1.53,0.884,3.185,2.242,4.037c-3.222,0.865-5.6,3.807-5.6,7.298c0,0.23,0.189,0.42,0.42,0.42h14.273c0.23,0,0.42-0.189,0.42-0.42C17.676,14.619,15.297,11.677,12.075,10.812 M6.761,6.775c0-2.162,1.773-3.778,3.358-3.778s3.359,1.616,3.359,3.778c0,2.162-1.774,3.778-3.359,3.778S6.761,8.937,6.761,6.775 M3.415,17.69c0.218-3.51,3.142-6.297,6.704-6.297c3.562,0,6.486,2.787,6.705,6.297H3.415z"></path>
</svg> -->
<td style="background-color: rgba(210, 214, 214, 0.373); padding-left: 0.250rem;"> <td style="background-color: rgba(210, 214, 214, 0.373); padding-left: 0.250rem;">
<h3 style="text-align: left; color: gray;">Infos und Predigtdienst</h3> <h3 style="text-align: left; color: gray;">Infos und Predigtdienst</h3>
</td> </td>
@ -124,9 +120,6 @@
<table style="margin-top: 1.5rem;"> <table style="margin-top: 1.5rem;">
<tr>#IF !MWB_NO!# <tr>#IF !MWB_NO!#
<td style="width: 2.750rem; background-color: !MWB_LIGHT_COLOR!;"> <td style="width: 2.750rem; background-color: !MWB_LIGHT_COLOR!;">
<!-- <svg style="width:24px;height:24px" viewBox="0 0 24 24">
<path fill="#ffffff" d="M16.254,3.399h-0.695V3.052c0-0.576-0.467-1.042-1.041-1.042c-0.576,0-1.043,0.467-1.043,1.042v0.347H6.526V3.052c0-0.576-0.467-1.042-1.042-1.042S4.441,2.476,4.441,3.052v0.347H3.747c-0.768,0-1.39,0.622-1.39,1.39v11.813c0,0.768,0.622,1.39,1.39,1.39h12.507c0.768,0,1.391-0.622,1.391-1.39V4.789C17.645,4.021,17.021,3.399,16.254,3.399z M14.17,3.052c0-0.192,0.154-0.348,0.348-0.348c0.191,0,0.348,0.156,0.348,0.348v0.347H14.17V3.052z M5.136,3.052c0-0.192,0.156-0.348,0.348-0.348S5.831,2.86,5.831,3.052v0.347H5.136V3.052z M16.949,16.602c0,0.384-0.311,0.694-0.695,0.694H3.747c-0.384,0-0.695-0.311-0.695-0.694V7.568h13.897V16.602z M16.949,6.874H3.052V4.789c0-0.383,0.311-0.695,0.695-0.695h12.507c0.385,0,0.695,0.312,0.695,0.695V6.874z M5.484,11.737c0.576,0,1.042-0.467,1.042-1.042c0-0.576-0.467-1.043-1.042-1.043s-1.042,0.467-1.042,1.043C4.441,11.271,4.908,11.737,5.484,11.737z M5.484,10.348c0.192,0,0.347,0.155,0.347,0.348c0,0.191-0.155,0.348-0.347,0.348s-0.348-0.156-0.348-0.348C5.136,10.503,5.292,10.348,5.484,10.348z M14.518,11.737c0.574,0,1.041-0.467,1.041-1.042c0-0.576-0.467-1.043-1.041-1.043c-0.576,0-1.043,0.467-1.043,1.043C13.475,11.271,13.941,11.737,14.518,11.737z M14.518,10.348c0.191,0,0.348,0.155,0.348,0.348c0,0.191-0.156,0.348-0.348,0.348c-0.193,0-0.348-0.156-0.348-0.348C14.17,10.503,14.324,10.348,14.518,10.348z M14.518,15.212c0.574,0,1.041-0.467,1.041-1.043c0-0.575-0.467-1.042-1.041-1.042c-0.576,0-1.043,0.467-1.043,1.042C13.475,14.745,13.941,15.212,14.518,15.212z M14.518,13.822c0.191,0,0.348,0.155,0.348,0.347c0,0.192-0.156,0.348-0.348,0.348c-0.193,0-0.348-0.155-0.348-0.348C14.17,13.978,14.324,13.822,14.518,13.822z M10,15.212c0.575,0,1.042-0.467,1.042-1.043c0-0.575-0.467-1.042-1.042-1.042c-0.576,0-1.042,0.467-1.042,1.042C8.958,14.745,9.425,15.212,10,15.212z M10,13.822c0.192,0,0.348,0.155,0.348,0.347c0,0.192-0.156,0.348-0.348,0.348s-0.348-0.155-0.348-0.348C9.653,13.978,9.809,13.822,10,13.822z M5.484,15.212c0.576,0,1.042-0.467,1.042-1.043c0-0.575-0.467-1.042-1.042-1.042s-1.042,0.467-1.042,1.042C4.441,14.745,4.908,15.212,5.484,15.212z M5.484,13.822c0.192,0,0.347,0.155,0.347,0.347c0,0.192-0.155,0.348-0.347,0.348s-0.348-0.155-0.348-0.348C5.136,13.978,5.292,13.822,5.484,13.822z M10,11.737c0.575,0,1.042-0.467,1.042-1.042c0-0.576-0.467-1.043-1.042-1.043c-0.576,0-1.042,0.467-1.042,1.043C8.958,11.271,9.425,11.737,10,11.737z M10,10.348c0.192,0,0.348,0.155,0.348,0.348c0,0.191-0.156,0.348-0.348,0.348s-0.348-0.156-0.348-0.348C9.653,10.503,9.809,10.348,10,10.348z"></path>
</svg> -->
</td>#ENDIF# </td>#ENDIF#
<td style="background-color: !MWB_LIGHT_COLOR!; padding-left: 0.250rem;"> <td style="background-color: !MWB_LIGHT_COLOR!; padding-left: 0.250rem;">
<h3 style="text-align: left; color: #4e5a5a;;">!TITLE! (!DATE ddd dd.MM.!#IF !DURATION!# - !BEGIN! !LM_STARTTIME!#ENDIF#)</h3> <h3 style="text-align: left; color: #4e5a5a;;">!TITLE! (!DATE ddd dd.MM.!#IF !DURATION!# - !BEGIN! !LM_STARTTIME!#ENDIF#)</h3>
@ -165,11 +158,6 @@
<table> <table>
<!--GW Title--> <!--GW Title-->
<tr> <tr>
<!-- <td style="background-color: rgba(101, 97, 100, 1); width: 2.750rem; height: 2.000rem; text-align: center;">
<svg width="66.7%" height="66.7%" viewBox="0 0 1024 1024">
<path d="M1019 295L879 28q-6-12-20-20t-27-8H192q-13 0-27 8t-20 20L5 290q-6 12-5 28t9 26l480 670q8 10 19 10q5 0 10-2.5t9-7.5l488-664q16-23 6-50q-1-3-2-5zm-77-7H771l69-197zM575 64h206l-64 183zm93 224H371L511 86zm-354-31L250 64h199zm367 95L509 844L345 352h336zM437 831L93 352h185zm312-479h185L581 832zM188 82l69 206H79z" fill="#ffffff" />
</svg>
</td> -->
<td>#IF !DURATION!#<div class="infobox duration gw"></div>#ELSE# <td>#IF !DURATION!#<div class="infobox duration gw"></div>#ELSE#
<div class="infobox starttime gw"></div>#ENDIF# <div class="infobox starttime gw"></div>#ENDIF#
</td> </td>
@ -248,19 +236,6 @@
<table> <table>
<!--FM Title--> <!--FM Title-->
<tr> <tr>
<!-- <td style="background-color: rgba(199, 137, 9, 1); width: 2.750rem; height: 2.000rem; text-align: center;">
<svg width="75%" height="75%" viewBox="0 0 33.334 100">
<path d="M19.445,41.667l11.11-11.111c2.778-2.778,2.778-2.778,2.778-13.889l-11.111,11.11C19.445,30.556,19.445,30.556,19.445,41.667z" fill="white" />
<path d="M33.334,0L22.223,11.111c-2.777,2.777-2.777,2.777-2.777,13.889l11.11-11.111C33.334,11.111,33.334,11.111,33.334,0z" fill="white" />
<path d="M13.89,41.667c0-11.111,0-11.111-2.778-13.89L0,16.667c0,11.11,0,11.11,2.778,13.889L13.89,41.667z" fill="white" />
<path d="M19.445,58.333l11.11-11.11c2.778-2.778,2.778-2.778,2.778-13.89L22.223,44.444C19.445,47.223,19.445,47.223,19.445,58.333z" fill="white" />
<path d="M13.89,58.333c0-11.11,0-11.11-2.778-13.889L0,33.333c0,11.111,0,11.111,2.778,13.89L13.89,58.333z" fill="white" />
<path d="M19.445,75l11.11-11.111c2.778-2.777,2.778-2.777,2.778-13.889L22.223,61.111C19.445,63.889,19.445,63.889,19.445,75z" fill="white" />
<path d="M13.89,75c0-11.111,0-11.111-2.778-13.889L0,50c0,11.111,0,11.111,2.778,13.889L13.89,75z" fill="white" />
<path d="M13.89,25c0-11.111,0-11.111-2.778-13.889L0,0c0,11.111,0,11.111,2.778,13.889L13.89,25z" fill="white" />
<path d="M16.667,83.333L0,66.667c0,11.11,0,11.11,2.778,13.889L13.89,91.667V100h5.556v-8.333l11.11-11.111c2.778-2.778,2.778-2.778,2.778-13.889L16.667,83.333z" fill="white" />
</svg>
</td> -->
<td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration fm"></div>#ELSE# <td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration fm"></div>#ELSE#
<div class="infobox starttime fm"></div>#ENDIF# <div class="infobox starttime fm"></div>#ENDIF#
</td> </td>
@ -368,33 +343,15 @@
#ENDIF# #ENDIF#
</table> </table>
</div> </div>
<!-- <div id="other">
<table>
<tr>
<td style="width: 2.750rem;">#IF !DURATION! EMPTY#
<div class="infobox starttime" style="background-color: !MWB_LIGHT_COLOR!;">!SONG3_STARTTIME!</div>#ENDIF#
</td>
<td colspan="2">
<p class="info">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF#</p>
</td>
</tr>
</table>
</div> -->
<div id="cl"> <div id="cl">
<table> <table>
<tr> <tr>
<!-- <td style="background-color: rgba(153, 19, 30, 1); width: 2.750rem; height: 2.000rem; text-align: center;">
<svg width="90%" height="90%" viewBox="0 0 100 100">
<path d="m 55.597646,70.013108 -5.940517,18.033439 -4.230019,0 2.745531,-18.056554 7.425005,0.02311 0,0 z m -37.547513,0.887353 6.517105,17.146086 -4.230019,0 -7.780717,-13.954952 5.493631,-3.191134 0,0 z M 64.304242,15.884538 c 0,-2.168944 1.758013,-3.928241 3.928241,-3.928241 0,0 14.891103,-0.0064 15.023372,0 1.738751,0.09117 3.46466,0.739675 4.901633,1.9455 L 100,23.837332 l 0,1.832494 c 0,2.709575 -2.197201,4.905486 -4.905491,4.905486 l -16.792938,0 0,1.421564 6.113879,2.676186 c 0,0 -4.626824,10.388844 -8.018286,18.843744 -4.087477,10.188514 -10.301521,12.493579 -11.416171,12.82746 l 2.199764,21.700997 -4.228734,0 -6.03683,-21.654767 -38.107407,-0.115574 -11.9439587,6.92932 -2.63381,14.841021 -4.23001806500003,0 0,-18.934919 L 6.2384423,62.873186 l 0,-11.045049 c -1.118503,0.895059 -2.367989,1.632166 -3.716355,2.177933 l 0,-12.860848 c 0,-3.77029 1.403585,-7.213119 3.716355,-9.834087 1.516591,-1.718204 3.4222815,-3.083265 5.5809527,-3.957777 1.722057,-0.696014 3.604633,-1.079977 5.575817,-1.079977 l 45.335936,0 9.602938,-8.058095 c -0.453308,0.0565 -0.914321,0.08604 -1.383039,0.08604 -2.49512,0 -4.797617,-0.829567 -6.646805,-2.226731 l 0,-0.190056 0,0 z" fill="white" />
</svg>
</td> -->
<td>#IF !DURATION!#<div class="infobox duration cl"></div>#ELSE# <td>#IF !DURATION!#<div class="infobox duration cl"></div>#ELSE#
<div class="infobox starttime cl"></div>#ENDIF# <div class="infobox starttime cl"></div>#ENDIF#
</td> </td>
<td colspan="2"> <td colspan="2">
<p><b><span class="cl">!CL!</span></b></p> <p><b><span class="cl">!CL!</span></b></p>
<p class="info">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF#</p> <p class="info">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF#</p>
<!-- <cr><span style="margin: 0 0.500rem; font-size: 0.750rem; font-weight: normal; color: gray;">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF#</span> -->
</td> </td>
</tr> </tr>
<tr> <tr>
@ -486,9 +443,6 @@
<table style="margin-top: 1.5rem;"> <table style="margin-top: 1.5rem;">
<tr>#IF !WT_NO!# <tr>#IF !WT_NO!#
<td style="width: 2.750rem; background-color: !WT_LIGHT_COLOR!;"> <td style="width: 2.750rem; background-color: !WT_LIGHT_COLOR!;">
<!-- <svg style="width:24px;height:24px" viewBox="0 0 24 24">
<path fill="#ffffff" d="M16.254,3.399h-0.695V3.052c0-0.576-0.467-1.042-1.041-1.042c-0.576,0-1.043,0.467-1.043,1.042v0.347H6.526V3.052c0-0.576-0.467-1.042-1.042-1.042S4.441,2.476,4.441,3.052v0.347H3.747c-0.768,0-1.39,0.622-1.39,1.39v11.813c0,0.768,0.622,1.39,1.39,1.39h12.507c0.768,0,1.391-0.622,1.391-1.39V4.789C17.645,4.021,17.021,3.399,16.254,3.399z M14.17,3.052c0-0.192,0.154-0.348,0.348-0.348c0.191,0,0.348,0.156,0.348,0.348v0.347H14.17V3.052z M5.136,3.052c0-0.192,0.156-0.348,0.348-0.348S5.831,2.86,5.831,3.052v0.347H5.136V3.052z M16.949,16.602c0,0.384-0.311,0.694-0.695,0.694H3.747c-0.384,0-0.695-0.311-0.695-0.694V7.568h13.897V16.602z M16.949,6.874H3.052V4.789c0-0.383,0.311-0.695,0.695-0.695h12.507c0.385,0,0.695,0.312,0.695,0.695V6.874z M5.484,11.737c0.576,0,1.042-0.467,1.042-1.042c0-0.576-0.467-1.043-1.042-1.043s-1.042,0.467-1.042,1.043C4.441,11.271,4.908,11.737,5.484,11.737z M5.484,10.348c0.192,0,0.347,0.155,0.347,0.348c0,0.191-0.155,0.348-0.347,0.348s-0.348-0.156-0.348-0.348C5.136,10.503,5.292,10.348,5.484,10.348z M14.518,11.737c0.574,0,1.041-0.467,1.041-1.042c0-0.576-0.467-1.043-1.041-1.043c-0.576,0-1.043,0.467-1.043,1.043C13.475,11.271,13.941,11.737,14.518,11.737z M14.518,10.348c0.191,0,0.348,0.155,0.348,0.348c0,0.191-0.156,0.348-0.348,0.348c-0.193,0-0.348-0.156-0.348-0.348C14.17,10.503,14.324,10.348,14.518,10.348z M14.518,15.212c0.574,0,1.041-0.467,1.041-1.043c0-0.575-0.467-1.042-1.041-1.042c-0.576,0-1.043,0.467-1.043,1.042C13.475,14.745,13.941,15.212,14.518,15.212z M14.518,13.822c0.191,0,0.348,0.155,0.348,0.347c0,0.192-0.156,0.348-0.348,0.348c-0.193,0-0.348-0.155-0.348-0.348C14.17,13.978,14.324,13.822,14.518,13.822z M10,15.212c0.575,0,1.042-0.467,1.042-1.043c0-0.575-0.467-1.042-1.042-1.042c-0.576,0-1.042,0.467-1.042,1.042C8.958,14.745,9.425,15.212,10,15.212z M10,13.822c0.192,0,0.348,0.155,0.348,0.347c0,0.192-0.156,0.348-0.348,0.348s-0.348-0.155-0.348-0.348C9.653,13.978,9.809,13.822,10,13.822z M5.484,15.212c0.576,0,1.042-0.467,1.042-1.043c0-0.575-0.467-1.042-1.042-1.042s-1.042,0.467-1.042,1.042C4.441,14.745,4.908,15.212,5.484,15.212z M5.484,13.822c0.192,0,0.347,0.155,0.347,0.347c0,0.192-0.155,0.348-0.347,0.348s-0.348-0.155-0.348-0.348C5.136,13.978,5.292,13.822,5.484,13.822z M10,11.737c0.575,0,1.042-0.467,1.042-1.042c0-0.576-0.467-1.043-1.042-1.043c-0.576,0-1.042,0.467-1.042,1.043C8.958,11.271,9.425,11.737,10,11.737z M10,10.348c0.192,0,0.348,0.155,0.348,0.348c0,0.191-0.156,0.348-0.348,0.348s-0.348-0.156-0.348-0.348C9.653,10.503,9.809,10.348,10,10.348z"></path>
</svg> -->
</td>#ENDIF# </td>#ENDIF#
<td style="background-color: !WT_LIGHT_COLOR!; padding-left: 0.250rem;"> <td style="background-color: !WT_LIGHT_COLOR!; padding-left: 0.250rem;">
<h3 style="text-align: left; color: rgba(189, 101, 101, 0.67);">!TITLE! (!DATE ddd dd.MM.!#IF !DURATION!# - !BEGIN! !PM_STARTTIME!#ENDIF#) <h3 style="text-align: left; color: rgba(189, 101, 101, 0.67);">!TITLE! (!DATE ddd dd.MM.!#IF !DURATION!# - !BEGIN! !PM_STARTTIME!#ENDIF#)
@ -514,18 +468,6 @@
</div> </div>
<div id="pt"> <div id="pt">
<table> <table>
<!-- <tr>
<td style="background-color: #2f4870; width: 2.750rem; height: 2.000rem; text-align: center;">
<svg xmlns="http://www.w3.org/2000/svg" width="75%" height="75%" viewBox="0 0 48 48">
<path d="M24 28c3.31 0 5.98-2.69 5.98-6L30 10c0-3.32-2.68-6-6-6-3.31 0-6 2.68-6 6v12c0 3.31 2.69 6 6 6zm10.6-6c0 6-5.07 10.2-10.6 10.2-5.52 0-10.6-4.2-10.6-10.2H10c0 6.83 5.44 12.47 12 13.44V42h4v-6.56c6.56-.97 12-6.61 12-13.44h-3.4z" fill="white" />
<path d="M0 0h48v48H0z" fill="none" />
</svg>
</td>
<td colspan="2">
<h4><span class="pt">!PT!</span></h4>
</td>
<td></td>
</tr> -->
<tr> <tr>
<td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration">!PT_TIME!</div>#ELSE# <td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration">!PT_TIME!</div>#ELSE#
<div class="infobox starttime" style="background-color: rgba(189, 101, 101, 0.67);">Vortrag</div>#ENDIF# <div class="infobox starttime" style="background-color: rgba(189, 101, 101, 0.67);">Vortrag</div>#ENDIF#
@ -539,60 +481,8 @@
</tr> </tr>
</table> </table>
</div> </div>
<!-- <p>#IF !CO_VISIT!#</p>
<div id="other">
<table>
<tr>
<td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration cob">!FT_TIME!</div>#ELSE#
<div class="infobox starttime" style="background-color: !WT_LIGHT_COLOR!;">!FT_STARTTIME!</div>#ENDIF#
</td>
<td>
<p class="theme">!FT_THEME!</p>
</td>
<td>
<p class="name">!CO_NAME! <span class="info">(!CO!)</p>
</td>
</tr>
<tr>
<td style="width: 2.750rem;">#IF !DURATION! EMPTY#
<div class="infobox starttime" style="background-color: !WT_LIGHT_COLOR!;">!SONG2_STARTTIME!</div>#ENDIF#
</td>
<td>
<p class="info">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF# & !PRAYER! <span class="name">#IF !PRAYER2_NAME! EMPTY# (!CO_NAME!)#ELSE# (!PRAYER2_NAME!)</span>#ENDIF#</p>
</td>
</tr>
</table>
</div>
<p>#ENDIF#</p>
<p>#IF !CO_VISIT! EMPTY#</p>
<div id="other">
<table>
<tr>
<td style="width: 2.750rem;">#IF !DURATION! EMPTY#
<div class="infobox starttime" style="background-color: !WT_LIGHT_COLOR!;">!SONG2_STARTTIME!</div>#ENDIF#
</td>
<td>
<p class="info">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF#</span></p>
</td>
</tr>
</table>
</div>
<P>#ENDIF#</P> -->
<div id="wt"> <div id="wt">
<table> <table>
<!-- <tr>
<td style="background-color: #4d654d; width: 2.750rem; height: 2.000rem; text-align: center;">
<svg xmlns="http://www.w3.org/2000/svg" width="75%" height="75%" viewBox="0 0 48 48">
<path d="M43.98 8c0-2.21-1.77-4-3.98-4H8C5.79 4 4 5.79 4 8v24c0 2.21 1.79 4 4 4h28l8 8-.02-36zM36 28H12v-4h24v4zm0-6H12v-4h24v4zm0-6H12v-4h24v4z" fill="white" />
<path d="M0 0h48v48H0z" fill="none" />
</svg>
</td>
<td colspan="2">
<h4><span class="wt">!WT!</span></h4>
<cr><span style="margin: 0 0.500rem; font-family:'Lato'; font-size: 0.750rem; font-weight: normal; color: gray;">!SONG! !SONG2_NO!#IF !SONG2_NAME!#: !SONG2_NAME!#ENDIF#</span>
</td>
<td></td>
</tr> -->
<tr> <tr>
<td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration">!WT_TIME!</div>#ELSE# <td style="width: 2.750rem;">#IF !DURATION!#<div class="infobox duration">!WT_TIME!</div>#ELSE#
<div class="infobox starttime" style="background-color: rgba(189, 101, 101, 0.67)">WT</div>#ENDIF# <div class="infobox starttime" style="background-color: rgba(189, 101, 101, 0.67)">WT</div>#ENDIF#
@ -723,14 +613,14 @@
<table> <table>
<tr> <tr>
<td style="width: 2.750rem;"><div class="infobox starttime t">Ordner</div></td> <td style="width: 2.750rem;"><div class="infobox starttime t">Ordner</div></td>
<td><p class="theme" style="text-align: left"><b>Saal</b> <span class="info CustomElem"></p></td> <td><p class="theme" style="text-align: left"><b>Saal</b> <span class="info CustomElem"></span> / <span class="info CustomElem"></span></p></td>
<td><p class="theme" style="font-weight: normal; text-align: right"><b>Foyer</b> <span class="info CustomElem"></p></p></td> <td><p class="theme" style="font-weight: normal; text-align: right"><b>Foyer</b> <span class="info CustomElem"></span> / <span class="info CustomElem"></span></p></p></td>
</tr> </tr>
<tr> <tr>
<td style="width: 2.750rem;"><div class="infobox starttime t">Technik</div></td> <td style="width: 2.750rem;"><div class="infobox starttime t">Technik</div></td>
<td><p class="theme" style="text-align: left"><b>Anlage</b> <span class="info CustomElem" id="t_1"></p></td> <td><p class="theme" style="text-align: left"><b>Anlage</b> <span class="info CustomElem" id="t_1"></span> / <span class="info CustomElem"></span></p></td>
<td><p class="theme" style="font-weight: normal; text-align: right"><b>Zoom</b> <span class="info CustomElem" id="t_2"></p></p></td> <td><p class="theme" style="font-weight: normal; text-align: right"><b>Zoom</b> <span class="info CustomElem" id="t_2"></span> / <span class="info CustomElem"></span></p></p></td>
<td><p class="theme" style="font-weight: normal; text-align: right"><b>Bühne</b> <span class="info CustomElem" id="t_3"></p></p></td> <td><p class="theme" style="font-weight: normal; text-align: right"><b>Bühne</b> <span class="info CustomElem" id="t_3"></span></p></p></td>
</tr> </tr>
</table> </table>
</div> </div>
@ -745,38 +635,36 @@
<script> <script>
const ordner_elements = document.querySelectorAll('.CustomElem'); const ordner_elements = document.querySelectorAll('.CustomElem');
const weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] const weekdays = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag']
const service_type = ['Saal', 'Zoom', 'Gruppe'] const service_type = ['Zoom', 'Saal', 'Gruppe']
function setData(myDATA){ function setData(myDATA){
let weeklistpos = 0; let weeklistpos = 0;
let myIndex = 0; let myIndex = 0;
ordner_elements.forEach((element) => { ordner_elements.forEach((element) => {
if (myIndex == 38){ if (myIndex == 35){
myIndex = 0; myIndex = 0;
weeklistpos = weeklistpos + 1; weeklistpos = weeklistpos + 1;
} else if ([3, 7, 11, 15, 19, 23].includes(myIndex+1) && myDATA[window.weekdate[weeklistpos]][myIndex] != "") { } else if ([3, 7, 11, 15, 19, 23].includes(myIndex+1) && myDATA[window.weekdate[weeklistpos]][myIndex] != "") {
element.innerHTML = weekdays[myDATA[window.weekdate[weeklistpos]][myIndex]] + " - "; element.innerHTML = weekdays[myDATA[window.weekdate[weeklistpos]][myIndex]];
} }
else if ([5, 9, 13, 17, 21, 25].includes(myIndex+1) && myDATA[window.weekdate[weeklistpos]][myIndex] != "") { else if ([5, 9, 13, 17, 21, 25].includes(myIndex+1) && myDATA[window.weekdate[weeklistpos]][myIndex] != "") {
element.innerHTML = service_type[myDATA[window.weekdate[weeklistpos]][myIndex]] + " - "; element.innerHTML = service_type[myDATA[window.weekdate[weeklistpos]][myIndex]-1];
} }
else { else {
element.innerHTML = myDATA[window.weekdate[weeklistpos]][myIndex]; element.innerHTML = myDATA[window.weekdate[weeklistpos]][myIndex];
// element.innerHTML = 'LOL';
} }
// element.innerHTML = myDATA[window.weekdate[weeklistpos]][myIndex];
myIndex = myIndex + 1; myIndex = myIndex + 1;
}); });
} }
const req = new XMLHttpRequest(); const req = new XMLHttpRequest();
req.open("GET", "http://mo.samuelzielke.de/api/", false); req.open("GET", "http://localhost:8000/api/", false);
req.send(); req.send();
myDATA = JSON.parse(req.response); myDATA = JSON.parse(req.response);

Loading…
Cancel
Save

Powered by TurnKey Linux.