settings: Add UI to manage channel folders.

Fixes part of #35545.
This commit is contained in:
Sahil Batra
2025-08-01 08:46:33 +05:30
committed by Tim Abbott
parent 7732aa0423
commit c127a0ae9f
12 changed files with 186 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
<tr class="channel-folder-row movable-row" data-channel-folder-id="{{id}}">
<td class="channel_folder_name_container">
{{#if is_admin}}
<span class="move-handle">
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
</span>
{{/if}}
<span class="channel_folder_name">{{folder_name}}</span>
</td>
<td class="channel_folder_description_container">
<span class="channel_folder_description">{{folder_description}}</span>
</td>
{{#if is_admin}}
<td class="actions">
{{> ../components/icon_button
icon="edit"
intent="neutral"
custom_classes="tippy-zulip-delayed-tooltip edit-channel-folder-button"
data-tippy-content=(t "Edit")
}}
{{> ../components/icon_button
icon="trash"
intent="danger"
custom_classes="tippy-zulip-delayed-tooltip archive-channel-folder-button"
data-tippy-content=(t "Delete")
aria-label=(t "Delete")
}}
</td>
{{/if}}
</tr>

View File

@@ -0,0 +1,28 @@
<div id="channel-folder-settings" class="settings-section" data-name="channel-folders">
<div class="settings_panel_list_header">
<h3>{{t "Channel folders"}}</h3>
<div class="alert-notification" id="admin-channel-folder-status"></div>
{{#if is_admin}}
{{> ../components/action_button
custom_classes="add-channel-folder-button"
label=(t "Add a new channel folder")
attention="quiet"
intent="brand"
}}
{{/if}}
</div>
<div class="progressive-table-wrapper" data-simplebar data-simplebar-tab-index="-1">
<table class="table table-striped admin_channel_folders_table">
<thead>
<tr>
<th>{{t "Name" }}</th>
<th>{{t "Description" }}</th>
{{#if is_admin}}
<th class="actions">{{t "Actions" }}</th>
{{/if}}
</tr>
</thead>
<tbody id="admin_channel_folders_table" data-empty="{{t 'No channel folders configured.' }}"></tbody>
</table>
</div>
</div>

View File

@@ -17,6 +17,8 @@
{{> bot_list_admin . }}
{{> admin_channel_folders .}}
{{> default_streams_list_admin . }}
{{> auth_methods_settings_admin . }}

View File

@@ -109,6 +109,11 @@
<div class="text">{{t "Default user settings" }}</div>
<i class="locked fa fa-lock tippy-zulip-tooltip" {{#if is_admin}}style="display: none;"{{/if}} data-tippy-content="{{t 'Only organization administrators can edit these settings.' }}"></i>
</li>
<li class="sidebar-item collapse-org-settings {{#unless is_admin}}hide-org-settings{{/unless}}" tabindex="0" data-section="channel-folders">
<i class="sidebar-item-icon zulip-icon zulip-icon-folder"></i>
<div class="text">{{t "Channel folders" }}</div>
<i class="locked fa fa-lock tippy-zulip-tooltip" {{#if is_admin}}style="display: none;"{{/if}} data-tippy-content="{{t 'Only organization administrators can edit these settings.' }}"></i>
</li>
{{#unless is_guest}}
<li class="sidebar-item collapse-org-settings {{#unless is_admin}}hide-org-settings{{/unless}}" tabindex="0" data-section="default-channels-list">
<i class="sidebar-item-icon fa fa-exchange" aria-hidden="true"></i>