firefly-iii/resources/twig/search/index.twig

106 lines
3.6 KiB
Twig
Raw Normal View History

2015-05-02 11:30:59 -05:00
{% extends "./layout/default.twig" %}
{% block content %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, query) }}
{% if query %}
<div class="row">
{% if result.transactions|length > 0 %}
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-repeat"></i> Transactions ({ result.transactions|length }})
</div>
<div class="panel-body">
{% include 'list/journals-tiny' with {'transactions' : result.transactions} %}
</div>
</div>
</div>
{% endif %}
{% if result.categories|length > 0 %}
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bar-chart"></i> Categories ({{result['categories'].count()}})
</div>
<div class="panel-body">
<div class="list-group">
{% for category in result.categories %}
<a class="list-group-item" title="{{category.name}}" href="{{route('categories.show',category.id)}}">
{{ category.name }}
</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
{% if result.tags|length > 0 %}
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bar-chart"></i> Tags ({{result['tags'].count()}})
</div>
<div class="panel-body">
<p>Bla bla</p>
</div>
</div>
</div>
{% endif %}
{% if result.accounts|length > 0 %}
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-credit-card"></i> Accounts ({{result['accounts'].count()}})
</div>
<div class="panel-body">
<div class="list-group">
{% for account in result.accounts %}
<a class="list-group-item" title="{{account.name}}" href="{{route('accounts.show',account.id)}}">
{{ account.name }}
</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
{% if result.budgets|length > 0 %}
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-tasks"></i> Budgets ({{result['budgets'].count()}})
</div>
<div class="panel-body">
<div class="list-group">
{% for budget in result.budgets %}
<a class="list-group-item" title="{{budget.name}}" href="{{route('budgets.show',budget.id)}}">
{{ budget.name }}
</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
<!--
<div class="col-lg-6 col-md-12 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-search-plus"></i> Other results
</div>
<div class="panel-body">
<p>Bla bla</p>
</div>
</div>
</div>
-->
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var query = '{{ query }}';
</script>
{% endblock %}