MantisBT-Discord – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | <?php |
3 | office | 2 | |
1 | office | 3 | /** |
4 | * Discord Integration |
||
2 | office | 5 | * Copyright (C) 2014 Karim Ratib (karim.ratib@gmail.com) |
1 | office | 6 | * |
7 | * Discord Integration is free software; you can redistribute it and/or |
||
8 | * modify it under the terms of the GNU General Public License 2 |
||
9 | * as published by the Free Software Foundation. |
||
10 | * |
||
11 | * Discord Integration is distributed in the hope that it will be useful, |
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
14 | * GNU General Public License for more details. |
||
15 | * |
||
16 | * You should have received a copy of the GNU General Public License |
||
17 | * along with Discord Integration; if not, write to the Free Software |
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
||
19 | * or see http://www.gnu.org/licenses/. |
||
20 | */ |
||
21 | |||
3 | office | 22 | auth_reauthenticate(); |
23 | access_ensure_global_level(config_get('manage_plugin_threshold')); |
||
1 | office | 24 | |
3 | office | 25 | html_page_top(plugin_lang_get('title')); |
1 | office | 26 | |
3 | office | 27 | print_manage_menu(); |
1 | office | 28 | |
2 | office | 29 | ?> |
1 | office | 30 | |
2 | office | 31 | <br /> |
1 | office | 32 | |
3 | office | 33 | <form action="<?php echo plugin_page('config_edit') ?>" method="post"> |
34 | <?php echo form_security_field('plugin_Discord_config_edit') ?> |
||
35 | <table class="width75" cellspacing="1"> |
||
2 | office | 36 | |
37 | <tr> |
||
38 | <td class="form-title" colspan="3"> |
||
3 | office | 39 | <?php echo plugin_lang_get('title') . ' : ' . plugin_lang_get('config') ?> |
2 | office | 40 | </td> |
41 | </tr> |
||
42 | |||
3 | office | 43 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 44 | <td class="category"> |
3 | office | 45 | <?php echo plugin_lang_get('url_webhook') ?> |
2 | office | 46 | </td> |
3 | office | 47 | <td colspan="2"> |
48 | <input size="80" type="text" name="url_webhook" value="<?php echo plugin_config_get('url_webhook') ?>" /> |
||
2 | office | 49 | </td> |
50 | </tr> |
||
51 | |||
3 | office | 52 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 53 | <td class="category"> |
3 | office | 54 | <?php echo plugin_lang_get('url_webhooks') ?> |
2 | office | 55 | </td> |
3 | office | 56 | <td colspan="2"> |
2 | office | 57 | <p> |
58 | Specifies the mapping between Mantis project names and Discord webhooks. |
||
59 | </p> |
||
60 | <p> |
||
61 | Option name is <strong>plugin_Discord_url_webhooks</strong> and is an array of 'Mantis project name' => 'Discord webhook'. |
||
62 | Array options must be set using the <a href="adm_config_report.php">Configuration Report</a> screen. |
||
3 | office | 63 | The current value of this option is: |
64 | <pre><?php var_export(plugin_config_get('url_webhooks')) ?></pre> |
||
2 | office | 65 | </p> |
66 | </td> |
||
67 | </tr> |
||
3 | office | 68 | |
2 | office | 69 | <!-- |
3 | office | 70 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 71 | <td class="category"> |
3 | office | 72 | <?php echo plugin_lang_get('bot_name') ?> |
2 | office | 73 | </td> |
74 | <td colspan="2"> |
||
3 | office | 75 | <input type="text" name="bot_name" value="<?php echo plugin_config_get('bot_name') ?>" /> |
2 | office | 76 | </td> |
77 | </tr> |
||
78 | |||
3 | office | 79 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 80 | <td class="category"> |
3 | office | 81 | <?php echo plugin_lang_get('bot_icon') ?> |
2 | office | 82 | </td> |
83 | <td colspan="2"> |
||
84 | <p> |
||
85 | Can be either a URL pointing to small image or an emoji of the form :emoji:</br> |
||
86 | Defaults to the Mantis logo. |
||
87 | </p> |
||
3 | office | 88 | <input type="text" name="bot_icon" value="<?php echo plugin_config_get('bot_icon') ?>" /> |
2 | office | 89 | </td> |
90 | </tr> |
||
91 | --> |
||
92 | |||
3 | office | 93 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 94 | <td class="category"> |
3 | office | 95 | <?php echo plugin_lang_get('skip_bulk') ?> |
2 | office | 96 | </td> |
3 | office | 97 | <td colspan="2"> |
98 | <input type="checkbox" name="skip_bulk" <?php if (plugin_config_get('skip_bulk')) echo "checked"; ?> /> |
||
2 | office | 99 | </td> |
100 | </tr> |
||
101 | |||
3 | office | 102 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 103 | <td class="category"> |
3 | office | 104 | <?php echo plugin_lang_get('link_names') ?> |
2 | office | 105 | </td> |
3 | office | 106 | <td colspan="2"> |
107 | <input type="checkbox" name="link_names" <?php if (plugin_config_get('link_names')) echo "checked"; ?> /> |
||
2 | office | 108 | </td> |
109 | </tr> |
||
3 | office | 110 | |
2 | office | 111 | <!-- |
112 | |||
3 | office | 113 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 114 | <td class="category"> |
3 | office | 115 | <?php echo plugin_lang_get('default_channel') ?> |
2 | office | 116 | </td> |
117 | <td colspan="2"> |
||
3 | office | 118 | <input type="text" name="default_channel" value="<?php echo plugin_config_get('default_channel') ?>" /> |
2 | office | 119 | </td> |
120 | </tr> |
||
121 | |||
3 | office | 122 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 123 | <td class="category"> |
3 | office | 124 | <?php echo plugin_lang_get('channels') ?> |
2 | office | 125 | </td> |
126 | <td colspan="2"> |
||
127 | <p> |
||
128 | Specifies the mapping between Mantis project names and Discord #channels. |
||
129 | </p> |
||
130 | <p> |
||
131 | Option name is <strong>plugin_Discord_channels</strong> and is an array of 'Mantis project name' => 'Discord channel name'. |
||
132 | Array options must be set using the <a href="adm_config_report.php">Configuration Report</a> screen. |
||
3 | office | 133 | The current value of this option is:<pre><?php var_export(plugin_config_get('channels')) ?></pre> |
2 | office | 134 | </p> |
135 | </td> |
||
136 | </tr> |
||
137 | --> |
||
138 | |||
3 | office | 139 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 140 | <td class="category"> |
3 | office | 141 | <?php echo plugin_lang_get('columns') ?> |
2 | office | 142 | </td> |
3 | office | 143 | <td colspan="2"> |
2 | office | 144 | <p> |
145 | Specifies the bug fields that should be attached to the Discord notifications. |
||
146 | </p> |
||
147 | <p> |
||
148 | Option name is <strong>plugin_Discord_columns</strong> and is an array of bug column names. |
||
149 | Array options must be set using the <a href="adm_config_report.php">Configuration Report</a> screen. |
||
150 | <?php |
||
3 | office | 151 | $t_columns = columns_get_all($t_project_id); |
152 | $t_all = implode(', ', $t_columns); |
||
2 | office | 153 | ?> |
154 | Available column names are:<div><textarea name="all_columns" readonly="readonly" cols="80" rows="5"><?php echo $t_all ?></textarea></div> |
||
3 | office | 155 | The current value of this option is: |
156 | <pre><?php var_export(plugin_config_get('columns')) ?></pre> |
||
2 | office | 157 | </p> |
158 | </td> |
||
159 | </tr> |
||
160 | |||
3 | office | 161 | <tr <?php echo helper_alternate_class() ?>> |
2 | office | 162 | <td class="category"> |
3 | office | 163 | <?php echo plugin_lang_get('language') ?> |
2 | office | 164 | </td> |
3 | office | 165 | <td colspan="2"> |
166 | <input type="text" name="language" value="<?php echo plugin_config_get('language') ?>" /> |
||
2 | office | 167 | </td> |
168 | </tr> |
||
169 | |||
170 | <tr> |
||
171 | <td class="center" colspan="3"> |
||
3 | office | 172 | <input type="submit" class="button" value="<?php echo lang_get('change_configuration') ?>" /> |
2 | office | 173 | </td> |
174 | </tr> |
||
175 | |||
176 | </table> |
||
177 | </form> |
||
178 | |||
179 | <?php |
||
180 | html_page_bottom(); |