<div style="margin-top: 12px; " class="clearfix categoryControls">
    <form autocomplete="off">
        {{#if categories}}
        <div class="form-group" style="display: inline-block; margin-bottom: 0;">
            <label class="control-label">View
            <select class="form-control categories" style="display: inline;width: auto;">
                <option value="_all_categories" selected="selected">{{#if allLabel}}{{allLabel}}{{else}}-All-{{/if}}</option>
                {{#each categories}}
                <option value="{{title}}">{{title}}</option>
                {{/each}}
            </select>
            </label>
        </div>
        {{/if}}
        <div class="row">            
            {{#if sortBy}}
            <div class="col-sm-12" style="margin-top:12px;">
                <label class="control-label">Sort by
                <div class="sortBy btn-group" data-toggle="buttons">
                    {{#each sortBy}}
                    <label class="btn btn-primary {{#if @first}}active{{/if}}">
                        <input type="radio" name="sortBy" value="{{title}}" {{#if @first}}checked="checked"{{/if}}> {{title}}
                    </label>
                    {{/each}}
                </div>
                </label>
            </div>
            {{/if}}
            {{#if groupBy}}
            <div class="col-sm-12">
                <div class="checkbox">
                    <label>
                        <input class="grouped" type="checkbox" checked="checked">{{#if groupByLabel}}{{groupByLabel}}{{else}}Grouped{{/if}}
                    </label>
                </div>
            </div>
            {{/if}}
        </div>
    </form>
</div>