diff options
Diffstat (limited to 'app/views/discussions/_discussion.html.haml')
-rw-r--r-- | app/views/discussions/_discussion.html.haml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml index 4a27284cbae..075eb99fc36 100644 --- a/app/views/discussions/_discussion.html.haml +++ b/app/views/discussions/_discussion.html.haml @@ -2,17 +2,15 @@ %li.note.note-discussion.timeline-entry.unstyled-comments .timeline-entry-inner .timeline-content - .discussion.js-toggle-container{ data: { discussion_id: discussion.id } } + .discussion.js-toggle-container{ data: { discussion_id: discussion.id, is_expanded: expanded.to_s } } .discussion-header .timeline-icon = link_to user_path(discussion.author) do = image_tag avatar_icon_for_user(discussion.author), class: "avatar s40" .discussion-actions %button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button", class: ("js-toggle-lazy-diff" unless expanded) } - - if expanded - = icon("chevron-up") - - else - = icon("chevron-down") + = sprite_icon('chevron-up', css_class: "js-sidebar-collapse #{'hidden' unless expanded}") + = sprite_icon('chevron-down', css_class: "js-sidebar-expand #{'hidden' if expanded}") = _('Toggle thread') = link_to_member(@project, discussion.author, avatar: false) |