Skip to content

Commit

Permalink
Implement filter-select for active/disabled users
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Mar 19, 2017
1 parent dcbde57 commit d8539e1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/sprinkles/admin/templates/components/tables/users.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% if 'last_activity' in table.columns %}
<th class="sorter-metanum" data-column-name="last_activity" data-column-template="#user-table-column-last-activity">{{translate("ACTIVITY.LAST")}} <i class="fa fa-sort"></i></th>
{% endif %}
<th data-column-name="flag_enabled" data-column-template="#user-table-column-actions">{{translate("STATUS")}}/{{translate("ACTIONS")}} <i class="fa fa-sort"></i></th>
<th class="filter-select filter-metaselect" data-column-name="flag_enabled" data-column-template="#user-table-column-actions">{{translate("STATUS")}}/{{translate("ACTIONS")}} <i class="fa fa-sort"></i></th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -58,7 +58,17 @@
</script>

<script id="user-table-column-actions" type="text/x-handlebars-template">
<td>
<td data-value="{{row.flag_enabled}}" data-text="
{{#ifCond row.flag_enabled 0 }}
{% endverbatim %}{{translate("DISABLED")}}{% verbatim %}
{{ else }}
{{#ifCond row.flag_verified 0 }}
{% endverbatim %}{{translate("UNACTIVATED")}}{% verbatim %}
{{ else }}
{% endverbatim %}{{translate("ACTIVE")}}{% verbatim %}
{{/ifCond }}
{{/ifCond }}
">
<div class="btn-group">
{{#ifCond row.flag_enabled 0 }}
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Expand Down

0 comments on commit d8539e1

Please sign in to comment.