|
| 1 | +Use this template to customize the HTML email your admins will receive |
| 2 | +when a user submits a tool installation request. |
| 3 | +Copy the file to {{ templates_dir }}/mail/notifications/tool_request-email.html and modify as required. |
| 4 | + |
| 5 | +If you are adding URLs, remember that only absolute URLs (with |
| 6 | +a domain name) make sense in email! They can be served from any stable |
| 7 | +location, including your Galaxy server or GitHub. |
| 8 | + |
| 9 | +The following variables are available for inserting into the HTML with Jinja2 |
| 10 | +syntax, like {{ variable_name }}. They will be rendered into the text before |
| 11 | +the email is sent: |
| 12 | + |
| 13 | +- name The admin's name |
| 14 | +- user_email The admin's email |
| 15 | +- date Date and time of the notification |
| 16 | +- hostname Your galaxy's hostname (i.e. usegalaxy.* or the value in `server_name` from the galaxy config file) |
| 17 | +- contact_email Your galaxy's contact email |
| 18 | +- notification_settings_url The URL to the admin's notification settings to manage their subscriptions |
| 19 | +- variant The notification variant indicates the level of importance of the notification (i.e. info, warning, urgent) |
| 20 | +- content The tool_request payload |
| 21 | + - tool_name The name of the requested tool |
| 22 | + - tool_url Homepage or repository URL for the tool (optional) |
| 23 | + - description Description of the tool and its use case |
| 24 | + - scientific_domain Scientific domain (optional) |
| 25 | + - requested_version Requested version (optional) |
| 26 | + - conda_available Whether a Conda package is available (optional) |
| 27 | + - test_data_available Whether test data is available (optional) |
| 28 | + - requester_name The username of the requester |
| 29 | + - requester_email The email address of the requester |
| 30 | + - requester_affiliation The affiliation/lab of the requester (optional) |
| 31 | + - workflow_name Name of the workflow requiring these tools (optional) |
| 32 | + - tool_ids List of tool shed IDs for workflow install requests (optional) |
| 33 | +- galaxy_url The URL to the Galaxy instance (i.e. https://usegalaxy.*) |
| 34 | + |
| 35 | +Template begins here >>>>>> |
| 36 | +<!DOCTYPE html> |
| 37 | +<html lang="en" dir="ltr"> |
| 38 | + <head> |
| 39 | + <meta charset="utf-8"> |
| 40 | + <title>[Galaxy] Tool installation request: {{ content['tool_name'] }}</title> |
| 41 | + <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet"> |
| 42 | + </head> |
| 43 | + <body style="font-family: 'Roboto', sans-serif;"> |
| 44 | + |
| 45 | + <p style="font-size: 12pt;"> |
| 46 | + Hello {{ name }},<br><br> |
| 47 | + |
| 48 | + A user has submitted a request to install a new tool on <b>{{ hostname }}</b> on <b>{{ date }}</b>. |
| 49 | + </p> |
| 50 | + |
| 51 | + <table style="font-size: 12pt; border-collapse: collapse; width: 100%;"> |
| 52 | + <tr> |
| 53 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Tool name</td> |
| 54 | + <td style="padding: 4px 8px;">{{ content['tool_name'] }}</td> |
| 55 | + </tr> |
| 56 | + {% if content['tool_url'] %} |
| 57 | + <tr> |
| 58 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">URL</td> |
| 59 | + <td style="padding: 4px 8px;">{{ content['tool_url'] }}</td> |
| 60 | + </tr> |
| 61 | + {% endif %} |
| 62 | + <tr> |
| 63 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap; vertical-align: top;">Description</td> |
| 64 | + <td style="padding: 4px 8px;">{{ content['description'] }}</td> |
| 65 | + </tr> |
| 66 | + {% if content['scientific_domain'] %} |
| 67 | + <tr> |
| 68 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Scientific domain</td> |
| 69 | + <td style="padding: 4px 8px;">{{ content['scientific_domain'] }}</td> |
| 70 | + </tr> |
| 71 | + {% endif %} |
| 72 | + {% if content['requested_version'] %} |
| 73 | + <tr> |
| 74 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Requested version</td> |
| 75 | + <td style="padding: 4px 8px;">{{ content['requested_version'] }}</td> |
| 76 | + </tr> |
| 77 | + {% endif %} |
| 78 | + {% if content['conda_available'] is not none %} |
| 79 | + <tr> |
| 80 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Conda package available</td> |
| 81 | + <td style="padding: 4px 8px;">{{ "Yes" if content['conda_available'] else "No" }}</td> |
| 82 | + </tr> |
| 83 | + {% endif %} |
| 84 | + {% if content['test_data_available'] is not none %} |
| 85 | + <tr> |
| 86 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Test data available</td> |
| 87 | + <td style="padding: 4px 8px;">{{ "Yes" if content['test_data_available'] else "No" }}</td> |
| 88 | + </tr> |
| 89 | + {% endif %} |
| 90 | + {% if content['workflow_name'] %} |
| 91 | + <tr> |
| 92 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Workflow</td> |
| 93 | + <td style="padding: 4px 8px;">{{ content['workflow_name'] }}</td> |
| 94 | + </tr> |
| 95 | + {% endif %} |
| 96 | + <tr> |
| 97 | + <td style="padding: 4px 8px; font-weight: bold; white-space: nowrap;">Requested by</td> |
| 98 | + <td style="padding: 4px 8px;"> |
| 99 | + {{ content['requester_name'] }} |
| 100 | + {% if content['requester_affiliation'] %} ({{ content['requester_affiliation'] }}){% endif %} |
| 101 | + {% if content['requester_email'] %} — {{ content['requester_email'] }}{% endif %} |
| 102 | + </td> |
| 103 | + </tr> |
| 104 | + </table> |
| 105 | + |
| 106 | + <p style="font-size: 12pt;"> |
| 107 | + {% if galaxy_url %} |
| 108 | + You can review the notification in Galaxy: <a href="{{ galaxy_url }}/user/notifications">View notifications</a> |
| 109 | + {% endif %} |
| 110 | + </p> |
| 111 | + |
| 112 | + <p style="font-size: 12pt;"> |
| 113 | + Thank you for administering Galaxy! |
| 114 | + </p> |
| 115 | + |
| 116 | + <p style="font-size: 12pt;"> |
| 117 | + Regards,<br> |
| 118 | + Your Galaxy Team at <a href="{{ galaxy_url }}">{{ hostname }}</a> |
| 119 | + </p> |
| 120 | + |
| 121 | + <p style="font-size: 10pt;"> |
| 122 | + You received this email because you are an administrator of this Galaxy instance. |
| 123 | + {% if notification_settings_url %} |
| 124 | + You can manage your notification settings <a href="{{ notification_settings_url }}">here</a>. |
| 125 | + {% endif %} |
| 126 | + |
| 127 | + <br> |
| 128 | + |
| 129 | + {% if contact_email %} |
| 130 | + This is an automated email. If you have any questions or concerns, please do not reply to this email, instead, contact us at <a href="mailto:{{ contact_email }}">{{ contact_email }}</a>. |
| 131 | + {% endif %} |
| 132 | + </p> |
| 133 | + |
| 134 | + <img |
| 135 | + style="width: 130px; height: auto; margin: 15px 0;" |
| 136 | + src="https://galaxyproject.org/images/galaxy-logos/galaxy_project_logo_square.png" |
| 137 | + alt="Galaxy project logo" |
| 138 | + > |
| 139 | + |
| 140 | + <br> |
| 141 | + |
| 142 | + </body> |
| 143 | +</html> |
0 commit comments