diff --git a/app/assets/stylesheets/content/_preview.css.sass b/app/assets/stylesheets/content/_preview.css.sass new file mode 100644 index 0000000000..2d095c6218 --- /dev/null +++ b/app/assets/stylesheets/content/_preview.css.sass @@ -0,0 +1,30 @@ +/*-- copyright + * OpenProject is a project management system. + * Copyright (C) 2012-2013 the OpenProject Foundation (OPF) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version 3. + * + * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: + * Copyright (C) 2006-2013 Jean-Philippe Lang + * Copyright (C) 2010-2013 the ChiliProject Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * See doc/COPYRIGHT.rdoc for more details. ++ + */ + +.nothing-to-preview + color: red diff --git a/app/assets/stylesheets/default.css.sass b/app/assets/stylesheets/default.css.sass index 8db0b8ca0a..8f93af0b5b 100644 --- a/app/assets/stylesheets/default.css.sass +++ b/app/assets/stylesheets/default.css.sass @@ -55,4 +55,5 @@ @import content/tabular @import content/headings @import content/timelines +@import content/preview @import default/main diff --git a/app/views/common/preview.html.erb b/app/views/common/preview.html.erb index 1ab120a615..6d7862b42c 100644 --- a/app/views/common/preview.html.erb +++ b/app/views/common/preview.html.erb @@ -27,8 +27,14 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> -<% texts.each do |text| %> +<% if texts.empty? %>
+<% else %> + <% texts.each do |text| %> + + <% end %> <% end %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 6cbfb5c44e..711250cd27 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1653,3 +1653,5 @@ de: work_package: updated_automatically_by_child_changes: | _Automatisch durch die Änderungen in %{child} aktualisert_ + + nothing_to_preview: "Keine Inhalte für Vorschau vorhanden" diff --git a/config/locales/en.yml b/config/locales/en.yml index 32e066b9e4..b2c1898f0d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1640,3 +1640,5 @@ en: work_package: updated_automatically_by_child_changes: | _Updated automatically by changing values within child work package %{child}_ + + nothing_to_preview: "Nothing to preview"