Permalink
Browse files

Merge branch 'develop' into bek

  • Loading branch information...
2 parents fcc6934 + 4f94edd commit d4083aeaea67947d0039c5d804880aa500c9399b @bek0nik bek0nik committed Mar 29, 2012
@@ -165,4 +165,7 @@ table{
color:#B17880;
font-weight:normal;
margin:10px 0px;
+}
+.id-table{
+ font-size:11px;
}
@@ -79,11 +79,11 @@ def lastcallcustomer
private
def sort_column
- Customer.column_names.include?(params[:sort]) ? params[:sort] : "lastname"
+ Customer.column_names.include?(params[:sort]) ? params[:sort] : "id"
end
def sort_direction
- %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc"
+ %w[asc desc].include?(params[:direction]) ? params[:direction] : "desc"
end
def page_paginate
@@ -24,11 +24,11 @@ def destroy
private
def sort_column
- Customer.column_names.include?(params[:sort]) ? params[:sort] : "lastname"
+ Customer.column_names.include?(params[:sort]) ? params[:sort] : "id"
end
def sort_direction
- %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc"
+ %w[asc desc].include?(params[:direction]) ? params[:direction] : "desc"
end
end
@@ -1,6 +1,7 @@
<table class="table table-striped table-condensed customers" id="customers_table">
<thead>
<tr>
+ <th><%= sortable "id", "" %></th>
<th><%= sortable "typetransaction_id", "Тип сделки" %></th>
<th><%= sortable "lastname", "Фамилия" %></th>
<th><%= sortable "firstname", "Имя" %></th>
@@ -17,21 +18,22 @@
<tbody>
<% @customers.each do |c| %>
<tr>
- <td><%= c.typetransaction.name %></td>
+ <td class="id-table"><%= c.id %></td>
+ <td class="id-table"><%= c.typetransaction.name %></td>
<td>
<%= link_to(isset_field(c.lastname),c) %>
</td>
<td><%= link_to(c.firstname, c) %></td>
- <td>
+ <td class="id-table">
<% if have_object?(c.social_status) %>
<%= c.social_status.title %>
<% else %>
Отсутствует
<% end %>
</td>
- <td><%= c.phonehome %></td>
- <td><%= c.phonemobile %></td>
- <td><%= c.subjects.size %></td>
+ <td class="id-table"><%= c.phonehome %></td>
+ <td class="id-table"><%= c.phonemobile %></td>
+ <td class="id-table"><%= c.subjects.size %></td>
<td>
<%= link_to plus_icon, new_subject_path(:customer_id => c.id), :title => "Добавить недвижимость" %>
</td>
@@ -1,6 +1,7 @@
<table class="table table-striped table-condensed customers" id="customers_table">
<thead>
<tr>
+ <th><%= sortable "id", "" %></th>
<th><%= sortable "typetransaction_id", "Тип сделки" %></th>
<th><%= sortable "lastname", "Фамилия" %></th>
<th><%= sortable "firstname", "Имя" %></th>
@@ -17,19 +18,20 @@
<tbody>
<% @customers.each do |c| %>
<tr>
- <td><%= c.typetransaction.name %></td>
+ <td class="id-table"><%= c.id %></td>
+ <td class="id-table"><%= c.typetransaction.name %></td>
<td><%= link_to(isset_field(c.lastname),c) %></td>
<td><%= link_to(c.firstname, c) %></td>
- <td>
+ <td class="id-table">
<% if have_object?(c.social_status) %>
<%= c.social_status.title %>
<% else %>
Отсутствует
<% end %>
</td>
- <td><%= c.phonehome %></td>
- <td><%= c.phonemobile %></td>
- <td><%= c.subjects.size %></td>
+ <td class="id-table"><%= c.phonehome %></td>
+ <td class="id-table"><%= c.phonemobile %></td>
+ <td class="id-table"><%= c.subjects.size %></td>
<td>
<%= link_to plus_icon, new_subject_path(:customer_id => c.id), :title => "Добавить недвижимость" %>
</td>
@@ -113,7 +113,11 @@
</div>
<div class="field-obj">
<span>Район:</span>
- <%= subject.district.title %>
+ <% if have_object?(subject.district) %>
+ <%= subject.district.title %>
+ <% else %>
+ Отсутствует
+ <% end %>
</div>
<div class="field-obj">
<span>Адресс:</span>
@@ -1,6 +1,7 @@
-<table class="table table-striped table-condensed" id="potentials_table">
+<table class="table table-striped table-condensed customers" id="customers_table">
<thead>
<tr>
+ <th><%= sortable "id", "" %></th>
<th><%= sortable "typetransaction_id", "Тип сделки" %></th>
<th><%= sortable "lastname", "Фамилия" %></th>
<th><%= sortable "firstname", "Имя" %></th>
@@ -13,21 +14,22 @@
</tr>
</thead>
- <% @potentials.each do |p| %>
- <tbody>
+ <tbody>
+ <% @potentials.each do |p| %>
<tr>
- <td><%= p.typetransaction.name %></td>
+ <td class="id-table"><%= p.id %></td>
+ <td class="id-table"><%= p.typetransaction.name %></td>
<td><%= link_to(isset_field(p.lastname), p) %></td>
<td><%= link_to(p.firstname, p) %></td>
- <td>
+ <td class="id-table">
<% if have_object?(p.social_status) %>
<%= p.social_status.title %>
<% else %>
Отсутствует
<% end %>
</td>
- <td><%= p.phonehome %></td>
- <td><%= p.phonemobile %></td>
+ <td class="id-table"><%= p.phonehome %></td>
+ <td class="id-table"><%= p.phonemobile %></td>
<td>
<%= link_to plus_icon, new_subject_path(:customer_id => p.id),
:title => "Добавить недвижимость" %>
@@ -46,7 +48,7 @@
:confirm => "Вы уверены?" %>
</td>
</tr>
- </tbody>
- <% end %>
+ <% end %>
+ </tbody>
</table>
<%= paginate @potentials %>
@@ -1,6 +1,7 @@
<table class="table table-striped table-condensed subjects" id="subjects_table">
<thead>
<tr>
+ <th>№</th>
<th><%= sortable "typetransaction_id", "Тип сделки" %></th>
<th>Тип объекта</th>
<th><%= sortable "city_id", "Город" %></th>
@@ -15,19 +16,20 @@
<tbody>
<% @subjects.each do |s| %>
<tr>
- <td><%= s.typetransaction.name %></td>
+ <td class="id-table"><%= s.id %></td>
+ <td class="id-table"><%= s.typetransaction.name %></td>
<td><%= link_to(s.typesubject.name, s) %></td>
- <td>
+ <td class="id-table">
<% if have_object?(s.city) %>
<%= s.city.name %>
<% else %>
Отсутствует
<% end %>
</td>
- <td><%= isset_data(s.room) %></td>
+ <td class="id-table"><%= isset_data(s.room) %></td>
<td><%= s.address %></td>
- <td><%= price_currency(s) %></td>
- <td><%= to_area(s.area) %></td>
+ <td class="id-table"><%= price_currency(s) %></td>
+ <td class="id-table"><%= to_area(s.area) %></td>
<td><%= active_subject?(s) %></td>
<td class="actions-buttons">
<%= link_to eye_icon, subject_path(s), :title => "Подробнее...",

0 comments on commit d4083ae

Please sign in to comment.