def _getDescriptionHtml(self, tree, explorer): if not self.element.isValid: html = ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.' 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>') return html else: return TreeItem._getDescriptionHtml(self, tree, explorer)
def _getDescriptionHtml(self, tree, explorer): if not self.element.isValid: html = u'<div style="background-color:#ffffcc;"><h1> ' + self.text(0) + ' (GWC layer)</h1></div></br>' html += ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.' 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>') return html else: return TreeItem._getDescriptionHtml(self, tree, explorer)
def _getDescriptionHtml(self, tree, explorer): if not self.element.isValid: html = ( '<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.' 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>' ) return html else: return TreeItem._getDescriptionHtml(self, tree, explorer)
def _getDescriptionHtml(self, tree, explorer): if not self.element.isValid: html = "" typesok, typesmsg = self._checkAllSelectionTypes(self, tree) if not typesok: return typesmsg else: html += typesmsg items = tree.selectedItems() # don't show if multiple items selected, but not the current item if not items or self in items or len(items) == 1: html += ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.' 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>') return html else: return TreeItem._getDescriptionHtml(self, tree, explorer)
def _getDescriptionHtml(self, tree, explorer): if not self.element.isValid: html = "" typesok, typesmsg = self._checkAllSelectionTypes(self, tree) if not typesok: return typesmsg else: html += typesmsg items = tree.selectedItems() # don't show if multiple items selected, but not the current item if not items or self in items or len(items) == 1: html += ( '<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.' 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>' ) return html else: return TreeItem._getDescriptionHtml(self, tree, explorer)