Hide keyboard shortcuts

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* 

5 

6:Author: 

7 David Young 

8""" 

9from builtins import object 

10import sys 

11import os 

12import khufu 

13from marshall_webapp.templates.commonelements.pagetemplates import defaultpagetemplate 

14 

15class templates_services_calendars(object): 

16 """ 

17 The worker class for the templates_services_calendars module 

18 

19 **Key Arguments** 

20 

21 - ``log`` -- logger 

22 - ``request`` -- the pyramid request 

23  

24 """ 

25 

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 

35 

36 return None 

37 

38 def get(self): 

39 """get the templates_services_calendars object 

40 

41 **Return** 

42 

43 - ``webpage`` -- the webpage for the calendar 

44  

45 """ 

46 self.log.debug('starting the ``get`` method') 

47 

48 # the google calendar embed code 

49 maincontent = """ 

50 <iframe src="https://www.google.com/calendar/embed?title=PESSTO%20NTT%20and%20Supplementary%20Telescope%20Time&amp;height=600&amp;wkst=1&amp;bgcolor=%23cccccc&amp;src=pessto.org_2ifj20jf8dln05cfpls2tjds4k%40group.calendar.google.com&amp;color=%232F6309&amp;src=pessto.org_b855vuk2444lqcot2d2tiakst8%40group.calendar.google.com&amp;color=%23711616&amp;ctz=Europe%2FLondon" style=" border:solid 1px #777 " width="800" height="600" frameborder="0" scrolling="no"></iframe> 

51 """ 

52 

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() 

64 

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 ) 

76 

77 self.log.debug('completed the ``get`` method') 

78 return webpage 

79 

80 # xt-class-method