Skip to content

Commit 20f7be1

Browse files
Add user search (#52)
2 parents b58278c + 3460dcd commit 20f7be1

File tree

4 files changed

+35
-53
lines changed

4 files changed

+35
-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>

db/seeds.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
88
# MovieGenre.find_or_create_by!(name: genre_name)
99
# end
10+
puts "Destroying current records..."
11+
12+
Topic.destroy_all
13+
Provider.destroy_all
14+
Language.destroy_all
15+
User.destroy_all
16+
17+
puts "Creating languages..."
1018

1119
[
1220
{ name: "english", file_share_folder: "languages/english" },
@@ -15,12 +23,18 @@
1523
Language.find_or_create_by!(language)
1624
end
1725

26+
puts "Languages created!"
27+
puts "Creating providers..."
28+
1829
[
1930
{ name: "Provided by the government", provider_type: "government" },
2031
].each do |provider|
2132
Provider.find_or_create_by!(provider)
2233
end
2334

35+
puts "Providers created!"
36+
puts "Creating topics..."
37+
2438
[
2539
{
2640
title: "Introduction to English",
@@ -41,3 +55,18 @@
4155
].each do |topic|
4256
Topic.find_or_create_by!(topic)
4357
end
58+
59+
puts "Topics created!"
60+
puts "Creating users..."
61+
62+
User.create(email: "[email protected]", password: "test123")
63+
64+
10.times do
65+
User.create(
66+
email: Faker::Internet.email,
67+
password: "password",
68+
is_admin: false,
69+
)
70+
end
71+
72+
puts "Users created!"

0 commit comments

Comments
 (0)