administration-zero 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5aa731f98bd95da0a453681a5eea61541db6265488bed953764f558df6aa0e11
4
- data.tar.gz: 8c7ca12710788cd5916d86fd70f2dd868825e82fc38ca451b794cd82203611c7
3
+ metadata.gz: 5c9bc430475641b273d9dc02e7e8883e74ee96c0987ce740486d26fb40812383
4
+ data.tar.gz: 9b6c6828929533f9265bcf3efc9ea7c82c7533713a7d5fc645f75464e77169c3
5
5
  SHA512:
6
- metadata.gz: 86c34f86a87f38bc83ddf4900e81cf87c811b6736176799a7cc18198de257c2705a0e5a3ddedd394c85cd8f731e8bd0e9d0315549d59fb46ce159c47c566a8a9
7
- data.tar.gz: f32f2ac7bf7e2042969226eeae8d35956b161bb39f79f0b1b9a2611b59e33a40a7ca661ffe1332833972ec9c80c5b6041189d456ef255d7f0c43631f26e50703
6
+ metadata.gz: b38673e793e5aebce3a1e379ab90e5870f26a1003f54299b283040341900b264e5c1448e645281795397a0c51c6e153f03a56f1cc61299e613d0588e2a47e5d6
7
+ data.tar.gz: 10f3e5d7d1cd05de057f6957da986ffffb00c506d6d0a6b493dece7fde760387a368010dadeeba9ac1c25e5d519b6480edfc129a9baaab4b6a7aab6c537d4d7b
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- administration-zero (0.0.7)
4
+ administration-zero (0.0.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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="Demo" style="max-width: 100%;">
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,3 +1,3 @@
1
1
  module AdministrationZero
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,19 +1,11 @@
1
- <% if flash[:notice] %>
2
- <div class="position-fixed start-50 translate-middle-x" style="z-index: 1030; top: 8rem;">
3
- <div class="toast hide text-center text-white bg-success border-0" data-controller="flash-message">
4
- <div class="toast-body">
5
- <%= flash[:notice] %>
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
- </div>
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", "#offcanvasFilters", "data-bs-toggle": "offcanvas", class: "btn btn-light" %>
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>Download: <%= link_to "CSV", admin_users_path(format: :csv, q: request.params[:q]) %></div>
43
- <div class="ms-auto d-flex align-items-center gap-2">
44
- <div class="d-none d-md-flex"><%== pagy_info @pagy %></div>
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="offcanvasFilters" tabindex="-1" class="offcanvas offcanvas-end">
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", "#offcanvasFilters", "data-bs-toggle": "offcanvas", class: "btn btn-light" %>
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>Download: <%%= link_to "CSV", <%= index_helper(type: :path) %>(format: :csv, q: request.params[:q]) %></div>
51
- <div class="ms-auto d-flex align-items-center gap-2">
52
- <div class="d-none d-md-flex"><%%== pagy_info @pagy %></div>
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="offcanvasFilters" tabindex="-1" class="offcanvas offcanvas-end">
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>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administration-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon