27 lines
1.6 KiB
Plaintext
27 lines
1.6 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>
|
|
<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "upbtn fl" %>
|
|
<a href="javascript:void(0)" class="upbtn fl">上传图片</a>
|
|
<%= file_field_tag 'avatar[image]',
|
|
:id => nil,
|
|
:class => 'upload_file ',
|
|
:size => "1",
|
|
:multiple => false,
|
|
:onchange => 'addInputAvatar(this);',
|
|
:data => {
|
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
|
: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 'avatars' %>
|
|
<% end %>
|
|
<div class="cl"></div> |