From 26ced0b2299047d8e80a780c730d056d0a424fdc Mon Sep 17 00:00:00 2001 From: louispt1 Date: Thu, 13 Feb 2025 11:18:11 +0100 Subject: [PATCH 1/5] Updated saved scenario tailwinds so updated at is aligned, version tags are in the same style and the user initial boxes do not get squished --- app/components/saved_scenarios/row/component.html.erb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/components/saved_scenarios/row/component.html.erb b/app/components/saved_scenarios/row/component.html.erb index 55f82572..1b51d91a 100644 --- a/app/components/saved_scenarios/row/component.html.erb +++ b/app/components/saved_scenarios/row/component.html.erb @@ -1,10 +1,9 @@ <%= link_to @path, data: { turbo_frame: "_top" }, class: "grid grid-cols-4 w-full transition mb-5 p-2 pr-4 rounded-md hover:bg-midnight-600" do %>
- <%= initials_for(first_owner) %> -
-
- <%= @saved_scenario.title %> - #<%= @saved_scenario.version.tag %> + <%= initials_for(first_owner) %> +
+
+ <%= @saved_scenario.title %>
<%= t("areas.#{@saved_scenario.area_code}") %> From 96aaf6f097075979e3296737d475982ced122f48 Mon Sep 17 00:00:00 2001 From: louispt1 Date: Thu, 13 Feb 2025 11:37:10 +0100 Subject: [PATCH 2/5] Updating links for docs and removing bad translation from header span --- .../saved_scenario_history/index.html.erb | 2 +- config/locales/en.yml | 176 ++++++++++++++++-- config/locales/nl.yml | 143 ++++++++++++-- 3 files changed, 294 insertions(+), 27 deletions(-) diff --git a/app/views/saved_scenario_history/index.html.erb b/app/views/saved_scenario_history/index.html.erb index 27088e6f..bdc86b73 100644 --- a/app/views/saved_scenario_history/index.html.erb +++ b/app/views/saved_scenario_history/index.html.erb @@ -1,4 +1,4 @@ -<% content_for(:title) { "#{@saved_scenario.title} <% #{t('meta.title')}" } %> +<% content_for(:title) { "#{@saved_scenario.title}" } %> <% content_for :menu_title, @saved_scenario.localized_title(I18n.locale) %> <%= render(partial: "saved_scenarios/block_right_menu", locals: { saved_scenario: @saved_scenario }) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index b5248cae..482a5409 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -9,23 +9,169 @@ en: password: Password password_confirmation: Re-enter password unconfirmed_email: New e-mail address - collections: - all: View all collections - block_right: - compose_collection: - description: Create a new collection from your saved scenarios - title: New scenario collection - create_transition: - description: | - Pick one of your 2050 scenarios to interpolate into scenarios - for 2030 and 2040 - title: New transition path + name: Your name + scenario_invitation_mailer: + invite_user: + subject: 'Invitation: ETM scenario' + roles: + scenario_viewer: viewer + scenario_collaborator: collaborator + scenario_owner: owner + sidebar: + saved_scenarios: Scenarios + collections: Collections + discarded: Trash + profile: My profile + admin: Admin + scenario_bar: + info: Info + history: History + manage_access: Manage access + edit: + title: Edit + description: Edit the title and description of this scenario + discarded: + true: Restore + false: Discard + description: + true: Restore from the trash bin + false: Move to trash. After %{deleted_after} days it will be permanently destroyed. + private: + true: Private + false: Public + description: + true: Only people with access can view or copy this scenario + false: | + Anyone can view or copy this scenario, but only people with access can make changes + featured: + true: Featured + false: Make this featured + description: + true: This scenario has been featured on a home page. Edit settings here. + false: Feature this scenario on the home page + destroy: + title: Delete permanently + description: Permanently delete this scenario. + scenario: + succesful_update: Your scenario was succesfully updated + title: Title + save: Save + private: This scenario has been made private by the owner + discard_changes: Discard changes + no_description: This scenario has no description. + create_description: Click here to create one. + saved_scenario_users: + manage_description: + Here you can manage who has access to your scenario and in which manner. + Click the 'Invite others' button to give someone access to your scenario, + or use the table above to manage users that are already coupled.

+ See the + + documentation for more information. + invite: 'Invite others' + send_invite: Send invite + name: 'Name' + role: 'Role' + you: 'you' + unknown: 'Unknown user' + nameless: 'Nameless user' + roles: + scenario_owner: 'Owner' + scenario_collaborator: 'Collaborator' + scenario_viewer: 'Viewer' + pending: 'Pending' + new: + title: 'Give someone access to your scenario' + new_email_hint: + If no existing user can be found for the given email address we will send an email + inviting this person to create an account for the ETM. + email: 'Email address' + role: Role + role_hint: Pick the type of access you want to grant. + confirm_destroy: + irreversible: This action is irreversible + warning: "You are about to revoke %{role} access." + confirm: 'Confirm' + cancel: 'Cancel' + not_possible: 'You can not revoke your own access.' + button: 'Revoke access' + errors: + create: Something went wrong while trying create the invite! + base: Please enter an email address. + user_email: The e-mail address you entered was invalid. + update: Something went wrong while trying to update this role! + destroy: Something went wrong while trying to remove the user from the scenario! + general: Please try again later. If you keep getting this error, please contact us. + duplicate: This person is already invited to join the scenario. + saved_scenario_history: + description: | + Here you can see the history of your saved scenario. A description can be added to each historical version. + When you are owner of this scenario, you can reset the scenario to an older stage. See the + + documentation for more information. + title: History + error: Something went wrong updating the history of your scenario + history: + row: + component: + update: 'Update' + cancel: 'Cancel' + restore: 'Restore' + edit_description: | + Edit the description of this saved version. Save your notes on what you have changed. + restore_description: | + Restore the saved scenario to this version. This action is irreversible. + empty_message: No description + saved_scenarios: + title: Saved scenarios + empty: You don't have any scenarios. + search_by_title: Filter by title + open: Open confirm_destroy: + title: Permanently deleting scenario + warning_header: You are permanently deleting your scenario + warning: | + Deleting this scenario will remove all data including history, + any grants for access, title and description. irreversible: This action is irreversible - submit: Delete this collection - title: Permanently deleting collection - warning: Deleting will remove all references to this collection. - warning_header: You are permanently deleting your collection + submit: Delete this scenario + featured_scenarios: + confirm_destroy: + title: Unfeaturing scenario + warning_header: You are removing all featured settings + warning: | + Unfeaturing this scenario will remove the localised title and + description, and remove the scenario from the homepage. + The title and dscription will default back to their + original settings from before the featuring. + irreversible: This action is irreversible + submit: Confirm unfeaturing + + trash: + title: Trash bin + notice: Scenarios in the trash will be automatically deleted after %{deleted_after} days. + discarded_flash: Your scenario was put in the trash + undiscarded_flash: Your scenario was restored + deleted_flash: Your scenario has been permanently deleted + empty: + title: + There are no items in the trash + description: + Deleted items are sent to the trash where you can choose to permanently + delete or restore them. Trashed scenarios are automatically removed after %{deleted_after} + days. + flash: + need_login: Please log in again + version: + latest: | + This scenario was created in the live version of the ETM + which includes all the latest monthly updates. Learn more.. + collections: + title: Collections + no_title: Untitled collection + failure: Something went wrong! + all: View all collections + open: Open collection contains: This collection contains the following scenarios failure: Something went wrong! filter: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index c46c3236..ccd654d8 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -9,17 +9,138 @@ nl: password: Wachtwoord password_confirmation: Voer wachtwoord nogmaals in unconfirmed_email: Nieuw e-mailadres - collections: - all: Bekijk alle collecties - block_right: - compose_collection: - description: Maak een collectie van je opgeslagen scenario's - title: Nieuwe collectie - create_transition: - description: | - Kies een 2050 scenario om te interpoleren naar scenario's voor - 2030 en 2040 - title: Nieuw transitiepad + name: Jouw naam + scenario_invitation_mailer: + invite_user: + subject: 'Uitnodiging: ETM scenario' + roles: + scenario_viewer: gast + scenario_collaborator: bewerker + scenario_owner: eigenaar + user: + forgot_password: + mail: + subject: "Reset Je Wachtwoord" + body: + header: "Wachtwoord Reset Aanvraag" + message: "Iemand heeft gevraagd om een link om je wachtwoord te wijzigen. Je kunt dit doen via de onderstaande link." + button_text: "Wijzig Mijn Wachtwoord" + link_message: "Als de knop niet werkt, kopieer en plak de onderstaande link in je browser:" + ignore_message: "Als je deze aanvraag niet hebt gedaan, kun je deze e-mail negeren." + no_change_message: "Je wachtwoord wordt niet gewijzigd totdat je de bovenstaande link opent en een nieuw wachtwoord aanmaakt." + search_by_name: Zoeken op naam + all: Alle gebruikers weergeven (%{count}) + sidebar: + saved_scenarios: Scenario's + collections: Collecties + discarded: Prullenbak + profile: Mijn profiel + admin: Admin + scenario_bar: + info: Info + history: Geschiedenis + manage_access: Beheer toegang + edit: + title: Pas aan + description: Pas titel en beschrijving aan van dit scenario + discarded: + true: Herstel + false: Verwijder + description: + true: Herstel van prullenbak + false: Verplaats naar prullenbak. Na %{deleted_after} dagen wordt deze permanent verwijderd. + private: + true: Privé + false: Openbaar + description: + true: Alleen mensen met toegang kunnen dit scenario bekijken of kopieëren + false: | + Iedereen kan dit scenario bekijken of kopieëren, maar alleen mensen met toegang kunnen veranderingen doen + featured: + true: Uitgelicht + false: Maak uitgelicht + description: + true: Dit scenario staat uitgelicht op de startpagina. Bewerk instellingen hier. + false: Maak dit scenario uitgelicht op de startpagina. + destroy: + title: Permanent verwijderen + description: Verwijder dit scenario permanent. + scenario: + succesful_update: Je scenario is succesvol bijgewerkt + title: Titel + save: Opslaan + private: Dit scenario is privé gemaakt door de eigenaar + discard_changes: Verwijder wijzigingen + no_description: Dit scenario heeft geen beschrijving. + create_description: Klik hier om er één aan te maken. + saved_scenario_users: + manage_description: + Hier kun je beheren wie toegang heeft tot jouw scenario en op welke manier. + Klik op 'Anderen uitnodigen' om iemand toegang te geven tot jouw scenario of + gebruik bovenstaande tabel om gekoppelde gebruikers te beheren.

+ Zie de + + documentatie voor meer informatie. + invite: 'Anderen uitnodigen' + send_invite: Stuur uitnodiging + name: 'Naam' + role: 'Rol' + you: 'jij' + unknown: 'Onbekende gebruiker' + nameless: 'Naamloze gebruiker' + roles: + scenario_owner: 'Eigenaar' + scenario_collaborator: 'Bewerker' + scenario_viewer: 'Gast' + pending: 'In afwachting' + new: + title: 'Geef iemand toegang to jouw scenario' + new_email_hint: + Als er geen bestaande gebruiker wordt gevonden voor het opgegeven e-mailadres, + wordt er een e-mail gestuurd op deze persoon uit te nodigen een aacount aan + te amken voor het ETM. + email: 'E-mailadres' + role: Rol + role_hint: Kies het type toegang dat je wilt verlenen. + confirm_destroy: + irreversible: Deze handeling is onomkeerbaar + warning: "Je staat op het punt om de toegang %{role} in te trekken." + confirm: 'Bevestig' + cancel: 'Annuleer' + not_possible: 'Je kan niet je eigen toegang intrekken.' + button: 'Toegang intrekken' + errors: + create: Er ging iets mis bij het maken van de uitnodiging! + base: Geef een e-mailadres op + user_email: Het ingevoerde e-mailadres is ongeldig. + update: Er ging iets mis in het bijwerken van deze rol! + destroy: Er ging iets mis bij het verwijderen van de gebruiker van het scenario! + general: Probeer het later nog eens. Neem contact met ons op als je deze foutmelding blijft krijgen. + duplicate: Deze persoon is al uitgenodigd voor dit scenario. + saved_scenario_history: + description: | + Here you can see the history of your saved scenario. A description can be added to each historical version. + When you are owner of this scenario, you can reset the scenario to an older stage. See the + + documentation for more information. + title: History + error: Something went wrong updating the history of your scenario + history: + row: + component: + update: 'Update' + cancel: 'Cancel' + restore: 'Restore' + edit_description: | + Edit the description of this saved version. Save your notes on what you have changed. + restore_description: | + Restore the saved scenario to this version. This action is irreversible. + empty_message: Geen beschrijving + saved_scenarios: + title: Opgeslagen scenario's + empty: Je hebt nog geen scenario's. + search_by_title: Filter op titel + open: Open confirm_destroy: irreversible: Deze handeling is onomkeerbaar submit: Verwijder deze collectie From b8acc552d59fa01a1726b8c8817bbfd62a798a92 Mon Sep 17 00:00:00 2001 From: louispt1 Date: Thu, 13 Feb 2025 12:01:41 +0100 Subject: [PATCH 3/5] Ensure buttons are never hidden by the hovercards - enhancing the pressability of the buttons --- app/components/hovercard/component.html.erb | 10 +++++----- .../controllers/hovercard_controller.js | 17 +++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app/components/hovercard/component.html.erb b/app/components/hovercard/component.html.erb index 58c1fac8..4b8f692b 100644 --- a/app/components/hovercard/component.html.erb +++ b/app/components/hovercard/component.html.erb @@ -5,11 +5,11 @@ > <%= content %> -<%# static card %> -<%# should make text optional and setup the @path with turbo see: https://boringrails.com/articles/hovercards-stimulus/ %> -
-
-
+ <%# static card %> + <%# should make text optional and setup the @path with turbo see: https://boringrails.com/articles/hovercards-stimulus/ %> +