学号在作业里显示问题,首页时间显示不确定问题,项目缺陷滑动效果乱跳问题。
This commit is contained in:
parent
38b1f69aa5
commit
4b8a4c82c9
|
@ -129,8 +129,16 @@ module BidsHelper
|
||||||
def im_watching_student_id? bid
|
def im_watching_student_id? bid
|
||||||
people = []
|
people = []
|
||||||
people << bid.author
|
people << bid.author
|
||||||
bid.join_in_contests.each do |jic|
|
case bid.reward_type # 天煞的bid分了三用途,里面各种hasmany还不定能用!
|
||||||
people << jic.user
|
when 1
|
||||||
|
when 2
|
||||||
|
bid.join_in_contests.each do |jic|
|
||||||
|
people << jic.user
|
||||||
|
end
|
||||||
|
when 3
|
||||||
|
people += bid.courses.first.users.to_a
|
||||||
|
else
|
||||||
|
raise 'bids_helper: unknow bid type' # 出了错看这里!不知道的抛异常,省的找不到出错的地方!
|
||||||
end
|
end
|
||||||
people.include?(User.current)
|
people.include?(User.current)
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,17 +74,31 @@ module WelcomeHelper
|
||||||
def show_user_content event
|
def show_user_content event
|
||||||
str = ' '.html_safe
|
str = ' '.html_safe
|
||||||
case event.event_type
|
case event.event_type
|
||||||
when 'news' , 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
when 'news'
|
||||||
str << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url, :target => "_blank" )
|
str << content_tag("span", "发表了") <<
|
||||||
|
content_tag("span", find_all_event_type(event)) <<
|
||||||
|
': '.html_safe <<
|
||||||
|
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url)
|
||||||
|
when 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
||||||
|
str << content_tag("span", "发表了") <<
|
||||||
|
content_tag("span", find_all_event_type(event)) <<
|
||||||
|
': '.html_safe <<
|
||||||
|
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||||
when 'reply' ,'Reply', 'Memo'
|
when 'reply' ,'Reply', 'Memo'
|
||||||
str << content_tag("span", "发表了") <<
|
str << content_tag("span", "发表了") <<
|
||||||
content_tag("span", find_all_event_type(event)) <<
|
content_tag("span", find_all_event_type(event)) <<
|
||||||
': '.html_safe <<
|
': '.html_safe <<
|
||||||
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url, :target => "_blank" )
|
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url)
|
||||||
when 'attachment'
|
when 'attachment'
|
||||||
str << content_tag('span', '上传了') << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color")
|
str << content_tag('span', '上传了') <<
|
||||||
|
content_tag('span', find_all_event_type(event)) <<
|
||||||
|
': '.html_safe <<
|
||||||
|
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) <<
|
||||||
|
link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color")
|
||||||
else
|
else
|
||||||
str << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url, :target => "_blank" )
|
str << content_tag("span", "更新了") <<
|
||||||
|
content_tag("span", find_all_event_type(event)) <<
|
||||||
|
': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||||
end
|
end
|
||||||
str
|
str
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
|
@ -94,10 +108,12 @@ module WelcomeHelper
|
||||||
def show_event_reply event
|
def show_event_reply event
|
||||||
str = "回复("
|
str = "回复("
|
||||||
case event.event_type
|
case event.event_type
|
||||||
|
when 'news'
|
||||||
|
str << link_to( event.comments.count, news_path(event)) << ")"
|
||||||
when "issue"
|
when "issue"
|
||||||
str << link_to(cal_issues_count(event), issue_path(event), :target => "_blank" ) << ")"
|
str << link_to(cal_issues_count(event), issue_path(event)) << ")"
|
||||||
when "Memo"
|
when "Memo"
|
||||||
str << link_to(cal_memos_count(event), forum_memo_path(event.forum_id,event.id), :target => "_blank" ) << ")"
|
str << link_to(cal_memos_count(event), forum_memo_path(event.forum_id,event.id)) << ")"
|
||||||
else
|
else
|
||||||
str = ""
|
str = ""
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% display_id = im_watching_student_id? @bid%>
|
||||||
<% @homework_list.each do |homework|%>
|
<% @homework_list.each do |homework|%>
|
||||||
<% if homework.attachments.any?%>
|
<% if homework.attachments.any?%>
|
||||||
<table width="660px" border="0" align="center">
|
<table width="660px" border="0" align="center">
|
||||||
|
@ -24,7 +25,11 @@
|
||||||
<td colspan="2" valign="top"><strong> <%= link_to homework.user, user_path(homework.user)%></strong> <span class="font_lighter">提交了作业</span></td>
|
<td colspan="2" valign="top"><strong> <%= link_to homework.user, user_path(homework.user)%></strong> <span class="font_lighter">提交了作业</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top"><strong><%= l(:label_bidding_user_studentcode) %> :<%= homework.user.user_extensions.student_id%></td>
|
<td colspan="2" valign="top">
|
||||||
|
<% if display_id %>
|
||||||
|
<strong><%= l(:label_bidding_user_studentcode) %> :<%= homework.user.user_extensions.student_id%></strong>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" >
|
<td colspan="2" width="580px" >
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
<%= form_tag({}) do -%>
|
|
||||||
<%= hidden_field_tag 'back_url', url_for(params), :id => nil %>
|
|
||||||
<div class="autoscroll">
|
<div class="autoscroll">
|
||||||
<ul>
|
<ul>
|
||||||
<% issue_list(issues) do |issue, level| -%>
|
<% issue_list(issues) do |issue, level| -%>
|
||||||
|
@ -58,4 +56,3 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end -%>
|
|
|
@ -4,7 +4,7 @@
|
||||||
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
|
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
|
||||||
|
|
||||||
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
||||||
:onclick => '$("#custom_query").slideToggle(); ' if User.current.logged? %>
|
:onclick => '$("#custom_query").slideToggle(400); ' if User.current.logged? %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||||
|
<div style="float:right; ">
|
||||||
<%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
<%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form', :class => 'query_form') do %>
|
||||||
<%= hidden_field_tag 'set_filter', '1' %>
|
<%= hidden_field_tag 'set_filter', '1' %>
|
||||||
|
|
||||||
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
<div id="custom_query" class="custom_query" style="display: <%= !params[:utf8].blank? ? 'block' : 'none' %>;">
|
||||||
<span>---<%= l :label_query_new %>---</span>
|
<span>---<%= l :label_query_new %>---</span>
|
||||||
<div id="query_form_content" class="hide-when-print">
|
<div id="query_form_content" class="hide-when-print">
|
||||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||||
<legend onclick="toggleFieldset(this);">
|
<legend onclick="toggleFieldset(this);">
|
||||||
|
@ -59,7 +59,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div style="clear:both"></div>
|
||||||
<%= error_messages_for 'query' %>
|
<%= error_messages_for 'query' %>
|
||||||
|
|
||||||
<% if @query.valid? %>
|
<% if @query.valid? %>
|
||||||
|
|
|
@ -55,7 +55,6 @@ function checkMaxLength() {
|
||||||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
||||||
<span class="body">
|
<span class="body">
|
||||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
||||||
<span class="font_lighter"><%= l(:label_projects_feedback) %></span>
|
|
||||||
<%= textilizable journal.notes%>
|
<%= textilizable journal.notes%>
|
||||||
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
||||||
<% id = 'project_respond_form_'+journal.id.to_s%>
|
<% id = 'project_respond_form_'+journal.id.to_s%>
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
|
|
||||||
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
||||||
<span style="color: green;"><%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %></span><%= show_user_content event %>
|
<span style="color: green;"><%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %></span><%= show_user_content event %>
|
||||||
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= time_tag_welcome event.event_datetime %></span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue