yummy-guide-generic-administrate 0.8.14 → 0.8.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31c95c124f946da973981b50eaf0247b854e0eca67d35a1fa2d120c58567d366
4
- data.tar.gz: 4a27c58133a3ec86c2fd483cfd80cef1c45a6655d91316b790dfe0732c0a1d29
3
+ metadata.gz: a9da6643ffb00010859cc51766113d7c757744a92cb1415ce70a30dafb33c194
4
+ data.tar.gz: 984902613fa65606e1ca1404bed57cc90b40cf821f678343583ec80e42ee8d95
5
5
  SHA512:
6
- metadata.gz: b0a893584bf5d7b1db8baee814bb2802ec78e1ce2c61701e411b4166b235d8ab9fba5d5fe4304d837a73fd9ea0d03a787e02912d27d6ead5325d238bc0b3b21e
7
- data.tar.gz: 854c72827dafd518d89c481a7d54da30245fb360e8a717e80b58bb18ac4e82b17e7527bababf8f9bd867b9077ca6d9134de899838de20db5ba6f9e7517a281ad
6
+ metadata.gz: 7cb593f606f48ca2bb18af508fd9df0e567cabfb457ae105901152d7501bc32c069ec5c7e662365e26084cd5b1095e949a9ea920d206da2525eec17db08bca2e
7
+ data.tar.gz: 1ea3603669a04a6a83ef151dfe48b2c961befdd8e1d6de81f13407fb871980b5556f4e14d4db3ab47746b1907cc83b832354d2cd57db14190b4f649296c01f53
@@ -140,6 +140,11 @@
140
140
  box-shadow: 0 calc(0px - var(--admin-sticky-page-header-top, 0px)) 0 var(--admin-sticky-page-header-top, 0px) var(--admin-page-background, #f6f7f7);
141
141
  }
142
142
 
143
+ .app-container > .main-content:has(> .main-content__header > .main-content__header-pagination),
144
+ body.admin-body > main.main-content:has(> .main-content__header > .main-content__header-pagination) {
145
+ --admin-sticky-page-header-height: 8rem;
146
+ }
147
+
143
148
  .main-content__header--sticky-table-layout + .main-content__body,
144
149
  [data-reservations-sticky-header] + .main-content__body,
145
150
  .app-container > .main-content:has(> .main-content__body--flush [data-css-sticky-table]) > .main-content__body--flush,
@@ -188,6 +193,57 @@
188
193
  --admin-sticky-page-header-height: 6.75rem;
189
194
  --admin-sticky-page-header-z-index: 10;
190
195
  }
196
+
197
+ .app-container > .main-content:has(> .main-content__header > .main-content__header-pagination),
198
+ body.admin-body > main.main-content:has(> .main-content__header > .main-content__header-pagination) {
199
+ --admin-sticky-page-header-height: 9rem;
200
+ }
201
+ }
202
+
203
+ .main-content__header:has(> .main-content__header-pagination) {
204
+ padding-bottom: calc(var(--admin-sticky-page-header-pagination-height, 2.5rem) + 0.75rem);
205
+ }
206
+
207
+ .main-content__header-pagination {
208
+ align-items: center;
209
+ box-sizing: border-box;
210
+ display: flex;
211
+ inset-block-end: 0.5rem;
212
+ inset-inline-start: 50%;
213
+ justify-content: center;
214
+ max-inline-size: calc(100% - 2rem);
215
+ pointer-events: none;
216
+ position: absolute;
217
+ transform: translateX(-50%);
218
+ width: max-content;
219
+ z-index: 1;
220
+ }
221
+
222
+ .main-content__header-pagination .pagination {
223
+ align-items: center;
224
+ display: flex;
225
+ flex-wrap: wrap;
226
+ gap: 0.25rem 0.5rem;
227
+ justify-content: center;
228
+ margin: 0;
229
+ max-inline-size: 100%;
230
+ padding-left: 0;
231
+ padding-right: 0;
232
+ pointer-events: auto;
233
+ text-align: center;
234
+ }
235
+
236
+ .main-content__header-pagination .pagination .first,
237
+ .main-content__header-pagination .pagination .prev,
238
+ .main-content__header-pagination .pagination .page,
239
+ .main-content__header-pagination .pagination .next,
240
+ .main-content__header-pagination .pagination .last {
241
+ flex: 0 0 auto;
242
+ inline-size: auto;
243
+ margin: 0;
244
+ max-inline-size: none;
245
+ white-space: nowrap;
246
+ width: auto;
191
247
  }
192
248
 
193
249
  .scroll-table {
@@ -0,0 +1,7 @@
1
+ <% pagination = local_assigns[:pagination] %>
2
+
3
+ <% if pagination.present? %>
4
+ <div class="main-content__header-pagination">
5
+ <%= pagination %>
6
+ </div>
7
+ <% end %>
@@ -0,0 +1,30 @@
1
+ <% content_for(:title) do %>
2
+ <%= display_resource_name(page.resource_name) %>
3
+ <% end %>
4
+
5
+ <header class="main-content__header main-content__header--sticky-table-layout">
6
+ <h1 class="main-content__page-title" id="page-title">
7
+ <%= content_for(:title) %>
8
+ </h1>
9
+
10
+ <% if show_search_bar %>
11
+ <%= render(
12
+ "search",
13
+ search_term: search_term,
14
+ resource_name: display_resource_name(page.resource_name)
15
+ ) %>
16
+ <% end %>
17
+
18
+ <div>
19
+ <%= link_to(
20
+ t(
21
+ "administrate.actions.new_resource",
22
+ name: display_resource_name(page.resource_name, singular: true).downcase
23
+ ),
24
+ [:new, namespace, page.resource_path.to_sym],
25
+ class: "button",
26
+ ) if accessible_action?(new_resource, :new) %>
27
+ </div>
28
+
29
+ <%= render("administrate/application/header_pagination", pagination: local_assigns[:pagination]) %>
30
+ </header>
@@ -0,0 +1,22 @@
1
+ <% pagination = render("pagination", resources: resources) %>
2
+
3
+ <%=
4
+ render("index_header",
5
+ resources: resources,
6
+ search_term: search_term,
7
+ page: page,
8
+ show_search_bar: show_search_bar,
9
+ pagination: pagination,
10
+ )
11
+ %>
12
+
13
+ <section class="main-content__body main-content__body--flush">
14
+ <%= render(
15
+ "collection",
16
+ collection_presenter: page,
17
+ collection_field_name: resource_name,
18
+ page: page,
19
+ resources: resources,
20
+ table_title: "page-title"
21
+ ) %>
22
+ </section>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module YummyGuide
4
4
  module Administrate
5
- VERSION = "0.8.14"
5
+ VERSION = "0.8.15"
6
6
  end
7
7
  end
@@ -358,6 +358,22 @@ RSpec.describe "column resizer assets" do
358
358
  expect(resizable_navigation_source).to include("z-index: var(--admin-navigation-z-index, 40)")
359
359
  end
360
360
 
361
+ # ページネーションを固定ページヘッダー下部中央に配置するCSSがあることを静的に確認する
362
+ it "places pagination at the bottom center of the sticky page header" do
363
+ expect(components_source).to include(".main-content__header-pagination")
364
+ expect(components_source).to include("inset-block-end: 0.5rem")
365
+ expect(components_source).to include("inset-inline-start: 50%")
366
+ expect(components_source).to include("transform: translateX(-50%)")
367
+ expect(components_source).to include("justify-content: center")
368
+ expect(components_source).to include("pointer-events: none")
369
+ expect(components_source).to include("pointer-events: auto")
370
+ expect(components_source).to include("--admin-sticky-page-header-height: 8rem")
371
+ expect(components_source).to include("--admin-sticky-page-header-height: 9rem")
372
+ expect(components_source).to include(".main-content__header:has(> .main-content__header-pagination)")
373
+ expect(components_source).to include("white-space: nowrap")
374
+ expect(components_source).to include("inline-size: auto")
375
+ end
376
+
361
377
  # 固定列リサイズ後にCSS変数のleftと幅を再計算する処理があることを静的に確認する
362
378
  it "recalculates CSS sticky-left offsets after applying column widths" do
363
379
  expect(javascript_source).to include("function refreshCssStickyLeftColumns(table)")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yummy-guide-generic-administrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.14
4
+ version: 0.8.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - akatsuki-kk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-29 00:00:00.000000000 Z
11
+ date: 2026-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate
@@ -121,6 +121,9 @@ files:
121
121
  - app/helpers/yummy_guide/administrate/filter_form_helper.rb
122
122
  - app/helpers/yummy_guide/administrate/number_input_helper.rb
123
123
  - app/helpers/yummy_guide/administrate/tooltip_helper.rb
124
+ - app/views/administrate/application/_header_pagination.html.erb
125
+ - app/views/administrate/application/_index_header.html.erb
126
+ - app/views/administrate/application/index.html.erb
124
127
  - app/views/fields/number/_form.html.erb
125
128
  - app/views/fields/yummy_guide_administrate/area/picture/_form.html.erb
126
129
  - app/views/fields/yummy_guide_administrate/area/picture/_index.html.erb