Index for exchange rates.

This commit is contained in:
James Cole
2024-12-21 18:35:05 +01:00
parent 7ff4f29bcb
commit 0e8fdd76a6
8 changed files with 142 additions and 2 deletions

View File

@@ -89,4 +89,7 @@ return [
// notifications
'notification_index' => 'Owner notifications',
// exchange rates
'exchange_rates_index' => 'Exchange rates',
];

View File

@@ -1394,6 +1394,11 @@ return [
'slack_url_label' => 'Slack "incoming webhook" URL',
'discord_url_label' => 'Discord webhook URL',
// exchange rates
'menu_exchange_rates_index' => 'Exchange rates',
'header_exchange_rates' => 'Exchange rates',
'exchange_rates_intro' =>'Firefly III supports downloading and using exchange rates. Read more about this in <a href="https://docs.firefly-iii.org/LOL_NOT_FINISHED_YET_TODO">the documentation</a>.',
// Financial administrations
'administration_index' => 'Financial administration',
'administrations_index_menu' => 'Financial administration(s)',

View File

@@ -0,0 +1,51 @@
{% extends './layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'header_exchange_rates'|_ }}</h3>
</div>
<div class="box-body">
<p>
{{ 'exchange_rates_intro'|_ }}
</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12 col-xs-12">
{% for currency in currencies %}
<div class="box box-default">
<div class="box-header with-border">
<h3 class="box-title">{{ currency.name }}</h3>
</div>
<div class="box-body">
{% if currencies.count > 0 %}
<ul>
{% for sub in currencies %}
{% if sub.id != currency.id %}
<li>From {{ currency.name }} to {{ sub.name }}</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
{% block styles %}
{% endblock %}
{% block scripts %}
{% endblock %}

View File

@@ -189,7 +189,7 @@
</li>
{% endif %}
<li class="{{ activeRoutePartial('admin') }} {{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currencies') }} treeview"
<li class="{{ activeRoutePartial('admin') }} {{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currencies') }} {{ activeRoutePartial('exchange-rates') }} treeview"
id="option-menu">
<a href="#">
<em class="fa fa-sliders fa-fw"></em>
@@ -220,6 +220,12 @@
</a>
</li>
{% if hasRole('owner') %}
<li class="{{ activeRoutePartial('exchange-rates') }}">
<a class="{{ activeRoutePartial('exchange-rates') }}" href="{{ route('exchange-rates.index') }}">
<span class="fa fa-angle-right fa-fw"></span>
<span>{{ 'menu_exchange_rates_index'|_ }}</span>
</a>
</li>
<li class="{{ activeRoutePartial('admin') }}">
<a class="{{ activeRoutePartial('admin') }}" href="{{ route('admin.index') }}">
<span class="fa fa-angle-right fa-fw"></span>