-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
367 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
section class="w-full py-8 px-4 mx-auto max-w-2xl lg:py-16 bg-white rounded-lg shadow dark:border md:mt-0 sm:max-w-md md:max-w-lg xl:p-0 dark:bg-gray-800 dark:border-gray-700" | ||
section class="section-container" | ||
div class="p-6 space-y-4 md:space-y-6 sm:p-8" | ||
h1 class=h1_label_class = category.id? ? "Editing category" : "New category" | ||
h1 class="h1-label" = category.id? ? "Editing category" : "New category" | ||
= form_with(model: [:admin, category], class: "contents") do |form| | ||
== render "shared/errors", errors: category&.errors&.full_messages || [] | ||
.my-5 | ||
= form.label :active, class: "inline-flex items-center cursor-pointer" | ||
= form.check_box :active, class: "sr-only peer" | ||
span class="text-sm font-medium text-gray-900 dark:text-white" Status | ||
div class="ms-3 relative w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-green-300 dark:peer-focus:ring-green-800 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-green-600" | ||
div class="peer form-switch" | ||
.my-5 | ||
= form.label :name, class: form_label_class | ||
= form.label :name, class: "form-label" | ||
= form.text_field :name, required: true, placeholder: "Category 1", | ||
class: form_input_class | ||
class: "form-input" | ||
.my-5 | ||
= form.label :description, class: form_label_class | ||
= form.label :description, class: "form-label" | ||
= form.text_area :description, | ||
class: form_input_class | ||
class: "form-input" | ||
.my-5 | ||
= form.label :image, class: form_label_class | ||
= form.label :image, class: "form-label" | ||
= form.file_field :image, accept: "image/*", | ||
class: form_input_class | ||
= form.submit class: form_button_class | ||
class: "form-input" | ||
= form.submit class: "btn-primary" | ||
div | ||
- if category.id? | ||
=> link_to admin_category_path(@category), class: button_with_icon_class do | ||
=> link_to admin_category_path(@category), class: "btn-dark border border-gray-300 dark:border-gray-700 me-2 mb-2" do | ||
i class="fa-solid fa-eye w-3.5 h-3.5 me-2" | ||
| Show this category | ||
=< link_to admin_categories_path, class: button_with_icon_class do | ||
=< link_to admin_categories_path, class: "btn-dark border border-gray-300 dark:border-gray-700 me-2 mb-2" do | ||
i class="fa-solid fa-arrow-left w-3.5 h-3.5 me-2" | ||
| Back to categories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
- title "Admin | Customers" | ||
|
||
.w-full | ||
h1 class="mb-4 #{h1_label_class}" Customers | ||
h1 class="mb-4 h1-label" Customers | ||
== render "content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.