Skip to content

Commit 3460dcd

Browse files
committed
Add search and pagination to user index
The "mazer" layout is no longer used as we have moved all the code on application.html.erb. We are not using ApexCharts currently so I removed the lines that were importing scripts for that. I tried writing system tests to test the search and pagination but I couldn't find how to make Capybara see it. It worked when I tested it by hand.
1 parent a740f24 commit 3460dcd

File tree

3 files changed

+6
-53
lines changed

3 files changed

+6
-53
lines changed

app/views/layouts/application.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/compiled/css/app.css">
2727
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/compiled/css/app-dark.css">
2828
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/compiled/css/iconly.css">
29+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/simple-datatables/style.css">
30+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/scss/pages/simple-datatables.scss">
2931

3032
<style>
3133
#app {
@@ -90,9 +92,7 @@
9092
</div>
9193
</div>
9294

93-
<!-- Need: Apexcharts -->
94-
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/apexcharts/apexcharts.min.js"></script>
95-
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/static/js/pages/dashboard.js"></script>
96-
95+
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/simple-datatables/umd/simple-datatables.js"></script>
96+
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/static/js/pages/simple-datatables.js"></script>
9797
</body>
9898
</html>

app/views/layouts/mazer.html.erb

Lines changed: 0 additions & 47 deletions
This file was deleted.

app/views/users/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<section class="section">
55
<div class="card">
66
<div class="card-body">
7-
<%= link_to new_region_path, class: "btn btn-primary" do %>
7+
<%= link_to new_region_path, class: "btn btn-primary m-2" do %>
88
<i class="bi bi-plus"></i> Add New User
99
<% end %>
1010
<table class="table table-striped" id="table1">
1111
<thead>
1212
<tr>
1313
<th>Email</th>
1414
<th>Administrator</th>
15-
<th>User actions</th>
15+
<th class="text-end">User Actions</th>
1616
</tr>
1717
</thead>
1818
<tbody>

0 commit comments

Comments
 (0)