diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index 44065eaa..00000000
--- a/.drone.yml
+++ /dev/null
@@ -1,145 +0,0 @@
-kind: pipeline
-type: docker
-name: build and test
-
-steps:
- - name: rubocop
- image: circleci/ruby:2.7-bullseye-node-browsers-legacy
- commands:
- - sudo apt install --no-install-recommends -y libmagic-dev
- - sudo -E bundle install
- - sudo -E bundle exec rubocop
- volumes:
- - name: gem-cache
- path: /bundle
- - name: tmp
- path: /drone/src/tmp
- failure: ignore
-
-
- - name: build_test
- image: circleci/ruby:2.7-bullseye-node-browsers-legacy
- commands:
- - sudo apt install --no-install-recommends -y libmagic-dev
- - echo 'Wait for db container'; sleep 30
- - bundle config set path '/bundle'
- - bundle config set without 'production'
- - sudo -E bundle install
- - sudo -E bundle exec rake foodsoft:setup_development_docker || true
- - sudo -E bundle exec rake rspec-rerun:spec
- volumes:
- - name: gem-cache
- path: /bundle
- - name: tmp
- path: /drone/src/tmp
- environment:
- RAILS_LOG_TO_STDOUT: true
- RAILS_ENV: test
- COVERAGE: lcov
- DATABASE_URL: mysql2://user:password@mariadb/test?encoding=utf8mb4
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true
- PARALLEL_TEST_PROCESSORS: 60
-
-services:
- - name: mariadb
- image: mariadb
- environment:
- MYSQL_USER: user
- MYSQL_PASSWORD: password
- MYSQL_DATABASE: test
- MYSQL_ROOT_PASSWORD: password
-
-volumes:
- - name: gem-cache
- host:
- path: /tmp/cache
- - name: tmp
- temp: {}
----
-
-kind: pipeline
-type: docker
-name: docker build and deploy
-steps:
- - name: build and publish docker image
- image: plugins/docker
- settings:
- registry: git.local-it.org
- repo: git.local-it.org/foodsoft/foodsoft
- username: philipp
- password:
- from_secret: docker_registry
- tags:
- - latest
- - ${DRONE_BRANCH}
- - ${DRONE_COMMIT:0:8}
- cache_from:
- - "git.local-it.org/foodsoft/foodsoft:latest"
- - "git.local-it.org/foodsoft/foodsoft:${DRONE_BRANCH}"
- - name: deployment
- image: git.local-it.org/philipp/stack-ssh-deply:latest
- settings:
- stack: "foodsoft_${DRONE_COMMIT:0:8}"
- compose: "deployment/compose.yml"
- deploy_key:
- from_secret: drone_deploy_key
- host: "dev.local-it.cloud"
- user: "root"
- port: 22
- reg_user: philipp
- reg_pass:
- from_secret: docker_registry
- reg_url: git.local-it.org
- image: git.local-it.org/foodsoft/foodsoft:${DRONE_COMMIT:0:8}
- generate_secrets: true
- networks:
- - proxy
- environment:
- IMAGE: git.local-it.org/foodsoft/foodsoft:${DRONE_COMMIT:0:8}
- STACK_NAME: "foodsoft_${DRONE_COMMIT:0:8}"
- DOMAIN: "${DRONE_COMMIT:0:8}.foodsoft.dev.local-it.cloud"
- LETS_ENCRYPT_ENV: production
- FOODCOOP_MULTI_INSTALL: true
- FOODCOOP_NAME: example
- FOODCOOP_CITY: XXX
- FOODCOOP_COUNTRY: XXX
- FOODCOOP_EMAIL: info@example.org
- FOODCOOP_PHONE: XXX
- FOODCOOP_STREET: XXX
- FOODCOOP_ZIP_CODE: XXX
- FOODCOOP_HOMEPAGE: https://order.example.org
- FOODCOOP_HELP_URL: https://order.example.org
- FOODCOOP_TIME_ZONE: Berlin
- FOODCOOP_USE_NICK: true
- FOODCOOP_LANGUAGE: de
- FOODCOOP_FOOTER: 'example hosted by Your Tech Co-op.'
- USE_APPLE_POINTS: false
- STOP_ORDERING_UNDER: 75
- MINIMUM_BALANCE: 0
- MYSQL_DB: foodsoft
- MYSQL_HOST: db
- MYSQL_PORT: 3306
- MYSQL_USER: foodsoft
- EMAIL_SENDER: noreply@example.org
- EMAIL_ERROR: systems@example.org
- SMTP_ADDRESS: mail.example.com
- SMTP_AUTHENTICATION: plain
- SMTP_DOMAIN: mail.example.com
- SMTP_ENABLE_STARTTLS_AUTO: true
- SMTP_PORT: 587
- SMTP_USER_NAME: foodsoft
- EMAIL_REPLY_DOMAIN: example.org
- SMTP_SERVER_HOST: 0.0.0.0
- SMTP_SERVER_PORT: 2525
- SECRET_DB_PASSWORD_VERSION: v1
- SECRET_DB_ROOT_PASSWORD_VERSION: v1
- SECRET_SHARED_LISTS_DB_PASSWORD_VERSION: v1
- SECRET_SMTP_PASSWORD_VERSION: v1
- SECRET_SECRET_KEY_BASE_VERSION: v1
- APP_CONFIG_VERSION: v1
- DB_CONFIG_VERSION: v1
- ENTRYPOINT_VERSION: v1
- PRODUCTION_ENV_VERSION: v1
-trigger:
- branch:
- - demo
diff --git a/Dockerfile b/Dockerfile
index 95479ce2..c999b3d4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ruby:2.7
+FROM ruby:2.6
RUN supercronicUrl=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64 && \
supercronicBin=/usr/local/bin/supercronic && \
@@ -15,16 +15,13 @@ ENV PORT=3000 \
WORKDIR /usr/src/app
-COPY Gemfile Gemfile.lock ./
-COPY plugins/ ./plugins
-COPY config/ ./config
+COPY . ./
# install dependencies and generate crontab
RUN buildDeps='libmagic-dev' && \
apt-get update && \
apt-get install --no-install-recommends -y $buildDeps && \
echo 'gem: --no-document' >> ~/.gemrc && \
- gem install bundler && \
bundle config build.nokogiri "--use-system-libraries" && \
bundle install --deployment --without development test -j 4 && \
apt-get purge -y --auto-remove $buildDeps && \
@@ -32,8 +29,6 @@ RUN buildDeps='libmagic-dev' && \
\
bundle exec whenever >crontab
-COPY . ./
-
# compile assets with temporary mysql server
RUN export DATABASE_URL=mysql2://localhost/temp?encoding=utf8 && \
export SECRET_KEY_BASE=thisisnotimportantnow && \
diff --git a/Gemfile b/Gemfile
index cf5c631a..82c2ea2a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -75,6 +75,7 @@ gem 'foodsoft_polls', path: 'plugins/polls'
# gem 'foodsoft_printer', path: 'plugins/printer'
# gem 'foodsoft_uservoice', path: 'plugins/uservoice'
+
group :development do
gem 'sqlite3', '~> 1.3.6'
gem 'mailcatcher'
@@ -127,6 +128,4 @@ group :test do
gem 'hashie', '~> 3.4.6', require: false # https://github.com/westfieldlabs/apivore/issues/114
end
-gem "importmap-rails", "~> 1.1"
-
-gem "image_processing", "~> 1.12"
+gem "redcarpet"
diff --git a/Gemfile.lock b/Gemfile.lock
index b7a61156..f4d3ed09 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -255,12 +255,6 @@ GEM
i18n-spec (0.6.0)
iso
ice_cube (0.16.4)
- image_processing (1.12.2)
- mini_magick (>= 4.9.5, < 5)
- ruby-vips (>= 2.0.17, < 3)
- importmap-rails (1.1.5)
- actionpack (>= 6.0.0)
- railties (>= 6.0.0)
inherited_resources (1.13.1)
actionpack (>= 5.2, < 7.1)
has_scope (~> 0.6)
@@ -321,7 +315,6 @@ GEM
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
- mini_magick (4.12.0)
mini_mime (1.1.2)
minitest (5.17.0)
mono_logger (1.1.1)
@@ -420,6 +413,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
+ redcarpet (3.6.0)
redis (5.0.5)
redis-client (>= 0.9.0)
redis-client (0.11.2)
@@ -500,8 +494,6 @@ GEM
ruby-prof (1.4.5)
ruby-progressbar (1.11.0)
ruby-units (3.0.0)
- ruby-vips (2.1.4)
- ffi (~> 1.12)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sass-rails (6.0.0)
@@ -637,8 +629,6 @@ DEPENDENCIES
i18n-js (~> 3.0.0.rc8)
i18n-spec
ice_cube
- image_processing (~> 1.12)
- importmap-rails (~> 1.1)
inherited_resources
jquery-rails
kaminari
@@ -663,6 +653,7 @@ DEPENDENCIES
rails_tokeninput
ransack
recurring_select!
+ redcarpet
resque
roo
roo-xls
diff --git a/app/assets/javascripts/application_legacy.js b/app/assets/javascripts/application.js
similarity index 100%
rename from app/assets/javascripts/application_legacy.js
rename to app/assets/javascripts/application.js
diff --git a/app/assets/stylesheets/actiontext.css b/app/assets/stylesheets/actiontext.css
deleted file mode 100644
index 3cfcb2b7..00000000
--- a/app/assets/stylesheets/actiontext.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
- * the trix-editor content (whether displayed or under editing). Feel free to incorporate this
- * inclusion directly in any other asset bundle and remove this file.
- *
- *= require trix
-*/
-
-/*
- * We need to override trix.css’s image gallery styles to accommodate the
- * element we wrap around attachments. Otherwise,
- * images in galleries will be squished by the max-width: 33%; rule.
-*/
-.trix-content .attachment-gallery > action-text-attachment,
-.trix-content .attachment-gallery > .attachment {
- flex: 1 0 33%;
- padding: 0 0.5em;
- max-width: 33%;
-}
-
-.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
-.trix-content .attachment-gallery.attachment-gallery--2 > .attachment, .trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
-.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
- flex-basis: 50%;
- max-width: 50%;
-}
-
-.trix-content action-text-attachment .attachment {
- padding: 0 !important;
- max-width: 100% !important;
-}
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 01dba421..6bdfecd2 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -7,5 +7,4 @@
*= require list.unlist
*= require list.missing
*= require recurring_select
-*= require actiontext
*/
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index de207901..2f281022 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -263,4 +263,26 @@ module ApplicationHelper
stylesheet_link_tag foodcoop_css_path, media: 'all'
end
end
+
+ # renders html from markdown input
+ def markdown(text)
+ options = {
+ filter_html: true,
+ hard_wrap: true,
+ link_attributes: { rel: 'nofollow', target: "_blank" },
+ fenced_code_blocks: true
+ }
+ extensions = {
+ autolink: true,
+ superscript: true,
+ disable_indented_code_blocks: true,
+ tables: true,
+ strikethrough: true,
+ footnotes: true
+ }
+
+ renderer = ::Redcarpet::Render::HTML.new(options)
+ markdown = ::Redcarpet::Markdown.new(renderer, extensions)
+ markdown.render(text).html_safe
+ end
end
diff --git a/app/javascript/application.js b/app/javascript/application.js
deleted file mode 100644
index ed5cae66..00000000
--- a/app/javascript/application.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
-import "trix"
-import "@rails/actiontext"
diff --git a/app/views/active_storage/blobs/_blob.html.erb b/app/views/active_storage/blobs/_blob.html.erb
deleted file mode 100644
index 49ba357d..00000000
--- a/app/views/active_storage/blobs/_blob.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
- attachment--<%= blob.filename.extension %>">
- <% if blob.representable? %>
- <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %>
- <% end %>
-
-
- <% if caption = blob.try(:caption) %>
- <%= caption %>
- <% else %>
- <%= blob.filename %>
- <%= number_to_human_size blob.byte_size %>
- <% end %>
-
-
diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
index 66e14355..974ce8f2 100644
--- a/app/views/layouts/_header.html.haml
+++ b/app/views/layouts/_header.html.haml
@@ -8,10 +8,10 @@
= csrf_meta_tags
= stylesheet_link_tag "application", :media => "all"
//%link(href="images/favicon.ico" rel="shortcut icon")
+
= yield(:head)
= foodcoop_css_tag
-
%body
= yield
@@ -19,9 +19,7 @@
Javascripts
\==================================================
/ Placed at the end of the document so the pages load faster
- = javascript_importmap_tags
- = javascript_include_tag "application_legacy"
-
+ = javascript_include_tag "application"
:javascript
I18n.defaultLocale = "#{I18n.default_locale}";
I18n.locale = "#{I18n.locale}";
diff --git a/app/views/layouts/action_text/contents/_content.html.erb b/app/views/layouts/action_text/contents/_content.html.erb
deleted file mode 100644
index 9e3c0d0d..00000000
--- a/app/views/layouts/action_text/contents/_content.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-
- <%= yield -%>
-
diff --git a/app/views/layouts/email.html.haml b/app/views/layouts/email.html.haml
deleted file mode 100644
index 6bcf3b4a..00000000
--- a/app/views/layouts/email.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-= yield
-\
-%hr
-%ul
- %li
- %a{href: root_url} Foodsoft
- - if FoodsoftConfig[:homepage]
- %li
- %a{href: FoodsoftConfig[:homepage]} Foodcoop
- - if FoodsoftConfig[:help_url]
- %li
- %a{href: FoodsoftConfig[:help_url]}= t '.help'
\ No newline at end of file
diff --git a/app/views/layouts/email.text.haml b/app/views/layouts/email.text.haml
index b6f6171f..94b0cd6c 100644
--- a/app/views/layouts/email.text.haml
+++ b/app/views/layouts/email.text.haml
@@ -3,4 +3,4 @@
= t '.footer_1_separator'
= t '.footer_2_foodsoft', url: root_url
= t '.footer_3_homepage', url: FoodsoftConfig[:homepage] if FoodsoftConfig[:homepage]
-= t '.footer_4_help', url: FoodsoftConfig[:help_url] if FoodsoftConfig[:help_url]
\ No newline at end of file
+= t '.footer_4_help', url: FoodsoftConfig[:help_url] if FoodsoftConfig[:help_url]
diff --git a/bin/importmap b/bin/importmap
deleted file mode 100755
index 36502ab1..00000000
--- a/bin/importmap
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env ruby
-
-require_relative "../config/application"
-require "importmap/commands"
diff --git a/config/application.rb b/config/application.rb
index f76faa95..9c0ade99 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -67,8 +67,6 @@ module Foodsoft
config.autoloader = :zeitwerk
- config.active_storage.variant_processor = :mini_magick
-
# Ex:- :default =>''
# CORS for API
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 266c31af..d0f06b95 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -29,7 +29,7 @@ Rails.application.configure do
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
- config.assets.js_compressor = Uglifier.new(harmony: true)
+ config.assets.js_compressor = :uglifier
config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
diff --git a/config/importmap.rb b/config/importmap.rb
deleted file mode 100644
index f882664b..00000000
--- a/config/importmap.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# Pin npm packages by running ./bin/importmap
-pin "application", preload: true
-pin "trix"
-pin "@rails/actiontext", to: "actiontext.js"
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index e1c4d5fa..fe48fc34 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -9,4 +9,4 @@ Rails.application.config.assets.version = '1.0'
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
-Rails.application.config.assets.precompile += %w( application_legacy.js jquery.min.js )
+# Rails.application.config.assets.precompile += %w( admin.js admin.css )
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 777244c1..5a1a5b35 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -1221,7 +1221,6 @@ de:
footer_2_foodsoft: 'Foodsoft: %{url}'
footer_3_homepage: 'Foodcoop: %{url}'
footer_4_help: 'Hilfe: %{url}'
- help: 'Hilfe'
foodsoft: Foodsoft
footer:
revision: Revision %{revision}
diff --git a/config/locales/en.yml b/config/locales/en.yml
index bf75a895..59e94385 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1224,7 +1224,6 @@ en:
footer_2_foodsoft: 'Foodsoft: %{url}'
footer_3_homepage: 'Foodcoop: %{url}'
footer_4_help: 'Help: %{url}'
- help: 'Help'
foodsoft: Foodsoft
footer:
revision: revision %{revision}
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 8dbe75dd..620ec3bb 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -268,7 +268,7 @@ es:
all_ordergroups: Todos los grupos de pedido
all_users: Todos los usuarios
all_workgroups: Todos los grupos de trabajo
- created_at: creado
+ created_at: creado
first_paragraph: Aquí puedes administrar grupos y usuarios de Foodsoft.
groupname: nombre del grupo
members: miembros
@@ -513,7 +513,7 @@ es:
status: Estado (x=saltar)
file_label: Por favor elige un archivo compatible
options:
- convert_units: Mantener unidades actuales, recomputar la cantidad y precio de unidades (como sincronizar).
+ convert_units: Mantener unidades actuales, recomputar la cantidad y precio de unidades (como sincronizar).
outlist_absent: Borrar artículos que no están en el archivo subido.
sample:
juices: Jugos
@@ -1014,7 +1014,7 @@ es:
changes_saved: Guarda los cambios.
index:
my_ordergroup:
- last_update: La última actualización fue hace %{when}
+ last_update: La última actualización fue hace %{when}
title: Mi grupo de pedido
transactions:
title: Últimas transacciones
@@ -1082,7 +1082,6 @@ es:
layouts:
email:
footer_4_help: 'Ayuda: %{url}'
- help: 'Ayuda'
footer:
revision: revisión %{revision}
header:
@@ -1104,7 +1103,7 @@ es:
error_invite_invalid: Tu invitación no es válida.
error_token_invalid: La sesión ha expirado o no es válida. Prueba de nuevo.
reset_password:
- notice: Si tu email está ya registrado aquí, recibirás un mensaje con un enlace para
+ notice: Si tu email está ya registrado aquí, recibirás un mensaje con un enlace para
update_password:
notice: Tu contraseña ha sido actualizada. Prueba a conectarte ahora.
forgot_password:
@@ -1470,7 +1469,7 @@ es:
copy:
title: Copia artículo de stock
create:
- notice: Se ha creado el nuevo producto en stock "%{name}"
+ notice: Se ha creado el nuevo producto en stock "%{name}"
derive:
title: Añade un artículo en stock desde plantilla
destroy:
@@ -1578,7 +1577,7 @@ es:
accept_task: Aceptar tarea
confirm_delete_group: Estás seguro/a de que quieres borrar esta tarea y todas las tareas subsecuentes?
confirm_delete_single: Estás seguro/a de que quieres borrar esta tarea?
- confirm_delete_single_from_group: Estás seguro/a de que quieres borrar esta tarea (y mantener las tareas recurrentes relacionadas)?
+ confirm_delete_single_from_group: Estás seguro/a de que quieres borrar esta tarea (y mantener las tareas recurrentes relacionadas)?
delete_group: Borrar esta tarea y las subsecuentes
edit_group: Edita recurrencia
mark_done: Marca tarea como hecha
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 53ab8835..4dbdb864 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -14,7 +14,7 @@ fr:
gross_price: Prix TTC
manufacturer: Product-rice-eur
name: Nom
- order_number: Numéro
+ order_number: Numéro
order_number_short: Numéro
origin: Lieu de production
price: Prix HT
@@ -834,7 +834,6 @@ fr:
email:
footer_3_homepage: 'Boufcoop: %{url}'
footer_4_help: 'Aide: %{url}'
- help: 'Aide'
footer:
revision: révision %{revision}
header:
@@ -861,7 +860,7 @@ fr:
error_invite_invalid: Ton invitation n'est pas ou plus valide.
error_token_invalid: Ton jeton de connexion n'est pas ou plus valide, essaie de cliquer à nouveau sur le lien.
reset_password:
- notice: Tu vas maintenant recevoir un message contenant un lien qui te permettra de réinitialiser ton mot de passe.
+ notice: Tu vas maintenant recevoir un message contenant un lien qui te permettra de réinitialiser ton mot de passe.
update_password:
notice: Ton mot de passe a été mis à jour. Tu peux maintenant de connecter.
forgot_password:
@@ -1094,7 +1093,7 @@ fr:
closed: décomptée
finished: clôturée
open: en cours
- received: reçu
+ received: reçu
update:
notice: La commande a été mise à jour.
update_order_amounts:
@@ -1345,7 +1344,7 @@ fr:
notice: La description du boulot a été mise à jour.
notice_converted: Le boulot a été converti en boulot ordinaire (sans répétition).
user:
- more: Tu t'ennuies en ce moment? Il y aura sûrement du boulot pour toi %{tasks_link}.
+ more: Tu t'ennuies en ce moment? Il y aura sûrement du boulot pour toi %{tasks_link}.
tasks_link: par là-bas
title: Ton boulot
title_accepted: Boulots acceptés
@@ -1370,7 +1369,7 @@ fr:
edit:
title: Modifier l'équipe
error_last_admin_group: Impossible de supprimer la dernière cellule avec privilèges administratrices.
- error_last_admin_role: Les privilèges administratrices ne peuvent pas être retirés à la dernière cellule qui les possède.
+ error_last_admin_role: Les privilèges administratrices ne peuvent pas être retirés à la dernière cellule qui les possède.
index:
title: Équipes
update:
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index e66bae80..4c97dda4 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -1194,7 +1194,6 @@ nl:
footer_2_foodsoft: 'Foodsoft: %{url}'
footer_3_homepage: 'Foodcoop: %{url}'
footer_4_help: 'Help: %{url}'
- help: 'Help'
foodsoft: Foodsoft
footer:
revision: revisie %{revision}
diff --git a/db/migrate/20230209105256_create_action_text_tables.action_text.rb b/db/migrate/20230209105256_create_action_text_tables.action_text.rb
deleted file mode 100644
index 1be48d70..00000000
--- a/db/migrate/20230209105256_create_action_text_tables.action_text.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# This migration comes from action_text (originally 20180528164100)
-class CreateActionTextTables < ActiveRecord::Migration[6.0]
- def change
- # Use Active Record's configured type for primary and foreign keys
- primary_key_type, foreign_key_type = primary_and_foreign_key_types
-
- create_table :action_text_rich_texts, id: primary_key_type do |t|
- t.string :name, null: false
- t.text :body, size: :long
- t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
-
- t.timestamps
-
- t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true
- end
- end
-
- private
- def primary_and_foreign_key_types
- config = Rails.configuration.generators
- setting = config.options[config.orm][:primary_key_type]
- primary_key_type = setting || :primary_key
- foreign_key_type = setting || :bigint
- [primary_key_type, foreign_key_type]
- end
-end
diff --git a/db/schema.rb b/db/schema.rb
index 9ba8eaf3..50c24c41 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,17 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[7.0].define(version: 2023_02_09_105256) do
- create_table "action_text_rich_texts", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
- t.string "name", null: false
- t.text "body", size: :long
- t.string "record_type", null: false
- t.bigint "record_id", null: false
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true
- end
-
+ActiveRecord::Schema[7.0].define(version: 2023_01_06_144440) do
create_table "active_storage_attachments", id: :integer, charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
diff --git a/deployment/.env.sample b/deployment/.env.sample
deleted file mode 100644
index a0d398c6..00000000
--- a/deployment/.env.sample
+++ /dev/null
@@ -1,65 +0,0 @@
-TYPE=foodsoft
-
-DOMAIN=order.example.org
-#EXTRA_DOMAINS=', `www.order.example.com`'
-LETS_ENCRYPT_ENV=production
-COMPOSE_FILE="compose.yml"
-
-# app settings
-FOODCOOP_MULTI_INSTALL=true # Best for now, see https://github.com/foodcoops/foodsoft/pull/841
-FOODCOOP_NAME=example
-FOODCOOP_CITY=XXX
-FOODCOOP_COUNTRY=XXX
-FOODCOOP_EMAIL=info@example.org
-FOODCOOP_PHONE=XXX
-FOODCOOP_STREET=XXX
-FOODCOOP_ZIP_CODE=XXX
-FOODCOOP_HOMEPAGE=https://order.example.org
-FOODCOOP_HELP_URL=https://order.example.org
-FOODCOOP_TIME_ZONE=Amsterdam
-FOODCOOP_USE_NICK=true
-FOODCOOP_LANGUAGE=en
-FOODCOOP_FOOTER='example hosted by Your Tech Co-op.'
-USE_APPLE_POINTS=false
-STOP_ORDERING_UNDER=75
-MINIMUM_BALANCE=0
-
-# database settings
-MYSQL_DB=foodsoft
-MYSQL_HOST=db
-MYSQL_PORT=3306
-MYSQL_USER=foodsoft
-
-# shared supplier list settings
-# COMPOSE_FILE="$COMPOSE_FILE:compose.sharedlists.yml"
-# ENABLE_SHARED_LISTS=0
-# SHARED_LISTS_DB_TYPE=mysql2
-# SHARED_LISTS_HOST=order.otherfoodcoop.org
-# SHARED_LISTS_DB_NAME=sharedlists
-# SHARED_LISTS_USER=example
-
-# Group order invoices generation pull request
-# https://github.com/foodcoops/foodsoft/pull/907
-# COMPOSE_FILE="$COMPOSE_FILE:compose.groupOrderInvoice.yml"
-
-# outgoing mail settings
-EMAIL_SENDER=noreply@example.org
-EMAIL_ERROR=systems@example.org
-SMTP_ADDRESS=mail.example.com
-SMTP_AUTHENTICATION=plain
-SMTP_DOMAIN=mail.example.com
-SMTP_ENABLE_STARTTLS_AUTO=true
-SMTP_PORT=587
-SMTP_USER_NAME=foodsoft
-
-# incoming mail settings
-EMAIL_REPLY_DOMAIN=example.org
-SMTP_SERVER_HOST=0.0.0.0
-SMTP_SERVER_PORT=2525
-
-# secret versions
-SECRET_DB_PASSWORD_VERSION=v1
-SECRET_DB_ROOT_PASSWORD_VERSION=v1
-SECRET_SHARED_LISTS_DB_PASSWORD_VERSION=v1
-SECRET_SMTP_PASSWORD_VERSION=v1
-SECRET_SECRET_KEY_BASE_VERSION=v1 # length=30
diff --git a/deployment/app_config.yml.tmpl b/deployment/app_config.yml.tmpl
deleted file mode 100644
index f1e1a580..00000000
--- a/deployment/app_config.yml.tmpl
+++ /dev/null
@@ -1,168 +0,0 @@
-# {{ env "DOMAIN" }} configuration
-
-default: &defaults
- # If you wanna serve more than one foodcoop with one installation
- # Don't forget to setup databases for each foodcoop. See also MULTI_COOP_INSTALL
- multi_coop_install: {{ env "FOODCOOP_MULTI_INSTALL" }}
-
- # If multi_coop_install you have to use a coop name, which you you wanna be selected by default
- default_scope: "{{ env "FOODCOOP_NAME" }}"
-
- # name of this foodcoop
- name: "{{ env "FOODCOOP_NAME" }}"
-
- # foodcoop contact information (used for FAX messages)
- contact:
- street: "{{ env "FOODCOOP_STREET" }}"
- zip_code: "{{ env "FOODCOOP_ZIP_CODE" }}"
- city: "{{ env "FOODCOOP_CITY" }}"
- country: "{{ env "FOODCOOP_COUNTRY" }}"
- email: "{{ env "FOODCOOP_EMAIL" }}"
- phone: "{{ env "FOODCOOP_PHONE" }}"
-
- # Homepage
- homepage: "{{ env "FOODCOOP_HOMEPAGE" }}"
-
- # foodsoft documentation URL
- help_url: "{{ env "FOODCOOP_HELP_URL" }}"
-
- # documentation URL for the apples&pears work system
- applepear_url: https://github.com/foodcoops/foodsoft/wiki/%C3%84pfel-u.-Birnen
-
- # custom foodsoft software URL (used in footer)
- foodsoft_url: https://foodcoops.github.io
-
- # Default language
- default_locale: {{ env "FOODCOOP_LANGUAGE" }}
-
- # By default, foodsoft takes the language from the webbrowser/operating system.
- # In case you really want foodsoft in a certain language by default, set this to true.
- # When members are logged in, the language from their profile settings is still used.
- ignore_browser_locale: false
-
- # Default timezone, e.g. UTC, Amsterdam, Berlin, etc.
- time_zone: "{{ env "FOODCOOP_TIME_ZONE" }}"
-
- # Currency symbol, and whether to add a whitespace after the unit.
- currency_unit: €
- #currency_space: true
-
- # price markup in percent
- price_markup: 2.0
-
- # default vat percentage for new articles
- tax_default: 7.0
-
- # tolerance order option: If set to false, article tolerance values do not count
- # for total article price as long as the order is not finished.
- tolerance_is_costly: false
-
- # Ordergroups, which have less than 75 apples should not be allowed to make new orders
- # Comment out this option to activate this restriction
- stop_ordering_under: {{ env "STOP_ORDERING_UNDER" }}
-
- # Comment out to completely hide apple points (be sure to comment stop_ordering_under)
- use_apple_points: {{ env "USE_APPLE_POINTS" }}
-
- # ordergroups can only order when their balance is higher than or equal to this
- # not fully enforced right now, since the check is only client-side
- minimum_balance: {{ env "MINIMUM_BALANCE" }}
-
- # how many days there are between two periodic tasks
- #tasks_period_days: 7
-
- # how many days upfront periodic tasks are created
- #tasks_upfront_days: 49
-
- # default order schedule, used to provide initial dates for new orders
- # (recurring dates in ical format; no spaces!)
- #order_schedule:
- # ends:
- # recurr: FREQ=WEEKLY;INTERVAL=2;BYDAY=MO
- # time: '9:00'
- # # reference point, this is generally the first pickup day; empty is often ok
- # #initial:
-
- # When use_nick is enabled, there will be a nickname field in the user form,
- # and the option to show a nickname instead of full name to foodcoop members.
- # Members of a user's groups and administrators can still see full names.
- use_nick: {{ env "FOODCOOP_USE_NICK" }}
-
- # Most plugins can be enabled/disabled here as well. Messages and wiki are enabled
- # by default and need to be set to false to disable. Most other plugins needs to
- # be enabled before they do anything.
- use_wiki: true
- use_messages: true
- use_documents: true
- use_polls: true
-
- # Base font size for generated PDF documents
- #pdf_font_size: 12
-
- # Page size for generated PDF documents
- #pdf_page_size: A4
-
- # Some documents (like group and article PDFs) can include page breaks
- # after each sublist.
- #pdf_add_page_breaks: true
-
- # Alternatively, this can be set for each document.
- #pdf_add_page_breaks:
- # order_by_groups: true
- # order_by_articles: true
-
- # Page footer (html allowed). Default is a Foodsoft footer. Set to `blank` for no footer.
- page_footer: {{ env "FOODCOOP_FOOTER" }}
-
- # Custom CSS for the foodcoop
- #custom_css: 'body { background-color: #fcffba; }'
-
- # Uncomment to add tracking code for web statistics, e.g. for Piwik. (Added to bottom of page)
- #webstats_tracking_code: |
- #
- # ......
-
- # email address to be used as sender
- email_sender: "{{ env "EMAIL_SENDER" }}"
-
- # email address to be used as from
- email_from: "{{ env "EMAIL_SENDER" }}"
-
- # domain to be used for reply emails
- reply_email_domain: {{ env "EMAIL_REPLY_DOMAIN" }}
-
- # If your foodcoop uses a mailing list instead of internal messaging system
- #mailing_list: list@example.org
- #mailing_list_subscribe: list-subscribe@example.org
-
- # Config for the exception_notification plugin
- notification:
- error_recipients:
- - "{{ env "EMAIL_ERROR" }}"
- sender_address: "\"Foodsoft error\" <{{ env "EMAIL_SENDER" }}>"
- email_prefix: "[foodsoft] "
-
- # http config for this host to generate links in emails (uses environment config when not set)
- protocol: https
- host: "{{ env "DOMAIN" }}"
- #port: 3000
-
- {{ if eq (env "ENABLE_SHARED_LISTS") "1" }}
- # Access to sharedlists, the external article-database.
- # This allows a foodcoop to subscribe to a selection of a supplier's full assortment,
- # and makes it possible to share data with several foodcoops. Using this requires installing
- # an additional application with a separate database.
- shared_lists:
- adapter: "{{ env "SHARED_LISTS_DB_TYPE" }}"
- host: "{{ env "SHARED_LISTS_HOST" }}"
- database: "{{ env "SHARED_LISTS_DB_NAME" }}"
- username: "{{ env "SHARED_LISTS_USER" }}"
- password: "{{ secret "shared_lists_db_password" }}"
- {{ end }}
-
-# don't remove this, required to run the app
-production:
- <<: *defaults
-
-{{ env "FOODCOOP_NAME" }}:
- <<: *defaults
diff --git a/deployment/compose.yml b/deployment/compose.yml
deleted file mode 100644
index b4484d66..00000000
--- a/deployment/compose.yml
+++ /dev/null
@@ -1,189 +0,0 @@
----
-version: "3.8"
-
-x-env: &env
- CERTBOT_DISABLED: 1
- DOMAIN:
- EMAIL_ERROR:
- EMAIL_REPLY_DOMAIN:
- EMAIL_SENDER:
- FOODCOOP_CITY:
- FOODCOOP_COUNTRY:
- FOODCOOP_EMAIL:
- FOODCOOP_FOOTER:
- FOODCOOP_HELP_URL:
- FOODCOOP_HOMEPAGE:
- FOODCOOP_MULTI_INSTALL:
- FOODCOOP_NAME:
- FOODCOOP_PHONE:
- FOODCOOP_STREET:
- FOODCOOP_TIME_ZONE:
- FOODCOOP_ZIP_CODE:
- FOODCOOP_USE_NICK:
- FOODCOOP_LANGUAGE:
- LOG_LEVEL:
- MINIMUM_BALANCE:
- MYSQL_DB:
- MYSQL_HOST:
- MYSQL_PORT:
- MYSQL_USER:
- QUEUE: foodsoft_notifier
- REDIS_URL: redis://cache:6379
- SECRET_KEY_BASE_FILE: /run/secrets/secret_key_base
- SMTP_ADDRESS:
- SMTP_AUTHENTICATION:
- SMTP_DOMAIN:
- SMTP_ENABLE_STARTTLS_AUTO:
- SMTP_PASSWORD_FILE: /run/secrets/smtp_password
- SMTP_PORT:
- SMTP_USER_NAME:
- STOP_ORDERING_UNDER:
- USE_APPLE_POINTS:
-
-x-configs: &configs
- - source: app_config
- target: /usr/src/app/config/app_config.yml
- - source: db_config
- target: /usr/src/app/config/database.yml
- - source: entrypoint
- target: /usr/src/app/docker-entrypoint.sh
- mode: 0555
-
-x-secrets: &secrets
- - db_password
- - secret_key_base
- - smtp_password
-
-services:
- app:
- image: ${IMAGE}
- networks:
- - internal
- - proxy
- secrets: *secrets
- configs: *configs
- entrypoint: &entrypoint /usr/src/app/docker-entrypoint.sh
- environment:
- <<: *env
- FOODSOFT_SERVICE: app
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:3000"]
- interval: 15s
- timeout: 10s
- retries: 10
- start_period: 1m
- deploy:
- update_config:
- failure_action: rollback
- order: start-first
- labels:
- - "traefik.enable=true"
- - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- - "coop-cloud.${STACK_NAME}.version=1.0.0+4.7.1"
-
- cron:
- image: ${IMAGE}
- secrets: *secrets
- configs: *configs
- entrypoint: *entrypoint
- environment:
- <<: *env
- FOODSOFT_SERVICE: cron
- networks:
- - internal
-
- worker:
- image: ${IMAGE}
- secrets: *secrets
- configs: *configs
- entrypoint: *entrypoint
- environment:
- <<: *env
- FOODSOFT_SERVICE: worker
- networks:
- - internal
-
- smtp:
- image: ${IMAGE}
- configs: *configs
- entrypoint: *entrypoint
- secrets: *secrets
- environment:
- <<: *env
- FOODSOFT_SERVICE: smtp
- SMTP_SERVER_HOST:
- SMTP_SERVER_PORT:
- networks:
- - proxy
- - internal
- deploy:
- labels:
- - "traefik.enable=true"
- - "traefik.tcp.routers.foodsoft-smtp.rule=HostSNI(`*`)"
- - "traefik.tcp.routers.foodsoft-smtp.entrypoints=foodsoft-smtp"
- - "traefik.tcp.services.foodsoft-smtp.loadbalancer.server.port=${SMTP_SERVER_PORT}"
-
- db:
- image: "mariadb:10.6"
- command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_520_ci"
- environment:
- MYSQL_USER: ${MYSQL_USER}
- MYSQL_DATABASE: ${MYSQL_DB}
- MYSQL_PASSWORD_FILE: /run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
- secrets:
- - db_password
- - db_root_password
- volumes:
- - "db:/var/lib/mysql"
- networks:
- - internal
- deploy:
- labels:
- backupbot.backup: "true"
- backupbot.backup.pre-hook: 'mkdir -p /tmp/backup/ && mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" $${MYSQL_DATABASE} > /tmp/backup/backup.sql'
- backupbot.backup.post-hook: "rm -rf /tmp/backup"
- backupbot.backup.path: "/tmp/backup/"
- cache:
- image: "redis:6"
- networks:
- - internal
-
-networks:
- internal:
- proxy:
- external: true
-
-volumes:
- db:
-
-configs:
- app_config:
- name: ${STACK_NAME}_app_config_${APP_CONFIG_VERSION}
- file: app_config.yml.tmpl
- template_driver: golang
- db_config:
- name: ${STACK_NAME}_db_config_${DB_CONFIG_VERSION}
- file: database.yml.tmpl
- template_driver: golang
- entrypoint:
- name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
- file: entrypoint.sh.tmpl
- template_driver: golang
-
-secrets:
- db_password:
- name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
- external: true
- db_root_password:
- name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
- external: true
- smtp_password:
- name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
- external: true
- secret_key_base:
- name: ${STACK_NAME}_secret_key_base_${SECRET_SECRET_KEY_BASE_VERSION}
- external: true
diff --git a/deployment/database.yml.tmpl b/deployment/database.yml.tmpl
deleted file mode 100644
index bf64dc72..00000000
--- a/deployment/database.yml.tmpl
+++ /dev/null
@@ -1,9 +0,0 @@
-production:
- adapter: "mysql2"
- encoding: "utf8mb4"
- collation: "utf8mb4_unicode_520_ci"
- username: "{{ env "MYSQL_USER" }}"
- password: "{{ secret "db_password" }}"
- database: "{{ env "MYSQL_DB" }}"
- host: "{{ env "MYSQL_HOST" }}"
- port: "{{ env "MYSQL_PORT" }}"
diff --git a/deployment/entrypoint.sh.tmpl b/deployment/entrypoint.sh.tmpl
deleted file mode 100644
index 06f27b08..00000000
--- a/deployment/entrypoint.sh.tmpl
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-set -eu
-
-file_env() {
- local var="$1"
- local fileVar="${var}_FILE"
- local def="${2:-}"
-
- if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
- echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
- exit 1
- fi
-
- local val="$def"
-
- if [ "${!var:-}" ]; then
- val="${!var}"
- elif [ "${!fileVar:-}" ]; then
- val="$(< "${!fileVar}")"
- fi
-
- export "$var"="$val"
- unset "$fileVar"
-}
-
-file_env "SECRET_KEY_BASE"
-file_env "SMTP_PASSWORD"
-
-echo "------------------------------------------------------------------------------"
-echo "Running entrypoint commands against '$FOODSOFT_SERVICE' service"
-echo "------------------------------------------------------------------------------"
-
-if [ "$FOODSOFT_SERVICE" == "app" ]; then
- bundle exec rake db:setup || true
- bundle exec rake db:migrate || true
- ./proc-start web
-elif [ "$FOODSOFT_SERVICE" == "cron" ]; then
- ./proc-start cron
-elif [ "$FOODSOFT_SERVICE" == "worker" ]; then
- ./proc-start worker
-elif [ "$FOODSOFT_SERVICE" == "smtp" ]; then
- ./proc-start mail
-fi
diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml
index 0a8b3fec..b0a325db 100644
--- a/docker-compose-dev.yml
+++ b/docker-compose-dev.yml
@@ -11,6 +11,7 @@ services:
build:
context: .
dockerfile: Dockerfile-dev
+ platform: linux/x86_64
command: ./proc-start worker
volumes:
- bundle:/usr/local/bundle
diff --git a/plugins/messages/app/controllers/messages_controller.rb b/plugins/messages/app/controllers/messages_controller.rb
index 7807b67f..628f145b 100644
--- a/plugins/messages/app/controllers/messages_controller.rb
+++ b/plugins/messages/app/controllers/messages_controller.rb
@@ -20,13 +20,11 @@ class MessagesController < ApplicationController
@message.group_id = original_message.group_id
@message.private = original_message.private
@message.subject = I18n.t('messages.model.reply_subject', :subject => original_message.subject)
- @message.body = I18n.t('messages.model.reply_header', :user => original_message.sender.display, :when => I18n.l(original_message.created_at, :format => :short)) + "\n" \
- + "" + original_message.body.to_trix_html + "
"
-
- # .each_line { |l| @message.body += I18n.t('messages.model.reply_indent', :line => l) }
+ @message.body = I18n.t('messages.model.reply_header', :user => original_message.sender.display, :when => I18n.l(original_message.created_at, :format => :short)) + "\n"
+ original_message.body.each_line { |l| @message.body += I18n.t('messages.model.reply_indent', :line => l) }
else
redirect_to new_message_url, alert: I18n.t('messages.new.error_private')
- end
+ end
end
end
diff --git a/plugins/messages/app/helpers/messages_helper.rb b/plugins/messages/app/helpers/messages_helper.rb
index d386e6df..d5371fe4 100644
--- a/plugins/messages/app/helpers/messages_helper.rb
+++ b/plugins/messages/app/helpers/messages_helper.rb
@@ -5,7 +5,7 @@ module MessagesHelper
body = ""
else
subject = message.subject
- body = truncate(message.body.to_plain_text, :length => length - subject.length)
+ body = truncate(message.body, :length => length - subject.length)
end
"#{link_to(h(subject), message)} #{h(body)}".html_safe
end
diff --git a/plugins/messages/app/models/message.rb b/plugins/messages/app/models/message.rb
index b5087d0d..08913d8d 100644
--- a/plugins/messages/app/models/message.rb
+++ b/plugins/messages/app/models/message.rb
@@ -22,8 +22,6 @@ class Message < ApplicationRecord
validates_presence_of :message_recipients, :subject, :body
validates_length_of :subject, :in => 1..255
- has_rich_text :body
-
after_initialize do
@recipients_ids ||= []
@send_method ||= 'recipients'
@@ -139,4 +137,4 @@ class Message < ApplicationRecord
def create_salt
self.salt = [Array.new(6) { rand(256).chr }.join].pack("m").chomp
end
-end
+end
\ No newline at end of file
diff --git a/plugins/messages/app/views/messages/new.haml b/plugins/messages/app/views/messages/new.haml
index d288cd72..57d6b452 100644
--- a/plugins/messages/app/views/messages/new.haml
+++ b/plugins/messages/app/views/messages/new.haml
@@ -110,7 +110,7 @@
= f.input :recipient_tokens, :input_html => { 'data-pre' => User.where(id: @message.recipients_ids).map(&:token_attributes).to_json }
= f.input :private, inline_label: t('.hint_private')
= f.input :subject, input_html: {class: 'input-xxlarge'}
- = f.rich_text_area :body, input_html: {class: 'input-xxlarge', rows: 13}
+ = f.input :body, input_html: {class: 'input-xxlarge', rows: 13}
.form-actions
= f.submit class: 'btn btn-primary'
= link_to t('ui.or_cancel'), :back
diff --git a/plugins/messages/app/views/messages/show.haml b/plugins/messages/app/views/messages/show.haml
index 8b3f7c1c..7a845c68 100644
--- a/plugins/messages/app/views/messages/show.haml
+++ b/plugins/messages/app/views/messages/show.haml
@@ -33,7 +33,7 @@
- if @message.can_toggle_private?(current_user)
= link_to t('.change_visibility'), toggle_private_message_path(@message), method: :post, class: 'btn btn-mini'
%hr/
- .trix-content= @message.body
+ = markdown(@message.body)
%hr/
%p
= link_to t('.reply'), new_message_path(:message => {:reply_to => @message.id}), class: 'btn'
diff --git a/plugins/messages/app/views/messages/thread.haml b/plugins/messages/app/views/messages/thread.haml
index 4bc36bcb..181bbd4a 100644
--- a/plugins/messages/app/views/messages/thread.haml
+++ b/plugins/messages/app/views/messages/thread.haml
@@ -9,7 +9,7 @@
.panel-heading
%b= h(message.sender_name)
= format_time(message.created_at)
- .panel-body= simple_format(h(message.body))
+ .panel-body= markdown(message.body)
%p
= link_to t('.reply'), new_message_path(:message => {:reply_to => thread_message.id}), class: 'btn'
diff --git a/plugins/messages/app/views/messages_mailer/foodsoft_message.html.haml b/plugins/messages/app/views/messages_mailer/foodsoft_message.html.haml
index 7ca572f3..4577c76e 100644
--- a/plugins/messages/app/views/messages_mailer/foodsoft_message.html.haml
+++ b/plugins/messages/app/views/messages_mailer/foodsoft_message.html.haml
@@ -1,11 +1,6 @@
-= raw @message.body
-%hr
-%ul
+= markdown(@message.body)
+%hr/
+%pre
- if @message.group
- %li= t '.footer_group', group: @message.group.name
- %li
- %a{href: new_message_url('message[reply_to]' => @message.id)}= t '.reply'
- %li
- %a{href: message_url(@message)}= t '.see_message_online'
- %li
- %a{href: my_profile_url}= t '.messaging_options'
+ = raw t '.footer_group', group: @message.group.name
+ = raw t '.footer', reply_url: new_message_url('message[reply_to]' => @message.id), msg_url: message_url(@message), profile_url: my_profile_url
diff --git a/plugins/messages/app/views/messages_mailer/foodsoft_message.text.haml b/plugins/messages/app/views/messages_mailer/foodsoft_message.text.haml
index cad65998..85b0436d 100644
--- a/plugins/messages/app/views/messages_mailer/foodsoft_message.text.haml
+++ b/plugins/messages/app/views/messages_mailer/foodsoft_message.text.haml
@@ -3,4 +3,4 @@
\
- if @message.group
= raw t '.footer_group', group: @message.group.name
-= raw t '.footer', reply_url: new_message_url('message[reply_to]' => @message.id), msg_url: message_url(@message), profile_url: my_profile_url
\ No newline at end of file
+= raw t '.footer', reply_url: new_message_url('message[reply_to]' => @message.id), msg_url: message_url(@message), profile_url: my_profile_url
diff --git a/plugins/messages/config/locales/de.yml b/plugins/messages/config/locales/de.yml
index eb8cff21..f1615163 100644
--- a/plugins/messages/config/locales/de.yml
+++ b/plugins/messages/config/locales/de.yml
@@ -138,9 +138,6 @@ de:
Antworten: %{reply_url}
Nachricht online einsehen: %{msg_url}
Nachrichten-Einstellungen: %{profile_url}
- reply: Antworten
- see_message_online: Nachricht online einsehen
- messaging_options: Nachrichten-Einstellungen
footer_group: |
Gesendet an Gruppe: %{group}
navigation:
diff --git a/plugins/messages/config/locales/en.yml b/plugins/messages/config/locales/en.yml
index ccd8bb6c..ede3f88c 100644
--- a/plugins/messages/config/locales/en.yml
+++ b/plugins/messages/config/locales/en.yml
@@ -140,9 +140,6 @@ en:
Reply: %{reply_url}
See message online: %{msg_url}
Messaging options: %{profile_url}
- reply: Reply
- see_message_online: See message online
- messaging_options: Messaging options
footer_group: |
Sent to group: %{group}
navigation:
diff --git a/plugins/messages/config/locales/fr.yml b/plugins/messages/config/locales/fr.yml
index 67d452c5..54584b48 100644
--- a/plugins/messages/config/locales/fr.yml
+++ b/plugins/messages/config/locales/fr.yml
@@ -67,9 +67,6 @@ fr:
Répondre: %{reply_url}
Afficher ce message dans ton navigateur: %{msg_url}
Préférences des messages: %{profile_url}
- reply: Répondre
- see_message_online: Afficher ce message dans ton navigateur
- messaging_options: Préférences des messages
simple_form:
labels:
settings:
diff --git a/plugins/messages/config/locales/nl.yml b/plugins/messages/config/locales/nl.yml
index 56738c0b..d3960a23 100644
--- a/plugins/messages/config/locales/nl.yml
+++ b/plugins/messages/config/locales/nl.yml
@@ -140,9 +140,6 @@ nl:
Antwoorden: %{reply_url}
Bericht online lezen: %{msg_url}
Berichtinstellingen: %{profile_url}
- reply: Antwoorden
- see_message_online: Bericht online lezen
- messaging_options: Berichtinstellingen
footer_group: |
Verzenden aan groep: %{group}
navigation:
diff --git a/vendor/javascript/.keep b/vendor/javascript/.keep
deleted file mode 100644
index e69de29b..00000000