Now that this page redirects to upstream, make our own links
to it point directly upstream. This saves a redirect, and
makes it more transparent where the link points if the user
examines it before following.
The settings dropdown was marked as having the "menu" ARIA role,
but contained no items with the "menuitem" role. I assigned this
role to the focusable link elements, and gave the intervening "li"
elements (and other "li" elements used as separators and such)
the "presentation" role to allow those to be gracefully ignored
when appropriate. Some of the links previously had the "button"
role, which I think was a holdover from a previous UI layout.
Fixes#5000.
This better sets expectatations for the fact that in Zulip, the
Organization settings UI is available read-only to non-administrator
users.
Tweaked by tabbott to update some additional references.
If you develop with Firefox, before this commit, you would
get jQuery warnings about empty selectors every time you clicked
in the app, due to a glitch with our old version of bootstrap.js.
This commit makes the error go away by setting
`data-toggle` to 'nada' for the settings-dropdown
element.
This was the error:
Empty string passed to getElementById().
More details here:
https://github.com/twbs/bootstrap/issues/5566
Previously, this would create a weird blue banner across the top of
the gear menu.
We can't remove it, since it’s required for the gear menu navigation.
Description edited by tabbott.
This is a major change to the /#subscriptions page, converting it to
by a side-by-side list of streams and their settings in an overlay.
There are no new features added/removed, but it's a huge changeset,
because it replaces the old navigation logic and moves the stream
creation modal to appear in the right side of this overlay.
Also changes all links to /integrations to be relative rather than
absolute, so that users will primarily access the /integrations page
for their subdomain.
The policy here is essentially:
* Pages on the central server (documentation, etc.) are server_uri.
* Pages associated with a user's realm server (anything logged-in, plus
things like their login page) are realm_uri.
Changes relative path to an absolute path (that doesn't contain the
subdomain) for various links to
/create_realm, /api, /apps, /integrations, /hello, /terms, and the logged
out / (the Zulip in the upper left corner of portico)
I typically left links internal to the relevant pages (e.g. a link from
integrations.html to a subpage of integrations/) as relative links, and
changed external links from within the app to the absolute path (e.g. the
link to integrations from the gear menu).
In order to genericize use of Zulip outside companies,
all instances of coworkers have been changed to users.
NOTABLE EXCEPTION: When the Zulip instance is domain-
locked, the reference to coworkers remains. The reason
for this is twofold: first, the majority of Zulip instances
which require a particular domain will be locked to a
company, and second, the template variable for the domain
necessary should be added to the alert so it is clear
to the user what the domain needs to be for access.
Fixes: #861.
This results in a substantial performance improvement for all of
Zulip's backend templates.
Changes in templates:
- Change `block.super` to `super()`.
- Remove `load` tag because Jinja2 doesn't support it.
- Use `minified_js()|safe` instead of `{% minified_js %}`.
- Use `compressed_css()|safe` instead of `{% compressed_css %}`.
- `forloop.first` -> `loop.first`.
- Use `{{ csrf_input }}` instead of `{% csrf_token %}`.
- Use `{# ... #}` instead of `{% comment %}`.
- Use `url()` instead of `{% url %}`.
- Use `_()` instead of `{% trans %}` because in Jinja `trans` is a block tag.
- Use `{% trans %}` instead of `{% blocktrans %}`.
- Use `{% raw %}` instead of `{% verbatim %}`.
Changes in tools:
- Check for `trans` block in `check-templates` instead of `blocktrans`
Changes in backend:
- Create custom `render_to_response` function which takes `request` objects
instead of `RequestContext` object. There are two reasons to do this:
1. `RequestContext` is not compatible with Jinja2
2. `RequestContext` in `render_to_response` is deprecated.
- Add Jinja2 related support files in zproject/jinja2 directory. It
includes a custom backend and a template renderer, compressors for js
and css and Jinja2 environment handler.
- Enable `slugify` and `pluralize` filters in Jinja2 environment.
Fixes#620.
In order to enable internationalization support in Zulip, and to use
Django internationalization tools, all strings in Zulip frontend needs
to be marked for translation.
Known issues:
* No support for whitelabeling in the email
* No whitelabeling for any externally-visible branding
(imported from commit 9eab7b0744e56a87007b8621a8bb18bbb1080256)
Also:
* Change fixed element positioning and fix bugs
* Move settings dropdown back to the right and add left padding to left sidebar
(imported from commit fcf903b59617687f94618a01ce7544b69f408130)
Always render the Administration menu item from the back end, but
make it be hidden by default until the page is loaded. Then, the
client can un-hide it as needed.
(imported from commit 66e607eec430d7179b4d5ac3f5416f5be8ac26c9)
UserProfile.show_admin was intended to be a check for users that have
administrative rights in other realms, which we've harmlessly but
erroneously been using to check if they are an admin in their realm.
Use the more straightforward check instead, with a more intuitive
name.
(imported from commit d81050c7dbbb19e59c5e31750be303a4630e1456)
To help reduce visual clutter.
From our observations this is almost never used, and there are many
more intuitive ways to get back to your messages.
(imported from commit 01448ec2f28b88c3b1674b6a9e02d56f47a23fdf)
It makes bootstrap look up the href as a DOM element, which caused
a browser error because the path is not a CSS selector.
(imported from commit 196a5983ae6a31716b14ae577239fe7ab1416226)