mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 23:19:10 +00:00
integrations: Fix missing links to non-webhook integrations.
Apparently help_content was attached to the wrong class. Fixes #4744.
This commit is contained in:
@@ -59,6 +59,17 @@ class Integration(object):
|
||||
# type: (Dict[Any, Any]) -> None
|
||||
self.doc_context = context
|
||||
|
||||
@property
|
||||
def help_content(self):
|
||||
# type: () -> Text
|
||||
doc_context = self.doc_context or {}
|
||||
|
||||
if self.doc.endswith('.md'):
|
||||
return render_markdown_path(self.doc, doc_context)
|
||||
else:
|
||||
template = loader.get_template(self.doc)
|
||||
return mark_safe(template.render(doc_context))
|
||||
|
||||
class EmailIntegration(Integration):
|
||||
def is_enabled(self):
|
||||
# type: () -> bool
|
||||
@@ -104,17 +115,6 @@ class WebhookIntegration(Integration):
|
||||
# type: () -> LocaleRegexProvider
|
||||
return url(self.url, self.function)
|
||||
|
||||
@property
|
||||
def help_content(self):
|
||||
# type: () -> Text
|
||||
doc_context = self.doc_context or {}
|
||||
|
||||
if self.doc.endswith('.md'):
|
||||
return render_markdown_path(self.doc, doc_context)
|
||||
else:
|
||||
template = loader.get_template(self.doc)
|
||||
return mark_safe(template.render(doc_context))
|
||||
|
||||
class HubotLozenge(Integration):
|
||||
GIT_URL_TEMPLATE = "https://github.com/hubot-scripts/hubot-{}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user