<%inherit file="base.mako"/>
<%namespace name="nav" file="nav.mako" />
-<%namespace file="navlinks.mako" import="navlinks" />
<%block name="navigation">
${nav.nav('maps')}
Active Maps Index
</%block>
-% if not top_maps:
-<h2>Sorry, no maps yet. Get playing!</h2>
+% if not top_maps and start is not None:
+ <h2 class="text-center">Sorry, no more maps!</h2>
+
+% elif not top_maps and start is None:
+ <h2 class="text-center">No active maps found. Yikes, get playing!</h2>
% else:
##### ACTIVE SERVERS #####
</tr>
</thead>
<tbody>
- ##### this is to get around the actual row_number/rank of the map not being in the actual query
- <% i = 1 + (top_maps.page-1) * 25%>
- % for (map_id, name, count) in top_maps:
+ % for tm in top_maps:
<tr>
- <td>${i}</td>
- % if map_id != '-':
- <td class="no-stretch"><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
- % else:
- <td class="nostretch">${name}</td>
- % endif
- <td>${count}</td>
+ <td>${tm.sort_order}</td>
+ <td class="no-stretch"><a href="${request.route_url('map_info', id=tm.map_id)}" title="Go to the map info page for ${tm.map_name}">${tm.map_name}</a></td>
+ <td>${tm.sort_order}</td>
</tr>
- <% i = i+1 %>
% endfor
</tbody>
</table>
- <small>*figures are from the past 7 days<small>
+ <p class="text-center"><small>Note: these figures are from the past 7 days</small>
</div>
</div>
- <div class="row">
- <div class="small-12 large-6 large-offset-3 columns">
- ${navlinks("top_maps_by_times_played", top_maps.page, top_maps.last_page)}
- </div>
+% if len(top_maps) == 20:
+<div class="row">
+ <div class="small-12 large-6 large-offset-3 columns">
+ <ul class="pagination">
+ <li>
+ <a href="${request.route_url('top_maps_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
+ </li>
+ </ul>
</div>
+</div>
+% endif
% endif