From 5d436d90afecd6f66a3f8d57143898ed5902470f Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Tue, 5 Jan 2021 00:57:34 +0100 Subject: [PATCH 1/7] delete donation block in about page (closes #572) --- app/assets/stylesheets/application.scss | 5 +-- app/views/pages/about.html.erb | 18 ++------- config/locales/ca.yml | 3 -- config/locales/en.yml | 49 ++++++++++++------------- config/locales/es.yml | 3 -- config/locales/eu.yml | 35 ++++++++---------- config/locales/gl.yml | 3 -- config/locales/pt-BR.yml | 3 -- 8 files changed, 44 insertions(+), 75 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c8bd7ba29..4230bdb2e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -223,7 +223,6 @@ html { padding: 20px; } - .row.exports { padding: 10px; } @@ -590,7 +589,7 @@ label[required]::after{ display: none; } - .header, .banner, .empower, .donate { + .header, .banner, .section-block { text-align: center; } @@ -672,7 +671,7 @@ label[required]::after{ } } - .empower, .donate { + .section-block { h2 { margin-bottom: 4rem; } diff --git a/app/views/pages/about.html.erb b/app/views/pages/about.html.erb index 485384b50..5fcf22e96 100644 --- a/app/views/pages/about.html.erb +++ b/app/views/pages/about.html.erb @@ -36,7 +36,7 @@
-
+

<%= t("pages.about.empower-title") %>

<%= t( "pages.about.empower-text-1", @@ -70,19 +70,7 @@

- -
-
- - +
<%= image_tag("ajuntament_bcn_activa.png", width: '400', class: "img-responsive center-block") %> diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 23159639d..508108c51 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -403,9 +403,6 @@ ca: banner-button: Sol·licita accés banner-subtitle: Us ajudarem a posar-lo en marxa o fer-vos una demostració banner-title: Ets un Banc de Temps? - donate-link: Dona 1€ al mes - donate-text: Amb la finalitat de donar suport a moltes comunitats la associació ADBdT ofereix la plataforma TimeOverflow a tots los Bancs de Temps. Considera %{donate_link} per contribuir a les despeses de manteniment i innovació. - donate-title: Participa amb una donació empower-adbdt: ADBdT empower-adbdt-title: Associació pel Desenvolupament dels Bancs de Temps empower-coopdevs: CoopDevs diff --git a/config/locales/en.yml b/config/locales/en.yml index d7c393daa..3ac225567 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -224,20 +224,20 @@ en: registrations: destroyed: Bye! Your account was successfully cancelled. We hope to see you again soon. edit: - cancel_account: - current_password: - edit_user: - help_current_password: - help_password: - password: - password_confirmation: - unhappy: - update: + cancel_account: + current_password: + edit_user: + help_current_password: + help_password: + password: + password_confirmation: + unhappy: + update: new: - password: - password_confirmation: - sign_me_up: - sign_up: + password: + password_confirmation: + sign_me_up: + sign_up: signed_up: Welcome! You have signed up successfully. signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated. signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked. @@ -335,14 +335,14 @@ en: report: report_title: REPORT locales: - ar: + ar: ca: Catalan en: English es: Spanish - eu: - fr: - gl: - pt: + eu: + fr: + gl: + pt: pt-BR: Portuguese mailers_globals: footer: @@ -382,9 +382,6 @@ en: banner-button: Request access to TimeOverflow banner-subtitle: We will contact you to start it up or make you a demonstration banner-title: Are you a Time Bank? - donate-text: In order to support many communities the ADBdT asociation offers TimeOverflow platform to all Time Banks. %{donate_link} to contribute to maintenance and innovation costs. - donate-title: Participate with a donation - donate-link: Donate 1€ a month empower-adbdt: ADBdT empower-adbdt-title: Association for the Development of Time Banks empower-coopdevs: CoopDevs @@ -579,8 +576,8 @@ en: active_ago: Active %{time} ago views: pagination: - first: - last: - next: - previous: - truncate: + first: + last: + next: + previous: + truncate: diff --git a/config/locales/es.yml b/config/locales/es.yml index 08f25c588..d4315a49b 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -403,9 +403,6 @@ es: banner-button: Solicita acceso banner-subtitle: Os ayudaremos a ponerlo en marcha o a haceros una demostración banner-title: "¿Eres un Banco de Tiempo?" - donate-link: Donar 1€ al mes - donate-text: Con el fin de apoyar a muchas comunidades la asociación ADBdT ofrece la plataforma TimeOverflow a todos los Bancos de Tiempo. Considera %{donate_link} para contribuir a los gastos de mantenimiento e innovación. - donate-title: Participa con una donación empower-adbdt: ADBdT empower-adbdt-title: Asociación para el Desarrollo de los Bancos de Tiempo empower-coopdevs: CoopDevs diff --git a/config/locales/eu.yml b/config/locales/eu.yml index e852e5089..208fb6623 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -411,9 +411,6 @@ eu: banner-button: Sartzea eskatzen du banner-subtitle: Martxan jartzen edo erakustaldi bat eginez lagunduko dizugu banner-title: Denbora banku bat al zara? - donate-link: Eman ezazu hilean €1 - donate-text: komunitate askori babesteko asmotan ADBdt elkarteak , TimeOverflow plataforma eskaintzen die Denbora Banku guztiei. Hausnar ezazu %{donate_link} mantenu eta berritze lanetan laguntzeko. - donate-title: Laguntzan parte hartu empower-adbdt: ADBdt empower-adbdt-title: Denbora Bankuen garapenerako elkartea empower-coopdevs: CoopDevs @@ -440,7 +437,7 @@ eu: title2: Denbora bankuentzat posts: show: - info: + info: reports: cat_with_users: title: Eskaintzen diren zerbitzuak @@ -452,8 +449,8 @@ eu: delete_reason: Zihur zaude , azalpen hau ezabatu nahi duzula? movements: Mugimenduak post_form: - group_inquiry: - group_offer: + group_inquiry: + group_offer: you_can_use: Erabil dezakezu simple_form: error_notification: @@ -465,7 +462,7 @@ eu: female: Emakumea male: Gizona others: Beste - prefer_not_to_answer: + prefer_not_to_answer: required: mark: "*" text: Beharrezkoa @@ -532,7 +529,7 @@ eu: one: "%{count}minutu" other: "%{count} minutu" new: - error_amount: + error_amount: users: edit: edit_user: Erabiltzailea aldatu @@ -542,18 +539,18 @@ eu: give_time: honi denbora eman index: actions: Ekintzak - active_warning: + active_warning: active_warning_angular: " {{username}} erabiltzailearen kontuaren egoera, aldatuko duzu." - cancel_warning: + cancel_warning: cancel_warning_angular: " {{username}} erabiltzailea D bankutik ezabatuko duzu." create: Erabiltzaile berria sortu - manage_warning: + manage_warning: manage_warning_angular: " {{username}} erabiltzailearen onurak, aldatuko diztuzu" members: Kideak user_created: "%{uid} %{name} erabiltzailea gorde da" member_card: - active_ago: - no_activity: + active_ago: + no_activity: new: cancel: Deuseztatu create_more_users_button: Beste erabiltzaile bat sortu eta sartu @@ -564,7 +561,7 @@ eu: accounts: Kontuak balance: 'Balantzea:' categories: Eskainiriko zerbitzuak - change_your_image: + change_your_image: created_at: 'Alta:' data: Erabiltzailearen datuak date: Eguna @@ -587,8 +584,8 @@ eu: manage_warning: "%{user} erabiltzailearen onurak aldatuko dituzu" views: pagination: - first: - last: - next: - previous: - truncate: + first: + last: + next: + previous: + truncate: diff --git a/config/locales/gl.yml b/config/locales/gl.yml index 1090503ef..4f0f7c277 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -403,9 +403,6 @@ gl: banner-button: Solicitar acceso a TimeOverflow banner-subtitle: Contamos contigo para poñelo en marcha ou para facerche unha demostración banner-title: Es ti un Banco de Tempo? - donate-link: Doe 1 € ao mes - donate-text: Para soportar moitas comunidades, a asociación ADBdT ofrece a plataforma TimeOverflow a todos os bancos de tempo. %{donate_link} para contribuír aos custos de mantemento e innovación. - donate-title: Participa cunha doazón empower-adbdt: ADBdT empower-adbdt-title: Asociación para o Desenvolvemento de Bancos de Tempo empower-coopdevs: CoopDevs diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 8de7fc794..a6f8107b6 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -403,9 +403,6 @@ pt-BR: banner-button: Pedir acesso banner-subtitle: Vamos ajudá-los a começar ou obter uma demonstração banner-title: Você é um Banco de Tempo? - donate-link: Doe 1€ ao mês - donate-text: A fim de apoiar muitas comunidades a associação ADBdT oferece a plataforma TimeOverflow para todos os Bancos de Tempo. Doe %{donate_link} para contribuir com os custos de manutenção e inovação. - donate-title: Participe com uma doação empower-adbdt: ADBdt empower-adbdt-title: Associação para o Desenvolvimento dos Bancos de Tempo empower-coopdevs: CoopDevs From a7458fd5bf894e22b76a33b9c30e3527242f8428 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Tue, 5 Jan 2021 01:20:51 +0100 Subject: [PATCH 2/7] remove unused css class --- app/assets/stylesheets/application.scss | 26 ------------------------- app/views/layouts/application.html.erb | 2 -- 2 files changed, 28 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 4230bdb2e..ff60006dc 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -351,17 +351,6 @@ label[required]::after{ } } -.back-overlay { - background-color: $black; - background-size: cover; - display: none; - height: 100%; - position: absolute; - top: 0; - width: 100%; - z-index: -1; -} - .navbar .container-fluid { padding: 0; } @@ -401,12 +390,6 @@ label[required]::after{ background-size: cover; } - .back-overlay { - display: block; - filter: alpha(opacity = 60); /* For IE8 and earlier */ - opacity: 0.2; - } - .login-wrapper { position: absolute; top: 51%; @@ -454,11 +437,6 @@ label[required]::after{ background: image-url('home_back_mobile.jpg') no-repeat center center fixed; background-size: cover; } - - .back-overlay { - filter: alpha(opacity = 15); /* For IE8 and earlier */ - opacity: 0.15; - } } .landing-page .content, .pages .banner { @@ -585,10 +563,6 @@ label[required]::after{ margin-top: 1.5rem; } - .back-overlay { - display: none; - } - .header, .banner, .section-block { text-align: center; } diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index dfbac3987..f428c7cd3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -27,7 +27,5 @@ <%= render_brand_logo %> <%= render 'application/footer' %> - -
From 13d0e411d7281b344f134d2fb041c022981bffa8 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Tue, 5 Jan 2021 16:04:40 +0100 Subject: [PATCH 3/7] rename dom selector + remove more useless entries in .gitignore --- .gitignore | 6 ------ app/assets/stylesheets/application/variables.scss | 2 -- app/views/transfers/_sources.html.erb | 2 +- app/views/transfers/new.html.erb | 2 +- spec/controllers/transfers_controller_spec.rb | 6 +++--- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index f175a47d5..1a60ee003 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,6 @@ # Ignore bundler config /.bundle -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-journal - # Ignore all logfiles and tempfiles. /log/*.log /tmp @@ -32,8 +28,6 @@ capybara-*.html /vendor/bundle /coverage/ /spec/tmp/* -timeoverflow_development -timeoverflow_test .byebug_history .env .DS_Store diff --git a/app/assets/stylesheets/application/variables.scss b/app/assets/stylesheets/application/variables.scss index 3a06a6086..d426312da 100644 --- a/app/assets/stylesheets/application/variables.scss +++ b/app/assets/stylesheets/application/variables.scss @@ -9,7 +9,6 @@ $palette-black: #333; $bg-color: #f5f8fa; $white: #ffffff; $border: #e1e8ed; -$menu-disabled: #ddd; $black: #000; $form-input-glyph: #555; $form-input-bg-color: #f5f5f5; @@ -26,4 +25,3 @@ $pages-anchor: #4a4a4a; $pages-anchor-hover: #8a8a8a; $features-background: #f5f5f5; $features-separator: #d8d8d8; - diff --git a/app/views/transfers/_sources.html.erb b/app/views/transfers/_sources.html.erb index 98c6a88b5..644294274 100644 --- a/app/views/transfers/_sources.html.erb +++ b/app/views/transfers/_sources.html.erb @@ -4,6 +4,6 @@ options_for_select( TransferSourcesOptions.new(sources).to_a, selected: current_user.member(current_organization).account.id - ), {}, id: "select2-time", class: "form-control" + ), {}, id: "select2", class: "form-control" %>
diff --git a/app/views/transfers/new.html.erb b/app/views/transfers/new.html.erb index 6de7ee460..8154b2eac 100644 --- a/app/views/transfers/new.html.erb +++ b/app/views/transfers/new.html.erb @@ -42,7 +42,7 @@ <% end %> diff --git a/app/views/transfers/new.html.erb b/app/views/transfers/new.html.erb index 8154b2eac..a0e717578 100644 --- a/app/views/transfers/new.html.erb +++ b/app/views/transfers/new.html.erb @@ -40,11 +40,3 @@
<% end %> - - From ba5a0c94208d2777818152278b072fbacf336cce Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Tue, 5 Jan 2021 20:16:11 +0100 Subject: [PATCH 5/7] Add post ID to offers/inquiries reports Co-authored-by: @dataf3l --- app/decorators/post_report_decorator.rb | 4 +++- app/views/reports/post_list.html.erb | 4 +++- app/views/reports/user_list.html.erb | 3 --- spec/decorators/post_report_decorator_spec.rb | 5 +++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/decorators/post_report_decorator.rb b/app/decorators/post_report_decorator.rb index b1c4fcce4..3ebb3985f 100644 --- a/app/decorators/post_report_decorator.rb +++ b/app/decorators/post_report_decorator.rb @@ -14,6 +14,7 @@ def name(extension) def headers [ + "", @type.model_name.human, User.model_name.human ] @@ -23,10 +24,11 @@ def rows grouped_rows = [] @collection.each do |category, posts| - grouped_rows << [category.try(:name) || "-", ""] + grouped_rows << ["", category.try(:name) || "-", ""] posts.each do |post| grouped_rows << [ + post.id, post.title, "#{post.user} (#{post.member_uid})" ] diff --git a/app/views/reports/post_list.html.erb b/app/views/reports/post_list.html.erb index 786bac8b5..8eff5134c 100644 --- a/app/views/reports/post_list.html.erb +++ b/app/views/reports/post_list.html.erb @@ -6,6 +6,7 @@ + <%= @post_type.model_name.human %> <%= User.model_name.human %> @@ -13,10 +14,11 @@ <% @posts.each do |cat, ps| %> -

<%= cat || '—' %>

+

<%= cat || '—' %>

<% ps.each do |post| %> + <%= post.id %> <%= post.title %> <%= "#{post.user} (#{post.member_uid})" %> diff --git a/app/views/reports/user_list.html.erb b/app/views/reports/user_list.html.erb index 9dca6fb06..ef533012c 100644 --- a/app/views/reports/user_list.html.erb +++ b/app/views/reports/user_list.html.erb @@ -2,8 +2,6 @@ - @@ -22,6 +20,5 @@ <% end %> -
N <%= User.human_attribute_name :username %> <%= User.human_attribute_name :email %>
diff --git a/spec/decorators/post_report_decorator_spec.rb b/spec/decorators/post_report_decorator_spec.rb index a515b2fbc..f3d429d9d 100644 --- a/spec/decorators/post_report_decorator_spec.rb +++ b/spec/decorators/post_report_decorator_spec.rb @@ -24,6 +24,7 @@ it "#headers" do expect(decorator.headers).to eq([ + "", Offer.model_name.human, User.model_name.human ]) @@ -34,8 +35,8 @@ offer = org.offers.of_active_members.active.first expect(decorator.rows).to eq([ - [category.name, ""], - [offer.title, "#{offer.user} (#{offer.member_uid})"] + ["", category.name, ""], + [offer.id, offer.title, "#{offer.user} (#{offer.member_uid})"] ]) end end From 6d8db8e745818fa54ee7037df64caef0e2330397 Mon Sep 17 00:00:00 2001 From: Marc Anguera Insa Date: Wed, 6 Jan 2021 19:05:51 +0100 Subject: [PATCH 6/7] refactor navbar: too much nested partials hurt view rendering performance --- app/views/application/_navbar.html.erb | 28 ++++++++++++++++--- .../menus/_inquiries_list_link.html.erb | 6 ---- .../menus/_offers_by_tag_link.html.erb | 6 ---- .../menus/_offers_list_link.html.erb | 6 ---- .../menus/_organization_switcher.html.erb | 11 -------- .../menus/_user_admin_menu_items.html.erb | 13 ++++++++- .../menus/_user_list_link.html.erb | 6 ---- app/views/reports/post_list.html.erb | 2 +- 8 files changed, 37 insertions(+), 41 deletions(-) delete mode 100644 app/views/application/menus/_inquiries_list_link.html.erb delete mode 100644 app/views/application/menus/_offers_by_tag_link.html.erb delete mode 100644 app/views/application/menus/_offers_list_link.html.erb delete mode 100644 app/views/application/menus/_organization_switcher.html.erb delete mode 100644 app/views/application/menus/_user_list_link.html.erb diff --git a/app/views/application/_navbar.html.erb b/app/views/application/_navbar.html.erb index 840f9b003..4f41013a3 100644 --- a/app/views/application/_navbar.html.erb +++ b/app/views/application/_navbar.html.erb @@ -52,11 +52,31 @@