[GH-ISSUE #248] Hide Domain column from mailbox listing #199

Closed
opened 2026-02-26 09:36:40 +03:00 by kerem · 2 comments
Owner

Originally created by @maysara on GitHub (Aug 1, 2018).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/248

As that is quite redundant column especially when there is one domain only, and as the domain name is shown at the top when browsing mailboxes per domain and the domain also shows in the username (in my configuration at least); I would suggest the following patch to optionally hide that column to file application/views/mailbox/list.phtml using configuration variable defaults.list_domain.disabled :

             {if isset($options.defaults.list_size.disabled) && !$options.defaults.list_size.disabled}
                 <th>Size ({$size_multiplier})</th>
             {/if}
-            <th>Domain</th>
+            {if isset($options.defaults.list_domain.disabled) && !$options.defaults.list_domain.disabled}
+                <th>Domain</th>
+            {/if}
             <th width="55">Active</th>
             <th width="140"></th>
         </tr>
@@ -57,7 +59,9 @@
                     {/if}
                 </td>
             {/if}
-            <td>{$mbox.domain}</td>
+            {if isset($options.defaults.list_domain.disabled) && !$options.defaults.list_domain.disabled}
+                <td>{$mbox.domain}</td>
+            {/if}
             <td>
                 <div id="throb-toggle-active-{$mbox.id}" style="float: right;"></div>
                 <span id="toggle-active-{$mbox.id}" onclick="toggleActive( 'toggle-active-{$mbox.id}', {$mbox.id} );" class="btn btn-mini {if $mbox.active}btn-success{else}btn-danger{/if}">{$mbox.active|yesno}</span>

and the following lines to application.conf

;; Enable or disable display of Domain name column. Default : disabled
defaults.list_domain.disabled = true
Originally created by @maysara on GitHub (Aug 1, 2018). Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/248 As that is quite redundant column especially when there is one domain only, and as the domain name is shown at the top when browsing mailboxes per domain and the domain also shows in the username (in my configuration at least); I would suggest the following patch to optionally hide that column to file application/views/mailbox/list.phtml using configuration variable defaults.list_domain.disabled : ```@@ -37,7 +37,9 @@ {if isset($options.defaults.list_size.disabled) && !$options.defaults.list_size.disabled} <th>Size ({$size_multiplier})</th> {/if} - <th>Domain</th> + {if isset($options.defaults.list_domain.disabled) && !$options.defaults.list_domain.disabled} + <th>Domain</th> + {/if} <th width="55">Active</th> <th width="140"></th> </tr> @@ -57,7 +59,9 @@ {/if} </td> {/if} - <td>{$mbox.domain}</td> + {if isset($options.defaults.list_domain.disabled) && !$options.defaults.list_domain.disabled} + <td>{$mbox.domain}</td> + {/if} <td> <div id="throb-toggle-active-{$mbox.id}" style="float: right;"></div> <span id="toggle-active-{$mbox.id}" onclick="toggleActive( 'toggle-active-{$mbox.id}', {$mbox.id} );" class="btn btn-mini {if $mbox.active}btn-success{else}btn-danger{/if}">{$mbox.active|yesno}</span> ``` and the following lines to application.conf ``` ;; Enable or disable display of Domain name column. Default : disabled defaults.list_domain.disabled = true ```
kerem closed this issue 2026-02-26 09:36:40 +03:00
Author
Owner

@maysara commented on GitHub (Aug 16, 2018):

In addition to the above, I've also added:

+++ b/application/views/mailbox/js/list.js
@@ -53,7 +53,9 @@ $(document).ready( function() {
             {if isset($options.defaults.list_size.disabled) && !$options.defaults.list_size.disabled}
             { 'sType': 'num-html' },
             {/if}
+            {if isset($options.defaults.list_domain.disabled) && !$options.defaults.list_domain.disabled}
             null,
+            {/if}
             { "bSearchable": false },
             null,
             { 'bSortable': false, "bSearchable": false }

Alternatively, I could utilize {if isset( $domain ) && $domain} and make this change apply always when the listing is not for a specific domain!

If those changes are welcomed, I can create a pull request.

<!-- gh-comment-id:413623230 --> @maysara commented on GitHub (Aug 16, 2018): In addition to the above, I've also added: ```--- a/application/views/mailbox/js/list.js +++ b/application/views/mailbox/js/list.js @@ -53,7 +53,9 @@ $(document).ready( function() { {if isset($options.defaults.list_size.disabled) && !$options.defaults.list_size.disabled} { 'sType': 'num-html' }, {/if} + {if isset($options.defaults.list_domain.disabled) && !$options.defaults.list_domain.disabled} null, + {/if} { "bSearchable": false }, null, { 'bSortable': false, "bSearchable": false } ``` Alternatively, I could utilize {if isset( $domain ) && $domain} and make this change apply always when the listing is not for a specific domain! If those changes are welcomed, I can create a pull request.
Author
Owner

@barryo commented on GitHub (May 16, 2020):

Implemented in b121616ebf except default reversed to keep current behavior.

<!-- gh-comment-id:629632767 --> @barryo commented on GitHub (May 16, 2020): Implemented in b121616ebf67ab4b2162e69bfa3571bad72bcfee except default reversed to keep current behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ViMbAdmin-opensolutions#199
No description provided.