def __init__(self, context): super(ContactCheckDetail, self).__init__(context) c = self.context self.head.add( script(attr(type='text/javascript'), 'ajaxSourceURLOfChecks = "%s";' % c.ajax_json_filter_url, 'dontDisplayFilter = true;')) self.main.add(h1(_('Contact checks detail'), '-', c.test_suit_name)) if c.contact_detail is None: self.main.add(h2(_('Contact was deleted'))) verified_info = None else: if contact_has_state(c.contact_detail, 'validatedContact'): verified_info = _('Contact is validated') elif contact_has_state(c.contact_detail, 'identifiedContact'): verified_info = _('Contact is identified') else: verified_info = None self.main.add( table( attr(cssc='section_table'), tr( td(attr(cssc='left_label'), _('Contact:'), td(a(attr(href=c.contact_url), c.check.contact_handle)))), tr( td(attr(cssc='left_label'), _('Created: '), td(c.check.created))), tr( td(attr(cssc='left_label'), _('Verified status:'), td(strong(attr(cssc='highlight_ok'), verified_info)))) if verified_info else None)) self.main.add(c.detail) if c.contact_detail: self.main.add(h2('Detail of contact:')) self.main.add( adifdetails.ContactDetail(c.contact_detail, c.history, is_nested=True)) if cherrypy.session.get('history', False): self.main.add(h2(_('All checks of this contact:'))) self.main.add(c.table_tag) self.main.add(h2(_('Contact checks messages:'))) self.main.add(c.messages_list) lang_code = config.lang[:2] self.head.add( script( attr(type='text/javascript'), 'scwLanguage = "%s"; //sets language of js_calendar' % lang_code, 'scwDateOutputFormat = "%s"; // set output format for js_calendar' % config.js_calendar_date_format))
def __init__(self, context = None): super(DigPage, self).__init__(context) c = self.context self.main.add(h2(_('dig_query'))) if c.get('handle'): self.main.add(h3(_('Domain'), c.handle)) if c.get('dig'): self.main.add(pre(c.dig))
def __init__(self, context = None): super(SetInZoneStatusPage, self).__init__(context) c = self.context self.main.add(h2(_('Set InZone Status'))) if c.get('handle'): self.main.add(h3(_('Domain'), c.handle)) if c.get('success') and c.success: self.main.add(pre(attr(style='color:green;'), _("Function returns True."))) if c.get('error'): self.main.add(pre(attr(style='color:red;'), c.error))
def add_to_bottom(self): if not cherrypy.session['user'].check_nperms( 'printout.%s' % self.get_object_name()): self.add( div( attr(id='printout-form'), h2(_('Generate record statement')), ObjectPrintoutForm( action=f_urls[self.get_object_name()] + 'printout/%s/' % self.data.get('handle', self.data.get('fqdn'))))) super(ObjectDetail, self).add_to_bottom()