修复tag的需求bug部分;修改上传图像部分

This commit is contained in:
zhangyang 2013-08-01 21:36:37 +08:00
parent 18b1d22502
commit 4e8c371160
3 changed files with 25 additions and 18 deletions

View File

@ -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

View File

@ -5,7 +5,9 @@
</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">
<spam><em>+</em>上传图片</span>
<%= file_field_tag 'avatar[image]',
:id => nil, :id => nil,
:class => 'file_selector', :class => 'file_selector',
:multiple => false, :multiple => false,
@ -19,6 +21,8 @@
:source_type => source.class.to_s, :source_type => source.class.to_s,
:source_id => source.id.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>

View File

@ -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)%>