Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1#!/usr/local/bin/python
2# encoding: utf-8
3"""
4*The HTML template module for the `templates_services_calendars.py` resource*
6:Author:
7 David Young
8"""
9from builtins import object
10import sys
11import os
12import khufu
13from marshall_webapp.templates.commonelements.pagetemplates import defaultpagetemplate
15class templates_services_calendars(object):
16 """
17 The worker class for the templates_services_calendars module
19 **Key Arguments**
21 - ``log`` -- logger
22 - ``request`` -- the pyramid request
24 """
26 def __init__(
27 self,
28 log,
29 request
30 ):
31 self.log = log
32 log.debug("instansiating a new 'templates_services_calendars' object")
33 self.request = request
34 # xt-self-arg-tmpx
36 return None
38 def get(self):
39 """get the templates_services_calendars object
41 **Return**
43 - ``webpage`` -- the webpage for the calendar
45 """
46 self.log.debug('starting the ``get`` method')
48 # the google calendar embed code
49 maincontent = """
50 <iframe src="https://www.google.com/calendar/embed?title=PESSTO%20NTT%20and%20Supplementary%20Telescope%20Time&height=600&wkst=1&bgcolor=%23cccccc&src=pessto.org_2ifj20jf8dln05cfpls2tjds4k%40group.calendar.google.com&color=%232F6309&src=pessto.org_b855vuk2444lqcot2d2tiakst8%40group.calendar.google.com&color=%23711616&ctz=Europe%2FLondon" style=" border:solid 1px #777 " width="800" height="600" frameborder="0" scrolling="no"></iframe>
51 """
53 src = self.request.static_path(
54 'marshall_webapp:static/docs/pessto_calendar_tutorial.pdf')
55 info = khufu.p(
56 content='For instructions on adding supplementary telescope time to this calendar <a href="%(src)s">see here</a>' % locals(
57 ),
58 htmlId="calendarInfo",
59 lead=True,
60 textAlign="left", # [ left | center | right ]
61 color=False, # [ muted | warning | info | error | success ]
62 )
63 maincontent = """%(maincontent)s %(info)s """ % locals()
65 webpage = defaultpagetemplate(
66 log=self.log,
67 request=self.request,
68 bodyId=False,
69 pageTitle="ePESSTO+ Marshall",
70 topNavBar=False,
71 sideBar=False,
72 mainContent=maincontent,
73 relativePathFromDocRoot=False,
74 thisPageName="PESSTO Observing Calendar"
75 )
77 self.log.debug('completed the ``get`` method')
78 return webpage
80 # xt-class-method