From 80bc2ac24e90261a31d4984c0331197cf9e84f93 Mon Sep 17 00:00:00 2001 From: Andrew Dickinson Date: Sat, 18 Apr 2020 13:34:41 -0400 Subject: [PATCH] Add persistent delete history buttons --- ihatemoney/static/css/main.css | 7 +++ ihatemoney/static/images/x.svg | 8 +++ ihatemoney/templates/history.html | 101 +++++++++++++++++------------- 3 files changed, 74 insertions(+), 42 deletions(-) create mode 100644 ihatemoney/static/images/x.svg diff --git a/ihatemoney/static/css/main.css b/ihatemoney/static/css/main.css index cf47fdde..7d91c38d 100644 --- a/ihatemoney/static/css/main.css +++ b/ihatemoney/static/css/main.css @@ -549,6 +549,13 @@ footer .icon svg { fill: white; } +.icon.icon-red { + fill: #dc3545; +} +.btn:hover .icon.icon-red { + fill: white !important; +} + /* align the first column */ #monthly_stats tr *:first-child { text-align: right; diff --git a/ihatemoney/static/images/x.svg b/ihatemoney/static/images/x.svg new file mode 100644 index 00000000..3416d7af --- /dev/null +++ b/ihatemoney/static/images/x.svg @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/ihatemoney/templates/history.html b/ihatemoney/templates/history.html index 58f6c6b9..875040e4 100644 --- a/ihatemoney/templates/history.html +++ b/ihatemoney/templates/history.html @@ -38,6 +38,49 @@ {{ _("to") }} {{ event.val_after }} {% endmacro %} +{% macro clear_history_modals() %} + + + + +{% endmacro %} {% macro owers_changed(event, add) %} {{ describe_object(event) }}: {% if add %}{{ _("Added") }}{% else %}{{ _("Removed") }}{% endif %} @@ -88,55 +131,29 @@ {% if history %}

{{ _("The table below reflects actions recorded prior to disabling project history. You can ") }} {{ _("clear project history") }} {{ _("to remove them.") }}

- - {% endif %} {% endif %} {% if current_log_pref != LoggingMode.RECORD_IP and any_ip_addresses %}

{{ _("Some entries below contain IP addresses, even though this project has IP recording disabled. ") }} - {{ _(" Delete stored IP addresses ") }}

- - + {{ _("Delete stored IP addresses") }}

{% endif %} {% endif %} + {{ clear_history_modals() }} + + + {{ static_include("images/x.svg") | safe }} + {{ _("Clear Project History") }} + + + + + {{ static_include("images/x.svg") | safe }} + {{ _("Delete Stored IP Addresses") }} + + + +
{% if history %}