forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Design update to comments (decidim#13205)
Co-authored-by: Andrés Pereira de Lucena <andreslucena@gmail.com>
- Loading branch information
1 parent
25f64af
commit 4446b1c
Showing
9 changed files
with
149 additions
and
43 deletions.
There are no files selected for viewing
8 changes: 0 additions & 8 deletions
8
decidim-comments/app/cells/decidim/comments/comment/actions.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 12 additions & 10 deletions
22
decidim-comments/app/cells/decidim/comments/comments/order_control.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<div class="comment-order-by"> | ||
<% available_orders.each do | order_value| %> | ||
<div class="text-center"> | ||
<%= link_to( | ||
t("decidim.components.comment_order_selector.order.#{order_value}"), | ||
decidim_comments.comments_path(commentable_gid: model.to_signed_global_id.to_s, order: order_value, reload: 1), | ||
class: "button button__sm button__text-secondary only:m-auto comment-order-by__item inline-block #{order_value == order ? "underline font-bold" : ""}", | ||
remote: true, | ||
aria: { controls: threads_node_id } | ||
) %> | ||
</div> | ||
<%= form_with url: "#" do %> | ||
<label for="order" class="comments-label-dropdown"><%= t("decidim.components.comment.sort_by") %></label> | ||
<select id="order" aria-label="Order" data-order-comment-select="true"> | ||
<% available_orders.each do |order_value| %> | ||
<option | ||
value="<%= order_value %>" | ||
<%= "selected" if order_value == order %> | ||
data-order-comment-url="<%= decidim_comments.comments_path(commentable_gid: model.to_signed_global_id.to_s, order: order_value, reload: 1) %>"> | ||
<%= t("decidim.components.comment_order_selector.order.#{order_value}") %> | ||
</option> | ||
<% end %> | ||
</select> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters