diff --git a/.gitignore b/.gitignore index c15ef538ed4..11db7e6b529 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ npm-debug.log* /.project /.loadpath /app/assets/javascripts/bundles/*.* +/app/assets/javascripts/editor/* /app/assets/javascripts/locales/*.* /config/additional_environment.rb /config/configuration.yml diff --git a/.pkgr.yml b/.pkgr.yml index 32f4ca3eb0e..d739d00fb25 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -4,6 +4,7 @@ targets: debian-8: &debian8 build_dependencies: - libsqlite3-dev + - cmake debian-9: <<: *debian8 ubuntu-14.04: @@ -13,12 +14,15 @@ targets: centos-7: dependencies: - epel-release + - cmake sles-11: build_dependencies: - sqlite3-devel + - cmake sles-12: build_dependencies: - sqlite3-devel + - cmake before_precompile: "packaging/setup" crons: - packaging/cron/openproject-hourly-tasks diff --git a/Dockerfile b/Dockerfile index 32271eae903..884a2d3e157 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ FROM ruby:2.4-stretch -ENV NODE_VERSION="7.7.2" -ENV BUNDLER_VERSION="1.11.2" +ENV NODE_VERSION="8.9.1" +ENV BUNDLER_VERSION="1.16.0" + +# Install cmake for gems +# (commonmarker) +USER root +RUN apt-get update -qq && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + cmake # install node + npm RUN curl https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz | tar xzf - -C /usr/local --strip-components=1 diff --git a/app/assets/stylesheets/content/_headings.sass b/app/assets/stylesheets/content/_headings.sass index c2419417ffe..9dcdb3f9e74 100644 --- a/app/assets/stylesheets/content/_headings.sass +++ b/app/assets/stylesheets/content/_headings.sass @@ -26,12 +26,6 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -body.controller-work_packages.action-show, -body.controller-work_packages.action-update - #content - h2 - padding-right: 340px - h1 color: $h1-font-color font-weight: bold diff --git a/app/assets/stylesheets/content/_index.sass b/app/assets/stylesheets/content/_index.sass index dd4c7d4d996..8c42407a5e7 100644 --- a/app/assets/stylesheets/content/_index.sass +++ b/app/assets/stylesheets/content/_index.sass @@ -64,3 +64,4 @@ @import content/custom_actions @import content/menus/_project_autocompletion +@import content/editor/ckeditor diff --git a/app/assets/stylesheets/content/editor/_ckeditor.sass b/app/assets/stylesheets/content/editor/_ckeditor.sass new file mode 100644 index 00000000000..7c1e2cf7993 --- /dev/null +++ b/app/assets/stylesheets/content/editor/_ckeditor.sass @@ -0,0 +1,19 @@ +// Wrapper for inline text editor +.op-ckeditor-element + min-height: 50px + border: 1px solid #bfbfbf !important + + &.ck-editor__editable_inline + padding-left: 2px !important + +// Wrapper for full text element +.op-ckeditor--wrapper + + // Borders for the main editor + .ck-editor__main + border: 1px solid #bfbfbf + margin-bottom: 2rem + + // Min height for the editable section + .ck-editor__editable + min-height: 20vh diff --git a/app/assets/stylesheets/content/work_packages/inplace_editing/_edit_fields.sass b/app/assets/stylesheets/content/work_packages/inplace_editing/_edit_fields.sass index bffa4ca9413..99c751d7337 100644 --- a/app/assets/stylesheets/content/work_packages/inplace_editing/_edit_fields.sass +++ b/app/assets/stylesheets/content/work_packages/inplace_editing/_edit_fields.sass @@ -36,7 +36,7 @@ p word-wrap: break-word - margin-bottom: 0 + // margin-bottom: 0 .read-value--html * diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f0de3d248c5..2bf8ca50c1e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -36,6 +36,7 @@ module ApplicationHelper include OpenProject::ObjectLinking include OpenProject::SafeParams include I18n + include ERB::Util include Redmine::I18n include HookHelper include IconsHelper diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 8627b21ba4b..a41e74e33b1 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -50,6 +50,7 @@ See docs/COPYRIGHT.rdoc for more details. <%= csrf_meta_tags %> <%= render 'common/favicons' %> <%= stylesheet_link_tag 'openproject', media: "all" %> + <%= javascript_include_tag 'editor/openproject-ckeditor' %> <%= javascript_include_tag 'application' %> <%= javascript_include_tag "locales/#{I18n.locale}" %> diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 3af6ce2ef55..91589ec9ab2 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -63,5 +63,11 @@ See docs/COPYRIGHT.rdoc for more details.
+ <%= OpenProject::TextFormatting::Renderer.format_text(Setting.localized_emails_header) %> + <%= call_hook(:view_layouts_mailer_html_before_content, self.assigns) %> + <%= yield %> + <%= call_hook(:view_layouts_mailer_html_after_content, self.assigns) %> +