Merge branch 'szzh' into develop
This commit is contained in:
commit
e52751f5e0
|
@ -365,15 +365,18 @@ class ProjectsController < ApplicationController
|
|||
def invite_members_by_mail
|
||||
if User.current.member_of?(@project) || User.current.admin?
|
||||
@inviter_lists = InviteList.where(project_id:@project.id).all
|
||||
@inviters = []
|
||||
@waiters = []
|
||||
unless @inviter_lists.blank?
|
||||
@inviter_lists.each do|inviter_list|
|
||||
@inviters = []
|
||||
@waiters = []
|
||||
@inviters << inviter_list.user
|
||||
@inviters_count = @inviters.size
|
||||
unless inviter_list.user.member_of?(@project)
|
||||
@waiters << inviter_list.user
|
||||
@waiters_count = @waiters.size
|
||||
unless inviter_list.user.nil?
|
||||
if inviter_list.user.member_of?(@project)
|
||||
@inviters << inviter_list.user
|
||||
@inviters_count = @inviters.size
|
||||
else
|
||||
@waiters << inviter_list.user
|
||||
@waiters_count = @waiters.size
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -199,8 +199,8 @@ class Mailer < ActionMailer::Base
|
|||
@title = "#@user #{t(:label_leave_your_message, :locale => 'zh')}"
|
||||
@issue_author_url = url_for(user_activities_url(@user))
|
||||
@url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型
|
||||
when :Bid
|
||||
course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||
# when :Bid
|
||||
# course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||
when :Project
|
||||
return -1 if journals_for_message.jour.project_type == Project::ProjectType_project
|
||||
project_feedback_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||
|
@ -236,12 +236,12 @@ class Mailer < ActionMailer::Base
|
|||
mail :to => @recipients,
|
||||
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} ",
|
||||
:filter => true
|
||||
elsif journals_for_message.jour.class.to_s.to_sym == :Bid
|
||||
if !journals_for_message.jour.author.notify_about? journals_for_message
|
||||
return -1
|
||||
end
|
||||
|
||||
mail :to => recipients, :subject => @title,:filter => true
|
||||
# elsif journals_for_message.jour.class.to_s.to_sym == :Bid
|
||||
# if !journals_for_message.jour.author.notify_about? journals_for_message
|
||||
# return -1
|
||||
# end
|
||||
#
|
||||
# mail :to => recipients, :subject => @title,:filter => true
|
||||
elsif journals_for_message.jour.class.to_s.to_sym == :Contest
|
||||
if !journals_for_message.jour.author.notify_about? journals_for_message
|
||||
return -1
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<% end %>
|
||||
|
||||
<!--课程作业-->
|
||||
<% if !@bids.first.nil? %>
|
||||
<% unless @bids.empty? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
|
||||
<% unless @bids.first.nil?%>
|
||||
|
@ -48,20 +48,20 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
|
||||
<%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to bid.user, user_activities_url(bid.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_on) %></span>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_at) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -138,7 +138,6 @@
|
|||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @attachments.each do |attachment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
|
|
@ -27,27 +27,27 @@
|
|||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% if !@bids.first.nil? %>
|
||||
<% unless @bids.empty? %>
|
||||
<%= l(:label_homework_overview) %><%= @bids.count %>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'),course_url(bid.courses.first, :token => @token.value)
|
||||
<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value)
|
||||
<%= link_to bid.user, user_activities_url(bid.user,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_homework) %>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(bid,:token => @token.value)
|
||||
<%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(bid.created_on) %>
|
||||
<%= format_time(bid.created_at) %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -80,19 +80,17 @@
|
|||
<%# 邀请用户的状态 %>
|
||||
<% unless @inviter_lists.blank? %>
|
||||
<div>
|
||||
<% if @inviters_count > 0 %>
|
||||
<span class="status_inviter">已邀请的用户</span><br/>
|
||||
<% @inviter_lists.each do |inviter_list| %>
|
||||
<%= inviter_list.user.name unless inviter_list.user.nil? %><br/>
|
||||
<% unless @inviters_count.nil? %>
|
||||
<span class="status_inviter">已加入项目的用户</span><br/>
|
||||
<% @inviters.each do |inv| %>
|
||||
<%= inv.name unless inv.nil? %><br/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</br>
|
||||
<% unless @waiters_count.nil? %>
|
||||
<span class="status_inviter">等待加入项目的用户</span><br/>
|
||||
<% @inviter_lists.each do |inviter_list| %>
|
||||
<% unless inviter_list.user.member_of?(@project) %>
|
||||
<%= inviter_list.user.name unless inviter_list.user.nil? %><br/>
|
||||
<% end %>
|
||||
<% @waiters.each do |wai| %>
|
||||
<%= wai.name unless wai.nil?%><br/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -6,13 +6,15 @@
|
|||
<span>
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</span>
|
||||
<% else%>
|
||||
<span class="ml30">--</span>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class="hwork_name">
|
||||
<% if is_my_work%>
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name %>
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02" %>
|
||||
<% else%>
|
||||
<%= link_to "匿名","javascript:void(0)"%>
|
||||
<%= link_to "匿名","javascript:void(0)", :class => "c_blue02"%>
|
||||
<% end%>
|
||||
</li>
|
||||
<li class=" hwork_tit_e" style="width: 410px">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</span>
|
||||
</li>
|
||||
<li class=" hwork_name ">
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name%>
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_tit">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
|
|
Loading…
Reference in New Issue