-
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.
- Loading branch information
1 parent
3354c8f
commit dc00dda
Showing
5 changed files
with
71 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<div class="card" > | ||
<div class="card-content viewMemo"> | ||
<div class="content"> | ||
<%= raw renderMarkdown(memo.body) %> | ||
<% if memo.attachment != nil && memo.attachment != 0 %> | ||
<div id="modal1" class="modal"> | ||
<div class="modal-background"></div> | ||
<div class="modal-content"> | ||
<p class="image is-1by1"> | ||
<img src="data:image/png;base64,<%= memo.attachment %>" style="width:auto;height:auto" /> | ||
</p> | ||
</div> | ||
<button class="modal-close is-large" aria-label="close" /> | ||
</div> | ||
<img src="data:image/png;base64,<%= memo.attachment %>" style="width:200px" onclick="openModal();" /> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="card-content updateMemo" data-url="<%= memo_path(memo.id) %>" > | ||
<div class="content"> | ||
<input type="hidden"><textarea id="editMemoTA" class="textarea"><%= memo.body %></textarea></input> | ||
<% if memo.attachment != nil && memo.attachment != 0 %> | ||
<img src="data:image/png;base64,<%= memo.attachment %>" style="width:200px" onclick="openModal();" /> | ||
<% end %> | ||
</div> | ||
</div> | ||
<footer class="card-footer"> | ||
<div class="card-footer-item left"> | ||
<button id="editMemo" class="button left" style="background-color:var(--ctp-frappe-peach);color:black;" ><i class="fa-regular fa-pen-to-square"></i></button> | ||
<button id="saveMemo" class="button left" style="background-color:var(--ctp-frappe-blue);color:black;" ><i class="fa-regular fa-floppy-disk"></i></button> | ||
<button id="cancelEdit" class="button left" style="background-color:var(--ctp-frappe-maroon);color:black;" ><i class="fa-solid fa-ban"></i></button> | ||
</div> | ||
<div class="card-footer-item right"> | ||
<%= button_to memo_path(memo), :action => "destroy", :method => :delete, :class => "button right is-danger", data: { turbo_confirm: "Are you sure you want to delete?" } do %> | ||
<i class="fa-regular fa-trash-can"></i> | ||
<% end %> | ||
</div> | ||
</footer> | ||
</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