... | ... |
@@ -80,8 +80,12 @@ |
80 | 80 |
src="<%= url_for("/$user/$project/raw/$rev/$file") %>" |
81 | 81 |
/> |
82 | 82 |
</div> |
83 |
- % } else { |
|
83 |
+ % } elsif ($mime_type =~ m#^text/#) { |
|
84 | 84 |
<pre class="prettyprint linenums"><% for my $line (@$lines) { %><%= "$line\n" %><% } %></pre> |
85 |
+ % } else { |
|
86 |
+ <div style="font-size:16px;background:#ddd;text-align:center;padding-top:30px;padding-bottom:30px;margin-bottom:30px"> |
|
87 |
+ <a href="<%= url_for("/$user/$project/raw/$rev/$file") %>">View raw</a> |
|
88 |
+ </div> |
|
85 | 89 |
% } |
86 | 90 |
</div> |
87 | 91 |
|
... | ... |
@@ -110,7 +110,6 @@ |
110 | 110 |
<div class="span7 text-right" style="padding:5px;margin-left:75px"> |
111 | 111 |
% my $parents = $commit->{parents}; |
112 | 112 |
|
113 |
- |
|
114 | 113 |
% if (@$parents == 0) { |
115 | 114 |
<div> |
116 | 115 |
0 <span class="muted" style="padding-right:10px">parent</span> |
... | ... |
@@ -284,7 +284,14 @@ note 'Blob page'; |
284 | 284 |
|
285 | 285 |
# Content |
286 | 286 |
$t->content_like(qr/bbb/); |
287 |
- }} |
|
287 |
+ } |
|
288 |
+ |
|
289 |
+ note 'blob binary'; |
|
290 |
+ { |
|
291 |
+ $t->get_ok("/$user/$project/blob/ed7b91659762fa612563f0595f3faca6aecfcfa0/sample.bin"); |
|
292 |
+ $t->content_like(qr/View raw/); |
|
293 |
+ } |
|
294 |
+} |
|
288 | 295 |
|
289 | 296 |
note 'raw page'; |
290 | 297 |
{ |