Commit Graph

259 Commits

Author SHA1 Message Date
Vishnu Ks 0960e654ab emails: Tag notify_new_login email for translation. 2018-12-19 09:21:09 -08:00
Vishnu Ks 78fea79c06 emails: Simplify new_login device info section. 2018-12-19 09:21:09 -08:00
Tim Abbott b29d66f34b i18n: Rename email subject files so i18n detects them.
Apparently, when we renamed these files to no longer have a .txt
extension, we accidentally removed them from the set of strings for
translation, because `manage.py makemessages` by default only
processes .txt and .html files under the templates/ directory.

Fix this by adding a .txt extension.
2018-12-17 10:00:49 -08:00
Vishnu Ks 6de6b0ed31 emails: Extract CSS to email.css in digest.html. 2018-12-03 17:43:53 -08:00
Vishnu Ks f3033207b9 emails: Cover all LDAP cases when emailing login details.
This provides a nice user experience for folks where we do know what
their LDAP credentials are.

Though we need to fix #10917 before the content in the email with be
correct.
2018-11-29 12:14:22 -08:00
Raymond Akornor d00b889402 auth: Add an organization reactivation flow with admin confirmation.
This adds a web flow and management command for reactivating a Zulip
organization, with confirmation from one of the organization
administrators.

Further work is needed to make the emails nicer (ideally, we'd send
one email with all the admins on the `To` line, but the `send_email`
library doesn't support that).

Fixes #10783.

With significant tweaks to the email text by tabbott.
2018-11-27 10:58:34 -08:00
Vishnu Ks 3258ce1fa4 emails: Cleanup followup day1 email. 2018-11-19 11:16:36 -08:00
Roger Souza 6179bba2bd emails: Add one-click unsubscribe link to new login emails.
Fixes: #10547.
2018-11-08 14:39:33 -08:00
Cynthia Lin 5869cc3b6d emails: Convert hex values to HSL values. 2018-10-16 13:14:19 -07:00
Akash Nimare 85a002ba9a login-email: Update the content of new email login message.
This PR adds the reset password link in the new login email since
users may want to reset their password in case of some unusual
account activity.
2018-09-28 14:34:04 -07:00
Shubham Dhama e70cf3bd67 emails/password_reset: Change text for listing other active accounts.
The main benefit of this change is that it reduces the amount of total
string that we might need to tag for translation.

Fixes: #10323.
2018-08-22 17:49:40 -07:00
Shubham Dhama aa8b3d2beb emails/password_reset: Change template string for deactivated users. 2018-08-22 17:43:23 -07:00
Shubham Dhama 491bd6d2c9 emails/password_reset: Refactor and replace no_account_in_realm.
In place of no_account_in_realm we will use its negation
active_account_in_realm as a part of refactoring this template.
2018-08-22 17:43:23 -07:00
Shubham Dhama 3fecc71777 emails/password_reset: Make `.txt` template consistent with `.html`. 2018-08-22 17:43:23 -07:00
Shubham Dhama 941cd0bb2f emails/password_reset: Fix multiple accounts realm uri listing. 2018-08-22 17:43:23 -07:00
Shubham Dhama 2dec30e4ab forms: Fix accounts listed in password_reset email to active accounts.
Previously we were listing both accounts, active as well as non-active.
Fixes: #10130.
2018-08-04 09:16:19 -07:00
Anupam Dagar c47e71abe0 emails: Fix preheader coming up inside email.
This makes the preheader correctly invisible inside the email.
2018-07-27 10:36:13 -07:00
Aditya Bansal 5190f4c51a stylesheets: Fix coding style to comply with stylistic rules. 2018-07-27 00:15:58 -07:00
Aditya Bansal fa3a337f37 stylelint: Fix css stylistic violations in various scss stylesheets. 2018-07-25 14:58:25 -07:00
Sarah 73f5be65e8 zerver/lib/notifications: Add stream email notifications.
This modifies the logic for formatting outgoing missed-message emails
to support the upcoming stream email notifications feature (providing
a new format for the subject, etc.).
2018-07-14 12:19:33 +05:30
Tim Abbott dabf3667d1 notifications: Eliminate unnecessary at_mention context variable.
we already had a variable "mention" that did the exact same thing.
2018-07-14 12:19:33 +05:30
Tim Abbott 7e3c4deeac emails: Use direct links to notification settings.
Now that we support such direct links, we should be using them where
necessary in our emails.
2018-07-12 13:39:14 +05:30
Anupam Dagar a1a36e7971 emails: Add preheader to "new login" emails.
This makes it easier to see what the new login was about in the previews.

Fixes: #9866.
2018-07-05 12:44:54 +02:00
Tim Abbott 7d57e2554f emails: Fix awkward "Zulip Team" invitations signature block.
These should have had the "The" at the start.
2018-05-26 07:38:14 -07:00
Tim Abbott 29ed55b253 followup_day1: Emphasize the Organization URL more strongly. 2018-05-26 07:35:26 -07:00
Yago González 2daf6c92f0 i18n: Tag followup_day1 templates for translation. 2018-05-26 07:32:33 -07:00
Yago González b4084d30d2 emails: Move user role logic for followup_day1 to notifications.py. 2018-05-26 07:29:58 -07:00
Vishnu Ks b72874226f enails: Pass new login details as separate variables.
Refactored by tabbott to eliminate some unnecessary complexity.
2018-04-30 12:03:10 -07:00
Vishnu Ks 363d17f2bb emails: Add translation tags to notify_change_in_email. 2018-05-01 00:11:44 +05:30
Vishnu Ks 69b0783b35 emails: Pass realm_name instead of realm in notify_change_in_email context. 2018-05-01 00:11:44 +05:30
Tim Abbott a77c61e8c1 invitation: Fix styling of Cheers message. 2018-04-27 12:05:50 -07:00
Vishnu Ks f140b0e870 emails: Add translation tags to invitation. 2018-04-27 11:59:36 -07:00
Vishnu Ks 185811f436 emails: Add translation tags to find_team. 2018-04-27 11:59:36 -07:00
Vishnu Ks 1a34cd919c emails: Add translation tags to invitation_reminder. 2018-04-27 11:59:36 -07:00
Vishnu Ks 078dac9496 emails: Add translation tags to confirm_registration. 2018-04-27 11:59:36 -07:00
Vishnu Ks e3314be114 emails: Add translation tags to confirm_new_email. 2018-04-27 11:59:36 -07:00
Rishi Gupta 718a87bd47 emails: Update followup_day1. 2018-04-25 08:52:29 -07:00
Aditya Bansal b9f1acb300 linter: Enforce 2 space indents on tags spread over multiple lines.
We make some specific cases of tags use 2 space indents.
The case description:
* A tag with opening tag spread over multiple lines and closing tag
on the same line as of the closing angle bracket of the opening tag.
* A tag with opening tag spread over multiple lines and closing tag
not on the same line as of the closing angle bracket of the opening
tag.

Example:
Case 1:

Not linted:
<button type="button"
class="btn btn-primary btn-small">{{t "Yes" }}</button>

After linting:
<button type="button"
  class="btn btn-primary btn-small">{{t "Yes" }}</button>

Case 2:

Before linting:
<div class = "foo"
     id = "bar"
     role = "whatever">
     {{ bla }}
</div>

After linting:
<div class = "foo"
  id = "bar"
  role = "whatever">
    {{ bla }}
</div>
2018-04-07 20:08:44 -07:00
Tim Abbott dfbe1e4914 notifications: Improve "why you were away" content lines.
We now include whether the message was a private or group private
message; this is particularly important with the new setting to
disable including any message content in these emails (since in that
case, one doesn't know anything about the message types).
2018-03-09 21:16:02 -08:00
YJDave c94b21e9ac settings: Add setting to disable message content in missed message emails.
Fixes #6938.
2018-03-09 21:16:02 -08:00
Vishnu Ks cbadecb466 emails: Replace signing in with logging in.
Fixes #7884
2018-03-09 13:31:36 -08:00
Aditya Bansal 6fce1d7834 template_parser: Add parsing support for self closing tags as per HTML5.
In this commit we add support for some tags which are also called
void-elements according to
http://w3c.github.io/html/syntax.html#void-elements to be parsed by
our template parser and get tagged as singleton_html_tags.

Fixes: #8387.
2018-02-15 17:47:43 -05:00
Rishi Gupta e62d9742aa emails: Fix notify_new_login emails have unserializable context.
Regression introduced in e0f30d0 (PR #7569).
2017-12-22 16:34:18 -05:00
Shreyansh Dwivedi 47fcb27e39 invitations: Remove custom_body.
Fixes #7672
2017-12-11 19:23:54 -08:00
Vishnu Ks 610eb557b8 backend: Make password reset form support multi realm membership. 2017-11-26 15:35:25 -08:00
Vishnu Ks 9c50819dd6 email: Add reset button to password reset email. 2017-11-20 10:35:03 -08:00
Umair Khan 95ba3e7cbb password_reset: Send email unconditionally.
This was basically rewritten by tabbott, because the code is a lot
cleaner after just rewriting the ZulipPasswordResetForm code to no
longer copy the model of the original Django version.

Fixes #4733.
2017-11-20 10:32:40 -08:00
Steve Howell ba51078418 Simplify CSS linter and clean up CSS.
The CSS linter was pretty hard to reason about.  It was
pretty flexible about certain things, but then it would
prevent seemingly innocuous code from getting checked in.

This commit overhauls the pretty-printer to be more composable,
where every object in the AST knows how to render itself.  It
also cleans up a little bit of the pre_fluff/post_fluff logic
in the parser itself, so comments are more likely to be "attached"
to the AST node that make sense.

The linter is actually a bit more finicky about newlines, but
this is mostly a good thing, as most of the variations before
this commit were pretty arbitrary.
2017-11-13 12:43:43 -08:00
Rishi Gupta e7ba4c5168 emails: Send first welcome email right away.
I think an hour after signup is not the right time to try to get someone to
re-engage with a product.

This also makes the day1 email clearly a transactional email both in
experiencing the product and in the eyes of various anti-spam laws, and
allows us to remove the unsubscribe link.
2017-10-19 00:04:07 -07:00
Rishi Gupta a08543f1ce server settings: Add setting for MAILING_ADDRESS.
The rules here are fuzzy, and it's quite possible none of Zulip's emails
need an address at all. Every country has its own rules though, which makes
it hard to tell. In general, transactional emails do not need an address,
and marketing emails do.
2017-10-19 00:04:07 -07:00
Brock Whittaker cd3518377a emails: Change "Server" and "Account" to render links.
This changes the "Server" and "Account" attributes in the info log
to render links so that they are guaranteed to have our styling
and behavior across all email clients.
2017-10-04 15:07:13 -07:00
Brock Whittaker e8b127916a emails: Override default button styling.
Some email services will provide default styling for things like
buttons, and in this case the site created a style that had a
`background` attribute that overrode our `background-color` attribute
because of CSS importance heirarchy. This swiches us to use
`background` as well.

This also forces no `text-shadow` on buttons.

Fixes: #6775.
2017-10-02 17:58:30 -07:00
Tim Abbott 28eaf5620e emails: Use common_context for email change notifications.
This also lets us remove `realm_uri`.
2017-09-27 16:48:18 -07:00
Vishnu Ks dfaa939af2 emails: Store the compiled emails in separate directory. 2017-09-27 16:48:18 -07:00
Vishnu Ks caaa90f22d emails: Extract CSS from email_base_default. 2017-09-27 16:48:18 -07:00
Vaida Plankyte 207e06d558 frontend: Add header & body illustrations to emails. 2017-09-27 16:32:43 -07:00
Vaida Plankyte 6222a487ec frontend: Add buttons to emails. 2017-09-27 16:16:43 -07:00
Vaida Plankyte 0993617214 frontend: Add new style to emails. 2017-09-27 16:16:43 -07:00
Vaida Plankyte cb7353a3b5 frontend: Remove inline color assignments in emails. 2017-09-27 16:16:43 -07:00
Harshit Bansal 4e8e7348da notifications: Fix the ugly inactive scrollbar in missed message emails.
Not sure why we have `overflow-y: scroll` in `messages` container in
missed messages email template when it is not a fixed width container
but anyway changing it to `overflow-y: auto` seems to be a safe change
as it will remove the ugly looking inactive scrollbar that was being
displayed there besides the `messages` container without changing the
functionality(if any).
2017-09-20 10:30:35 -07:00
Rishi Gupta c1997e759c password_reset: Change email to be appropriate for obtaining first password.
The situation if, for instance, the user signed up via google auth, and now
needs a password to get their API key.
2017-08-28 20:39:53 -07:00
Rishi Gupta d296f29fa7 emails: Link to organization getting started guide in followup_day1. 2017-08-22 14:26:17 -07:00
Rishi Gupta 4a74399514 emails: Update followup_day2 with better topic advice.
These topics also better match the new followup_day2 email illustrations.
2017-08-22 14:26:17 -07:00
Tim Abbott 3425d83f52 twitter: Update links to point to our new Twitter username. 2017-08-01 17:13:33 -07:00
James Rowan 21b5536353 emails: Update subject lines of emails. 2017-07-14 15:20:04 -07:00
James Rowan 59b5a2f862 emails: Rewrite the day 1 followup email. 2017-07-13 20:51:54 -07:00
Rishi Gupta f0ed556730 emails: Remove comments from tops of email templates.
The comments are not very helpful, in some cases incorrect, and make
skimming the template harder.
2017-07-13 19:17:53 -07:00
Rishi Gupta d8eaae278d emails: Update text of emails.
Partial update; likely more to be done.
2017-07-13 19:17:53 -07:00
James Rowan 71bc40d829 emails: Update subject for invitation emails. 2017-07-13 18:47:21 -07:00
James Rowan 88b8d98d34 emails: Update subject for missed message emails. 2017-07-13 18:47:17 -07:00
James Rowan 9bd1b0ba58 emails: Update subject for digest emails. 2017-07-13 18:47:02 -07:00
James Rowan dc9a41c543 emails: Add preheader content to missed message emails. 2017-07-06 15:46:03 -07:00
Rishi Gupta c827c7840d lint: Re-indent digest.html and missed_message.html. 2017-07-06 15:46:03 -07:00
James Rowan 0d76da27b4 emails: Add base template for missed message and digest emails.
Also removes the files from lint, so that the new indentation doesn't
obscure the change. The files are reindented in the next commit.
2017-07-06 15:46:03 -07:00
Rishi Gupta e04bf3273c emails: Rename email_base.html to email_base_default.html.
About to add another template for digest and missed message emails. Another
natural name would be email_base_transactional, but the followup_day{1,2}
emails aren't really transactional.
2017-07-06 15:46:03 -07:00
Vaida Plankyte 0d8720fe0c missed_message.txt: Use the singular 'they' pronoun. 2017-07-05 09:27:43 -07:00
Vaida Plankyte b68ba0a13e missed_message.html: Use the singular 'they' pronoun. 2017-07-05 11:34:45 +02:00
James Rowan 1ea9a23f95 emails: Fix two grammar nits. 2017-07-04 13:57:54 -07:00
James Rowan 19ffb84ac2 Make notification email for new login give browser and os.
notify_new_login.subject: include browser and os in subject line.
test_new_users: test for subject line to include browser/os.
2017-06-21 14:36:41 -04:00
Aditya Bansal 9cc3e8cf62 followup_day2.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 39a88019f8 followup_day1.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 9a0edad604 find_team.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal d4e827c618 email_base.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 9fc16888ca digest.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal fa28dcd008 invitation_reminder.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 07e7482228 confirm_registration.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal 1b82e90331 invitation.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Bansal e12bb65c0b confirm_new_email.html: Cleanup to use 4 space indentation. 2017-06-14 04:48:07 +05:30
Aditya Ramesh a77aa79da9 emails: Add html versions of emails that do not have them.
Fixes #4691.
2017-06-12 23:02:28 -07:00
Rishi Gupta 9a02739008 emails: Remove invitation_mit. 2017-06-12 23:02:28 -07:00
Rishi Gupta 3332ebaf22 emails: Remove confirmation_registration_mit.
Not enough new Zephyr signups to justify the carrying cost :(.
2017-06-12 23:02:28 -07:00
Rishi Gupta 1d702d13a4 emails: Replace context variable zulip_support with support_email. 2017-06-10 01:35:03 -07:00
Rishi Gupta c3aa799192 emails: Remove verbose_support_offers conditional where unneccesary.
For almost all of these, the verbose support offer clause is almost the same
as the non-verbose version. The distinction carries extra carrying cost when
coming up with new copy, testing new email designs, etc.
2017-06-10 01:04:00 -07:00
Vaida Plankyte 114b080d01 emails: Add base template for html emails. 2017-06-09 23:34:24 -07:00
Rishi Gupta 9cba5573e6 emails: Remove Zulip logo and tagline from the top of emails.
We're about to add a new base html template that will provide formatting and
other embellishments, so this touch is no longer needed.
2017-06-09 23:34:24 -07:00
Rishi Gupta 7aa735294f emails: Remove unneeded safe tags from non-HTML email templates.
Reverts 7527ac9, and removes an additional |safe tag in
missed_messages.txt. These files are now rendered by a template engine
with autoescape=False.
2017-06-06 23:22:22 -07:00
Rishi Gupta 7527ac9a8c emails: Mark variables in non-HTML emails as HTML-safe.
Make sure 's, &s, and other characters are not HTML-escaped in subject
lines and plain-text emails.

Hack so that this isn't blocking the release of Zulip 1.6. A more robust way
to do this would be to have two different template Engines, one that renders
HTML, and one that doesn't.

Fixes #5088.
2017-06-03 16:04:06 -07:00
Umair Khan ad5780c03e lint: Mark alt argument for translation. 2017-05-26 15:28:46 -07:00
James Rowan 0facaa0797 Changes sender and subject lines for missed message emails.
Now, in the event of messages between two other members of a huddle,
the missed message emails are threaded in "Group PMs with name1 and
name2" and not in separate threads by sender.

Also, now the order of recipients in get_display_recipient consistent
with the order of names that appears in the list of personal messages
on the left sidebar.

Fixes most of #4553.
2017-05-12 13:29:43 -07:00
Rishi Gupta 0ce04556bf CSS: Change color of PMs from yellow to blue-grey. 2017-05-11 16:18:39 -07:00
Rishi Gupta 8321bd3f92 notifications: Refactor missed message queue to use send_email.
This commit also changes the sender from "Zulip <NOREPLY_EMAIL_ADDRESS>" to
NOREPLY_EMAIL_ADDRESS when it is not set explicitly.
2017-05-05 14:38:25 -07:00
Rishi Gupta 72ee5e5159 email: Make context for invitation_reminder template jsonable.
We are about to change send_future_email in a way that will require all
callers to use jsonable context.
2017-05-05 14:38:25 -07:00
Rishi Gupta 92dd76822f email: Move and rename password reset templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta c10d3114eb email: Move and rename followup_day* templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta 21a6377204 email: Move and rename find_team_email templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta ebfae36494 email: Move and rename digest_email templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta a1f0c1d6ac email: Move and rename new_login_alert templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta 26ac344b19 email: Move and rename invitation_reminder_email templates. 2017-05-03 23:26:14 -07:00
Rishi Gupta 21a2c7b9d9 email: Remove translation tags from email templates.
The only thing being translated in any email was the title of the Zulip
header image in the html file, probably because not doing so breaks a linter
rule.

he name "Zulip" doesn't make sense to translate anyway.
2017-05-03 23:25:33 -07:00
Rishi Gupta 975d5bd8c0 email: Move and rename notify_change_in_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta 4e779c3e6f email: Move and rename mituser_invite_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta 713303deff email: Move and rename invite_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta ed0c310aa3 email: Move and rename preregistrationuser_confirmation_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta aa21012783 email: Move and rename mituser_confirmation_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta 235abe0b72 email: Move and rename emailchangestatus_confirmation_email templates. 2017-05-03 20:54:40 -07:00
Rishi Gupta cafc60dd1d email: Move and rename missed_message_email templates.
All email templates are being moved to templates/zerver/emails.
2017-05-03 20:54:39 -07:00
Benjamin Gilbert a282cbb493 emails: Fix typo in spelling of "recognize". 2017-04-17 20:29:14 -07:00
Benjamin Gilbert 4775f55ca7 Fix spelling of "occurred" in various places. 2017-04-17 20:29:07 -07:00
hollywoodno 75d9630258 Add notifications on new logins to Zulip.
This adds helpful email notifications for users who just logged into a
Zulip server, as a security protection against accounts being hacked.

Text tweaked by tabbott.

Fixes #2182.
2017-03-25 16:50:52 -07:00
Tim Abbott 3b59e6c3cc subs: Rename /#subscriptions to /#streams.
Fixes #3653.
2017-03-08 16:57:58 -08:00
Tim Abbott 85fbdd6b2d emails: Remove old 'Keyboard Shortcuts' capitalization. 2017-02-10 15:18:41 -08:00
Rishi Gupta c2ca4cb1bb day2 email: Soften advice against using long topics.
In response to feedback that joining (and sending a first message to) a new
chat platform/org is already intimidating enough, and "Not Recommended" gets
the point across in a gentler way.
2017-01-12 15:04:51 -08:00
Rishi Gupta 0039689acb find team flow: Update text in emails and templates. 2017-01-06 10:42:28 -08:00
Rishi Gupta e481fef9e1 Move find_team_email subject to a templates/ file. 2017-01-06 10:42:28 -08:00
Rishi Gupta 7cb5d26999 Rename find_team_email_html.txt to find_team_email.html. 2017-01-06 10:42:28 -08:00
Rishi Gupta f5d5b2525c notifications.py: Change email template file endings from .text to .txt.
We use .txt for all other emails (i.e. ones that don't go through
notifications.py) in the codebase.
2017-01-06 10:42:28 -08:00
Rishi Gupta 8a07545afb Rename digest_email_txt.html to digest_email.html.
The .html file ending is clearer and more in line with our other
email files.
2017-01-06 10:42:28 -08:00
Rishi Gupta 416c8f3052 digest_email_html.txt: Fix html linter errors. 2017-01-06 10:42:28 -08:00
Rishi Gupta 8d038eef2f digest emails: Move the subject line to a templates/ file.
To match how we do the subject line for the emails in followup/ and
invitation/.
2017-01-06 10:42:28 -08:00
Umair Khan f208813ea3 Add Find My Team feature. 2017-01-03 21:33:42 -08:00
Tim Abbott 39f0ffdedd Move static/third/gemoji to static/generated/emoji.
Fixes #1153.
2016-12-27 20:16:23 -08:00
Umair Khan db5d86ab9e i18n: Title attribute should be translatable. 2016-12-15 13:44:13 -08:00
Rishi Gupta bba2465f89 Change links to /api to be relative or with {{ realm_uri }}. 2016-09-08 17:05:34 -07:00
Rishi Gupta 205fb996ec templates: Use realm_uri and server_uri settings for server URL.
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.
2016-08-13 16:37:45 -07:00
Rishi Gupta dff43fcc5e Change https:// to external_uri_scheme in templates.
Helps in case the development environment is not using https.
We get the value from zerver/context_processors.py (which is
ultimately reading it from settings)
2016-08-13 16:27:36 -07:00
Tim Abbott 7725c62892 Use VERBOSE_SUPPORT_OFFERS in day1 emails. 2016-07-19 15:28:41 -07:00
Tim Abbott 3ea4cbb5c3 settings: Extract settings.VERBOSE_SUPPORT_OFFERS. 2016-07-19 15:28:41 -07:00
Umair Khan 99b73c2728 digest emails: Fix typo in remaining_unread_pms_count.
This error likely caused this feature to never trigger.
2016-05-12 13:09:37 -07:00
Umair Khan dfc58b0ed0 Upgrade digest email templates to Jinja2.
Fixes: #780
2016-05-13 01:01:28 +05:00
Umair Khan 5359e6b0d4 Convert Zulip to use Jinja2 templates.
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.
2016-05-09 09:55:18 -07:00
Nicholas Bergson-Shilcock 89a2765553 Turn off desktop notifications by default for new users.
New users will no longer get desktop and audible notifications for all streams
by default.

This also updates the `day1` follow-up email to let users know they can
customize how and when Zulip notifies them of new messages.

Lastly, this adds a `changelog.md` file, following the conventions from
keepachangelog.com, to track changes for new releases.
2015-10-15 12:25:32 -04:00
David Roe 3f7cb34b00 enterprise => voyager
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
Waseem Daher 1016686397 Typo fix in day2 email.
(imported from commit bf36702c84ba545a64bf5c6531ce30fc23ef6ac7)
2014-01-30 07:57:52 -08:00
acrefoot c30f2bbe3e slightly stricter linting of html templates
(imported from commit 5bd0aa3c49d6ff95559a73bd5f134cc50ae98ce9)
2013-12-17 12:05:23 -05:00
Jessica McKellar 129d01e139 Remove stray typo in plaintext digest email template.
(imported from commit ccef927bd2e0fa5810a539c569785d4bdb640819)
2013-12-13 16:38:10 -05:00
Jessica McKellar 207cfc449d Add unsubscribe links to digest e-mails.
(imported from commit 4e2a324decf4bc694752cc24b9085361338a08a5)
2013-12-02 18:58:03 -05:00
Waseem Daher 89844c6ced Revise day1/day2 emails.
(imported from commit dc5e78cccb22b024be46b3066d44f09ea1b53345)
2013-12-02 11:15:13 -05:00
Jessica McKellar 8e72084fcb Add one-click unsubscribe links to day 1 and day 2 emails.
(imported from commit 9396f96365430baf894c708f9eaea642fc648435)
2013-11-27 09:29:59 -05:00
acrefoot fd4565dd67 modify day1 emails to point to new /hello location
(imported from commit e22936378eb1a8c541c4af274e6e6491cca8d313)
2013-11-22 13:50:24 -05:00
acrefoot 5d14105d1f /hello is sacred, even on Zulip Enterprise
I broke Zulip Enterprise because I tried to make the /hello link in our day1 email
point to the local server (EXTERNAL_HOST).

(imported from commit 70262b34474ae292ecf9cfe59bebc3c7de904926)
2013-11-15 22:34:24 -05:00