fix show of someone who watch and fxi the show of homework exdit
This commit is contained in:
parent
534c252bcb
commit
1cfba644f5
|
@ -608,7 +608,7 @@ class BidsController < ApplicationController
|
|||
|
||||
def edit
|
||||
@bid = Bid.find(params[:bid_id])
|
||||
if (User.current.admin?||User.current.id==@bid.author_id)&&(@bid.homework_type == 1)
|
||||
if (User.current.admin?||User.current.id==@bid.author_id)
|
||||
@project_id = params[:project_id]
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
|
|
|
@ -1426,4 +1426,10 @@ module ApplicationHelper
|
|||
def stringCut240(str)
|
||||
(str.length > 240) ? (str[0,240]<<"......") : str
|
||||
end
|
||||
#author : xianbo
|
||||
def objCut12(obj)
|
||||
for obj1 in obj[0..11]
|
||||
obj2 = obj1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<span style="float: right"><%= l(:field_deadline) %> : <%=bid.deadline %></span>
|
||||
|
||||
<span style="float: right">
|
||||
<% if (User.current.admin?||User.current.id==bid.author_id)&&(bid.homework_type == 1)%>
|
||||
<% if (User.current.admin?||User.current.id==bid.author_id)%>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :controller=>'bids', :project_id =>@project.id, :bid_id => bid.id},
|
||||
|
|
|
@ -125,19 +125,22 @@
|
|||
<!--fans-->
|
||||
<div class="user_fans">
|
||||
<div class="font_title_left">
|
||||
<strong><%= l(:label_bidding_project) %></strong>
|
||||
<strong><%= l(:label_bidding_project) %></strong>
|
||||
<span style="font-size: 13px"><%= link_to "更多>>", :controller => 'bids', :action => 'show_project'%>
|
||||
</div>
|
||||
|
||||
<div class="user_underline"></div>
|
||||
<div class="left_wf">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-top: 5px">
|
||||
<% if @bid.projects.size>0%>
|
||||
<% for project in @bid.projects%>
|
||||
<% if @bid.projects.size<0%>
|
||||
<p class="font_lighter"><%= l(:label_no_bid_project) %></p>
|
||||
|
||||
<%else%>
|
||||
<% for project in objCut12(@bid.projects)%>
|
||||
<%= link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar" %>
|
||||
<% end%>
|
||||
<%else%>
|
||||
<p class="font_lighter"><%= l(:label_no_bid_project) %></p>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue