mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New features for rules in search.
This commit is contained in:
@@ -318,6 +318,8 @@ return [
|
||||
'search_modifier_bill_is' => 'Bill is ":value"',
|
||||
'search_modifier_transaction_type' => 'Transaction type is ":value"',
|
||||
'search_modifier_tag_is' => 'Tag is ":value"',
|
||||
'update_rule_from_query' => 'Update rule ":rule" from search query',
|
||||
'create_rule_from_query' => 'Create new rule from search query',
|
||||
|
||||
// END
|
||||
'modifiers_applies_are' => 'The following modifiers are applied to the search as well:',
|
||||
|
@@ -72,27 +72,6 @@
|
||||
<tr class="single-rule" data-order="{{ rule.order }}" data-id="{{ rule.id }}" data-group-id="{{ ruleGroup.id }}" data-position="{{ loop.index0 }}">
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs prio_buttons">
|
||||
{#
|
||||
{% if rule.order > 1 %}
|
||||
<a title="{{ 'rule_priority_up'|_ }}"
|
||||
href="{{ route('rules.up', rule.id) }}"
|
||||
class="btn btn-default"><span
|
||||
class="fa fa-fw fa-arrow-up"></span></a>
|
||||
{% else %}
|
||||
<button disabled="disabled" class="btn btn-default"><span
|
||||
class="fa fa-fw"></span></button>
|
||||
{% endif %}
|
||||
{% if rule.order < ruleGroup.rules.count %}
|
||||
<a title="{{ 'rule_priority_down'|_ }}"
|
||||
href="{{ route('rules.down', rule.id) }}"
|
||||
class="btn btn-default"><span
|
||||
class="fa fa-fw fa-arrow-down"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<button disabled="disabled" class="btn btn-default"><span
|
||||
class="fa fa-fw"></span></button>
|
||||
{% endif %}
|
||||
#}
|
||||
<i class="fa fa-fw fa-bars rule-handle"></i>
|
||||
</div>
|
||||
</td>
|
||||
@@ -109,21 +88,16 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs test_buttons">
|
||||
{# show which transactions would match #}
|
||||
{% if rule.active %}
|
||||
<a href="#" class="btn btn-default test_rule_triggers" data-id="{{ rule.id }}"
|
||||
title="{{ 'test_rule_triggers'|_ }}"><i data-id="{{ rule.id }}"
|
||||
class="test_rule_triggers fa fa-fw fa-flask"></i></a>
|
||||
{# show which transactions would match #}
|
||||
<a href="{{ route('rules.search',rule.id) }}" class="btn btn-default {% if false == rule.strict %}test_rule_triggers{% endif %}" data-id="{{ rule.id }}" title="{{ 'test_rule_triggers'|_ }}"><i data-id="{{ rule.id }}" class="fa fa-fw fa-flask"></i></a>
|
||||
|
||||
{# actually execute rule #}
|
||||
<a href="{{ route('rules.select-transactions',rule.id) }}" class="btn btn-default"
|
||||
title=" {{ trans('firefly.apply_rule_selection', {title: rule.title}) }}">
|
||||
<i class="fa fa-fw fa-power-off "></i></a>
|
||||
{# actually execute rule #}
|
||||
<a href="{{ route('rules.select-transactions',rule.id) }}" class="btn btn-default" title=" {{ trans('firefly.apply_rule_selection', {title: rule.title}) }}"><i class="fa fa-fw fa-power-off "></i></a>
|
||||
{% endif %}
|
||||
|
||||
{# duplicate rule #}
|
||||
<a href="{{ route('rules.duplicate',rule.id) }}" class="btn btn-default"
|
||||
title=" {{ trans('firefly.duplicate_rule', {title: rule.title}) }}">
|
||||
<i class="fa fa-fw fa-copy"></i></a>
|
||||
<a href="{{ route('rules.duplicate',rule.id) }}" class="btn btn-default" title=" {{ trans('firefly.duplicate_rule', {title: rule.title}) }}"><i class="fa fa-fw fa-copy"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="markdown">
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, query) }}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, fullQuery) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -26,20 +26,27 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i> {{ 'search'|_ }}</button>
|
||||
<button type="submit" class="btn btn-info"><i class="fa fa-search"></i> {{ 'search'|_ }}</button>
|
||||
{% if ruleId > 0 and ruleChanged %}
|
||||
<a href="#" class="btn btn-default">{{ trans('firefly.update_rule_from_query', {rule: rule.title}) }}</a>
|
||||
{% endif %}
|
||||
<a href="#" class="btn btn-default">{{ 'create_rule_from_query'|_ }}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% if 0 != ruleId %}
|
||||
<input type="hidden" name="rule" value="{{ ruleId }}" />
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if '' != query %}
|
||||
<p>
|
||||
{{ trans('firefly.search_for_query', {query: query|escape})|raw}}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if modifiers|length > 0 %}
|
||||
{% if operators|length > 0 %}
|
||||
<p>{{ trans('firefly.modifiers_applies_are') }}</p>
|
||||
<ul>
|
||||
{% for modifier in modifiers %}
|
||||
<li>{{ trans('firefly.search_modifier_'~modifier.type, {value: modifier.value}) }}</li>
|
||||
{% for operator in operators %}
|
||||
<li>{{ trans('firefly.search_modifier_'~operator.type, {value: operator.value}) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user