Add 'nothing to preview' message

pull/1000/head
Hagen Schink 11 years ago
parent 7d222e4b6e
commit 9ce77b1993
  1. 30
      app/assets/stylesheets/content/_preview.css.sass
  2. 1
      app/assets/stylesheets/default.css.sass
  3. 10
      app/views/common/preview.html.erb
  4. 2
      config/locales/de.yml
  5. 2
      config/locales/en.yml

@ -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

@ -55,4 +55,5 @@
@import content/tabular @import content/tabular
@import content/headings @import content/headings
@import content/timelines @import content/timelines
@import content/preview
@import default/main @import default/main

@ -27,8 +27,14 @@ See doc/COPYRIGHT.rdoc for more details.
++#%> ++#%>
<% texts.each do |text| %> <% if texts.empty? %>
<fieldset class="preview"><legend><%= l(:label_preview) %></legend> <fieldset class="preview"><legend><%= l(:label_preview) %></legend>
<%= textilizable text, attachments: attachments, object: previewed %> <span class="nothing-to-preview"><%= l(:nothing_to_preview) %></span>
</fieldset> </fieldset>
<% else %>
<% texts.each do |text| %>
<fieldset class="preview"><legend><%= l(:label_preview) %></legend>
<%= textilizable text, attachments: attachments, object: previewed %>
</fieldset>
<% end %>
<% end %> <% end %>

@ -1653,3 +1653,5 @@ de:
work_package: work_package:
updated_automatically_by_child_changes: | updated_automatically_by_child_changes: |
_Automatisch durch die Änderungen in %{child} aktualisert_ _Automatisch durch die Änderungen in %{child} aktualisert_
nothing_to_preview: "Keine Inhalte für Vorschau vorhanden"

@ -1640,3 +1640,5 @@ en:
work_package: work_package:
updated_automatically_by_child_changes: | updated_automatically_by_child_changes: |
_Updated automatically by changing values within child work package %{child}_ _Updated automatically by changing values within child work package %{child}_
nothing_to_preview: "Nothing to preview"

Loading…
Cancel
Save