active_admin_prism 0.1.3 → 0.1.5
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 +4 -4
- data/CHANGELOG.md +88 -0
- data/INTEGRATION.md +147 -22
- data/README.md +3 -1
- data/app/assets/javascripts/active_admin_prism/prism.js +1 -1
- data/app/assets/stylesheets/active_admin_prism/prism.css +1 -1
- data/js-src/prism.js +479 -39
- data/lib/active_admin/views/action_items.rb +32 -0
- data/lib/active_admin/views/filters_sidebar.rb +42 -13
- data/lib/active_admin/views/prism_sidebar.rb +4 -3
- data/lib/active_admin/views/title_bar.rb +49 -0
- data/lib/active_admin_prism/configuration.rb +40 -0
- data/lib/active_admin_prism/version.rb +1 -1
- data/lib/active_admin_prism.rb +2 -0
- data/lib/prism_icons.rb +21 -0
- data/scss-src/_buttons.scss +96 -0
- data/scss-src/_panels.scss +28 -14
- data/scss-src/_select2.scss +56 -0
- data/scss-src/_tables.scss +116 -4
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7692da28c74e2ba208c82c128fc0b8806b5731050c547064513ab8663d2d0ea
|
|
4
|
+
data.tar.gz: 3a190afe06d75fb75dba6a58dc51147cc2363a566260958513e2f7f8c849f21a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19d1e7493871ab1546ac1b1a70d881a209f817bf9051f808d8ab9bdc0f3b9aa772add6b37c19d8aa516743849b7482b3f72cb0580963e42f373789035f4d4b89
|
|
7
|
+
data.tar.gz: e4ca0255db93b9f899c8e5d6d8b92d92a922be951e90c1dfd5f0d7baf961307f9cdd1210987263f1c8b46f579fb932ec7dcc2c2c42dfb0c03aeecc4c3d45d21b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5
|
|
4
|
+
|
|
5
|
+
- Fixed: a page with several `action_item` buttons could briefly flash
|
|
6
|
+
the full, unstyled wall of individual buttons before
|
|
7
|
+
`action_items_dropdown` consolidated them into the "Actions" dropdown —
|
|
8
|
+
visible on a slow connection, since that consolidation only runs once
|
|
9
|
+
js-src/prism.js's own script has downloaded and executed, which can lag
|
|
10
|
+
well behind the buttons' own markup already having painted. A small
|
|
11
|
+
inline `<script>` right after them in the markup (lib/active_admin/views/title_bar.rb)
|
|
12
|
+
now hides them immediately, before that lag has a chance to show
|
|
13
|
+
anything — prism.js un-hides them again itself, right before either
|
|
14
|
+
moving them into the dropdown or, below its own threshold, leaving them
|
|
15
|
+
untouched. If JS is disabled entirely, that inline script never runs
|
|
16
|
+
either, so the buttons stay fully visible and functional throughout,
|
|
17
|
+
same as before this fix.
|
|
18
|
+
|
|
19
|
+
## 0.1.4
|
|
20
|
+
|
|
21
|
+
- A Pages nav item registered with no `icon:` now gets one automatically
|
|
22
|
+
(`auto_nav_icons`, on by default) — picked deterministically from a
|
|
23
|
+
generic subset of the built-in icon set based on the item's own label,
|
|
24
|
+
so the same label always gets the same icon rather than shuffling
|
|
25
|
+
between page loads. Mainly matters once the sidebar is collapsed to
|
|
26
|
+
its icon-only rail (`sidebar_collapsible`): an unassigned item used to
|
|
27
|
+
render there as just a bare, indistinguishable dot. `icon:` set
|
|
28
|
+
explicitly always wins; `auto_nav_icons = false` restores the old
|
|
29
|
+
no-icon-at-all behavior.
|
|
30
|
+
- Every non-Filters sidebar section (ActiveAdmin core's own "Search
|
|
31
|
+
status" panel, when `active_filters_bar` is off, or a host's own custom
|
|
32
|
+
`sidebar "Title" do ... end` block) now flattens every link/button
|
|
33
|
+
inside it into a single "Sidebar Actions" Select2 dropdown when
|
|
34
|
+
`collapsible_filters` is on, instead of each rendering its own
|
|
35
|
+
individually collapsed icon button with nowhere near enough room in
|
|
36
|
+
the 72px gutter that assumed just one — wrapping every word onto its
|
|
37
|
+
own line, or spilling out unclipped over the main content, instead of
|
|
38
|
+
collapsing cleanly. This dropdown renders in the title bar, next to
|
|
39
|
+
(and styled identically to) the consolidated "Actions" dropdown below,
|
|
40
|
+
so the two read as one "more stuff lives here" row instead of two
|
|
41
|
+
disconnected mechanisms in different parts of the page. Picking an
|
|
42
|
+
option fires a real click on the underlying (hidden but still
|
|
43
|
+
DOM-attached, so Rails UJS's `data-method`/`data-confirm` keeps
|
|
44
|
+
working) link/button and resets right back to its placeholder — same
|
|
45
|
+
"jump menu" click-and-reset flow as the "Actions" dropdown, rather than
|
|
46
|
+
opening the section's content in a nested panel. The section itself is
|
|
47
|
+
discarded outright either way, never rendered in `#sidebar`. The
|
|
48
|
+
Filters panel itself is untouched by any of this — it always keeps its
|
|
49
|
+
own plain icon button exactly as before, whether or not any other
|
|
50
|
+
sections exist. A page with only Filters (the common case) shows no
|
|
51
|
+
dropdown at all.
|
|
52
|
+
- A title bar with more than `action_items_dropdown_threshold` (default:
|
|
53
|
+
`0`, so this applies from a single extra `action_item` on) `action_item`
|
|
54
|
+
buttons now collapses all of them into a single Select2 "jump menu",
|
|
55
|
+
aligned with the index table's own right edge (not the page's corner,
|
|
56
|
+
which a table's own column-driven width often doesn't reach), instead
|
|
57
|
+
of rendering a multi-row wall of individual buttons — a resource
|
|
58
|
+
registering a dozen+ CSV upload / bulk-action links is a real example
|
|
59
|
+
this was built for. Sits in the same row as the "Sidebar Actions"
|
|
60
|
+
dropdown above when both exist on the same page, with a visible gap
|
|
61
|
+
before the (always excluded, always pinned to the true top-right
|
|
62
|
+
corner) "New Resource" button. Both this and the "Sidebar Actions"
|
|
63
|
+
dropdown above always show Select2's search box, even with just one or
|
|
64
|
+
two options — not gated behind a result-count threshold — so either
|
|
65
|
+
reads unambiguously as Select2 regardless of how many items it
|
|
66
|
+
currently has. Picking an option fires that action immediately (a
|
|
67
|
+
plain link navigates, a `button_to` form submits — whatever it
|
|
68
|
+
actually was, `data-confirm`/`data-method` included) and resets right
|
|
69
|
+
back to its placeholder. Purely client-side: it moves each existing
|
|
70
|
+
action_item element as-is into a hidden holding area and `.click()`s
|
|
71
|
+
the real trigger inside it, so whatever a host's own `action_item`
|
|
72
|
+
block rendered keeps working completely unmodified. Set
|
|
73
|
+
`config.action_items_dropdown = false` to always render every
|
|
74
|
+
action_item inline, matching this gem's behavior before this flag
|
|
75
|
+
existed.
|
|
76
|
+
- The active-filters bar (`config.active_filters_bar`) now toggles the
|
|
77
|
+
Filters panel open/closed on click, same as the funnel icon, instead of
|
|
78
|
+
only ever opening it.
|
|
79
|
+
- Following any Pages nav item — a plain leaf link, or a parent group
|
|
80
|
+
like "School" — while the sidebar is collapsed to its icon-only rail
|
|
81
|
+
(`config.sidebar_collapsible`) now expands it back out first. A
|
|
82
|
+
parent's own submenu is force-hidden by CSS while collapsed regardless
|
|
83
|
+
of its "open" class, so without this, clicking one did nothing visible
|
|
84
|
+
at all.
|
|
85
|
+
- An index table wider than its container (many columns, a narrow
|
|
86
|
+
viewport) now fades in a subtle shadow on whichever edge still has
|
|
87
|
+
more columns to scroll toward, clearing once scrolled all the way to
|
|
88
|
+
that side — a table simply cut off flush at the container's edge
|
|
89
|
+
otherwise gave no indication scrolling was even possible.
|
|
90
|
+
|
|
3
91
|
## 0.1.3
|
|
4
92
|
|
|
5
93
|
- A hamburger icon button next to the brand, at the top of the Prism
|
data/INTEGRATION.md
CHANGED
|
@@ -135,6 +135,9 @@ ActiveAdminPrism.configure do |config|
|
|
|
135
135
|
config.menu_search = true # default: true
|
|
136
136
|
config.select2 = false # default: false (opt-in — see below)
|
|
137
137
|
config.sidebar_collapsible = true # default: true
|
|
138
|
+
config.action_items_dropdown = true # default: true
|
|
139
|
+
config.action_items_dropdown_threshold = 3 # default: 3
|
|
140
|
+
config.auto_nav_icons = true # default: true
|
|
138
141
|
end
|
|
139
142
|
|
|
140
143
|
ActiveAdminPrism.enable!
|
|
@@ -161,6 +164,9 @@ ActiveAdminPrism.enable!
|
|
|
161
164
|
| `menu_search` | `true` | No search box renders above the sidebar's "Pages" nav — see [Menu search](#menu-search). |
|
|
162
165
|
| `select2` | `false` | **Opposite polarity from every other flag above — opt-in, not opt-out.** `false` (the default) leaves every `<select>` exactly as ActiveAdmin renders it. `true` auto-enhances *every* plain `<select>` (filters, form inputs, association pickers — no per-field setup) into a searchable Select2 widget — see [Select2](#select2). |
|
|
163
166
|
| `sidebar_collapsible` | `true` | No hamburger toggle button renders next to the brand — the sidebar is always full width, with no way to collapse it to an icon-only rail. Desktop-only either way; the mobile off-canvas toggle is unaffected — see [Collapsible sidebar rail](#collapsible-sidebar-rail). |
|
|
167
|
+
| `action_items_dropdown` | `true` | Every `action_item` always renders inline in the title bar, however many there are — no "Actions" dropdown consolidation. See [Consolidated action items](#consolidated-action-items). |
|
|
168
|
+
| `action_items_dropdown_threshold` | `3` | How many `action_item`s a title bar can have before `action_items_dropdown` (if on) collapses them into a dropdown. |
|
|
169
|
+
| `auto_nav_icons` | `true` | A Pages nav item with no explicit `icon:` renders with no icon at all (just its label, or a bare dot once collapsed to the icon-only rail) instead of an automatically-picked one — see [Automatic nav icons](#automatic-nav-icons). |
|
|
164
170
|
|
|
165
171
|
**How this crosses the server/client boundary.** `sidebar`,
|
|
166
172
|
`colorize_action_icons`, and the `login_*` flags are pure server-side
|
|
@@ -292,6 +298,21 @@ passes this hash through untouched) accepts: `:dashboard`, `:users`,
|
|
|
292
298
|
`:home`, `:list`, `:folder`, `:bell`, `:search`, `:menu`, `:logout`,
|
|
293
299
|
`:check`, `:x`, `:chevron_down`, `:eye`, `:pencil`, `:trash`, `:filter`.
|
|
294
300
|
|
|
301
|
+
### Automatic nav icons
|
|
302
|
+
|
|
303
|
+
A menu item registered with no `icon:` at all still gets one, picked from
|
|
304
|
+
a generic subset of the icon set above (`:dashboard`, `:users`, `:cart`,
|
|
305
|
+
`:box`, `:receipt`, `:credit_card`, `:message`, `:settings`, `:home`,
|
|
306
|
+
`:list`, `:folder`, `:bell`, `:search`, `:globe`, `:eye`, `:pencil`,
|
|
307
|
+
`:filter`) based on the item's own label — the same label always maps to
|
|
308
|
+
the same icon (it's a deterministic hash, not re-rolled per request), so
|
|
309
|
+
it never visibly changes between page loads. This is mainly about the
|
|
310
|
+
collapsed icon-only rail (see below): without any icon at all, an
|
|
311
|
+
unassigned item renders there as just a bare dot, indistinguishable from
|
|
312
|
+
any other unassigned item. `icon:` set explicitly always wins. Turn it
|
|
313
|
+
off with `config.auto_nav_icons = false` to go back to rendering no icon
|
|
314
|
+
for such an item (this gem's behavior before this flag existed).
|
|
315
|
+
|
|
295
316
|
### Collapsible sidebar rail
|
|
296
317
|
|
|
297
318
|
A hamburger icon button next to the brand, at the top of the sidebar,
|
|
@@ -626,17 +647,71 @@ jquery-rails/jquery-ujs. Turn off with `config.styled_confirms = false`.
|
|
|
626
647
|
The "Filters" panel (ActiveAdmin's `filters_sidebar_section`) starts
|
|
627
648
|
collapsed to a single filter-icon button; clicking it expands the full form
|
|
628
649
|
in place (also keyboard-accessible — Enter/Space toggle it, and it exposes
|
|
629
|
-
`aria-expanded`).
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
650
|
+
`aria-expanded`). This is always how Filters behaves, whether or not any
|
|
651
|
+
other collapsible sections exist — it's never grouped into a dropdown
|
|
652
|
+
with anything else.
|
|
653
|
+
|
|
654
|
+
Every *other* sidebar section — dashboard panels, ActiveAdmin's own
|
|
655
|
+
"Search status" panel (when `active_filters_bar` is off), or any custom
|
|
656
|
+
`sidebar "Title" do ... end` block a host registers — gets collapsed too,
|
|
657
|
+
but consolidated into a single "More Actions" Select2 dropdown instead of
|
|
658
|
+
each getting its own individually collapsed icon button: a stack of those
|
|
659
|
+
has nowhere near enough room in the 72px gutter that assumes just one
|
|
660
|
+
(Filters). This dropdown renders in the *title bar*, next to (and
|
|
661
|
+
styled like) the consolidated action items dropdown below — see
|
|
662
|
+
[Consolidated action items](#consolidated-action-items) — not inside
|
|
663
|
+
`#sidebar` itself, so the two read as one "more stuff lives here" row
|
|
664
|
+
instead of two disconnected mechanisms in different parts of the page.
|
|
665
|
+
Picking an option from it opens that section (closing every other
|
|
666
|
+
non-Filters one — one visible at a time, in `#sidebar`, same as ever)
|
|
667
|
+
and reflows the table just like Filters opening does. A section's own
|
|
668
|
+
header still opens/closes it directly too, keeping the dropdown in sync
|
|
669
|
+
either way. A page with no sections besides Filters (the common case)
|
|
670
|
+
shows no dropdown at all — just the one familiar icon button.
|
|
671
|
+
|
|
672
|
+
Pass your own icon via `sidebar "More Actions", icon: :list do ... end`
|
|
673
|
+
(any name from `lib/prism_icons.rb`) — it's only used on a section's own
|
|
674
|
+
header once it's open, since the collapsed dropdown itself doesn't render
|
|
675
|
+
per-section icons; anything else falls back to a generic one (`:filter`
|
|
676
|
+
for the Filters section specifically, `:list` otherwise). The index
|
|
677
|
+
table/main content area reflows to reclaim the freed-up width while
|
|
678
|
+
*every* section is collapsed, giving it back the moment any one of them
|
|
679
|
+
opens. Turn it off with `config.collapsible_filters = false` to always
|
|
680
|
+
show every section fully expanded, matching ActiveAdmin's own default
|
|
681
|
+
(and the table/content area at its normal, non-reflowing width).
|
|
636
682
|
|
|
637
683
|
The reflow relies on the CSS `:has()` selector (broadly supported in
|
|
638
|
-
current browsers); without it,
|
|
639
|
-
|
|
684
|
+
current browsers); without it, sections still collapse/expand correctly,
|
|
685
|
+
the reflow just won't reclaim the extra width.
|
|
686
|
+
|
|
687
|
+
### Consolidated action items
|
|
688
|
+
|
|
689
|
+
A title bar with more than `action_items_dropdown_threshold` (default:
|
|
690
|
+
`3`) `action_item` buttons collapses all of them into a single Select2
|
|
691
|
+
"jump menu", aligned with the index table's own right edge, instead of a
|
|
692
|
+
multi-row wall of individual buttons — a resource registering a dozen+
|
|
693
|
+
CSV upload / bulk-action links is a real example this was built for.
|
|
694
|
+
(The table's own edge, not the page's: a table's column-driven width
|
|
695
|
+
often doesn't reach the page's full content width, so aligning to the
|
|
696
|
+
container instead would leave the dropdown looking stranded out past
|
|
697
|
+
the table it belongs to.) Picking an option fires that action
|
|
698
|
+
immediately (a plain `link_to` navigates, a `button_to` form submits —
|
|
699
|
+
whatever it actually was, including its own `data-confirm`/`data-method`)
|
|
700
|
+
and the dropdown resets right back to its placeholder, ready for the next
|
|
701
|
+
pick — it's a trigger, not a persistent selection. Purely client-side DOM
|
|
702
|
+
restructuring: `prism.js` moves each existing `action_item` element as-is
|
|
703
|
+
(not a clone) into a hidden holding area and `.click()`s the real
|
|
704
|
+
`<a>`/`<button>` inside it on selection, so whatever a host's own
|
|
705
|
+
`action_item` block rendered keeps working completely unmodified. Select2
|
|
706
|
+
itself is always available for this regardless of `config.select2` (that
|
|
707
|
+
flag only controls auto-enhancing a *host's* own selects) — the library
|
|
708
|
+
ships in this gem's JS either way. A page with only a couple of action
|
|
709
|
+
items (a lone "New Resource" button, say) is left untouched, rendering
|
|
710
|
+
inline exactly as ActiveAdmin does by default — the threshold exists so
|
|
711
|
+
this only kicks in for pages that actually need it. Turn it off entirely
|
|
712
|
+
with `config.action_items_dropdown = false`, or raise/lower
|
|
713
|
+
`config.action_items_dropdown_threshold` to change how many buttons it
|
|
714
|
+
takes before consolidation kicks in.
|
|
640
715
|
|
|
641
716
|
### Active filters bar
|
|
642
717
|
|
|
@@ -1035,30 +1110,80 @@ anything Prism itself renders:
|
|
|
1035
1110
|
li.select2-results__message <- "No results found" etc.
|
|
1036
1111
|
```
|
|
1037
1112
|
|
|
1038
|
-
###
|
|
1113
|
+
### Collapsible sidebar sections (`.prism-collapsible-panel`)
|
|
1039
1114
|
|
|
1040
|
-
|
|
1041
|
-
panel
|
|
1042
|
-
(dashboard panels, a host's own `sidebar :title do ... end`) is untouched:
|
|
1115
|
+
Every `SidebarSection` gets this markup — not just AA's built-in Filters
|
|
1116
|
+
panel; a host's own `sidebar "Title" do ... end` block gets it too:
|
|
1043
1117
|
|
|
1044
1118
|
```
|
|
1045
1119
|
#sidebar <- AA's own right-hand content sidebar (not Prism's left nav)
|
|
1046
|
-
.panel
|
|
1120
|
+
.panel.prism-collapsible-panel[#filters_sidebar_section][.open]
|
|
1047
1121
|
> h3 <- the icon-only button when collapsed
|
|
1048
|
-
svg.prism-filter-icon
|
|
1122
|
+
svg.prism-filter-icon <- :filter for Filters, :list (or your own `icon:`) otherwise
|
|
1049
1123
|
span.prism-filter-label <- visually hidden (max-width:0) while collapsed
|
|
1050
1124
|
.panel_contents <- max-height:0 while collapsed, animates open
|
|
1051
|
-
form.filter_form
|
|
1125
|
+
form.filter_form <- Filters section specifically
|
|
1052
1126
|
.filter_form_field[.select_and_search][.filter_date_range]
|
|
1053
1127
|
```
|
|
1054
1128
|
|
|
1055
1129
|
`.prism-collapsible-panel` and the icon/label markup are only added when
|
|
1056
|
-
`config.collapsible_filters` is `true`; `prism.js` mirrors the
|
|
1057
|
-
`.open` state onto `body.prism-filters-open
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
the
|
|
1130
|
+
`config.collapsible_filters` is `true`; `prism.js` mirrors the Filters
|
|
1131
|
+
section's `.open` state onto `body.prism-filters-open` specifically (kept
|
|
1132
|
+
for any host CSS already keying off it), but `#active_admin_content`/
|
|
1133
|
+
`#sidebar`'s own reflow rule keys off *any* section's `.open` via `:has()`
|
|
1134
|
+
instead — see [Collapsible "Filters" sidebar](#collapsible-filters-sidebar).
|
|
1135
|
+
With the config `false`, `body.prism-filters-collapsible-disabled` is the
|
|
1136
|
+
backstop class that forces every section back to always-expanded.
|
|
1137
|
+
|
|
1138
|
+
With at least one collapsible section besides Filters, `prism.js` also
|
|
1139
|
+
adds `.prism-sidebar-multi-panel` to `#sidebar` — which does nothing but
|
|
1140
|
+
hide each non-Filters section's own collapsed-state `> h3` (above) via
|
|
1141
|
+
CSS
|
|
1142
|
+
(`#sidebar.prism-sidebar-multi-panel .prism-collapsible-panel:not(.open):not(#filters_sidebar_section) > h3`),
|
|
1143
|
+
since its trigger lives elsewhere now (Filters' own `> h3` is never
|
|
1144
|
+
hidden by this rule, regardless) — and inserts the actual dropdown into
|
|
1145
|
+
the *title bar's* shared row instead of into `#sidebar` itself:
|
|
1146
|
+
|
|
1147
|
+
```
|
|
1148
|
+
#titlebar_right
|
|
1149
|
+
div.action_items
|
|
1150
|
+
span#prism-titlebar-actions-row.prism-titlebar-actions-row
|
|
1151
|
+
span.prism-sidebar-panel-select-wrapper
|
|
1152
|
+
select.prism-sidebar-panel-select <- Select2-enhanced; one <option> per non-Filters section, by title
|
|
1153
|
+
span.prism-action-items-dropdown <- see below; may or may not be present on the same page
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
Selecting an option opens that section (in `#sidebar`, same as ever) and
|
|
1157
|
+
closes every other non-Filters one — Filters itself is excluded entirely
|
|
1158
|
+
and never appears in this dropdown's options.
|
|
1159
|
+
|
|
1160
|
+
### Consolidated action items markup (`.prism-action-items-dropdown`)
|
|
1161
|
+
|
|
1162
|
+
Only present once `action_item` count exceeds
|
|
1163
|
+
`config.action_items_dropdown_threshold` (see
|
|
1164
|
+
[Consolidated action items](#consolidated-action-items)); shares
|
|
1165
|
+
`#prism-titlebar-actions-row` above with the "More Actions" dropdown when
|
|
1166
|
+
both exist on the same page (whichever one exists lands in that shared
|
|
1167
|
+
row on its own otherwise):
|
|
1168
|
+
|
|
1169
|
+
```
|
|
1170
|
+
#titlebar_right
|
|
1171
|
+
div.action_items
|
|
1172
|
+
span#prism-titlebar-actions-row.prism-titlebar-actions-row
|
|
1173
|
+
span.prism-action-items-dropdown
|
|
1174
|
+
select.prism-action-items-select <- Select2-enhanced; one <option> per action_item, by its link/button text
|
|
1175
|
+
div.prism-action-items-holding[hidden]
|
|
1176
|
+
span.action_item <- every original action_item element, moved here as-is, never shown
|
|
1177
|
+
a / form <- whatever a host's own action_item block rendered, untouched
|
|
1178
|
+
```
|
|
1179
|
+
|
|
1180
|
+
Selecting an option finds the real `<a>`/`<button>`/`<input type=submit>`
|
|
1181
|
+
inside the matching `.action_item` in `.prism-action-items-holding` and
|
|
1182
|
+
`.click()`s it directly, then resets the select back to its placeholder.
|
|
1183
|
+
The whole `#prism-titlebar-actions-row` (not each dropdown individually)
|
|
1184
|
+
is what a separate script in `prism.js` aligns to the index table's own
|
|
1185
|
+
right edge — see [Consolidated action items](#consolidated-action-items)
|
|
1186
|
+
for why.
|
|
1062
1187
|
|
|
1063
1188
|
### Active filters bar (`#prism_active_filters_bar`)
|
|
1064
1189
|
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ theme, troubleshooting). This README is a quick start.
|
|
|
12
12
|
## Live demo
|
|
13
13
|
|
|
14
14
|
A live demo dashboard is running at
|
|
15
|
-
**[prism-demo.onrender.com/admin](https://prism-demo.onrender.com/admin)**:
|
|
15
|
+
**[prism-demo.onrender.com/admin](https://prism-demo.onrender.com/admin/login)**:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
Username: admin@example.com
|
|
@@ -120,6 +120,8 @@ ActiveAdminPrism.configure do |config|
|
|
|
120
120
|
config.menu_search = true # search box that filters the sidebar's Pages nav
|
|
121
121
|
config.select2 = false # default: false — auto-enhance every <select> into Select2
|
|
122
122
|
config.sidebar_collapsible = true # sidebar collapses to an icon-only rail (desktop only)
|
|
123
|
+
config.action_items_dropdown = true # many title-bar action_items collapse into an "Actions" dropdown
|
|
124
|
+
config.action_items_dropdown_threshold = 3
|
|
123
125
|
end
|
|
124
126
|
|
|
125
127
|
ActiveAdminPrism.enable!
|