Add Preferences > Mailbox View > Main Options > Layout (#5829)

pull/5890/head
Aleksander Machniak 7 years ago
parent 0f24470c5b
commit 3f820d76fa

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Add Preferences > Mailbox View > Main Options > Layout (#5829)
- Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820) - Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820)
- Fix decoding non-ascii attachment names from TNEF attachments (#5646, #5799) - Fix decoding non-ascii attachment names from TNEF attachments (#5646, #5799)
- Fix uninitialized string offset in rcube_utils::bin2ascii() and make sure rcube_utils::random_bytes() result has always requested length (#5788) - Fix uninitialized string offset in rcube_utils::bin2ascii() and make sure rcube_utils::random_bytes() result has always requested length (#5788)

@ -207,6 +207,9 @@ $labels['layout'] = 'Layout';
$labels['layoutwidescreen'] = 'Widescreen'; $labels['layoutwidescreen'] = 'Widescreen';
$labels['layoutdesktop'] = 'Desktop'; $labels['layoutdesktop'] = 'Desktop';
$labels['layoutlist'] = 'List'; $labels['layoutlist'] = 'List';
$labels['layoutwidescreendesc'] = 'Widescreen (3-column view)';
$labels['layoutdesktopdesc'] = 'Desktop (wide list and mail preview below)';
$labels['layoutlistdesc'] = 'List (no mail preview)';
$labels['folderactions'] = 'Folder actions...'; $labels['folderactions'] = 'Folder actions...';
$labels['compact'] = 'Compact'; $labels['compact'] = 'Compact';

@ -410,6 +410,24 @@ function rcmail_user_prefs($current = null)
'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))), 'advanced' => array('name' => rcube::Q($RCMAIL->gettext('advancedoptions'))),
); );
if (!isset($no_override['layout'])) {
if (!$current) {
continue 2;
}
$field_id = 'rcmfd_layout';
$select = new html_select(array('name' => '_layout', 'id' => $field_id));
$select->add($RCMAIL->gettext('layoutwidescreendesc'), 'widescreen');
$select->add($RCMAIL->gettext('layoutdesktopdesc'), 'desktop');
$select->add($RCMAIL->gettext('layoutlistdesc'), 'list');
$blocks['main']['options']['date_format'] = array(
'title' => html::label($field_id, rcube::Q($RCMAIL->gettext('layout'))),
'content' => $select->show($config['layout'] ?: 'widescreen'),
);
}
// show config parameter for auto marking the previewed message as read // show config parameter for auto marking the previewed message as read
if (!isset($no_override['mail_read_time'])) { if (!isset($no_override['mail_read_time'])) {
if (!$current) { if (!$current) {

@ -47,6 +47,7 @@ case 'general':
case 'mailbox': case 'mailbox':
$a_user_prefs = array( $a_user_prefs = array(
'layout' => rcube_utils::get_input_value('_layout', rcube_utils::INPUT_POST),
'mail_read_time' => isset($_POST['_mail_read_time']) ? intval($_POST['_mail_read_time']) : $CONFIG['mail_read_time'], 'mail_read_time' => isset($_POST['_mail_read_time']) ? intval($_POST['_mail_read_time']) : $CONFIG['mail_read_time'],
'autoexpand_threads' => isset($_POST['_autoexpand_threads']) ? intval($_POST['_autoexpand_threads']) : 0, 'autoexpand_threads' => isset($_POST['_autoexpand_threads']) ? intval($_POST['_autoexpand_threads']) : 0,
'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0, 'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0,

Loading…
Cancel
Save