def render_entity_attributes(self, entity): super(CWSourceMainTab, self).render_entity_attributes(entity) self.w( add_etype_button(self._cw, 'CWSourceHostConfig', __linkto='cw_host_config_of:%s:subject' % entity.eid, __redirectpath=entity.rest_path())) try: hostconfig = self._cw.execute( 'Any X, XC, XH WHERE X cw_host_config_of S, S eid %(s)s, ' 'X config XC, X match_host XH', {'s': entity.eid}) except Unauthorized: pass else: if hostconfig: self.w(u'<h3>%s</h3>' % self._cw._('CWSourceHostConfig_plural')) self._cw.view('table', hostconfig, w=self.w, displaycols=list(range(2)), cellvids={1: 'editable-final'})
def call(self, **kwargs): self.w(u"<h1>{0}</h1>".format(self.title)) self.w(add_etype_button(self._cw, "CWUser")) self.w(u"<div class='clear'></div>") self.wview('shiirdor.admin-users-table2', self._cw.execute(self.rql))
def call(self, **kwargs): self.w(add_etype_button(self._cw, 'CWGroup')) self.w(u'<div class="clear"></div>') self.wview('cw.groups-table', self._cw.execute(self.rql))
def call(self, **kwargs): self.w('<h1>%s</h1>' % self._cw._(self.title)) self.w(add_etype_button(self._cw, 'CWSource')) self.w(u'<div class="clear"></div>') self.wview('cw.sources-table', self._cw.execute(self.rql))
def call(self, **kwargs): self.w(u"<h1>{0}</h1>".format(self.title)) self.w(add_etype_button(self._cw, "CWUser")) self.w(u"<div class='clear'></div>") self.wview('shiirdor.admin-users-table', self._cw.execute(self.rql))