mirror of https://github.com/zulip/zulip.git
help: Add gear menu icons to relative links.
This commit is contained in:
parent
195e5b8dc1
commit
fa59d4f345
|
@ -18,16 +18,25 @@ gear_info = {
|
||||||
# key is from REGEXP: `{relative|gear|key}`
|
# key is from REGEXP: `{relative|gear|key}`
|
||||||
# name is what the item is called in the gear menu: `Select **name**.`
|
# name is what the item is called in the gear menu: `Select **name**.`
|
||||||
# link is used for relative links: `Select [name](link).`
|
# link is used for relative links: `Select [name](link).`
|
||||||
"manage-streams": ["Manage streams", "/#streams/subscribed"],
|
"manage-streams": ['<i class="fa fa-exchange"></i> Manage streams', "/#streams/subscribed"],
|
||||||
"settings": ["Personal Settings", "/#settings/profile"],
|
"settings": ['<i class="fa fa-wrench"></i> Personal Settings', "/#settings/profile"],
|
||||||
"organization-settings": ["Organization settings", "/#organization/organization-profile"],
|
"organization-settings": [
|
||||||
"integrations": ["Integrations", "/integrations/"],
|
'<i class="fa fa-bolt"></i> Organization settings',
|
||||||
"stats": ["Usage statistics", "/stats"],
|
"/#organization/organization-profile",
|
||||||
"plans": ["Plans and pricing", "/plans/"],
|
],
|
||||||
"billing": ["Billing", "/billing/"],
|
"integrations": ['<i class="fa fa-github"></i> Integrations', "/integrations/"],
|
||||||
"keyboard-shortcuts": ["Keyboard shortcuts (?)", "/#keyboard-shortcuts"],
|
"stats": ['<i class="fa fa-bar-chart"></i> Usage statistics', "/stats"],
|
||||||
"message-formatting": ["Message formatting", "/#message-formatting"],
|
"plans": ['<i class="fa fa-rocket"></i> Plans and pricing', "/plans/"],
|
||||||
"search-filters": ["Search filters", "/#search-operators"],
|
"billing": ['<i class="fa fa-credit-card"></i> Billing', "/billing/"],
|
||||||
|
"keyboard-shortcuts": [
|
||||||
|
'<i class="fa fa-keyboard-o"></i> Keyboard shortcuts (?)',
|
||||||
|
"/#keyboard-shortcuts",
|
||||||
|
],
|
||||||
|
"message-formatting": [
|
||||||
|
'<i class="fa fa-pencil"></i> Message formatting',
|
||||||
|
"/#message-formatting",
|
||||||
|
],
|
||||||
|
"search-filters": ['<i class="fa fa-search"></i> Search filters', "/#search-operators"],
|
||||||
"about-zulip": ["About Zulip", "/#about-zulip"],
|
"about-zulip": ["About Zulip", "/#about-zulip"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -388,13 +388,18 @@ class HelpTest(ZulipTestCase):
|
||||||
|
|
||||||
def test_help_relative_links_for_gear(self) -> None:
|
def test_help_relative_links_for_gear(self) -> None:
|
||||||
result = self.client_get("/help/analytics")
|
result = self.client_get("/help/analytics")
|
||||||
self.assertIn('<a href="/stats">Usage statistics</a>', str(result.content))
|
self.assertIn(
|
||||||
|
'<a href="/stats"><i class="fa fa-bar-chart"></i> Usage statistics</a>',
|
||||||
|
str(result.content),
|
||||||
|
)
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
|
|
||||||
with self.settings(ROOT_DOMAIN_LANDING_PAGE=True):
|
with self.settings(ROOT_DOMAIN_LANDING_PAGE=True):
|
||||||
result = self.client_get("/help/analytics", subdomain="")
|
result = self.client_get("/help/analytics", subdomain="")
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
self.assertIn("<strong>Usage statistics</strong>", str(result.content))
|
self.assertIn(
|
||||||
|
'<strong><i class="fa fa-bar-chart"></i> Usage statistics</strong>', str(result.content)
|
||||||
|
)
|
||||||
self.assertNotIn("/stats", str(result.content))
|
self.assertNotIn("/stats", str(result.content))
|
||||||
|
|
||||||
def test_help_relative_links_for_stream(self) -> None:
|
def test_help_relative_links_for_stream(self) -> None:
|
||||||
|
|
Loading…
Reference in New Issue