Expand view and translations.

This commit is contained in:
James Cole 2016-01-13 16:51:55 +01:00
parent 20941dedd3
commit e9ee93beb7
2 changed files with 109 additions and 49 deletions

View File

@ -40,6 +40,44 @@ return [
// rules // rules
'rules' => 'Rules', 'rules' => 'Rules',
'rules_explanation' => 'Here is going to be text',
'rule_name' => 'Name of rule',
'rule_triggers' => 'Rule triggers when',
'rule_actions' => 'Rule will',
'new_rule' => 'New rule',
'new_rule_group' => 'New rule group',
'rule_priority_up' => 'Give rule more priority',
'rule_priority_down' => 'Give rule less priority',
// actions and triggers
'rule_trigger_user_action' => '',
'rule_trigger_from_account_starts' => 'from_account_starts',
'rule_trigger_from_account_ends' => 'from_account_ends',
'rule_trigger_from_account_is' => 'Source account is ":trigger_value"',
'rule_trigger_from_account_contains' => '',
'rule_trigger_to_account_starts' => '',
'rule_trigger_to_account_ends' => '',
'rule_trigger_to_account_is' => '',
'rule_trigger_to_account_contains' => '',
'rule_trigger_transaction_type' => '',
'rule_trigger_amount_less' => '',
'rule_trigger_amount_exactly' => 'Amount is :trigger_value',
'rule_trigger_amount_more' => '',
'rule_trigger_description_starts' => '',
'rule_trigger_description_ends' => '',
'rule_trigger_description_contains' => 'Description contains ":trigger_value"',
'rule_trigger_description_is' => '',
'rule_action_set_category' => 'Set category to ":action_value"',
'rule_action_clear_category' => 'Clear category',
'rule_action_set_budget' => 'Set budget to ":action_value"',
'rule_action_clear_budget' => 'Clear budget',
'rule_action_add_tag' => 'Add tag ":action_value"',
'rule_action_remove_tag' => 'Remove tag ":action_value"',
'rule_action_remove_all_tags' => 'Remove all tags',
'rule_action_set_description' => 'Set description to ":action_value"',
'rule_action_append_description' => 'Append description with ":action_value"',
'rule_action_prepend_description' => 'Prepend description with ":action_value"',
// tags // tags
'store_new_tag' => 'Store new tag', 'store_new_tag' => 'Store new tag',

View File

@ -50,7 +50,7 @@
</p> </p>
{% if ruleGroup.rules.count > 0 %} {% if ruleGroup.rules.count > 0 %}
<table class="table table- table-striped sortable"> <table class="table table-hover table-striped sortable">
<thead> <thead>
<tr> <tr>
<th colspan="2">{{ 'rule_name'|_ }}</th> <th colspan="2">{{ 'rule_name'|_ }}</th>
@ -63,10 +63,14 @@
<tr> <tr>
<td> <td>
<div class="btn-group btn-group-xs"> <div class="btn-group btn-group-xs">
<a title="{{ 'rule_priority_up' }}" href="{{ route('rules.rule.up', rule.id) }}" class="btn btn-default"><span class="fa fa-arrow-up"></span></a> <a title="{{ 'rule_priority_up'|_ }}" href="{{ route('rules.rule.up', rule.id) }}" class="btn btn-default"><span
<a title="{{ 'rule_priority_down' }}" href="{{ route('rules.rule.down', rule.id) }}" class="btn btn-default"><span class="fa fa-arrow-down"></span></a> class="fa fa-arrow-up"></span></a>
<a title="{{ 'edit'|_ }}" href="{{ route('rules.rule.edit', rule.id) }}" class="btn btn-default"><span class="fa fa-pencil"></span></a> <a title="{{ 'rule_priority_down'|_ }}" href="{{ route('rules.rule.down', rule.id) }}"
<a title="{{ 'delete'|_ }}" href="{{ route('rules.rule.delete', rule.id) }}" class="btn btn-danger"><span class="fa fa-trash"></span></a> class="btn btn-default"><span class="fa fa-arrow-down"></span></a>
<a title="{{ 'edit'|_ }}" href="{{ route('rules.rule.edit', rule.id) }}" class="btn btn-default"><span
class="fa fa-pencil"></span></a>
<a title="{{ 'delete'|_ }}" href="{{ route('rules.rule.delete', rule.id) }}" class="btn btn-danger"><span
class="fa fa-trash"></span></a>
</div> </div>
</td> </td>
@ -75,8 +79,26 @@
<small><br/>{{ rule.description }}</small> <small><br/>{{ rule.description }}</small>
{% endif %} {% endif %}
</td> </td>
<td>X</td> <td>
<td>Y</td> {% if rule.ruleTriggers.count > 0 %}
<ul class="small">
{% for trigger in rule.ruleTriggers %}
{% if trigger.trigger_type != "user_action" %}
<li>{{ trans(('firefly.rule_trigger_' ~ trigger.trigger_type), {trigger_value: trigger.trigger_value}) }}</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</td>
<td>
{% if rule.ruleActions.count > 0 %}
<ul class="small">
{% for action in rule.ruleActions %}
<li>{{ trans(('firefly.rule_action_' ~ action.action_type), {action_value: action.action_value}) }}</li>
{% endfor %}
</ul>
{% endif %}
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -87,7 +109,7 @@
</p> </p>
{% endif %} {% endif %}
<p> <p>
<br /> <br/>
<a href="{{ route('rules.rule.create') }}" class="btn btn-success">{{ 'new_rule'|_ }}</a> <a href="{{ route('rules.rule.create') }}" class="btn btn-success">{{ 'new_rule'|_ }}</a>
</p> </p>
</div> </div>