| 
									
										
										
										
											2016-11-06 08:11:43 +01:00
										 |  |  | {% extends "./layout/default" %}
 | 
					
						
							| 
									
										
										
										
											2016-01-11 20:42:24 +01:00
										 |  |  | {% block breadcrumbs %}
 | 
					
						
							| 
									
										
										
										
											2017-12-23 20:46:52 +01:00
										 |  |  |     {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
 | 
					
						
							| 
									
										
										
										
											2016-01-11 20:42:24 +01:00
										 |  |  | {% endblock %}
 | 
					
						
							|  |  |  | {% block content %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="row">
 | 
					
						
							|  |  |  |         <div class="col-lg-12 col-md-12 col-sm-12">
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |             <p>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 18:14:29 +02:00
										 |  |  |                 <a href="{{ route('rule-groups.create') }}" id="new_rule_group" class="btn btn-success">{{ 'new_rule_group'|_ }}</a>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |             </p>
 | 
					
						
							| 
									
										
										
										
											2016-01-11 20:42:24 +01:00
										 |  |  |         </div>
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |     {% for ruleGroup in ruleGroups %}
 | 
					
						
							|  |  |  |         <div class="row">
 | 
					
						
							|  |  |  |             <div class="col-lg-12 col-md-12 col-sm-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                         <h3 class="box-title">
 | 
					
						
							|  |  |  |                             {% if ruleGroup.active %}
 | 
					
						
							|  |  |  |                                 {{ ruleGroup.title }}
 | 
					
						
							|  |  |  |                             {% else %}
 | 
					
						
							| 
									
										
										
										
											2017-01-02 11:41:14 +01:00
										 |  |  |                                 <s>{{ ruleGroup.title }}</s> ({{ 'inactive'|_|lower }})
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                             {% endif %}
 | 
					
						
							|  |  |  |                         </h3>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-21 04:36:23 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                         <div class="box-tools pull-right">
 | 
					
						
							|  |  |  |                             <div class="btn-group">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                 <button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i
 | 
					
						
							|  |  |  |                                             class="fa fa-ellipsis-v"></i></button>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                 <ul class="dropdown-menu" role="menu">
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                     <li><a href="{{ route('rule-groups.edit',ruleGroup.id) }}"><i class="fa fa-fw fa-pencil"></i> {{ 'edit'|_ }}</a></li>
 | 
					
						
							|  |  |  |                                     <li><a href="{{ route('rule-groups.delete',ruleGroup.id) }}"><i class="fa fa-fw fa-trash"></i> {{ 'delete'|_ }}</a></li>
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                     <li><a href="{{ route('rule-groups.select-transactions',ruleGroup.id) }}"><i
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                                     class="fa fa-fw fa-power-off"></i> {{ trans('firefly.apply_rule_group_selection', {title: ruleGroup.title}) }}
 | 
					
						
							|  |  |  |                                         </a></li>
 | 
					
						
							| 
									
										
										
										
											2016-08-27 03:50:35 +02:00
										 |  |  |                                     {% if ruleGroup.order > 1 %}
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                         <li><a href="{{ route('rule-groups.up',ruleGroup.id) }}"><i
 | 
					
						
							| 
									
										
										
										
											2016-08-27 03:50:35 +02:00
										 |  |  |                                                         class="fa fa-fw fa-arrow-up"></i> {{ 'move_rule_group_up'|_ }}</a></li>
 | 
					
						
							|  |  |  |                                     {% endif %}
 | 
					
						
							|  |  |  |                                     {% if ruleGroup.order < ruleGroups|length %}
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                         <li><a href="{{ route('rule-groups.down',ruleGroup.id) }}"><i
 | 
					
						
							| 
									
										
										
										
											2016-08-27 03:50:35 +02:00
										 |  |  |                                                         class="fa fa-fw fa-arrow-down"></i> {{ 'move_rule_group_down'|_ }}
 | 
					
						
							|  |  |  |                                             </a></li>
 | 
					
						
							|  |  |  |                                     {% endif %}
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                 </ul>
 | 
					
						
							|  |  |  |                             </div>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <p>
 | 
					
						
							|  |  |  |                             <em>{{ ruleGroup.description }}</em>
 | 
					
						
							|  |  |  |                         </p>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         {% if ruleGroup.rules.count > 0 %}
 | 
					
						
							| 
									
										
										
										
											2016-11-20 17:36:11 +01:00
										 |  |  |                             <table class="table table-hover table-striped">
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                 <thead>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                 <tr>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                     <th> </th>
 | 
					
						
							|  |  |  |                                     <th> </th>
 | 
					
						
							|  |  |  |                                     <th> </th>
 | 
					
						
							|  |  |  |                                     <th>{{ 'rule_name'|_ }}</th>
 | 
					
						
							| 
									
										
										
										
											2016-11-08 20:35:30 +01:00
										 |  |  |                                     <th class="hidden-xs">{{ 'rule_triggers'|_ }}</th>
 | 
					
						
							|  |  |  |                                     <th class="hidden-xs">{{ 'rule_actions'|_ }}</th>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                 </tr>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                 </thead>
 | 
					
						
							|  |  |  |                                 <tbody>
 | 
					
						
							|  |  |  |                                 {% for rule in ruleGroup.rules %}
 | 
					
						
							|  |  |  |                                     <tr>
 | 
					
						
							|  |  |  |                                         <td>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 18:14:29 +02:00
										 |  |  |                                             <div class="btn-group btn-group-xs prio_buttons">
 | 
					
						
							| 
									
										
										
										
											2016-01-14 09:17:23 +01:00
										 |  |  |                                                 {% if rule.order > 1 %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                     <a title="{{ 'rule_priority_up'|_ }}"
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                                        href="{{ route('rules.up', rule.id) }}"
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                        class="btn btn-default"><span
 | 
					
						
							|  |  |  |                                                                 class="fa fa-fw fa-arrow-up"></span></a>
 | 
					
						
							|  |  |  |                                                 {% else %}
 | 
					
						
							| 
									
										
										
										
											2017-10-02 14:41:06 +02:00
										 |  |  |                                                     <button disabled="disabled" class="btn btn-default"><span
 | 
					
						
							|  |  |  |                                                                 class="fa fa-fw"></span></button>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 09:17:23 +01:00
										 |  |  |                                                 {% endif %}
 | 
					
						
							|  |  |  |                                                 {% if rule.order < ruleGroup.rules.count %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                     <a title="{{ 'rule_priority_down'|_ }}"
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                                        href="{{ route('rules.down', rule.id) }}"
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                        class="btn btn-default"><span
 | 
					
						
							|  |  |  |                                                                 class="fa fa-fw fa-arrow-down"></span>
 | 
					
						
							|  |  |  |                                                     </a>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 09:17:23 +01:00
										 |  |  |                                                 {% else %}
 | 
					
						
							| 
									
										
										
										
											2017-10-02 14:41:06 +02:00
										 |  |  |                                                     <button disabled="disabled" class="btn btn-default"><span
 | 
					
						
							|  |  |  |                                                                 class="fa fa-fw"></span></button>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 09:17:23 +01:00
										 |  |  |                                                 {% endif %}
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                             </div>
 | 
					
						
							|  |  |  |                                         </td>
 | 
					
						
							|  |  |  |                                         <td>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 18:14:29 +02:00
										 |  |  |                                             <div class="btn-group btn-group-xs edit_buttons">
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                                 <a title="{{ 'edit'|_ }}" href="{{ route('rules.edit', rule.id) }}"
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                    class="btn btn-default"><span
 | 
					
						
							| 
									
										
										
										
											2016-01-14 09:17:23 +01:00
										 |  |  |                                                             class="fa fa-fw fa-pencil"></span></a>
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                 <a title="{{ 'delete'|_ }}"
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                                                    href="{{ route('rules.delete', rule.id) }}"
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                    class="btn btn-danger"><span
 | 
					
						
							| 
									
										
										
										
											2016-01-14 09:17:23 +01:00
										 |  |  |                                                             class="fa fa-fw fa-trash"></span></a>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                             </div>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                         </td>
 | 
					
						
							|  |  |  |                                         <td>
 | 
					
						
							| 
									
										
										
										
											2017-07-16 18:14:29 +02:00
										 |  |  |                                             <div class="btn-group btn-group-xs test_buttons">
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                                 {# show which transactions would match #}
 | 
					
						
							| 
									
										
										
										
											2017-12-29 09:05:35 +01:00
										 |  |  |                                                 <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>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                                 {# actually execute rule #}
 | 
					
						
							| 
									
										
										
										
											2017-07-23 20:02:32 +02:00
										 |  |  |                                                 <a href="{{ route('rules.select-transactions',rule.id) }}" class="btn btn-default"
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |                                                    title=" {{ trans('firefly.apply_rule_selection', {title: rule.title}) }}">
 | 
					
						
							|  |  |  |                                                     <i class="fa fa-fw fa-power-off "></i></a>
 | 
					
						
							|  |  |  |                                             </div>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                         </td>
 | 
					
						
							| 
									
										
										
										
											2018-01-12 20:37:39 +01:00
										 |  |  |                                         <td class="markdown">
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                                             {% if rule.active %}
 | 
					
						
							|  |  |  |                                                 {{ rule.title }}
 | 
					
						
							|  |  |  |                                             {% else %}
 | 
					
						
							| 
									
										
										
										
											2017-11-03 14:53:00 +01:00
										 |  |  |                                                 <s>{{ rule.title }}</s> ({{ 'inactive'|_|lower }})
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                                             {% if rule.stop_processing %}
 | 
					
						
							|  |  |  |                                                 <i class="fa fa-stop-circle-o"></i>
 | 
					
						
							|  |  |  |                                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                             {% if rule.description != "" %}
 | 
					
						
							| 
									
										
										
										
											2017-04-09 07:56:46 +02:00
										 |  |  |                                                 <small class="hidden-xs"
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                                                         {% if not rule.active %}
 | 
					
						
							|  |  |  |                                                             class="text-muted"
 | 
					
						
							|  |  |  |                                                         {% endif %}
 | 
					
						
							| 
									
										
										
										
											2017-11-18 20:26:57 +01:00
										 |  |  |                                                 ><br/>{{ rule.description|markdown }}</small>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2018-04-14 20:31:31 +02:00
										 |  |  |                                             <small><br />{% if rule.strict %}<span class="text-danger">{{ 'rule_is_strict'|_ }}</span>{% else %}<span class="text-success">{{ 'rule_is_not_strict'|_ }}</span>{% endif %}</small>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                         </td>
 | 
					
						
							| 
									
										
										
										
											2016-11-08 20:35:30 +01:00
										 |  |  |                                         <td class="hidden-xs">
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                             {% if rule.ruleTriggers.count > 0 %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                 <ul class="small rule-triggers" data-id="{{ rule.id }}">
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                                     {% for trigger in rule.ruleTriggers %}
 | 
					
						
							|  |  |  |                                                         {% if trigger.trigger_type != "user_action" %}
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                                                             <li
 | 
					
						
							|  |  |  |                                                                     {% if not rule.active %}
 | 
					
						
							|  |  |  |                                                                         class="text-muted"
 | 
					
						
							|  |  |  |                                                                     {% endif %}
 | 
					
						
							|  |  |  |                                                                     data-id="{{ trigger.id }}">{{ trans(('firefly.rule_trigger_' ~ trigger.trigger_type), {trigger_value: trigger.trigger_value}) }}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |                                                                 {% if trigger.stop_processing %}
 | 
					
						
							|  |  |  |                                                                     <i class="fa fa-stop-circle-o"></i>
 | 
					
						
							|  |  |  |                                                                 {% endif %}
 | 
					
						
							|  |  |  |                                                             </li>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                                         {% endif %}
 | 
					
						
							|  |  |  |                                                     {% endfor %}
 | 
					
						
							|  |  |  |                                                 </ul>
 | 
					
						
							|  |  |  |                                             {% endif %}
 | 
					
						
							|  |  |  |                                         </td>
 | 
					
						
							| 
									
										
										
										
											2016-11-08 20:35:30 +01:00
										 |  |  |                                         <td class="hidden-xs">
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                             {% if rule.ruleActions.count > 0 %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  |                                                 <ul class="small rule-actions" data-id="{{ rule.id }}">
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                                     {% for action in rule.ruleActions %}
 | 
					
						
							| 
									
										
										
										
											2016-01-15 10:52:35 +01:00
										 |  |  |                                                         <li
 | 
					
						
							|  |  |  |                                                                 {% if not rule.active %}
 | 
					
						
							|  |  |  |                                                                     class="text-muted"
 | 
					
						
							|  |  |  |                                                                 {% endif %}
 | 
					
						
							|  |  |  |                                                                 data-id="{{ action.id }}">{{ trans(('firefly.rule_action_' ~ action.action_type), {action_value: action.action_value}) }}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 12:37:49 +01:00
										 |  |  |                                                             {% if action.stop_processing %}
 | 
					
						
							|  |  |  |                                                                 <i class="fa fa-stop-circle-o"></i>
 | 
					
						
							|  |  |  |                                                             {% endif %}
 | 
					
						
							|  |  |  |                                                         </li>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                                                     {% endfor %}
 | 
					
						
							|  |  |  |                                                 </ul>
 | 
					
						
							|  |  |  |                                             {% endif %}
 | 
					
						
							|  |  |  |                                         </td>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                                     </tr>
 | 
					
						
							|  |  |  |                                 {% endfor %}
 | 
					
						
							|  |  |  |                                 </tbody>
 | 
					
						
							|  |  |  |                             </table>
 | 
					
						
							|  |  |  |                         {% else %}
 | 
					
						
							|  |  |  |                             <p>
 | 
					
						
							|  |  |  |                                 <em>{{ 'no_rules_in_group'|_ }}</em>
 | 
					
						
							|  |  |  |                             </p>
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  |                         <p>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 16:51:55 +01:00
										 |  |  |                             <br/>
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |                             <a href="{{ route('rules.create', ruleGroup.id) }}"
 | 
					
						
							| 
									
										
										
										
											2017-07-16 18:14:29 +02:00
										 |  |  |                                class="btn btn-success new_rule">{{ 'new_rule'|_ }}</a>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |                         </p>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  |     {% endfor %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-16 13:04:45 +02:00
										 |  |  |     {% include '/rules/partials/test-trigger-modal' %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |     <div class="row">
 | 
					
						
							|  |  |  |         <div class="col-lg-12 col-md-12 col-sm-12">
 | 
					
						
							| 
									
										
										
										
											2016-12-06 09:07:50 +01:00
										 |  |  |             <a href="{{ route('rule-groups.create') }}" class="btn btn-success">{{ 'new_rule_group'|_ }}</a>
 | 
					
						
							| 
									
										
										
										
											2016-01-13 15:59:45 +01:00
										 |  |  |         </div>
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-11 20:42:24 +01:00
										 |  |  | {% endblock %}
 | 
					
						
							| 
									
										
										
										
											2016-01-14 11:27:15 +01:00
										 |  |  | {% block scripts %}
 | 
					
						
							| 
									
										
										
										
											2017-09-12 19:59:07 +02:00
										 |  |  |     <script type="text/javascript" src="js/lib/jquery-ui.min.js?v={{ FF_VERSION }}"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/ff/rules/index.js?v={{ FF_VERSION }}"></script>
 | 
					
						
							| 
									
										
										
										
											2016-01-28 21:50:20 +01:00
										 |  |  | {% endblock %}
 |