Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="main-container">
- <div class="user-info">
- <%= image_tag("user.png", class: "user-info-avatar") %>
- <h1><%= current_user.complete_name %></h1>
- <h2><%= current_user.email %></h2>
- <div class="bank-info">
- <h3>Información bancaria</h3>
- <h4><%= current_user.bank_name %></h4>
- <h4><%= current_user.account_type %></h4>
- <h4><%= current_user.bank_account %></h4>
- </div>
- </div>
- <% if notice %>
- <div class="dashboard-notice">
- <h2><%= notice %></h2>
- <a class="notice-button btn">OK</a>
- </div>
- <% end %>
- <div class="status-panel">
- <h2 class="situation-title">Balance</h2>
- <div class="situation">
- <h2>Esta es la situación financiera de <%= current_user.complete_name %>:</h2>
- <!-- 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 -->
- <table>
- <thead>
- <th><h1 id="balance">Debo</h1></th>
- <th><h1 id="balance">Me deben</h1></th>
- </thead>
- <tbody>
- <tr>
- <td><h3>$<%= @debo %></h3></td>
- <td><h3>$<%= @me_deben %></h3></td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2>Deja tu anuncio</h2>
- <%= simple_form_for(@anuncio_para_publicar) do |f| %>
- <%= f.input :user_id, :as => :hidden, :input_html => {:value => current_user.id} %>
- <%= f.input :text, label: false, :input_html => {class: 'inputs'} %>
- <%= f.button :submit, "Anunciar", class: 'input-button2'%>
- <% end %>
- <h2>¿Qué piensan tus amigos?</h2>
- <% @anuncios.each do |anuncio| %>
- <div class="notification">
- <h1><%= anuncio.user.complete_name %>: <%= anuncio.text %></h1>
- </div>
- <% end %>
- <h2 class="situation-title">Notificaciones</h2>
- <% @notifications.each do |noti| %>
- <div class="notification">
- <h1> <%= link_to User.find(noti.user_que_notifica).complete_name, user_path(noti.user_que_notifica) %>
- <%= noti.message %>
- <% if noti.tipo_notificacion== "tab_participant"%>
- <%= link_to Tab.find(noti.id_elemento).title, tab_path(noti.id_elemento) %>
- <% if TabParticipant.where(tab_id: noti.id_elemento, user_id: current_user.id).first.accepted == false %>
- <%= link_to "OK", oktabparticipant_path(TabParticipant.where(tab_id: noti.id_elemento, user_id: current_user.id).first) %>
- <% end %>
- <% elsif noti.tipo_notificacion== "payment"%>
- <%= Payment.find(noti.id_elemento).amount %>
- <% if Payment.find(noti.id_elemento).accepted == false %>
- <%= link_to "ACEPTAR", okpayment_path(noti.id_elemento) %>
- <% end %>
- <% elsif noti.tipo_notificacion== "debt"%>
- <%= Debt.find(noti.id_elemento).amount %>
- <% if Debt.find(noti.id_elemento).accepted == false %>
- <%= link_to "OK", okdebt_path(noti.id_elemento) %>
- <% end %>
- <% end %>
- </h1>
- </div>
- <% end %>
- <h2 class="situation-title">Eventos</h2>
- <% current_user.tabs.each do |tab|%>
- <div class="situation">
- <div class="avatar">
- <%= image_tag("user.png") %>
- </div>
- <h1 id="balance"><%= "#{current_user.first_name} ha participado en la actividad \"#{tab.title}\", el día #{tab.date}." %></h1>
- <h2><%= "\"" + tab.description + "\"" %></h2>
- <%= link_to "Ver cuenta", tab_path(tab.id) , class: 'btn' %>
- </div>
- <% end %>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement