def set_html(self, renderitems, rendered=False): if rendered: if len(self.items) > 0: self.render_html(''' <body ondragstart="return false"> %s <div id="tweets"> <div id="newcontainer"></div> <div>%s</div> <div class="loadmore"> <a href="more:%d"><b>%s</b></a> </div> </div> </body>''' % (self.profile_data, HTML_UNSET_TEXT.join(renderitems), self.items[0][0].id, self.lang_load)) else: if self.error_view: info = lang.profile_html_tweet_error else: info = lang.profile_html_protected if self.protected_view \ else self.lang_empty self.render_html(''' <body class="unloaded" ondragstart="return false"> %s <div id="tweets" class="profile_tweets"> <div class="loading"> <div class="profile_empty"><b>%s</b></div> </div> </div> </body>''' % (self.profile_data, info))
def set_html(self, renderitems, rendered=False): if rendered: if len(self.items) > 0: self.render_html(''' <body ondragstart="return false"> <div><div id="newcontainer">%s</div> <div class="loadmore"> <a href="more:%d"><b>%s</b></a> </div> </body>''' % (HTML_UNSET_TEXT.join(renderitems), self.items[0][0].id, self.lang_load)) else: self.render_html(''' <body class="unloaded" ondragstart="return false"> <div class="loading"><b>%s</b></div> </body>''' % self.lang_empty) elif self.main.status(ST_LOGIN_SUCCESSFUL): self.render_html(''' <body class="unloaded" ondragstart="return false"> <div class="loading"><b>%s</b></div> </body>''' % self.lang_empty)