mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
We currently always show fa-ban icon and "Disable" text for "Disabled" or "None selected" option in dropdown-list widget. This commit adds code to provide an option for not showing the fa-ban icon and having the option text be something other than "Disable". This will be used in channel folder dropdown widget where we want to have "None" text in the option without icon.
50 lines
2.2 KiB
Handlebars
50 lines
2.2 KiB
Handlebars
{{#with item}}
|
|
<li class="list-item {{#if is_current_user_setting}}current_user_setting{{/if}}" role="presentation" data-unique-id="{{unique_id}}" data-name="{{name}}" tabindex="0">
|
|
{{#if description}}
|
|
<a class="dropdown-list-item-common-styles">
|
|
<span class="dropdown-list-item-name">
|
|
{{#if bold_current_selection}}
|
|
<span class="dropdown-list-bold-selected">{{name}}</span>
|
|
{{#if has_edit_icon}}
|
|
{{> components/icon_button custom_classes="dropdown-list-edit" intent="neutral" icon="edit" aria-label=(t "Edit snippet") }}
|
|
{{/if}}
|
|
{{#if has_delete_icon}}
|
|
{{> components/icon_button custom_classes="dropdown-list-delete" intent="danger" icon="trash" aria-label=(t "Delete snippet") }}
|
|
{{/if}}
|
|
{{else}}
|
|
{{name}}
|
|
{{/if}}
|
|
</span>
|
|
<span class="dropdown-list-item-description line-clamp">
|
|
{{description}}
|
|
</span>
|
|
</a>
|
|
{{else}}
|
|
<a class="dropdown-list-item-common-styles">
|
|
{{#if stream}}
|
|
{{> inline_decorated_channel_name stream=stream show_colored_icon=true}}
|
|
{{else if is_direct_message}}
|
|
<i class="zulip-icon zulip-icon-users channel-privacy-type-icon"></i> <span class="decorated-dm-name">{{name}}</span>
|
|
{{else if is_setting_disabled}}
|
|
<span class="setting-disabled-option">
|
|
{{#if show_disabled_icon}}
|
|
<i class="setting-disabled-option-icon fa fa-ban" aria-hidden="true"></i>
|
|
{{/if}}
|
|
{{#if show_disabled_option_name}}
|
|
{{name}}
|
|
{{else}}
|
|
{{t "Disable" }}
|
|
{{/if}}
|
|
</span>
|
|
{{else}}
|
|
{{#if bold_current_selection}}
|
|
<span class="dropdown-list-bold-selected">{{name}}</span>
|
|
{{else}}
|
|
{{name}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</a>
|
|
{{/if}}
|
|
</li>
|
|
{{/with}}
|