tmp
ouyangxuhua 10 years ago
commit 316f660ca4

@ -563,7 +563,7 @@ class ApplicationController < ActionController::Base
uri = URI.parse(back_url) uri = URI.parse(back_url)
# do not redirect user to another host or to the login or register page # do not redirect user to another host or to the login or register page
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) if default.is_a?(:User)
redirect_to(back_url) redirect_to(back_url)
return return
end end

@ -98,9 +98,12 @@ class WelcomeController < ApplicationController
end end
def course def course
@course_page = FirstPage.find_by_page_type('course') redirect_to signin_path
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117 return
@logoLink ||= logolink() #
# @course_page = FirstPage.find_by_page_type('course')
# @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
# @logoLink ||= logolink()
end end
def logolink() def logolink()
@ -140,8 +143,11 @@ class WelcomeController < ApplicationController
def contest def contest
@contest_page = FirstPage.find_by_page_type('contest') redirect_to signin_path
@contest_notifications = Contestnotification.order("created_at desc").limit(5) return
# @contest_page = FirstPage.find_by_page_type('contest')
# @contest_notifications = Contestnotification.order("created_at desc").limit(5)
end end
def search def search
@ -181,28 +187,28 @@ class WelcomeController < ApplicationController
private private
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法 # 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
def entry_select def entry_select
url = request.original_url.gsub('/','') # url = request.original_url.gsub('/','')
if url.include?(Setting.url_course.gsub('/','')) # if url.include?(Setting.url_course.gsub('/',''))
if @first_page.show_course == 1 # if @first_page.show_course == 1
course # course
render :course # render :course
else # else
render_404 # render_404
end # end
#
return 0 # return 0
elsif url.include?(Setting.url_contest.gsub('/','')) # elsif url.include?(Setting.url_contest.gsub('/',''))
if @first_page.show_contest == 1 # if @first_page.show_contest == 1
contest # contest
render :contest # render :contest
else # else
render_404 # render_404
end # end
#
return 0 # return 0
elsif url.include?(Setting.url_user.gsub('/','')) # elsif url.include?(Setting.url_user.gsub('/',''))
#redirect_to(:controller => "users", :action => "index") # #redirect_to(:controller => "users", :action => "index")
end # end
end end

@ -2254,6 +2254,21 @@ module ApplicationHelper
technical_title technical_title
end end
def get_user_roll user
technical_title = ""
case user.user_extensions.identity.to_s
when "0"
technical_title = get_technical_title user
when "1"
technical_title = l(:label_account_identity_student)
when "2"
technical_title = l(:label_account_identity_enterprise)
when "3"
technical_title = l(:label_account_identity_developer)
end
technical_title
end
def ie8? def ie8?
request.env["HTTP_USER_AGENT"] =~ /MSIE 8.0/ request.env["HTTP_USER_AGENT"] =~ /MSIE 8.0/

@ -202,24 +202,24 @@ class JournalsForMessage < ActiveRecord::Base
# 用户留言消息通知 # 用户留言消息通知
def act_as_user_feedback_message def act_as_user_feedback_message
# 主留言 # 主留言
receivers = []
if self.reply_id == 0
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
receivers << self.jour
end
else # 留言回复
reply_to = User.find(self.reply_id)
if self.user_id != self.reply_id # 添加我回复的那个人
receivers << reply_to
end
if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
receivers << self.parent.jour
end
end
if self.jour_type == 'Principal' if self.jour_type == 'Principal'
receivers.each do |r| receivers = []
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false) if self.reply_id == 0
if self.user_id != self.jour_id # 过滤自己给自己的留言消息
receivers << self.jour
end end
else # 留言回复
reply_to = User.find(self.reply_id)
if self.user_id != self.reply_id # 添加我回复的那个人
receivers << reply_to
end
if self.user_id != self.parent.jour_id && self.reply_id != self.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
receivers << self.parent.jour
end
end
receivers.each do |r|
self.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => self.id, :journals_for_message_type => "Principal", :viewed => false)
end
end end
end end

@ -5,7 +5,7 @@
<div class="ping_dispic"> <div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %> <%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
</div> </div>
<div class="ping_discon upload_img" style="width: 670px;"> <div class="ping_discon upload_img" style="width: 610px;">
<div class="ping_distop f14"> <div class="ping_distop f14">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> --> <!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span> <span>

@ -56,7 +56,7 @@
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %> <%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索"/> <input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索"/>
<input type="hidden" name="search_type" id="type" value=""/> <input type="hidden" name="search_type" id="type" value=""/>
<input type="text" class="none"/> <input type="text" style="display: none;"/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a> <a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
<% end %> <% end %>
<div class="navSearchTypeBox" id="navHomepageSearchType"> <div class="navSearchTypeBox" id="navHomepageSearchType">

@ -31,7 +31,7 @@
<div class="homepageLeft" id="LSide"> <div class="homepageLeft" id="LSide">
<div class="homepagePortraitContainer"> <div class="homepagePortraitContainer">
<div class="homepagePortraitImage fl" id="homepage_portrait_image"> <div class="homepagePortraitImage fl" id="homepage_portrait_image">
<%= image_tag(url_to_avatar(@user),width:"90", height: "90", :id=>'nh_user_tx') %> <%= image_tag(url_to_avatar(@user),width:"78", height: "78", :id=>'nh_user_tx') %>
<% if User.current.logged?%> <% if User.current.logged?%>
<% if is_current_user%> <% if is_current_user%>
<div id="edit_user_file_btn" class="none"> <div id="edit_user_file_btn" class="none">
@ -43,16 +43,18 @@
<% end%> <% end%>
</div> </div>
<div class="fl ml10"> <div class="fl ml10">
<p class="homepageImageName hidden db mb8"> <p class="homepageImageName hidden db mb5">
<%= @user.login %> <%= @user.login %>
</p> </p>
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %> <% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
<span class="<%= @user.user_extensions.gender == 1 ? 'homepageImageSexWomen' : 'homepageImageSexMan' %> "></span> <span class="<%= @user.user_extensions.gender == 1 ? 'homepageImageSexWomen' : 'homepageImageSexMan' %> "></span>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<p class="mb20 c_dark f14"> <% if @user.user_extensions && @user.user_extensions.identity %>
<%= get_technical_title @user %> <p class="mb8 c_dark f14">
</p> <%= get_user_roll @user %>
</p>
<% end%>
<div id="watch_user_btn_div"> <div id="watch_user_btn_div">
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %> <%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
</div> </div>

@ -27,7 +27,7 @@
<%= render :partial => 'attachments/new_form', :locals => {:container => @news} %> <%= render :partial => 'attachments/new_form', :locals => {:container => @news} %>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<li class="ml50" > <li class="ml40" >
<% if is_new %> <% if is_new %>
<%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %> <%= link_to l(:button_create), "javascript:void(0)", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
<%= link_to l(:button_cancel), course_news_index_path(@course), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %> <%= link_to l(:button_cancel), course_news_index_path(@course), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %>

@ -2,7 +2,7 @@
<% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> <% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%>
<% if @is_teacher%> <% if @is_teacher%>
<li title="<%= poll.polls_name %>"> <li title="<%= poll.polls_name %>">
<div style="width: 370px;float: left;"> <div style="width: 310px;float: left;">
<% if has_commit %> <% if has_commit %>
<%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%> <%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%>
<% else %> <% else %>

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>--> <!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb12"> <div class="homepagePostTo">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
@ -15,7 +15,7 @@
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.container_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %> <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.container_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>--> <!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div> </div>
<div class="homepagePostTitle mb12"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey"><%=activity.filename.to_s(附件名称)%></a> <a href="javascript:void(0);" class="postGrey"><%=activity.filename.to_s(附件名称)%></a>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理课程创建</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理课程创建</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -1,19 +1,19 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8 break_word"> <div class="homepagePostTo break_word">
<% if activity.try(:user).try(:realname) == ' ' %> <% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %> TO <!--+"(课程名称)" --> <% end %> TO <!--+"(课程名称)" -->
<%= link_to activity.course.name.to_s+" | 课程作业", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %> <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id), :class => "newsBlue ml15"%>
</div> </div>
<div class="homepagePostTitle mb8 break_word"> <!--+"(作业名称)"--> <div class="homepagePostTitle break_word"> <!--+"(作业名称)"-->
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %> <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey"%>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"> <div class="homepagePostSubmit">
@ -21,7 +21,7 @@
</div> </div>
<div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div> <div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div>
</div> </div>
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id%>"> <div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">
作业描述:<%= activity.description.html_safe %> 作业描述:<%= activity.description.html_safe %>
</div> </div>
<!--<p style="display: none" id="activity_message_<%#= user_activity.id%>"> <!--<p style="display: none" id="activity_message_<%#= user_activity.id%>">

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理留言</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理留言</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -1,32 +1,32 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10"> <!-- onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"--> <div class="homepagePostBrief"> <!-- onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"-->
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb12 break_word"> <div class="homepagePostTo break_word">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.course.name.to_s+" | 课程讨论区", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%> <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course), :class => "newsBlue ml15 mr5"%>
<%#= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%> <%#= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5"%>
</div> </div>
<div class="homepagePostTitle mb12 break_word"> <div class="homepagePostTitle break_word">
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"--> <% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %> <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey" %>
<% else %> <% else %>
<%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey"%>
<% end %> <% end %>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostDate">
<div class="homepagePostDeadline">发帖时间:<%= format_date(activity.created_on) %></div> 发帖时间:<%= format_date(activity.created_on) %>
</div> </div>
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id%>">帖子描述: <div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">帖子描述:
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%> <%= activity.content.to_s.html_safe%>
<% else %> <% else %>

@ -1,24 +1,24 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb12 break_word"> <div class="homepagePostTo break_word">
<% if @ctivity.try(:author).try(:realname) == ' ' %> <% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <!--+"(课程名称)"--> <% end %> TO <!--+"(课程名称)"-->
<%= link_to activity.course.name.to_s+" | 课程通知", course_path(activity.course), :class => "newsBlue ml15", :style => "word-break:break-all" %> <%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle mb12 break_word"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey", :style => "word-break:break-all" %> <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostDate">
<div class="homepagePostDeadline">发布时间:<%= format_date(activity.created_on) %></div> 发布时间:<%= format_date(activity.created_on) %>
</div> </div>
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id %>">通知描述:<%= activity.description.html_safe %></div> <div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id %>">通知描述:<%= activity.description.html_safe %></div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden"> <div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul> <ul>

@ -1,20 +1,20 @@
<% has_commit = has_commit_poll?(activity.id ,User.current)%> <% has_commit = has_commit_poll?(activity.id ,User.current)%>
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%> <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>--> <!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb12 break_word"> <div class="homepagePostTo break_word">
<% if activity.try(:user).try(:realname) == ' ' %> <% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %> <%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15" %>
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>--> <!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div> </div>
<div class="homepagePostTitle break_word" > <div class="homepagePostTitle break_word" >
@ -25,10 +25,10 @@
<%= link_to poll_name, poll_path(activity.id), :class => "postGrey"%> <%= link_to poll_name, poll_path(activity.id), :class => "postGrey"%>
<% end %> <% end %>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostDate">
<div class="homepagePostDeadline">发布时间:<%= format_date(activity.published_at) %></div> 发布时间:<%= format_date(activity.published_at) %>
</div> </div>
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id%>">问卷描述:<%=activity.polls_description.html_safe.to_s%></div> <div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">问卷描述:<%=activity.polls_description.html_safe.to_s%></div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden"> <div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目附件</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目附件</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目创建</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目创建</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理文档名称</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理文档名称</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -1,19 +1,19 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb12 break_word"> <div class="homepagePostTo break_word">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <% end %> TO
<%= link_to activity.project.name.to_s+" | 项目缺陷", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %> <%= link_to activity.project.name.to_s+" | 项目缺陷", project_issues_path(activity.project), :class => "newsBlue ml15"%>
</div> </div>
<div class="homepagePostTitle mb12 break_word"> <div class="homepagePostTitle break_word">
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %> <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'><%= get_issue_priority(activity.priority_id)[1] %></span> <span class='<%= get_issue_priority(activity.priority_id)[0] %>'><%= get_issue_priority(activity.priority_id)[1] %></span>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
@ -28,13 +28,18 @@
</div> </div>
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div> <div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
</div> </div>
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id %>">缺陷描述:<%= activity.description.html_safe %></div> <div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id %>">缺陷描述:
<% if activity.description? %>
<%= textAreailizable activity, :description, :attachments => activity.attachments %>
<% end %>
<%#= activity.description.html_safe %>
</div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<% if activity.attachments.any? %> <% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %> <% activity.attachments.each do |attachment| %>
<div class="break_word"> <div class="break_word">
<span title="<%= attachment.filename %>" id="attachment_"> <span title="<%= attachment.filename %>" id="attachment_">
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%> <%= link_to_short_attachment attachment,:length=> 58, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
</span> </span>
<% if attachment.is_text? %> <% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'), <%= link_to image_tag('magnifier.png'),

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目日志</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目日志</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -1,30 +1,32 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb12 break_word"> <div class="homepagePostTo break_word">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%> <%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>--> <!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
</div> </div>
<div class="homepagePostTitle mb12 break_word"> <div class="homepagePostTitle break_word">
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %> <%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey"
%>
<% else %> <% else %>
<%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> <%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey"
%>
<% end %> <% end %>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostDate">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div> 时间:<%= format_date(activity.created_on) %>
</div> </div>
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id%>">帖子描述: <div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity.id%>">帖子描述:
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%> <%= activity.content.to_s.html_safe%>
<% else %> <% else %>

@ -1,11 +1,11 @@
<div class="resources mt10"> <div class="resources mt10">
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"> <div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div> <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="50" height="50" alt="用户头像"/></a></div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo mb8"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div> <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle mb8"> <div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目新闻</a></div> <a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目新闻</a></div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div> <div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>

@ -3,7 +3,7 @@
<div class="HomeWork mb10"> <div class="HomeWork mb10">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%=link_to image_tag(url_to_avatar(homework_common.user),width:"90px", height: "90px"), user_activities_path(homework_common.user.id)%> <%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo"> <div class="homepagePostTo">

@ -8,7 +8,7 @@
div.ke-toolbar .ke-outline{border:none;} div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;} div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
div.recall_con{width:600px;} div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;} div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
</style> </style>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save