@@ -306,8 +306,10 @@ protected function output() {
306306 }
307307 }
308308 }
309-
310- // Long headers (hidden by default)
309+ $ is_draft = isset ($ headers ['Flags ' ]) && mb_stristr ($ headers ['Flags ' ], 'draft ' );
310+ if ($ is_draft ) {
311+ $ txt .= '<tr class="header_space"><th colspan="2"><a class="btn btn-primary" href="?page=compose ' .$ reply_args .'&imap_draft=1"><i class="bi bi-pencil"></i> ' .$ this ->trans ('Edit Draft ' ).'</a></th></tr> ' ;
312+ }
311313 foreach ($ headers as $ name => $ value ) {
312314 if (!in_array (mb_strtolower ($ name ), $ small_headers )) {
313315 if (is_array ($ value )) {
@@ -392,9 +394,11 @@ protected function output() {
392394 $ txt .= schedule_dropdown ($ this , true );
393395 }
394396
395- $ is_draft = isset ( $ headers [ ' Flags ' ]) && mb_stristr ( $ headers [ ' Flags ' ], ' draft ' );
396- if ( $ this -> get ( ' sieve_filters_enabled ' ) && ! $ is_draft ) {
397+ $ settings = $ this -> get ( ' user_settings ' , array () );
398+ if ( array_key_exists ( ' enable_snooze_setting ' , $ settings ) && $ settings [ ' enable_snooze_setting ' ] ) {
397399 $ txt .= snooze_dropdown ($ this , isset ($ headers ['X-Snoozed ' ]));
400+ }
401+ if ($ this ->get ('sieve_filters_enabled ' ) && !$ is_draft ) {
398402 $ server_id = $ this ->get ('msg_server_id ' );
399403 $ imap_server = $ this ->get ('imap_accounts ' )[$ server_id ];
400404 if ($ this ->get ('sieve_filters_client ' )) {
@@ -416,10 +420,7 @@ protected function output() {
416420 }
417421 $ txt .= '<a class="hlink text-decoration-none" id="show_message_source" href="#"> ' . $ this ->trans ('Show Source ' ) . '</a> ' ;
418422
419- if ($ is_draft ) {
420- $ txt .= '<a class="edit_draft_link hlink text-decoration-none" id="edit_draft" href="?page=compose ' .$ reply_args .'&imap_draft=1"> ' .$ this ->trans ('Edit Draft ' ).'</a> ' ;
421- }
422- $ txt .= '</div><span id="extra-header-buttons"></span> ' ;
423+ $ txt .= '</ul><span id="extra-header-buttons"></span> ' ;
423424 $ txt .= '<input type="hidden" class="move_to_type" value="" /> ' ;
424425 $ txt .= '<input type="hidden" class="move_to_string1" value=" ' .$ this ->trans ('Move to ... ' ).'" /> ' ;
425426 $ txt .= '<input type="hidden" class="move_to_string2" value=" ' .$ this ->trans ('Copy to ... ' ).'" /> ' ;
0 commit comments