pagination on the top as well
[onlineproject.git] / online / app / views / admin / _form.html.erb
blobfdecf5c20fb165a62f2bfc607619e989e7c0d959
1 <br />
2 <table border=0>
3   <tr >
4     <th>#</th>
5     <th>First Name</th>
6     <th>Second Name</th>
7     <th>Permission Day</th> 
8     <th>Last set status</th>
9     <th>Birthday</th>
10     <th>E-mail</th>
11     <th>Age<br /><%= select_tag(:age, options_for_select(@selectParams, params[:age] || cookies[:age] || "0")) %></th>
12     <th>Gender<br /><%= select_tag(:gender, options_for_select([['all',0],['male','male'],['female','female'],['Undefined','Undefined']],  params[:gender] || cookies[:gender] || 0) )%> </th>
13     <th>Relationship Status<br /><%= select_tag(:relation, options_for_select([['all',0],['Single','Single'],['It\'s complicated','It\'s complicated'],['Engaged','Engaged'],['Married','Married'],['In an Open Relationship','In an Open Relationship'],['Undefined','Undefined']], params[:relation] ||  cookies[:relation] || 0)) %></th>
14     <th>Location</th>
15     <th>Networks</th>
16     <th>Feeds was published</th>
17   </tr>
18   <tr>
19     <td colspan="6">
20       <%=will_paginate @fbusers %>
21     </td>
22   </tr>
23 <% @fbusers.each_with_index do |fbuser, i| %>
24   <tr class= "<%if i % 2 == 0 %>firstcolor<%else%><%end%>"> 
25     <td><%=i+1 + Person_per_page * ((params[:page] ? params[:page].to_i : 1) -1)%> </td>
26     <td><a target="_blank" href='http://www.facebook.com/profile.php?id=<%=h fbuser.uid %>'><%=h fbuser.first_name %></td>
27     <td><%=h fbuser.last_name %></a></td>
28     <td align=center><%=h fbuser.created_at.to_date.to_formatted_s(:long_ordinal)%></td>
29     <td><%= fbuser.status %></td>
30     <td><%= fbuser.birthday %></td>
31     <td align=center><%=h fbuser.usermail %></td>
32     <td align=center><%=h fbuser.birthday ? convert_birthday_to_number(fbuser.birthday) : nil %></td>  
33     <td align=center><%=h fbuser.gender %></td>
34     <td><%=h fbuser.relation  %></td>
35     <td><%=h fbuser.hometown_location  %></td>
36     <td><%=h fbuser.affiliations  %></td>
37     <td><%=h fbuser.friends_published  %></td>
38   </tr>
39 <% end %>
40 </table>
42 <%=will_paginate @fbusers %>
43 <br />
44 <%= submit_tag "Sort" %>
45 <br />  
46 <a href="admin/export_table_to_csv?<%= (params[:age]? "#{params.to_query}" : "")%>&query_type=<%=@query_type%>" target='_blank'">Export To CSV...</a>
47