1.修复文本格式化报错的问题

2.修改作业留言清除按钮描述不正确的问题
This commit is contained in:
sw 2014-08-14 14:11:02 +08:00
parent 79c6722aad
commit 08115c9de4
6 changed files with 16 additions and 15 deletions

View File

@ -679,15 +679,15 @@ module ApplicationHelper
def textilizable(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
case args.size
when 1
obj = options[:object]
text = args.shift
when 2
obj = args.shift
attr = args.shift
text = obj.send(attr).html_safe.to_s
else
raise ArgumentError, 'invalid arguments to textilizable'
when 1
obj = options[:object]
text = args.shift
when 2
obj = args.shift
attr = args.shift
text = obj.send(attr).to_s
else
raise ArgumentError, 'invalid arguments to textilizable'
end
return '' if text.blank?
project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil)
@ -727,7 +727,7 @@ module ApplicationHelper
when 2
obj = args.shift
attr = args.shift
text = obj.send(attr).html_safe.to_s
text = obj.send(attr).to_s
else
raise ArgumentError, 'invalid arguments to textilizable'
end

View File

@ -5,7 +5,7 @@
<div id='leave-message'>
<%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
</div>
<% label = '';
<% label = ''
case @bid.reward_type
when 1
label = l(:label_respond_requirement)

View File

@ -41,7 +41,7 @@
<table border="0" width="525px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
<%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
<%= submit_tag l(:button_clear_meassge), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
</tr>
</table>
<!-- end -->

View File

@ -4,11 +4,11 @@
<span class="body">
<h3><%= link_to(@bid.author.lastname+@bid.author.firstname, user_path(@bid.author))%><%= link_to(@bid.name,respond_path(@bid)) %></h3>
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
<p>
<p>
<strong><%= l(:label_bids_reward_method) %><span class="bonus"><%= l(:label_call_bonus) %>&nbsp; <%= l(:label_RMB_sign) %><%= @bid.budget %></span></strong>
</p>
<% elsif @bid.reward_type == 2%>
<p>
<p>
<strong><%= l(:label_bids_reward_method) %><span class="bonus"><%= @bid.budget%></span></strong>
</p>
<% else %>

View File

@ -39,7 +39,7 @@
<ul class="list-group-item-meta">
<div class="issue-list-description">
<div class="wiki">
<p style="word-break:break-all;width: 100%;"><%= textAreailizable issue, :description %></p>
<%= textilizable issue, :description %>
</div>
<!-- <#%= l(:field_description)%>:&nbsp;<#%= issue.short_description %> -->
</div>

View File

@ -1415,6 +1415,7 @@ zh:
#fq
button_leave_meassge: 留言
button_clear_meassge: 清除留言
label_leave_message_to: 给用户 %{name}留言
label_leave_message: 留言内容
label_message: 留言板