28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
<span id="avatar_fields">
|
|
<%= image_tag(url_to_avatar(source), id: "avatar_image", size: AvatarHelper::AVATAR_SIZE)%>
|
|
<span id="avatar_file">
|
|
|
|
</span>
|
|
</span>
|
|
<span class="add_avatar">
|
|
<%= file_field_tag 'avatar[image]',
|
|
:id => nil,
|
|
:class => 'file_selector',
|
|
: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,
|
|
: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
|
|
} %>
|
|
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
|
</span>
|
|
|
|
<% content_for :header_tags do %>
|
|
<%= javascript_include_tag 'avatars' %>
|
|
<% end %>
|