socialforge/app/views/avatar/_new_avatar_form.html.erb

29 lines
1.8 KiB
Plaintext
Raw Normal View History

<div class="banner-course-avatar fl">
<%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片", :class => "fl pro_new_upimg")%>
<a class="banner-course-inner" href="javascript:void(0)" onclick="$('#upload_course_logo').click();"></a>
<a class="banner-course-notice" href="javascript:void(0)" onclick="$('#upload_course_logo').click();">更换图片</a>
</div>
<a href="javascript:void(0)" class="fl mt45 ml5" style="line-height: 1.5" onclick="$('#upload_course_logo').click();">点击更换</a>
2015-03-26 17:17:31 +08:00
<%= file_field_tag 'avatar[image]',
2015-09-29 16:51:22 +08:00
:id => 'upload_course_logo',
:class => 'undis upload_file',
2015-03-26 17:17:31 +08:00
:size => "1",
:multiple => true,
2015-03-26 17:17:31 +08:00
:data => {
2015-05-15 17:35:24 +08:00
: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)),
2015-03-26 17:17:31 +08:00
: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,
:is_direct => 0
2015-03-26 17:17:31 +08:00
} %>
<!--</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' %>
2015-03-26 17:17:31 +08:00
<% end %>
<div class="cl"></div>