administration-zero 0.0.7 → 0.0.8
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/.documentation/screenshot.png +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -2
- data/lib/administration_zero/version.rb +1 -1
- data/lib/generators/admin/install/templates/erb/admin/application/_flash_messages.html.erb +8 -16
- data/lib/generators/admin/install/templates/erb/admin/users/index.html.erb +8 -6
- data/lib/generators/admin/scaffold/templates/erb/index.html.erb.tt +8 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c9bc430475641b273d9dc02e7e8883e74ee96c0987ce740486d26fb40812383
|
4
|
+
data.tar.gz: 9b6c6828929533f9265bcf3efc9ea7c82c7533713a7d5fc645f75464e77169c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38673e793e5aebce3a1e379ab90e5870f26a1003f54299b283040341900b264e5c1448e645281795397a0c51c6e153f03a56f1cc61299e613d0588e2a47e5d6
|
7
|
+
data.tar.gz: 10f3e5d7d1cd05de057f6957da986ffffb00c506d6d0a6b493dece7fde760387a368010dadeeba9ac1c25e5d519b6480edfc129a9baaab4b6a7aab6c537d4d7b
|
Binary file
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
The purpose of administration zero is to generate a pre-built administration panel into a rails application.
|
4
4
|
|
5
|
-
<img src=".documentation/screenshot.png" alt="
|
5
|
+
<img src=".documentation/screenshot.png" alt="screenshot" style="max-width: 100%;">
|
6
6
|
|
7
7
|
## Features
|
8
8
|
|
@@ -10,6 +10,7 @@ The purpose of administration zero is to generate a pre-built administration pan
|
|
10
10
|
- [Paginated results](https://github.com/ddnexus/pagy)
|
11
11
|
- [Sortable and filterable](https://github.com/activerecord-hackery/ransack)
|
12
12
|
- [Exportable data](https://github.com/westonganger/spreadsheet_architect)
|
13
|
+
- [Toastr for flash messages](https://getbootstrap.com/docs/5.1/components/toasts)
|
13
14
|
- Easy authentication system
|
14
15
|
- Admin scaffolds
|
15
16
|
|
@@ -37,7 +38,7 @@ $ rails generate admin:install
|
|
37
38
|
|
38
39
|
Then run `bundle install` again
|
39
40
|
|
40
|
-
Then run `rails db:seed`, you can access the admin panel in `/admin`, using `email: "admin@example.com", password: "Password9957"`
|
41
|
+
Then run `rails db:migrate db:seed`, you can access the admin panel in `/admin`, using `email: "admin@example.com", password: "Password9957"`
|
41
42
|
|
42
43
|
|
43
44
|
Now you're ready to generate your admin scaffolds.
|
@@ -1,19 +1,11 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
<div class="
|
4
|
-
<div class="toast-
|
5
|
-
|
1
|
+
<% flash.each do |type, message| %>
|
2
|
+
<% if ["notice", "alert"].include?(type) %>
|
3
|
+
<div class="position-fixed start-50 translate-middle-x" style="z-index: 1030; top: 8rem;">
|
4
|
+
<div class="toast hide text-center text-white bg-dark border-0" data-controller="flash-message">
|
5
|
+
<div class="toast-body">
|
6
|
+
<%= message %>
|
7
|
+
</div>
|
6
8
|
</div>
|
7
9
|
</div>
|
8
|
-
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
<% if flash[:alert] %>
|
12
|
-
<div class="position-fixed start-50 translate-middle-x" style="z-index: 1030; top: 8rem;">
|
13
|
-
<div class="toast hide text-center text-white bg-danger border-0" data-controller="flash-message">
|
14
|
-
<div class="toast-body">
|
15
|
-
<%= flash[:alert] %>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
</div>
|
10
|
+
<% end %>
|
19
11
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<%= render "page_header_actions" do %>
|
7
|
-
<%= link_to "Filters", "#
|
7
|
+
<%= link_to "Filters", "#offcanvas_filters", "data-bs-toggle": "offcanvas", class: "btn btn-light" %>
|
8
8
|
<%= link_to "New admin user", new_admin_user_path, class: "btn btn-primary" %>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<th><%= sort_link @search, :id %></th>
|
20
20
|
<th><%= sort_link @search, :email %></th>
|
21
21
|
<th><%= sort_link @search, :created_at %></th>
|
22
|
-
<th></th>
|
22
|
+
<th class="w-1"></th>
|
23
23
|
</tr>
|
24
24
|
</thead>
|
25
25
|
<tbody>
|
@@ -39,9 +39,11 @@
|
|
39
39
|
</table>
|
40
40
|
</div>
|
41
41
|
<div class="card-footer d-flex align-items-center fs-5">
|
42
|
-
<div
|
43
|
-
|
44
|
-
|
42
|
+
<div class="d-none d-md-block">
|
43
|
+
<div>Download: <%= link_to "CSV", admin_posts_path(format: :csv, q: request.params[:q]) %></div>
|
44
|
+
<%== pagy_info @pagy %>
|
45
|
+
</div>
|
46
|
+
<div class="ms-auto">
|
45
47
|
<%= render "pagination", pagy: @pagy %>
|
46
48
|
</div>
|
47
49
|
</div>
|
@@ -49,7 +51,7 @@
|
|
49
51
|
</div>
|
50
52
|
</div>
|
51
53
|
|
52
|
-
<div id="
|
54
|
+
<div id="offcanvas_filters" tabindex="-1" class="offcanvas offcanvas-end">
|
53
55
|
<div class="offcanvas-header">
|
54
56
|
<h2 class="offcanvas-title">Filters</h2>
|
55
57
|
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"></button>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%% end %>
|
5
5
|
|
6
6
|
<%%= render "page_header_actions" do %>
|
7
|
-
<%%= link_to "Filters", "#
|
7
|
+
<%%= link_to "Filters", "#offcanvas_filters", "data-bs-toggle": "offcanvas", class: "btn btn-light" %>
|
8
8
|
<%%= link_to "New <%= human_name.downcase %>", <%= new_helper(type: :path) %>, class: "btn btn-primary" %>
|
9
9
|
<%% end %>
|
10
10
|
<%% end %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<% attributes.each do |attribute| -%>
|
20
20
|
<th><%%= sort_link @search, :<%= attribute.column_name %> %></th>
|
21
21
|
<% end -%>
|
22
|
-
<th></th>
|
22
|
+
<th class="w-1"></th>
|
23
23
|
</tr>
|
24
24
|
</thead>
|
25
25
|
<tbody>
|
@@ -47,9 +47,11 @@
|
|
47
47
|
</table>
|
48
48
|
</div>
|
49
49
|
<div class="card-footer d-flex align-items-center fs-5">
|
50
|
-
<div
|
51
|
-
|
52
|
-
|
50
|
+
<div class="d-none d-md-block">
|
51
|
+
<div>Download: <%%= link_to "CSV", <%= index_helper(type: :path) %>(format: :csv, q: request.params[:q]) %></div>
|
52
|
+
<%%== pagy_info @pagy %>
|
53
|
+
</div>
|
54
|
+
<div class="ms-auto">
|
53
55
|
<%%= render "pagination", pagy: @pagy %>
|
54
56
|
</div>
|
55
57
|
</div>
|
@@ -57,7 +59,7 @@
|
|
57
59
|
</div>
|
58
60
|
</div>
|
59
61
|
|
60
|
-
<div id="
|
62
|
+
<div id="offcanvas_filters" tabindex="-1" class="offcanvas offcanvas-end">
|
61
63
|
<div class="offcanvas-header">
|
62
64
|
<h2 class="offcanvas-title">Filters</h2>
|
63
65
|
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas"></button>
|