-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate conversation template into .leex file
- Loading branch information
1 parent
183db92
commit 46407cb
Showing
3 changed files
with
26 additions
and
23 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
21 changes: 21 additions & 0 deletions
21
lib/curious_messenger_web/templates/conversation/show.html.leex
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,21 @@ | ||
<div> | ||
<b>User name:</b> <%= @user.nickname %> | ||
</div> | ||
<div> | ||
<b>Conversation title:</b> <%= @conversation.title %> | ||
</div> | ||
<div> | ||
<%= f = form_for :message, "#", [phx_submit: "send_message"] %> | ||
<%= label f, :content %> | ||
<%= text_input f, :content %> | ||
<%= submit "Send" %> | ||
</form> | ||
</div> | ||
<div> | ||
<b>Messages:</b> | ||
<%= for message <- @messages do %> | ||
<div> | ||
<b><%= message.user.nickname %></b>: <%= message.content %> | ||
</div> | ||
<% end %> | ||
</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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
defmodule CuriousMessengerWeb.ConversationView do | ||
use CuriousMessengerWeb, :view | ||
end |