Skip to content

Commit

Permalink
Add Preferences > Mailbox View > Main Options > Layout (#5829)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jun 30, 2017
1 parent a1117c5 commit 8993059
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CHANGELOG Roundcube Webmail
- Use 7bit encoding for ISO-2022-* charsets in sent mail (#5640)
- Fix so links over images are not removed in plain text signatures converted from HTML (#4473)
- Fix various issues when downloading files with names containing non-ascii chars, use RFC 2231 (#5772)
- Add Preferences > Mailbox View > Main Options > Layout (#5829)
- Password: Fix compatibility with PHP 7+ in cpanel_webmail driver (#5820)
- 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)
Expand Down
3 changes: 3 additions & 0 deletions program/localization/en_US/labels.inc
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ $labels['layout'] = 'Layout';
$labels['layoutwidescreen'] = 'Widescreen';
$labels['layoutdesktop'] = 'Desktop';
$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['compact'] = 'Compact';
Expand Down
18 changes: 18 additions & 0 deletions program/steps/settings/func.inc
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,24 @@ function rcmail_user_prefs($current = null)
'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(

This comment has been minimized.

Copy link
@tomsommer

tomsommer Jun 30, 2017

Contributor

Can't be right?

This comment has been minimized.

Copy link
@alecpl

alecpl Jun 30, 2017

Author Member

Oops, thanks. Fixed.

'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
if (!isset($no_override['mail_read_time'])) {
if (!$current) {
Expand Down
1 change: 1 addition & 0 deletions program/steps/settings/save_prefs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ case 'general':

case 'mailbox':
$a_user_prefs = array(
'layout' => rcmail_prefs_input('layout', '/^[a-z]+$/'),
'mail_read_time' => intval($_POST['_mail_read_time']),
'autoexpand_threads' => intval($_POST['_autoexpand_threads']),
'mdn_requests' => intval($_POST['_mdn_requests']),
Expand Down

0 comments on commit 8993059

Please sign in to comment.