Last active
July 18, 2020 21:36
-
-
Save mrbongiolo/98f1ba254e4b806f368c19a9f920df91 to your computer and use it in GitHub Desktop.
Categories Index Example
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
.d-flex.align-items-center.justify-content-space-between | |
h3 | |
| Listando categorias | |
= button_to 'Nova Categoria', new_category_path, method: :get, class: 'btn btn-primary' | |
table.table.table-hover | |
thead | |
tr | |
th | |
| Descrição | |
th | |
tbody | |
- @categories.each do |category| | |
tr | |
td | |
= category.desc | |
td | |
.d-flex.align-items-center.justify-content-center | |
= button_to 'Mostrar', category_path(category), method: :get, class: 'btn btn-success' | |
= button_to 'Editar', edit_category_path(category), method: :get, class: 'btn btn-warning' | |
= button_to 'Excluir', category_path(category), method: :delete, class: 'btn btn-danger btn-sm confirm', data: { confirm: 'Você tem certeza que deseja excluir essa categoria?'} |
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
.d-flex.align-items-center.justify-content-space-between | |
h3 | |
| Listando categorias | |
= button_to 'Nova Categoria', new_category_path, method: :get, class: 'btn btn-primary' | |
table.table.table-hover | |
thead | |
tr | |
th | |
| Descrição | |
th | |
tbody | |
- @categories.each do |category| | |
tr | |
td | |
= category.desc | |
td.text-align-right | |
= button_to 'Mostrar', category_path(category), method: :get, class: 'btn btn-success' | |
= button_to 'Editar', edit_category_path(category), method: :get, class: 'btn btn-warning' | |
= button_to 'Excluir', category_path(category), method: :delete, class: 'btn btn-danger btn-sm confirm', data: { confirm: 'Você tem certeza que deseja excluir essa categoria?'} |
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
.d-flex { | |
display: flex; | |
} | |
.align-items-center: { | |
align-items: center; | |
} | |
.justify-content-end { | |
justify-content: end; | |
} | |
.justify-content-space-between { | |
justify-content: space-between; | |
} | |
.text-align-right { | |
text-align: right; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment