mirror of
https://github.com/tabler/tabler.git
synced 2025-12-27 05:39:58 +04:00
84 lines
2.7 KiB
HTML
84 lines
2.7 KiB
HTML
{% assign roles = 'User,Admin,Owner' | split: ',' %}
|
|
<div class="table-responsive">
|
|
<table class="table table-vcenter{% if include.mobile %} table-mobile-md{% endif %}{% if include.card %} card-table{% endif %}{% if include.stripped %} table-striped{% endif %}{% if include.nowrap %} table-nowrap{% endif %}">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Title</th>
|
|
|
|
{% unless include.avatars %}
|
|
<th>Email</th>
|
|
{% endunless %}
|
|
|
|
|
|
<th>Role</th>
|
|
|
|
{% if include.nowrap %}
|
|
<th></th>
|
|
{% endif %}
|
|
|
|
<th class="w-1"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for person in site.data.people limit: 5 offset: include.offset %}
|
|
<tr>
|
|
{% if include.avatars %}
|
|
<td {% if include.mobile %}data-label="Name"{% endif %}>
|
|
<div class="d-flex lh-sm py-1 align-items-center">
|
|
{% include ui/avatar.html person-id=person.id class="mr-2" %}
|
|
<div class="flex-fill">
|
|
<div class="strong">{{ person.full_name }}</div>
|
|
<div class="text-muted text-h5"><a href="#" class="text-reset">{{ person.email }}</a></div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
{% else %}
|
|
<td {% if include.mobile %}data-label="Name"{% endif %}>{{ person.full_name }}</td>
|
|
{% endif %}
|
|
|
|
|
|
{% if include.avatars %}
|
|
<td {% if include.mobile %}data-label="Title"{% endif %}>
|
|
<div>{{ person.job_title }}</div>
|
|
<div class="text-muted text-h5">{{ person.department }}</div>
|
|
</td>
|
|
{% else %}
|
|
<td class="text-muted" {% if include.mobile %}data-label="Title"{% endif %}>
|
|
{{ person.job_title }}, {{ person.department }}
|
|
</td>
|
|
{% endif %}
|
|
|
|
{% unless include.avatars %}
|
|
<td class="text-muted"{% if include.mobile %}data-label="Email"{% endif %}><a href="#" class="text-reset">{{ person.email }}</a></td>
|
|
{% endunless %}
|
|
|
|
|
|
<td class="text-muted" {% if include.mobile %}data-label="Role"{% endif %}>
|
|
{% assign role-id = forloop.index | random_number: 0, 2 %}
|
|
{{ roles[role-id] }}
|
|
</td>
|
|
|
|
{% if include.nowrap %}
|
|
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Animi, commodi cupiditate debitis deserunt expedita hic incidunt iste modi molestiae nesciunt non nostrum perferendis perspiciatis placeat praesentium quaerat quo repellendus, voluptates.</td>
|
|
{% endif %}
|
|
|
|
<td>
|
|
{% if include.buttons %}
|
|
<div class="btn-list flex-nowrap">
|
|
{% include ui/button.html text="Edit" %}
|
|
<div class="dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle align-text-top" data-boundary="viewport" data-toggle="dropdown">Actions</button>
|
|
{% include ui/dropdown-menu.html right=true %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<a href="#">Edit</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|