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