Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. <div class="main-container">
  2. <div class="user-info">
  3. <%= image_tag("user.png", class: "user-info-avatar") %>
  4. <h1><%= current_user.complete_name %></h1>
  5. <h2><%= current_user.email %></h2>
  6. <div class="bank-info">
  7. <h3>Información bancaria</h3>
  8. <h4><%= current_user.bank_name %></h4>
  9. <h4><%= current_user.account_type %></h4>
  10. <h4><%= current_user.bank_account %></h4>
  11. </div>
  12. </div>
  13. <% if notice %>
  14. <div class="dashboard-notice">
  15. <h2><%= notice %></h2>
  16. <a class="notice-button btn">OK</a>
  17. </div>
  18. <% end %>
  19. <div class="status-panel">
  20. <h2 class="situation-title">Balance</h2>
  21. <div class="situation">
  22. <h2>Esta es la situación financiera de <%= current_user.complete_name %>:</h2>
  23. <!-- Acá se deme tomar la suma de dinero que debe el usuario y ponerla en pasivo, y la suma de dinero que le deben al usuario y ponerla en activo. Hacer método a nivel de modelo -->
  24. <table>
  25. <thead>
  26. <th><h1 id="balance">Debo</h1></th>
  27. <th><h1 id="balance">Me deben</h1></th>
  28. </thead>
  29. <tbody>
  30. <tr>
  31. <td><h3>$<%= @debo %></h3></td>
  32. <td><h3>$<%= @me_deben %></h3></td>
  33. </tr>
  34. </tbody>
  35. </table>
  36. </div>
  37. <h2>Deja tu anuncio</h2>
  38. <%= simple_form_for(@anuncio_para_publicar) do |f| %>
  39. <%= f.input :user_id, :as => :hidden, :input_html => {:value => current_user.id} %>
  40. <%= f.input :text, label: false, :input_html => {class: 'inputs'} %>
  41. <%= f.button :submit, "Anunciar", class: 'input-button2'%>
  42. <% end %>
  43.  
  44. <h2>¿Qué piensan tus amigos?</h2>
  45. <% @anuncios.each do |anuncio| %>
  46. <div class="notification">
  47. <h1><%= anuncio.user.complete_name %>: <%= anuncio.text %></h1>
  48. </div>
  49. <% end %>
  50.  
  51.  
  52. <h2 class="situation-title">Notificaciones</h2>
  53. <% @notifications.each do |noti| %>
  54. <div class="notification">
  55. <h1> <%= link_to User.find(noti.user_que_notifica).complete_name, user_path(noti.user_que_notifica) %>
  56. <%= noti.message %>
  57.  
  58. <% if noti.tipo_notificacion== "tab_participant"%>
  59. <%= link_to Tab.find(noti.id_elemento).title, tab_path(noti.id_elemento) %>
  60. <% if TabParticipant.where(tab_id: noti.id_elemento, user_id: current_user.id).first.accepted == false %>
  61. <%= link_to "OK", oktabparticipant_path(TabParticipant.where(tab_id: noti.id_elemento, user_id: current_user.id).first) %>
  62. <% end %>
  63.  
  64. <% elsif noti.tipo_notificacion== "payment"%>
  65. <%= Payment.find(noti.id_elemento).amount %>
  66. <% if Payment.find(noti.id_elemento).accepted == false %>
  67. <%= link_to "ACEPTAR", okpayment_path(noti.id_elemento) %>
  68. <% end %>
  69.  
  70. <% elsif noti.tipo_notificacion== "debt"%>
  71. <%= Debt.find(noti.id_elemento).amount %>
  72. <% if Debt.find(noti.id_elemento).accepted == false %>
  73. <%= link_to "OK", okdebt_path(noti.id_elemento) %>
  74. <% end %>
  75. <% end %>
  76. </h1>
  77.  
  78. </div>
  79. <% end %>
  80.  
  81. <h2 class="situation-title">Eventos</h2>
  82. <% current_user.tabs.each do |tab|%>
  83. <div class="situation">
  84. <div class="avatar">
  85. <%= image_tag("user.png") %>
  86. </div>
  87. <h1 id="balance"><%= "#{current_user.first_name} ha participado en la actividad \"#{tab.title}\", el día #{tab.date}." %></h1>
  88. <h2><%= "\"" + tab.description + "\"" %></h2>
  89. <%= link_to "Ver cuenta", tab_path(tab.id) , class: 'btn' %>
  90. </div>
  91. <% end %>
  92.  
  93. </div>
  94. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement