-
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.
Merge pull request #111 from Code-the-Dream-School/104-add-display-co…
…mment-page-stylings added styling and got the comment buttons to work correctly
- Loading branch information
Showing
12 changed files
with
128 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
|
||
<h1>Edit comment</h1> | ||
|
||
<div class="comments-new"> | ||
<%= form_with model: [@entry, @comment], local: true do |f| %> | ||
<div> | ||
<%= f.label :text, "Edit your comment:" %><br> | ||
<%= f.text_area :text, value: @comment.text %> | ||
<%= f.text_area :text, value: @comment.text, class: "comment-field" %> | ||
</div> | ||
<%= f.submit 'Update' %> | ||
|
||
<br> | ||
<div class="actions"> | ||
<%= f.submit 'Update', class: "comment-btn" %> | ||
</div> | ||
|
||
<% end %> | ||
<div> | ||
<%= link_to "Show this comment", entry_comments_path(@entry, @comment) %> | | ||
<%= link_to "Back to comment", entry_comments_path(@entry) %> | ||
</div> |
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,10 +1,7 @@ | ||
|
||
<h1>New comment</h1> | ||
|
||
<div class="comments-new" > | ||
<%= render "form", comment: @comment %> | ||
|
||
<br> | ||
|
||
<div> | ||
<%= link_to 'Friends Entries', friend_entries_path, class: "btn btn-secondary btn-sm" %> | ||
</div> |
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,15 +1,18 @@ | ||
<h1>Comment</h1> | ||
|
||
<div class="comments-show"> | ||
|
||
<% if @comment.present? %> | ||
<%= render @comment %> | ||
<% else %> | ||
<p>No comment found.</p> | ||
|
||
<% end %> | ||
<%= link_to 'Edit', edit_entry_comment_path(@entry, @comment), class: "btn btn-primary" %> | | ||
<%= button_to entry_comment_path(@entry, @comment), method: :delete, class: "btn btn-danger btn-sm" do%> | ||
<i class="bi bi-trash"></i> | ||
<% end %> | ||
<%= link_to 'My Entries', entries_path, class: "btn btn-primary" %> | ||
<%= link_to 'Friends Entries', friend_entries_path, class: "btn btn-primary" %> | ||
|
||
<div class="comment-btn-group"> | ||
<%= link_to 'Edit', edit_entry_comment_path(@entry, @comment), class: 'comment-btn' %> | ||
<%= button_to entry_comment_path(@entry, @comment), method: :delete, class: "delete-comment-btn" do%> | ||
<i class="bi bi-trash"></i> | ||
<% end %> | ||
</div> | ||
</div> |
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