26 lines
1.5 KiB
Plaintext
26 lines
1.5 KiB
Plaintext
<a href="javascript:void(0)" class="upimg fl">
|
|
<%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%>
|
|
</a>
|
|
<a href="javascript:void(0)" class="upbtn fl" onclick="$('#upload_img').click();"><%= l(:button_upload_photo) %></a>
|
|
<%= file_field_tag 'avatar[image]',
|
|
:id => "upload_img",
|
|
:class => 'undis',
|
|
:size => "1",
|
|
:multiple => true,
|
|
:data => {
|
|
:max_file_size => Setting.upload_avatar_max_size,
|
|
:max_file_size_message => l(:error_upload_avatar_to_large, :max_size => number_to_human_size(Setting.upload_avatar_max_size.to_i)),
|
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
|
:file_type => Redmine::Configuration['pic_types'].to_s,
|
|
:type_support_message => l(:error_pic_type),
|
|
:upload_path => upload_avatar_path(:format => 'js'),
|
|
:description_placeholder => nil ,# l(:label_optional_description)
|
|
:source_type => source.class.to_s,
|
|
:source_id => source.id.to_s
|
|
} %>
|
|
<!--</span>-->
|
|
<% content_for :header_tags do %>
|
|
<%= javascript_include_tag 'jq-upload/jquery.ui.widget', 'jq-upload/jquery.iframe-transport', 'jq-upload/jquery.fileupload', 'jq-upload/upload' %>
|
|
<% end %>
|
|
<div class="cl"></div>
|