|
| 1 | +<style> |
| 2 | + |
| 3 | +.comments{ |
| 4 | + background: #E59866; |
| 5 | + opacity: 1; |
| 6 | + border-radius: 18px; |
| 7 | + padding-top: 5px; |
| 8 | + padding-bottom: 5px; |
| 9 | + margin-right: 500px; |
| 10 | + text-align:center; |
| 11 | + |
| 12 | +} |
| 13 | + |
| 14 | + |
| 15 | +#myDIV { |
| 16 | +} |
| 17 | + #user-chat-box{ |
| 18 | + position: fixed; |
| 19 | + bottom: 0; |
| 20 | + right: 15px; |
| 21 | + border: 1px solid grey; |
| 22 | + height: 350px; |
| 23 | + width: 300px; |
| 24 | + } |
| 25 | + #chat-messages-list{ |
| 26 | + list-style: none; |
| 27 | + padding: 10px; |
| 28 | + height: 83%; |
| 29 | + background-color: white; |
| 30 | + overflow: auto; |
| 31 | + } |
| 32 | + .other-message{ |
| 33 | + text-align: left; |
| 34 | + padding: 5px; |
| 35 | + } |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +.self-message{ |
| 41 | + text-align: right; |
| 42 | + padding: 5px; |
| 43 | + } |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + #chat-message-input-container{ |
| 48 | + height: 30%; |
| 49 | + width: 100%; |
| 50 | + display: flex; |
| 51 | + flex-direction: row; |
| 52 | + } |
| 53 | + #msg{ |
| 54 | + height: 50%; |
| 55 | + width: 70%; |
| 56 | + } |
| 57 | + #send{ |
| 58 | + height: 50%; |
| 59 | + width: 30%; |
| 60 | + font-size: 25px; |
| 61 | + color: white; |
| 62 | + border: none; |
| 63 | + background:#1AABEE ; |
| 64 | + } |
| 65 | + |
| 66 | + |
| 67 | +</style> |
| 68 | + |
| 69 | + |
1 | 70 | <% content_for :body_class, 'bg-light' %>
|
2 | 71 |
|
3 | 72 | <section class="section seller-show">
|
|
19 | 88 | <br>
|
20 | 89 |
|
21 | 90 | <div class="control has-icons-left">
|
22 |
| - <%= button_to 'Talk to Seller', '#', class: 'button is-info add-to-cart' %> |
| 91 | + <button onclick="myFunction()" class='button is-info add-to-cart' >Talk to Seller</button> |
| 92 | + |
| 93 | + |
23 | 94 |
|
24 | 95 | <span class="icon is-small is-left">
|
25 | 96 | <i class="fa fa-comments"></i>
|
26 | 97 | </span>
|
| 98 | + <div id="myDIV"> |
| 99 | + <% if user_signed_in? %> |
| 100 | + <div id="user-chat-box"> |
| 101 | + <ul id="chat-messages-list"> |
| 102 | + <li class="other-message"> |
| 103 | + <span style="background-color:#F3AD87 ;"> |
| 104 | + Other Message</span> |
| 105 | + </li> |
| 106 | + <li class="self-message"> |
| 107 | + <span style=" background-color: #BBF5CF ;"> |
| 108 | + Self Message |
| 109 | + </span> |
| 110 | + |
| 111 | + </li> |
| 112 | + </ul> |
| 113 | + <div id="chat-message-input-container"> |
| 114 | + <input id="msg" placeholder="Type message here"> |
| 115 | + <button id="send"><i class="fa fa-paper-plane""></i></button> |
| 116 | + </div> |
| 117 | + </div> |
| 118 | + <% end %> |
| 119 | +</div> |
27 | 120 | </div>
|
| 121 | + </div> |
28 | 122 |
|
29 |
| - </div> |
| 123 | + |
30 | 124 |
|
31 | 125 |
|
32 | 126 |
|
|
104 | 198 |
|
105 | 199 | <div class="column" style="border:1px solid #D7DBDD ">
|
106 | 200 | <li class="inline-block pr3 f3"><strong>Rating and Review: </strong></li>
|
| 201 | + |
| 202 | + <hr> |
| 203 | + <div style="background-color: #EAECEE; border-radius:20px; display:block;"> |
| 204 | + <%= render @seller.comments %> |
| 205 | + |
107 | 206 |
|
| 207 | +</div> |
108 | 208 |
|
109 |
| - |
110 |
| - </div> |
111 |
| -<br> |
112 | 209 | <br>
|
113 |
| - <div class="column" style="border:1px solid #D7DBDD "> |
114 |
| - <li class="inline-block pr3 f3"><strong>Question And Answer: </strong></li> |
| 210 | +<strong><p class="comments">Add Review</p></strong><br> |
| 211 | + |
| 212 | + <%= render "comments/form" %> |
115 | 213 |
|
116 | 214 |
|
117 | 215 |
|
118 | 216 | </div>
|
| 217 | +<br> |
| 218 | +<br> |
| 219 | + |
119 | 220 |
|
120 | 221 | </div>
|
121 | 222 | </ul>
|
|
0 commit comments