-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from qld-gov-au/develop
Develop to master - fix email template and update tests
- Loading branch information
Showing
13 changed files
with
123 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
# Pass commands to Docker Compose v1 or v2 depending on what is present | ||
|
||
if (which docker-compose >/dev/null); then | ||
# Docker Compose v1 | ||
docker-compose $* | ||
elif (docker compose ls >/dev/null); then | ||
# Docker Compose v2 | ||
docker compose $* | ||
else | ||
# Docker Compose not found | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 10 additions & 12 deletions
22
ckanext/qgov/common/templates/activity_streams/activity_stream_email_notifications.text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
{%- set num = activities|length -%} | ||
{% set num = activities|length %}{{ ngettext("You have {num} new activity on your {site_title} dashboard", "You have {num} new activities on your {site_title} dashboard", num).format(site_title=g.site_title if g else site_title, num=num) }} {{ _('To view your dashboard, click on this link:') }} | ||
|
||
{{ ungettext("You have {num} new activity on your {site_title} dashboard", "You have {num} new activities on your {site_title} dashboard", num).format(site_title=g.site_title, num=num) }}: | ||
{% url_for 'activity.dashboard', _external=True %} | ||
|
||
{% for activity in activities -%} | ||
{%- set data = activity['data'] if activity['data'] else None -%} | ||
{%- set activity_type = activity['activity_type'] if activity['activity_type'] else None -%} | ||
{%- set id = activity['object_id'] -%} | ||
{%- if data -%} | ||
{%- if data['package'] -%} | ||
{%- set id = data['package']['name'] -%} | ||
{%- set action = 'dataset_read' -%} | ||
{%- set name = data['package']['title'] -%} | ||
{%- set action = 'dataset.read' -%} | ||
{%- elif data['group'] -%} | ||
{%- set id = data['group']['name'] -%} | ||
{%- set action = 'organization_read' if data['group']['is_organization'] else 'group_read' -%} | ||
{%- set name = data['group']['title'] -%} | ||
{%- set action = 'organization.read' if activity_type == 'changed organization' else 'group.read' -%} | ||
{%- endif -%} | ||
{%- endif -%} | ||
{% if action and id %}{{ h.url_for(action, id=id, _external=True) }}{% if activity_type %} ({{ h.activity_type_nice(activity_type)|capitalize }}){% endif %}{% endif %} | ||
{% if action and id %}{{name}} {% if activity_type %}({{ (activity_type|replace('organization', _('organization'))|replace('package', 'dataset')|capitalize).split()|reverse|join(' ') }}){% endif %} {% url_for action, id=id, _external=True %}{% endif %} | ||
{% endfor %} | ||
{{ _('To view your dashboard, click on this link:') }} | ||
|
||
{{ g.site_url + '/dashboard' }} | ||
{{ _('You can turn off these email notifications in your {site_title} preferences. To change your preferences, click on this link:').format(site_title=g.site_title if g else site_title) }} | ||
|
||
{{ _('You can turn off these email notifications in your {site_title} preferences. To change your preferences, click on this link:').format(site_title=g.site_title) }} | ||
|
||
{{ g.site_url + '/user/edit' }} | ||
{% url_for 'user.edit', _external=True %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.