summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-08 08:02:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-05-08 08:02:23 +0000
commit3d2c198c0f889e73ae2a16a068c41948b40cefff (patch)
treec764f9e787428d113cc37201f93e2c0e719e259d /app/views
parentd8d23fbb6b23f15c6c5cc0a65ebfdf99c06e1a9b (diff)
downloadredmine-3d2c198c0f889e73ae2a16a068c41948b40cefff.tar.gz
redmine-3d2c198c0f889e73ae2a16a068c41948b40cefff.zip
Add view for "no preview" repository files (#22482).
Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@15397 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/common/_other.html.erb1
-rw-r--r--app/views/repositories/entry.html.erb4
2 files changed, 4 insertions, 1 deletions
diff --git a/app/views/common/_other.html.erb b/app/views/common/_other.html.erb
new file mode 100644
index 000000000..fe0228a50
--- /dev/null
+++ b/app/views/common/_other.html.erb
@@ -0,0 +1 @@
+<p class="nodata"><%= l(:label_no_preview) %></p>
diff --git a/app/views/repositories/entry.html.erb b/app/views/repositories/entry.html.erb
index d9b5be9ab..37a5db961 100644
--- a/app/views/repositories/entry.html.erb
+++ b/app/views/repositories/entry.html.erb
@@ -10,8 +10,10 @@
<% if Redmine::MimeType.is_type?('image', @path) %>
<%= render :partial => 'common/image', :locals => {:path => url_for(params.merge(:action => 'raw')), :alt => @path} %>
-<% else %>
+<% elsif @content %>
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
+<% else %>
+ <%= render :partial => 'common/other' %>
<% end %>
<% content_for :header_tags do %>