123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- {% from 'macro/form.twig' import checked, selected %}
- {% macro check_popup(name, value) %}
- <label>
- <input type="checkbox" name="notifications_{{ name }}_popup" id="notifications_{{ name }}_popup"{{ checked(value in [
- constant('\\Gazelle\\Manager\\Notification::OPT_POPUP'),
- constant('\\Gazelle\\Manager\\Notification::OPT_POPUP_PUSH'),
- ]) }} /> Pop-up
- </label>
- {% endmacro %}
- {% macro check_push(name, value) %}
- <label>
- <input type="checkbox" name="notifications_{{ name }}_push" id="notifications_{{ name }}_push"{{ checked(value in [
- constant('\\Gazelle\\Manager\\Notification::OPT_PUSH'),
- constant('\\Gazelle\\Manager\\Notification::OPT_POPUP_PUSH'),
- constant('\\Gazelle\\Manager\\Notification::OPT_TRADITIONAL_PUSH'),
- ]) }} /> Push
- </label>
- {% endmacro %}
- {% macro check_trad(name, value) %}
- <label>
- <input type="checkbox" name="notifications_{{ name }}_traditional" id="notifications_{{ name }}_traditional"{{ checked(value in [
- constant('\\Gazelle\\Manager\\Notification::OPT_TRADITIONAL'),
- constant('\\Gazelle\\Manager\\Notification::OPT_TRADITIONAL_PUSH'),
- ]) }} /> Traditional
- </label>
- {% endmacro %}
-
- <table cellpadding="6" cellspacing="1" border="0" width="100%" class="layout border user_options" id="notification_settings">
- <tr class="colhead_dark">
- <td colspan="2">
- <strong>Notification Settings</strong>
- </td>
- </tr>
- <tr id="notif_autosubscribe_tr">
- <td class="label tooltip" title="Enabling this will automatically subscribe you to any thread you post in.">
- <strong>Automatic thread subscriptions</strong>
- </td>
- <td>
- <input type="checkbox" name="autosubscribe" id="autosubscribe"{{ checked(notify.autosub) }} />
- <label for="autosubscribe">Enable automatic thread subscriptions</label>
- </td>
- </tr>
- <tr id="notif_notifyondeleteseeding_tr">
- <td class="label tooltip" title="Enabling this will send you a PM alert whenever a torrent you're seeding is deleted.">
- <strong>Deleted seeding torrent alerts</strong>
- </td>
- <td>
- <input type="checkbox" name="notifyondeleteseeding" id="notifyondeleteseeding"{{ checked(notify.seeded) }} />
- <label for="notifyondeleteseeding">Enable PM notification for deleted seeding torrents</label>
- </td>
- </tr>
- <tr id="notif_notifyondeletesnatched_tr">
- <td class="label tooltip" title="Enabling this will send you a PM alert whenever a torrent you've snatched is deleted.">
- <strong>Deleted snatched torrent alerts</strong>
- </td>
- <td>
- <input type="checkbox" name="notifyondeletesnatched" id="notifyondeletesnatched"{{ checked(notify.snatched) }} />
- <label for="notifyondeletesnatched">Enable PM notification for deleted snatched torrents</label>
- </td>
- </tr>
- <tr id="notif_notifyondeletedownloaded_tr">
- <td class="label tooltip" title="Enabling this will send you a PM alert whenever a torrent you've downloaded is deleted.">
- <strong>Deleted downloaded torrent alerts</strong>
- </td>
- <td>
- <input type="checkbox" name="notifyondeletedownloaded" id="notifyondeletedownloaded"{{ checked(notify.downloaded) }} />
- <label for="notifyondeletedownloaded">Enable PM notification for deleted downloaded torrents</label>
- </td>
- </tr>
- <tr id="notif_unseeded_tr">
- <td class="label tooltip" title="Enabling this will send you a PM alert before your uploads are deleted for being unseeded.">
- <strong>Unseeded torrent alerts</strong>
- </td>
- <td>
- <input type="checkbox" name="unseededalerts" id="unseededalerts"{{ checked(notify.unseeded) }} />
- <label for="unseededalerts">Enable unseeded torrent alerts</label>
- </td>
- </tr>
-
- <tr>
- <td class="label"><strong>Push notifications</strong></td>
- <td>
- <select name="pushservice" id="pushservice">
- <option value="0"{{ selected(service is empty or service == 0) }}>No push notifications</option>
- <!-- RIP Notify My Android -->
- <option value="2"{{ selected(service == 2) }}>Prowl</option>
- <!-- RIP notifo -->
- <option value="4"{{ selected(service == 4) }}>Super Toasty</option>
- <option value="5"{{ selected(service == 5) }}>Pushover</option>
- <option value="6"{{ selected(service == 6) }}>PushBullet</option>
- </select>
- <div id="pushsettings" style="display: none;">
- <label id="pushservice_title" for="pushkey">API key</label>
- <input type="text" size="50" name="pushkey" id="pushkey" value="{{ option.PushKey }}" />
- <label class="pushdeviceid" id="pushservice_device" for="pushdevice">Device ID</label>
- <select class="pushdeviceid" name="pushdevice" id="pushdevice">
- <option value="{{ option.PushDevice }}" selected="selected">{{ option.PushDevice }}</option>
- </select>
- <br />
- <a href="user.php?action=take_push&push=1&userid={{ logged_user }}&auth={{ auth }}" class="brackets">Test push</a>
- <a href="wiki.php?action=article&id=113" class="brackets">View wiki guide</a>
- </div>
- </td>
- </tr>
-
- <tr>
- <td class="label">
- <strong>News announcements</strong>
- </td>
- <td>
- {{ _self.check_popup("News", settings.News) }}
- {{ _self.check_push("News", settings.News) }}
- </td>
- </tr>
- <tr>
- <td class="label">
- <strong>Blog announcements</strong>
- </td>
- <td>
- {{ _self.check_popup("Blog", settings.Blog) }}
- {{ _self.check_push("Blog", settings.Blog) }}
- </td>
- </tr>
- <tr>
- <td class="label">
- <strong>Inbox messages</strong>
- </td>
- <td>
- {{ _self.check_popup("Inbox", settings.Inbox) }}
- {{ _self.check_trad("Inbox", settings.Inbox) }}
- {{ _self.check_push("Inbox", settings.Inbox) }}
- </td>
- </tr>
- <tr>
- <td class="label tooltip" title="Enabling this will give you a notification when you receive a new private message from a member of {{ constant('SITE_NAME') }} staff.">
- <strong>Staff messages</strong>
- </td>
- <td>
- {{ _self.check_popup("StaffPM", settings.StaffPM) }}
- </td>
- </tr>
- <tr>
- <td class="label">
- <strong>Thread subscriptions</strong>
- </td>
- <td>
- {{ _self.check_popup("Subscriptions", settings.Subscriptions) }}
- </td>
- </tr>
- <tr>
- <td class="label tooltip" title="Enabling this will give you a notification whenever someone quotes you in the forums.">
- <strong>Quote notifications</strong>
- </td>
- <td>
- {{ _self.check_popup("Quotes", settings.Quotes) }}
- {{ _self.check_push("Quotes", settings.Quotes) }}
- </td>
- </tr>
- {% if torrent_notify %}
- <tr>
- <td class="label tooltip" title="Enabling this will give you a notification when the torrent notification filters you have established are triggered.">
- <strong>Torrent notifications</strong>
- </td>
- <td>
- {{ _self.check_popup("Torrents", settings.Torrents) }}
- {{ _self.check_trad("Torrents", settings.Torrents) }}
- </td>
- </tr>
- {% endif %}
- <tr>
- <td class="label tooltip" title="Enabling this will give you a notification when a torrent is added to a collage you are subscribed to.">
- <strong>Collage subscriptions</strong>
- </td>
- <td>
- {{ _self.check_popup("Collages", settings.Collages) }}
- </td>
- </tr>
- {% if request_notify %}
- {# TODO #}
- {% endif %}
- </table>
|