74 lines
2.4 KiB
HTML
74 lines
2.4 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block content %}
|
|
<h1>Blocks</h1>
|
|
<hr />
|
|
<div class="row-fluid">
|
|
{% for item in page.object_list %}
|
|
<div class="span3">
|
|
{% if user.is_authenticated %}
|
|
<a href="{{ url('blocks_detail', item.data_value) }}">
|
|
{% else %}
|
|
<a href="#">
|
|
{% endif %}
|
|
<div class="well">
|
|
<div class="pull-right text-right">
|
|
<span class="badge">{{ item.data_value }}</span>
|
|
<h5 class="text-black">{{ item.name() }}</h5>
|
|
</div>
|
|
<div class="codexicon x4 margin-auto pull-left">
|
|
{% if item.main_texture %}
|
|
<img src="/static/textures/{{ item.main_texture.get_image(4) }}" />
|
|
{% endif %}
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
{% if loop.index % 4 == 0 %}
|
|
</div>
|
|
<div class="row-fluid">
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{#
|
|
<table class="table table-condensed table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th width="20" nowrap="nowrap"><div class="text-center">Data value</div></th>
|
|
<th nowrap="nowrap"><div class="text-center">Texture</div></th>
|
|
<th><div class="text-center">Name</div></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in page.object_list %}
|
|
<tr>
|
|
<td>
|
|
<div class="text-center">{{ item.data_value }}</div>
|
|
</td>
|
|
<td>
|
|
<div class="codexicon x2 margin-auto">
|
|
{% if item.main_texture %}
|
|
<img src="/static/textures/{{ item.main_texture.get_image(2) }}" />
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
{{ item.name() }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
#}
|
|
<div class="pagination pagination-centered">
|
|
<ul>
|
|
{% for p in range(1, paginator.num_pages+1) %}
|
|
<li {% if p == page_number %}class="active"{% endif %}>
|
|
<a href="{{ url('blocks_list') }}?page={{ p }}">{{ p }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endblock %}
|