修复tag的需求bug部分;修改上传图像部分
This commit is contained in:
parent
18b1d22502
commit
4e8c371160
|
@ -286,6 +286,8 @@ class UsersController < ApplicationController
|
||||||
@obj = Project.find_by_id(@obj_id)
|
@obj = Project.find_by_id(@obj_id)
|
||||||
when '3' then
|
when '3' then
|
||||||
@obj = Issue.find_by_id(@obj_id)
|
@obj = Issue.find_by_id(@obj_id)
|
||||||
|
when '4' then
|
||||||
|
@obj = Bid.find_by_id(@obj_id)
|
||||||
else
|
else
|
||||||
@obj = nil
|
@obj = nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,20 +5,24 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="add_avatar">
|
<span class="add_avatar">
|
||||||
<%= file_field_tag 'avatar[image]',
|
<a href="javascript:void(0);" class="btn_addPic">
|
||||||
:id => nil,
|
<spam><em>+</em>上传图片</span>
|
||||||
:class => 'file_selector',
|
<%= file_field_tag 'avatar[image]',
|
||||||
:multiple => false,
|
:id => nil,
|
||||||
:onchange => 'addInputAvatar(this);',
|
:class => 'file_selector',
|
||||||
:data => {
|
:multiple => false,
|
||||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
:onchange => 'addInputAvatar(this);',
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
:data => {
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||||
:upload_path => upload_avatar_path(:format => 'js'),
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:description_placeholder => nil ,# l(:label_optional_description)
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
:source_type => source.class.to_s,
|
:upload_path => upload_avatar_path(:format => 'js'),
|
||||||
:source_id => source.id.to_s
|
:description_placeholder => nil ,# l(:label_optional_description)
|
||||||
} %>
|
:source_type => source.class.to_s,
|
||||||
|
:source_id => source.id.to_s
|
||||||
|
} %>
|
||||||
|
<input type="file" tabindex="3" title="支持jpg、jpeg、gif、png格式,文件小于5M" size="3" name="pic" class="filePrew">
|
||||||
|
</a>
|
||||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,7 @@
|
||||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account)%></h3>
|
<h3 style="padding-left: 10px;"><%= l(:label_my_account)%></h3>
|
||||||
|
|
||||||
|
|
||||||
<%= labelled_form_for :user, @user,
|
|
||||||
:url => { :action => "account" },
|
|
||||||
:html => { :id => 'my_account_form',
|
|
||||||
:method => :post } do |f| %>
|
|
||||||
|
|
||||||
<fieldset class="box" style="margin:10px;">
|
<fieldset class="box" style="margin:10px;">
|
||||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||||
|
@ -22,6 +19,10 @@
|
||||||
<!--upload-->
|
<!--upload-->
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<%= labelled_form_for :user, @user,
|
||||||
|
:url => { :action => "account" },
|
||||||
|
:html => { :id => 'my_account_form',
|
||||||
|
:method => :post } do |f| %>
|
||||||
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
<fieldset class="collapsible collapsed" style="width:800px;margin-left: 10px;">
|
||||||
<legend onclick="toggleFieldset(this);">
|
<legend onclick="toggleFieldset(this);">
|
||||||
<%= l(:label_information_plural)%>
|
<%= l(:label_information_plural)%>
|
||||||
|
|
Loading…
Reference in New Issue