zulip/static/templates/message_controls.hbs

63 lines
2.9 KiB
Handlebars

<div class="message_controls{{#status_message}} sender-status-controls{{/status_message}} no-select">
{{#if msg/sent_by_me}}
<div class="edit_content message_control_button" data-tooltip-template-id="view-source-tooltip-template"></div>
<template id="edit-content-tooltip-template">
{{#tr}}Edit message{{/tr}}
{{tooltip_hotkey_hints "E"}}
</template>
<template id="move-message-tooltip-template">
{{#tr}}Move message{{/tr}}
{{tooltip_hotkey_hints "M"}}
</template>
<template id="view-source-tooltip-template">
{{#tr}}View message source{{/tr}}
{{tooltip_hotkey_hints "E"}}
</template>
{{/if}}
{{#unless msg/sent_by_me}}
<div class="reaction_button message_control_button" data-tooltip-template-id="add-emoji-tooltip-template">
<i class="fa fa-smile-o" aria-label="{{#tr}}Add emoji reaction{{/tr}} (:)" role="button" aria-haspopup="true" tabindex="0"></i>
</div>
<template id="add-emoji-tooltip-template">
{{#tr}}Add emoji reaction{{/tr}}
{{tooltip_hotkey_hints ":"}}
</template>
{{/unless}}
{{#unless msg/locally_echoed}}
<div class="actions_hover message_control_button" data-tooltip-template-id="message-actions-tooltip-template" >
<i class="zulip-icon zulip-icon-ellipsis-v-solid" role="button" aria-haspopup="true" tabindex="0" aria-label="{{#tr}}Message actions{{/tr}}"></i>
</div>
<template id="message-actions-tooltip-template">
{{#tr}}Message actions{{/tr}}
{{tooltip_hotkey_hints "I"}}
</template>
{{/unless}}
<div class="message_failed {{#unless msg.failed_request}}hide{{/unless}}">
<div class="message_control_button failed_message_action" data-tippy-content="{{t 'Retry' }}">
<i class="fa fa-refresh refresh-failed-message" aria-label="{{t 'Retry' }}" role="button" tabindex="0"></i>
</div>
<div class="message_control_button failed_message_action" data-tippy-content="{{t 'Cancel' }}">
<i class="fa fa-times-circle remove-failed-message" aria-label="{{t 'Cancel' }}" role="button" tabindex="0"></i>
</div>
</div>
{{#unless msg/locally_echoed}}
<div class="star_container message_control_button {{#if msg/starred}}{{else}}empty-star{{/if}}" data-tooltip-template-id="{{#if msg/starred}}unstar{{else}}star{{/if}}-message-tooltip-template">
<i role="button" tabindex="0" class="star fa {{#if msg/starred}}fa-star{{else}}fa-star-o{{/if}}"></i>
</div>
<template id="star-message-tooltip-template">
<span class="starred-status">{{#tr}}Star this message{{/tr}}</span>
{{tooltip_hotkey_hints "Ctrl" "S"}}
</template>
<template id="unstar-message-tooltip-template">
<span class="starred-status">{{#tr}}Unstar this message{{/tr}}</span>
{{tooltip_hotkey_hints "Ctrl" "S"}}
</template>
{{/unless}}
</div>