-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow Admins to delete users * Add user page * Allow admins to edit User profile * Fix User list ordering error + validate presence of username * Add responsive class to tables
- Loading branch information
Showing
12 changed files
with
428 additions
and
248 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,49 +1,52 @@ | ||
<h1 class="my-5">Bejegyzések</h1> | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Cím</th> | ||
<th>Létrehozva</th> | ||
<th>Indexkép</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
<% @posts.each do |post| %> | ||
<div class="table-responsive"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<td><%= link_to post.title, post %></td> | ||
<td><%= post.created_at %></td> | ||
<td> | ||
<% if post.image.attached? %> | ||
van | ||
<% else %> | ||
nincs | ||
<% end %> | ||
</td> | ||
<td> | ||
<div class="btn-group" role="group" aria-label="Műveletek"> | ||
<%= link_to edit_post_path(post), class: "btn btn-outline-primary btn-sm", title: "Módosítás" do %> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /> | ||
</svg> | ||
<% end %> | ||
<%= link_to post, | ||
method: :delete, | ||
data: { confirm: 'Biztosan törlöd?' }, | ||
class: "btn btn-outline-danger btn-sm", | ||
title: "Törlés" do %> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /> | ||
</svg> | ||
<% end %> | ||
</div> | ||
</td> | ||
<th>Cím</th> | ||
<th>Létrehozva</th> | ||
<th>Indexkép</th> | ||
<th></th> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</thead> | ||
|
||
<tbody> | ||
<% @posts.each do |post| %> | ||
<tr> | ||
<td><%= link_to post.title, post %></td> | ||
<td><%= post.created_at %></td> | ||
<td> | ||
<% if post.image.attached? %> | ||
van | ||
<% else %> | ||
nincs | ||
<% end %> | ||
</td> | ||
<td> | ||
<div class="btn-group" role="group" aria-label="Műveletek"> | ||
<%= link_to edit_post_path(post), class: "btn btn-outline-primary btn-sm", title: "Módosítás" do %> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/> | ||
</svg> | ||
<% end %> | ||
<%= link_to post, | ||
method: :delete, | ||
data: { confirm: 'Biztosan törlöd?' }, | ||
class: "btn btn-outline-danger btn-sm", | ||
title: "Törlés" do %> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/> | ||
</svg> | ||
<% end %> | ||
</div> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<div class="my-3"> | ||
<%= link_to 'Új Poszt', new_post_path, class: "btn btn-primary" %> | ||
</div> |
Oops, something went wrong.