Skip to content
Snippets Groups Projects
Commit 172a94b6 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

off grid

parent a88c461c
No related branches found
No related tags found
No related merge requests found
......@@ -6,4 +6,11 @@
td:last-of-type,
th:last-of-type
padding-right: 0
text-align: right
\ No newline at end of file
text-align: right
.table-selectable
overflow-x: visible
table
margin-left: -25px
th:first-of-type,
td:first-of-type
width: 25px
\ No newline at end of file
......@@ -48,7 +48,7 @@ module Admin::ApplicationHelper
end
def preview_link
raw "<button class=\"btn btn-primary btn-xs\"
raw "<button class=\"btn btn-light btn-xs\"
type=\"button\"
data-bs-toggle=\"modal\"
data-bs-target=\"#preview\"
......
......@@ -14,7 +14,7 @@
<%= link_to page,
admin_communication_website_page_path(website_id: page.website.id, id: page.id),
class: "#{'draft' unless page.published?}" %>
<p class="small text-muted mb-0"><%= page.ancestors.join(' / ')%></p>
<p class="small text-muted mb-0"><%= page.ancestors[1..-1].join(' / ') %></p>
</td>
<td>
<% if page.featured_image.attached? && page.featured_image.representable? %>
......
......@@ -7,14 +7,16 @@ selectable ||= false
<% if selectable %>
<input type="hidden" name="ids[]" value="">
<% end %>
<div class="table-responsive">
<div class="table-responsive <%= 'table-selectable' if selectable %>">
<table class="<%= table_classes %>">
<thead>
<tr>
<th class="ps-0" width="60%">
<%= Communication::Website::Post.human_attribute_name('title') %>
<%= check_box_tag nil, nil, false, data: { batch_selectable_role: "select-all" } if selectable %>
</th>
<% if selectable %>
<th class="border-0">
<%= check_box_tag nil, nil, false, data: { batch_selectable_role: "select-all" } if selectable %>
</th>
<% end %>
<th class="ps-0" width="60%"><%= Communication::Website::Post.human_attribute_name('title') %></th>
<th class="ps-3"><%= Communication::Website::Post.human_attribute_name('meta') %></th>
<th><%= Communication::Website::Post.human_attribute_name('featured_image') %></th>
</tr>
......@@ -22,11 +24,13 @@ selectable ||= false
<tbody>
<% posts.each do |post| %>
<tr <% unless post.published? %>class="draft"<% end %>>
<% if selectable %>
<td class="border-0"><%= check_box_tag "ids[]", post.id, false, data: { batch_selectable_role: "select-single" } %></td>
<% end %>
<td class="ps-0">
<%= link_to post,
admin_communication_website_post_path(website_id: post.website.id, id: post.id),
class: "#{'draft' unless post.published?}" %>
<%= check_box_tag "ids[]", post.id, false, data: { batch_selectable_role: "select-single" } if selectable %>
</td>
<td class="ps-3 small">
<% if post.published_at %>
......@@ -38,12 +42,12 @@ selectable ||= false
<% unless hide_category %>
<ul class="list-unstyled mb-0">
<% post.categories.each do |category| %>
<li><span class="badge bg-dark"><%= category %></span></li>
<li><%= category %></li>
<% end %>
</ul>
<% end %>
<% if post.pinned %>
<span class="badge bg-success"><%= Communication::Website::Post.human_attribute_name('pinned') %></span>
<%= Communication::Website::Post.human_attribute_name('pinned') %>
<% end %>
</td>
<td><%= image_tag post.featured_image.representation(resize: '200x'),
......
......@@ -23,7 +23,6 @@ subtitle = link_to t('communication.website.see_all', number: @all_pages.count),
<%= link_to page,
admin_communication_website_page_path(website_id: page.website.id, id: page.id),
class: "#{'draft' unless page.published?}" %>
<p class="small text-muted mb-0"><%= page.ancestors.join(' / ')%></p>
</td>
<td>
<% if page.featured_image.attached? && page.featured_image.representable? %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment