Skip to content

Commit

Permalink
Merge branch 'EN-7917-backoffice-neighborhood-optims'
Browse files Browse the repository at this point in the history
nicolas-entourage committed Jan 9, 2025
2 parents 001688a + 10c3fd2 commit 9e85c98
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/controllers/admin/neighborhoods_controller.rb
Original file line number Diff line number Diff line change
@@ -100,6 +100,7 @@ def update_image
end

def show_members
@members = @neighborhood.members.page(page).per(per)
end

def show_outings
7 changes: 6 additions & 1 deletion app/views/admin/neighborhoods/show_members.html.erb
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
<th>Téléphone</th>
<th>Statut</th>
<th>Profil</th>
<% @neighborhood.members.each do |member| %>
<% @members.each do |member| %>
<tr>
<td><%= member.id %></td>
<td>
@@ -65,4 +65,9 @@
<% end %>
</table>
</div>

<%= page_entries_info @members, entry_name: 'Membres' %>
<div class="container">
<%= paginate(@members) %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/admin/neighborhoods/show_outings.html.erb
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
<%= image_tag(outing.image_url, size: '225x96') if outing.image_url.present? %>
</div>

<% if outing.parent_chat_messages.any? %>
<% if outing.number_of_root_chat_messages > 0 %>
<div><%= link_to "voir les messages", show_outing_posts_admin_neighborhood_path(@neighborhood, outing_id: outing.id) %></div>
<% end %>
</div>
4 changes: 2 additions & 2 deletions app/views/admin/neighborhoods/show_posts.html.erb
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@
<div id="chat-message-image-<%= message.id %>" hidden="hidden"></div>
<% end %>

<% if message.children.any? %>
<% if message.comments_count > 0 %>
<div><%= link_to "voir les commentaires", show_post_comments_admin_neighborhood_path(@neighborhood, post_id: message.id) %></div>
<% end %>
</div>
@@ -118,7 +118,7 @@
method: :post %>
</li>

<% unless message.children.any? %>
<% unless message.comments_count > 0 %>
<li>
<%= link_to "Ajouter un commentaire", show_post_comments_admin_neighborhood_path(@neighborhood, post_id: message.id) %>
</li>

0 comments on commit 9e85c98

Please sign in to comment.