Revision 1082:997f6d7738f7
| app/controllers/repositories_controller.rb | ||
|---|---|---|
| 143 | 143 |
|
| 144 | 144 |
@content = @repository.cat(@path, @rev) |
| 145 | 145 |
(show_error_not_found; return) unless @content |
| 146 |
if 'raw' == params[:format] || |
|
| 147 |
(@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) || |
|
| 148 |
! is_entry_text_data?(@content, @path) |
|
| 146 |
if 'raw' == params[:format] |
|
| 149 | 147 |
# Force the download |
| 150 | 148 |
send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
|
| 151 | 149 |
send_type = Redmine::MimeType.of(@path) |
| 152 | 150 |
send_opt[:type] = send_type.to_s if send_type |
| 153 | 151 |
send_data @content, send_opt |
| 154 | 152 |
else |
| 153 |
@display_raw = ((@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) || !is_entry_text_data?(@content, @path)) |
|
| 155 | 154 |
# Prevent empty lines when displaying a file with Windows style eol |
| 156 | 155 |
# TODO: UTF-16 |
| 157 | 156 |
# Is this needs? AttachmentsController reads file simply. |
| app/views/repositories/entry.html.erb | ||
|---|---|---|
| 8 | 8 |
|
| 9 | 9 |
<p><%= render :partial => 'link_to_functions' %></p> |
| 10 | 10 |
|
| 11 |
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
|
| 11 |
<% if @display_raw %> |
|
| 12 |
<em><%= l(:text_binary_data) %></em> |
|
| 13 |
<% else %> |
|
| 14 |
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
|
| 15 |
<% end %> |
|
| 12 | 16 |
|
| 13 | 17 |
<% content_for :header_tags do %> |
| 14 | 18 |
<%= stylesheet_link_tag "scm" %> |
| config/locales/en.yml | ||
|---|---|---|
| 1032 | 1032 |
text_settings_repo_need_help: Please <a href="/projects/soundsoftware-site/wiki/Help">contact us</a> if you need help deciding how best to set this up.<br>We can also import complete revision history from other systems into a new primary repository for you if you wish. |
| 1033 | 1033 |
text_has_welcome_page_info: <b>Welcome page</b><p>You can replace the standard {{overview_link}} page for this project with your own welcome page.<br>This page will be editable using the project Wiki.
|
| 1034 | 1034 |
text_has_welcome_page_wiki_disabled: <b>Note:</b> You must enable the Wiki module in the {{modules_link}} tab before you can create or edit this page.
|
| 1035 |
|
|
| 1035 |
text_binary_data: Binary data |
|
| 1036 | 1036 |
|
| 1037 | 1037 |
default_role_manager: Manager |
| 1038 | 1038 |
default_role_developer: Developer |
Also available in: Unified diff