commit
c0067eb616
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
|||||||
|
class CourseActivity < ActiveRecord::Base
|
||||||
|
attr_accessible :user_id, :course_act_id,:course_act_type,:course_id
|
||||||
|
# 虚拟关联
|
||||||
|
belongs_to :course_act ,:polymorphic => true
|
||||||
|
belongs_to :course
|
||||||
|
belongs_to :user
|
||||||
|
has_many :user_acts, :class_name => 'UserAcivity',:as =>:act
|
||||||
|
after_save :add_user_activity
|
||||||
|
before_destroy :destroy_user_activity
|
||||||
|
|
||||||
|
#在个人动态里面增加当前动态
|
||||||
|
def add_user_activity
|
||||||
|
user_activity = UserActivity.where("act_type = '#{self.course_act_type.to_s}' and act_id = '#{self.course_act_id}'").first
|
||||||
|
if user_activity
|
||||||
|
user_activity.save
|
||||||
|
else
|
||||||
|
user_activity = UserActivity.new
|
||||||
|
user_activity.act_id = self.course_act_id
|
||||||
|
user_activity.act_type = self.course_act_type
|
||||||
|
user_activity.container_type = "Course"
|
||||||
|
user_activity.container_id = self.course_id
|
||||||
|
user_activity.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy_user_activity
|
||||||
|
user_activity = UserActivity.where("act_type = '#{self.course_act_type.to_s}' and act_id = '#{self.course_act_id}'")
|
||||||
|
user_activity.destroy_all
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,20 @@
|
|||||||
|
class CourseMessage < ActiveRecord::Base
|
||||||
|
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status
|
||||||
|
|
||||||
|
# 多态 虚拟关联
|
||||||
|
belongs_to :course_message ,:polymorphic => true
|
||||||
|
belongs_to :course
|
||||||
|
belongs_to :user
|
||||||
|
has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy
|
||||||
|
|
||||||
|
validates :user_id,presence: true
|
||||||
|
validates :course_id,presence: true
|
||||||
|
validates :course_message_id,presence: true
|
||||||
|
validates :course_message_type, presence: true
|
||||||
|
validates_length_of :content, :maximum => 100
|
||||||
|
after_create :add_user_message
|
||||||
|
|
||||||
|
def add_user_message
|
||||||
|
self.message_alls << MessageAll.new(:user_id => self.user_id)
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,27 @@
|
|||||||
|
class ForgeMessage < ActiveRecord::Base
|
||||||
|
# 公共表中活动类型,命名规则:TYPE_OF_{类名}_ACT
|
||||||
|
TYPE_OF_ISSUE_ACT = "Issue"
|
||||||
|
TYPE_OF_MESSAGE_ACT = "Message"
|
||||||
|
TYPE_OF_ATTACHMENT_ACT = "Attachment"
|
||||||
|
TYPE_OF_DOCUMENT_ACT = "Document"
|
||||||
|
TYPE_OF_JOURNAL_ACT = "Journal"
|
||||||
|
TYPE_OF_WIKI_ACT = "Wiki"
|
||||||
|
TYPE_OF_NEWS_ACT = "News"
|
||||||
|
|
||||||
|
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed
|
||||||
|
|
||||||
|
belongs_to :forge_message ,:polymorphic => true
|
||||||
|
belongs_to :project
|
||||||
|
belongs_to :user
|
||||||
|
has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy
|
||||||
|
|
||||||
|
validates :user_id,presence: true
|
||||||
|
validates :project_id,presence: true
|
||||||
|
validates :forge_message_id,presence: true
|
||||||
|
validates :forge_message_type, presence: true
|
||||||
|
after_create :add_user_message
|
||||||
|
|
||||||
|
def add_user_message
|
||||||
|
self.message_alls << MessageAll.new(:user_id => self.user_id)
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,17 @@
|
|||||||
|
class MemoMessage < ActiveRecord::Base
|
||||||
|
attr_accessible :forum_id, :memo_id, :memo_type, :user_id, :viewed
|
||||||
|
|
||||||
|
belongs_to :memo
|
||||||
|
belongs_to :user
|
||||||
|
has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy
|
||||||
|
|
||||||
|
validates :user_id,presence: true
|
||||||
|
validates :forum_id,presence: true
|
||||||
|
validates :memo_id,presence: true
|
||||||
|
validates :memo_type, presence: true
|
||||||
|
after_create :add_user_message
|
||||||
|
|
||||||
|
def add_user_message
|
||||||
|
self.message_alls << MessageAll.new(:user_id => self.user_id)
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class MessageAll < ActiveRecord::Base
|
||||||
|
attr_accessible :message_id, :message_type, :user_id
|
||||||
|
# 虚拟关联---项目消息表/课程消息表/用户留言消息表/贴吧消息表
|
||||||
|
belongs_to :message ,:polymorphic => true
|
||||||
|
end
|
@ -0,0 +1,7 @@
|
|||||||
|
class UserActivity < ActiveRecord::Base
|
||||||
|
attr_accessible :act_type,:act_id,:container_type,:container_id
|
||||||
|
# 虚拟关联---项目动态表/课程动态表
|
||||||
|
belongs_to :act ,:polymorphic => true
|
||||||
|
# 虚拟关联---项目/课程
|
||||||
|
belongs_to :container ,:polymorphic => true
|
||||||
|
end
|
@ -0,0 +1,16 @@
|
|||||||
|
class UserFeedbackMessage < ActiveRecord::Base
|
||||||
|
attr_accessible :journals_for_message_id, :journals_for_message_type, :user_id, :viewed
|
||||||
|
|
||||||
|
belongs_to :journals_for_message
|
||||||
|
belongs_to :user
|
||||||
|
has_many :message_alls, :class_name => 'MessageAll',:as =>:message, :dependent => :destroy
|
||||||
|
|
||||||
|
validates :user_id,presence: true
|
||||||
|
validates :journals_for_message_id,presence: true
|
||||||
|
validates :journals_for_message_type, presence: true
|
||||||
|
after_create :add_user_message
|
||||||
|
|
||||||
|
def add_user_message
|
||||||
|
self.message_alls << MessageAll.new(:user_id => self.user_id)
|
||||||
|
end
|
||||||
|
end
|
@ -1,16 +1,26 @@
|
|||||||
<% @nav_dispaly_home_path_label = 1
|
<%= stylesheet_link_tag 'new_user'%>
|
||||||
@nav_dispaly_main_course_label = 1
|
|
||||||
@nav_dispaly_main_project_label = 1
|
|
||||||
@nav_dispaly_main_contest_label = 1 %>
|
|
||||||
<% @nav_dispaly_forum_label = 1%>
|
|
||||||
<h3><%=l(:label_password_forget)%></h3>
|
|
||||||
|
|
||||||
|
<div class="homepageContentContainer " style="margin-top:20px;">
|
||||||
|
<div class="homepageContent BgBox">
|
||||||
|
<h2 class="BgBox_h2">忘记密码</h2>
|
||||||
|
<div class="BgBoxCon">
|
||||||
<%= form_tag(lost_password_path) do %>
|
<%= form_tag(lost_password_path) do %>
|
||||||
<div class="box tabular">
|
<p class="BgBoxConP mb5">通过注册邮箱链接重设密码</p>
|
||||||
<p>
|
<!--<input type="text" class="NomalInput mb20 " value="请输入登录邮箱地址" />-->
|
||||||
<label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
|
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱',:class=>'NomalInput mb20'%>
|
||||||
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱'%>
|
<% if flash[:error] %>
|
||||||
<%= submit_tag l(:button_submit) %>
|
<p class="c_red mb5"><%= flash[:error]%></p>
|
||||||
</p>
|
<!--<div style="color: red" class="mb5" ><%#= flash[:error]%></div>-->
|
||||||
</div>
|
<% elsif flash[:notice] %>
|
||||||
|
<p class="c_green mb5"><%= flash[:notice]%></p>
|
||||||
|
<!--<div style="color: green" class="mb5" ><%#= flash[:notice]%></div>-->
|
||||||
|
<% end %>
|
||||||
|
<div class="LoginButton"><a href="javascript:void(0);" class="c_white db" onclick="$(this).parent().parent().submit();">提交</a></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div><!---BgBox end--->
|
||||||
|
</div><!---homepageContentContainer end--->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
<h3><%=l(:label_password_lost)%></h3>
|
|
||||||
|
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
|
<div style="margin-top:20px;width:100%; background-color:#eaebed;">
|
||||||
|
<div style="width:1000px; background-color:#eaebed; margin:0 auto; width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;margin: 20px auto">
|
||||||
|
<h2 style="font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;">重置密码</h2>
|
||||||
|
<div style="width:310px; margin:80px auto;">
|
||||||
<%= form_tag(lost_password_path) do %>
|
<%= form_tag(lost_password_path) do %>
|
||||||
<%= hidden_field_tag 'token', @token.value %>
|
<%= hidden_field_tag 'token', @token.value %>
|
||||||
<div class="box tabular">
|
<!--<input type="text" class="NomalInput " value="新密码" />-->
|
||||||
<p>
|
<%= password_field_tag 'new_password', nil, :size => 25,:placeholder=>'新密码',:style=>"width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px; " %>
|
||||||
<label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
<p style=" color:#F00 ;margin-bottom:5px;">至少需要 6 个字符</p>
|
||||||
<%= password_field_tag 'new_password', nil, :size => 25 %>
|
<!--<input type="text" class="NomalInput mb20 " value="确定密码" />-->
|
||||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
|
<%= password_field_tag 'new_password_confirmation', nil, :size => 25,:placeholder=>'确定密码',:style=>"width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;margin-bottom:20px; " %>
|
||||||
</p>
|
<div style="width:315px; height:40px; background-color:#269ac9; font-size:14px; text-align:center; line-height:40px; vertical-align:middle;"><a href="javascript:void(0);" style=" color:#fff;display:block !important;" onclick="$(this).parent().parent().submit();">提交</a></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<label for="new_password_confirmation"><%= l(:field_password_confirmation)%> <span class="required">*</span></label>
|
|
||||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<p><%= submit_tag l(:button_save) %></p>
|
</div>
|
||||||
<% end %>
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
<div class="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to l(:label_forum), {:action => 'messages_list'}, class: "#{current_page?(messages_list_path)? 'selected' : nil }" %></li>
|
||||||
|
<li><%= link_to l(:label_borad_course), {:action => 'course_messages'}, class: "#{current_page?(course_messages_path)? 'selected' : nil }" %></li>
|
||||||
|
<li><%= link_to l(:label_borad_project), {:action => 'project_messages'}, class: "#{current_page?(project_messages_path)? 'selected' : nil }" %></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -0,0 +1,69 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_message_plural)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<%= render 'tab_messages' %>
|
||||||
|
<h4><%=l(:label_borad_course) %></h4>
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(课程ID)">
|
||||||
|
来源(课程ID)
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
作者
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
标题
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
回复数
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count=@page*30%>
|
||||||
|
<% for course in @course_ms -%>
|
||||||
|
|
||||||
|
<% @count=@count + 1 %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= @count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= Board.where('id=?',course.board_id).first.course_id %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if course.try(:author).try(:realname) == ' '%><%= course.try(:author)%><% else %><%=course.try(:author).try(:realname) %><% end %>'>
|
||||||
|
<% if course.try(:author).try(:realname) == ' '%>
|
||||||
|
<%= link_to(course.try(:author), user_path(course.author)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(course.try(:author).try(:realname), user_path(course.author)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(course.created_on) %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=course.subject %>'>
|
||||||
|
<%= link_to(course.subject, course_boards_path(Board.where('id=?',course.board_id).first.course_id)) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= link_to(course.replies_count, course_boards_path(Board.where('id=?',course.board_id).first.course_id)) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_message_plural)) -%>
|
@ -0,0 +1,66 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_user_homework)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
作业名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
课程名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
作者
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
提交作品数
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
提交截止日期
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<%@count=@page*30 %>
|
||||||
|
<% for homework in @homework do %>
|
||||||
|
<% @count+=1 %>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<%=@count %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.name%>'>
|
||||||
|
<%=link_to(homework.name, student_work_index_path(:homework => homework.id))%>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=homework.course.name%>'>
|
||||||
|
<%= link_to(homework.course.name, course_path(homework.course.id)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if homework.try(:user).try(:realname) == ' '%><%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'>
|
||||||
|
<% if homework.try(:user).try(:realname) == ' '%>
|
||||||
|
<%= link_to(homework.try(:user), user_path(homework.user_id)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(homework.try(:user).try(:realname), user_path(homework.user_id)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=format_date(homework.end_time) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_user_homework)) -%>
|
@ -0,0 +1,96 @@
|
|||||||
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %>
|
||||||
|
<h3>
|
||||||
|
<%=l(:label_latest_login_user_list)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<%= form_tag({}, :method => :get) do %>
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<%= l(:label_filter_plural) %>
|
||||||
|
</legend>
|
||||||
|
<label style="float:left">开始日期:</label>
|
||||||
|
<%= text_field_tag 'startdate', params[:startdate], :size => 15, :onchange=>"$('#ui-datepicker-div').hide()", :style=>"float:left"%>
|
||||||
|
<%= calendar_for('startdate')%><span style="float: left "> </span>
|
||||||
|
<label style="float:left">结束日期:</label>
|
||||||
|
<%= text_field_tag 'enddate', params[:enddate], :size => 15, :onchange =>"$('#ui-datepicker-div').hide()", :style=>"float:left"%>
|
||||||
|
<%= calendar_for('enddate')%>
|
||||||
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||||
|
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'latest_login_users'}, :class => 'icon icon-reload' %>
|
||||||
|
</fieldset>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
登录时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
用户id
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
用户姓名
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
用户昵称
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
用户身份
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count=@page * 30 %>
|
||||||
|
<% for user in @user do %>
|
||||||
|
<tr>
|
||||||
|
<% @count +=1 %>
|
||||||
|
<td align="center">
|
||||||
|
<%=@count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=format_date(user.last_login_on) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=user.id %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if user.try(:realname) == ' '%><%= user.login%><% else %><%=user.try(:realname) %><% end %>'>
|
||||||
|
<% if user.try(:realname) == ' '%>
|
||||||
|
<%= link_to(user.login, user_path(user)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(user.try(:realname), user_path(user)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=link_to(user.login, user_path(user)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<% case user.user_extensions.identity %>
|
||||||
|
<% when 0 %>
|
||||||
|
<%='老师' %>
|
||||||
|
<% when 1 %>
|
||||||
|
<%='学生' %>
|
||||||
|
<% when 2 %>
|
||||||
|
<%='企业' %>
|
||||||
|
<% when 3 %>
|
||||||
|
<%='开发者' %>
|
||||||
|
<% else %>
|
||||||
|
<%='未知身份' %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_latest_login_user_list)) -%>
|
@ -0,0 +1,96 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_leave_message_list)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
类型
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(课程或用户ID)">
|
||||||
|
来源(课程或用户ID)
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
留言人
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
留言时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
留言内容
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
回复数
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count = @page * 30 %>
|
||||||
|
<% for journal in @jour -%>
|
||||||
|
<% @count=@count + 1 %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= @count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%case journal.jour_type %>
|
||||||
|
<% when 'Principal' %>
|
||||||
|
<%='用户主页' %>
|
||||||
|
<% when 'Course' %>
|
||||||
|
<%='课程' %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= journal.jour_id %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<% if journal.try(:user).try(:realname) == ' '%><%= journal.try(:user)%><% else %><%=journal.try(:user).try(:realname) %><% end %>'>
|
||||||
|
<% if journal.try(:user).try(:realname) == ' '%>
|
||||||
|
<%= link_to(journal.try(:user), user_path(journal.user)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(journal.try(:user).try(:realname), user_path(journal.user)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(journal.created_on) %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=journal.notes %>'>
|
||||||
|
<%case journal.jour_type %>
|
||||||
|
<% when 'Principal' %>
|
||||||
|
<%= link_to(journal.notes.html_safe, feedback_path(journal.jour_id)) %>
|
||||||
|
<% when 'Course' %>
|
||||||
|
<%= link_to(journal.notes.html_safe, course_feedback_path(journal.jour_id)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<% if(journal.m_reply_count) %>
|
||||||
|
<%case journal.jour_type %>
|
||||||
|
<% when 'Principal' %>
|
||||||
|
<%= link_to(journal.m_reply_count, feedback_path(journal.jour_id)) %>
|
||||||
|
<% when 'Course' %>
|
||||||
|
<%= link_to(journal.m_reply_count, course_feedback_path(journal.jour_id)) %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<%case journal.jour_type %>
|
||||||
|
<% when 'Principal' %>
|
||||||
|
<%= link_to(0, feedback_path(journal.jour_id)) %>
|
||||||
|
<% when 'Course' %>
|
||||||
|
<%= link_to(0, course_feedback_path(journal.jour_id)) %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_leave_message_list)) -%>
|
@ -0,0 +1,71 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_message_plural)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<%= render 'tab_messages' %>
|
||||||
|
<h4><%=l(:label_forum) %></h4>
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(贴吧ID)">
|
||||||
|
来源(贴吧ID)
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
作者
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
标题
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
回复数
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count=@page * 30%>
|
||||||
|
<% for memo in @memo -%>
|
||||||
|
<% @count=@count + 1 %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= @count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= memo.forum_id %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if memo.try(:author).try(:realname) == ' '%><%= memo.try(:author)%><% else %><%=memo.try(:author).try(:realname) %><% end %>'>
|
||||||
|
<% if memo.try(:author).try(:realname) == ' '%>
|
||||||
|
<%= link_to(memo.try(:author), user_path(memo.author)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(memo.try(:author).try(:realname), user_path(memo.author)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(memo.created_at) %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=memo.subject %>'>
|
||||||
|
<% if memo.parent_id.nil? || memo.subject.starts_with?('RE:')%>
|
||||||
|
<%= link_to(memo.subject, forum_memo_path(memo.forum, memo)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to("RE:"+memo.subject, forum_memo_path(memo.forum, memo)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= link_to(memo.replies_count, forum_memo_path(memo.forum, memo)) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_message_plural)) -%>
|
@ -0,0 +1,78 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_notification_list)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
课程id
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
课程名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
主讲老师
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
作者
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
标题
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
回复数
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count=@page * 30%>
|
||||||
|
<% for news in @news -%>
|
||||||
|
<% @count=@count + 1 %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= @count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%=news.course_id %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title="<%=news.course.name %>">
|
||||||
|
<%=link_to(news.course.name, course_path(news.course)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title="<%=news.course.try(:teacher).try(:realname) %>">
|
||||||
|
<%=link_to(news.course.try(:teacher).try(:realname), user_path(news.course.teacher)) %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if news.try(:author).try(:realname) == ' '%><%= news.try(:author)%><% else %><%=news.try(:author).try(:realname) %><% end %>'>
|
||||||
|
<% if news.try(:author).try(:realname) == ' '%>
|
||||||
|
<%= link_to(news.try(:author), user_path(news.author)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(news.try(:author).try(:realname), user_path(news.author)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(news.created_on) %>
|
||||||
|
</td>
|
||||||
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=news.title %>'>
|
||||||
|
<%= link_to(news.title, news_path(news)) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= link_to(news.comments_count, news_path(news)) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_notification_list)) -%>
|
@ -0,0 +1,70 @@
|
|||||||
|
<h3>
|
||||||
|
<%=l(:label_message_plural)%>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<%= render 'tab_messages' %>
|
||||||
|
<h4><%=l(:label_borad_project) %></h4>
|
||||||
|
<div class="autoscroll">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(项目ID)">
|
||||||
|
来源(项目ID)
|
||||||
|
</th>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
作者
|
||||||
|
</th>
|
||||||
|
<th style="width: 70px;">
|
||||||
|
时间
|
||||||
|
</th>
|
||||||
|
<th style="width: 120px;">
|
||||||
|
标题
|
||||||
|
</th>
|
||||||
|
<th style="width: 30px;">
|
||||||
|
回复数
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @count=@page * 30 %>
|
||||||
|
<% for project in @project_ms -%>
|
||||||
|
|
||||||
|
<% @count=@count + 1 %>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<%= @count %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= Board.where('id=?',project.board_id).first.project_id %>
|
||||||
|
</td>
|
||||||
|
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if project.try(:author).try(:realname) == ' '%><%= project.try(:author)%><% else %><%=project.try(:author).try(:realname) %><% end %>'>
|
||||||
|
<% if project.try(:author).try(:realname) == ' '%>
|
||||||
|
<%= link_to(project.try(:author), user_path(project.author)) %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to(project.try(:author).try(:realname), user_path(project.author)) %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= format_date(project.created_on) %>
|
||||||
|
</td>
|
||||||
|
<td title='<%=project.subject %>' style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name">
|
||||||
|
<%= link_to(project.subject, project_boards_path(Board.where('id=?',project.board_id).first.project_id)) %>
|
||||||
|
</td>
|
||||||
|
<td class="center">
|
||||||
|
<%= link_to(project.replies_count, project_boards_path(Board.where('id=?',project.board_id).first.project_id)) %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_message_plural)) -%>
|
@ -0,0 +1,50 @@
|
|||||||
|
<h3 style="float: left">
|
||||||
|
<%=l(:label_school_plural)%>
|
||||||
|
</h3>
|
||||||
|
<%= form_tag({:controller => 'admin', :action => 'schools' }, :method => :get,:id=>"search_course_form") do %>
|
||||||
|
<%= submit_tag "搜索",:style => "float: right;margin-right: 15px;"%>
|
||||||
|
<input style="float: right;margin-right: 10px;" id="v_subject" placeholder="学校名称" type="text" name="school_name" value="<%= @school_name%>">
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<div class="autoscroll" style="margin-top: 40px;">
|
||||||
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 50px;">
|
||||||
|
序号
|
||||||
|
</th>
|
||||||
|
<th style="width: 100px;">
|
||||||
|
LOGO
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
学校名称
|
||||||
|
</th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @schools.each do |school|%>
|
||||||
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
<td style="text-align:center;vertical-align: middle;">
|
||||||
|
<%= school.id %>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<%= image_tag(school.logo_link,width:40,height:40) %>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center;vertical-align: middle;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=school.name%>'>
|
||||||
|
<span>
|
||||||
|
<%= link_to school.name,"http://#{Setting.host_course}/?school_id=#{school.id}" %>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="buttons" style="vertical-align: middle;">
|
||||||
|
<%= link_to("修改", upload_logo_school_path(school.id,:school_name => @school_name), :class => 'icon icon-copy') %>
|
||||||
|
<%#= link_to(l(:button_delete), organization_path(school.id), :method => :delete,:confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end%>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% html_title(l(:label_project_plural)) -%>
|
@ -0,0 +1,12 @@
|
|||||||
|
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
|
||||||
|
$("#test_result_<%= @index%>").val("<%= @result%>");
|
||||||
|
<% if @err_msg || @result != 0%>
|
||||||
|
$("#homework_work_test_show").show();
|
||||||
|
$("#homework_work_test_desc").text("<%= escape_javascript(@err_msg || status_to_err_msg(@result))%>");
|
||||||
|
<% if @err_msg%>
|
||||||
|
$("#homework_test_error_msg").val("<%= escape_javascript(@err_msg)%>");
|
||||||
|
<% end%>
|
||||||
|
<% else%>
|
||||||
|
$("#homework_work_test_show").hide();
|
||||||
|
$("#homework_test_error_msg").val("");
|
||||||
|
<% end%>
|
@ -0,0 +1,46 @@
|
|||||||
|
<div id="Footer">
|
||||||
|
<div class="footerAboutContainer">
|
||||||
|
<ul class="footerAbout">
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/projects/2/feedback" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_recruitment_information)%></a>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_forums)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey ml20" target="_blank"><%= l(:label_language)%></a>
|
||||||
|
<select class="languageBox">
|
||||||
|
<option value="Chinese" selected="selected">中文</option>
|
||||||
|
<option value="English">英文</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="departments">
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%= l(:label_hosted_by)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%= l(:label_sponsor)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_partners)%></strong><a href="http://eecs.pku.edu.cn" class="ml10 f_grey" target="_blank"><%= l(:label_co_organizer_EECS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://scse.buaa.edu.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_BHU)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.iscas.ac.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_CAS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%= l(:label_co_organizer_InforS)%></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="copyright">
|
||||||
|
<li class="fl"><%= l(:label_rights_reserved)%></li>
|
||||||
|
<span class="fl mw15">|</span>
|
||||||
|
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--Footer end-->
|
||||||
|
<div class="cl"></div>
|
@ -0,0 +1,39 @@
|
|||||||
|
<div id="Footer">
|
||||||
|
<div class="footerAboutContainer">
|
||||||
|
<ul class="footerAbout">
|
||||||
|
<li class="fl"><span class="f_grey mw20" title="暂未开放"><%= l(:label_about_us)%></span>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/projects/2/member" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
|
||||||
|
<li class="fl"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||||
|
<li class="fl"><span class="f_grey mw20" title="暂未开放"><%= l(:label_forums)%></span></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="departments">
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%= l(:label_hosted_by)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%= l(:label_sponsor)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_partners)%></strong><a href="http://eecs.pku.edu.cn" class="ml10 f_grey" target="_blank"><%= l(:label_co_organizer_EECS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://scse.buaa.edu.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_BHU)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.iscas.ac.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_CAS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%= l(:label_co_organizer_InforS)%></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="copyright">
|
||||||
|
<li class="fl mr30"><%= l(:label_rights_reserved)%></li>
|
||||||
|
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--Footer end-->
|
@ -0,0 +1,119 @@
|
|||||||
|
<div class="navHomepage">
|
||||||
|
<div class="navHomepageLogo fl">
|
||||||
|
<%=link_to image_tag("../images/nav_logo.png",width:"51px", height: "45px",class: "mt3"), user_activities_path(User.current.id)%>
|
||||||
|
</div>
|
||||||
|
<div class="fl">
|
||||||
|
<ul>
|
||||||
|
<li class="navHomepageMenu fl">
|
||||||
|
<%= link_to "首页",user_activities_path(User.current.id), :class => "c_white f16 db"%>
|
||||||
|
</li>
|
||||||
|
<li class="navHomepageMenu fl">
|
||||||
|
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>User.current.id,:type=>1)%>" class="c_white f16 db">资源库</a></li>
|
||||||
|
<li class="navHomepageMenu fl">
|
||||||
|
<%= link_to "作业", user_homeworks_user_path(User.current.id), :class => "c_white f16 db"%>
|
||||||
|
</li>
|
||||||
|
<li class="navHomepageMenu fl mr30">
|
||||||
|
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16 db">帮助中心</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
<% type = type%>
|
||||||
|
$(function (){
|
||||||
|
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
||||||
|
$('input:radio[value="courses"]').attr('checked','checked');
|
||||||
|
}
|
||||||
|
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
||||||
|
$('input:radio[value="projects"]').attr('checked','checked');
|
||||||
|
}
|
||||||
|
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
||||||
|
$('input:radio[value="users"]').attr('checked','checked');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$("#navHomepageSearchInput").keypress(function(e){
|
||||||
|
var name = $.trim($('#navHomepageSearchInput').val());
|
||||||
|
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
||||||
|
$('#type').val($('input[type=radio]:checked').val());
|
||||||
|
$(this).parent().submit();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
function search_in_header(obj){
|
||||||
|
var name = $.trim($('#navHomepageSearchInput').val());
|
||||||
|
if (name != "" && name.length != 0) {
|
||||||
|
$('#type').val($('input[type=radio]:checked').val());
|
||||||
|
obj.parent().submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="fl" id="navHomepageSearch">
|
||||||
|
<!--<form class="navHomepageSearchBox">-->
|
||||||
|
<% name = name%>
|
||||||
|
|
||||||
|
<%= 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="hidden" name="search_type" id="type" value=""/>
|
||||||
|
<input type="text" class="none"/>
|
||||||
|
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||||
|
<% end %>
|
||||||
|
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
||||||
|
<div class="fl mr15 mt8">
|
||||||
|
<input type="radio" value="courses" name="search_type" checked/>
|
||||||
|
课程
|
||||||
|
</div>
|
||||||
|
<div class="fl mr15 mt8">
|
||||||
|
<input type="radio" value="projects" name="search_type" />
|
||||||
|
项目
|
||||||
|
</div>
|
||||||
|
<div class="fl mr15 mt8">
|
||||||
|
<input type="radio" value="users" name="search_type" />
|
||||||
|
用户
|
||||||
|
</div>
|
||||||
|
<div id="navSearchAlert" class="fr mr10">
|
||||||
|
<span class="c_red">请选择搜索类型</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="navHomepageProfile">
|
||||||
|
<ul>
|
||||||
|
<li class="homepageProfileMenuIcon">
|
||||||
|
<%= link_to "<div class='mt5 mb8'>#{image_tag(url_to_avatar(User.current),:width =>"40",:height => "40",:class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe,user_activities_path(User.current.id)%>
|
||||||
|
<ul class="topnav_login_list">
|
||||||
|
<li>
|
||||||
|
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
|
||||||
|
</li>
|
||||||
|
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||||
|
<li>
|
||||||
|
<%= link_to "退出",signout_path,:class => "menuGrey",:method => "post"%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="navHomepageNews">
|
||||||
|
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||||
|
<% if User.current.count_new_message >0 %>
|
||||||
|
<div ><%= link_to "" , user_message_path(User.current), :class => "newsActive" %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
//搜索相关
|
||||||
|
$("#navHomepageSearch").mouseover(function(){
|
||||||
|
$("#navHomepageSearchType").show();
|
||||||
|
}).mouseout(function(){
|
||||||
|
$("#navHomepageSearchType").hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
function signout(){
|
||||||
|
$.post(
|
||||||
|
'<%= signout_path%>',
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,95 @@
|
|||||||
|
<div class="navHomepage">
|
||||||
|
<div class="navHomepageLogo fl">
|
||||||
|
<%=link_to image_tag("../images/nav_logo.png",width:"51px", height: "45px",class: "mt3"), signin_path%>
|
||||||
|
</div>
|
||||||
|
<div class="fl">
|
||||||
|
<ul>
|
||||||
|
<li class="navHomepageMenu fl mr40">
|
||||||
|
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16">帮助中心</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
function search(doc){
|
||||||
|
//alert(1)
|
||||||
|
// val = $('input:radio[name="search_type"]:checked').val();
|
||||||
|
// alert(2)
|
||||||
|
// $("#search_type").val(val);
|
||||||
|
// alert(3)
|
||||||
|
$(doc).parent().submit();
|
||||||
|
}
|
||||||
|
<% type = type%>
|
||||||
|
$(function (){
|
||||||
|
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
||||||
|
$('input:radio[value="courses"]').attr('checked','checked');
|
||||||
|
}
|
||||||
|
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
||||||
|
$('input:radio[value="projects"]').attr('checked','checked');
|
||||||
|
}
|
||||||
|
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
||||||
|
$('input:radio[value="users"]').attr('checked','checked');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function search_in_header(obj){
|
||||||
|
var name = $.trim($('#navHomepageSearchInput').val());
|
||||||
|
if (name != "" && name.length != 0) {
|
||||||
|
$('#type').val($('input[type=radio]:checked').val());
|
||||||
|
obj.parent().submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function search_in_header_I(e,obj){
|
||||||
|
var name = $.trim($('#navHomepageSearchInput').val());
|
||||||
|
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
||||||
|
$('#type').val($('input[type=radio]:checked').val());
|
||||||
|
obj.parent().submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div class="fl" id="navHomepageSearch">
|
||||||
|
<!--<form class="navHomepageSearchBox">-->
|
||||||
|
<% name = name%>
|
||||||
|
|
||||||
|
<%= 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="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
|
||||||
|
<input type="hidden" name="search_type" id="type" value=""/>
|
||||||
|
<input type="text" style="display: none;"/>
|
||||||
|
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||||
|
<% end %>
|
||||||
|
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
||||||
|
<div class="fl mr15 mt8">
|
||||||
|
<input type="radio" value="courses" name="search_type" checked/>
|
||||||
|
课程
|
||||||
|
</div>
|
||||||
|
<div class="fl mr15 mt8">
|
||||||
|
<input type="radio" value="projects" name="search_type" />
|
||||||
|
项目
|
||||||
|
</div>
|
||||||
|
<div class="fl mr15 mt8">
|
||||||
|
<input type="radio" value="users" name="search_type" />
|
||||||
|
用户
|
||||||
|
</div>
|
||||||
|
<div id="navSearchAlert" class="fr mr10">
|
||||||
|
<span class="c_red">请选择搜索类型</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="loginInButton" class="fr ml20">
|
||||||
|
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
|
||||||
|
</div>
|
||||||
|
<div id="loginSignButton" class="fr">
|
||||||
|
<a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
//搜索相关
|
||||||
|
$("#navHomepageSearch").mouseover(function(){
|
||||||
|
$("#navHomepageSearchType").show();
|
||||||
|
}).mouseout(function(){
|
||||||
|
$("#navHomepageSearchType").hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
@ -0,0 +1,8 @@
|
|||||||
|
<% if user.user_extensions && user.user_extensions.brief_introduction && !user.user_extensions.brief_introduction.empty? %>
|
||||||
|
<%= user.user_extensions.brief_introduction %>
|
||||||
|
<% else%>
|
||||||
|
这位童鞋很懒,什么也没有留下~
|
||||||
|
<% end %>
|
||||||
|
<% if User.current == user%>
|
||||||
|
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_user_introduction();"%>
|
||||||
|
<% end%>
|
@ -0,0 +1,12 @@
|
|||||||
|
<% courses.each do |course|%>
|
||||||
|
<li class="homepageLeftMenuCoursesLine">
|
||||||
|
<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :class => "coursesLineGrey hidden #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}", :title => course.name%>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if courses.size == 5%>
|
||||||
|
<li class="homepageLeftMenuMore" id="user_show_more_course">
|
||||||
|
<input type="hidden" value="<%= page%>" id="course_page_num">
|
||||||
|
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_course('<%= user_courses4show_user_path(user.id)%>');"></a>
|
||||||
|
</li>
|
||||||
|
<% end%>
|
@ -0,0 +1,11 @@
|
|||||||
|
<% projects.each do |project|%>
|
||||||
|
<li class="homepageLeftMenuCoursesLine">
|
||||||
|
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => project.name%>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if projects.size == 5%>
|
||||||
|
<li class="homepageLeftMenuMore" id="user_show_more_project">
|
||||||
|
<input type="hidden" value="<%= page%>" id="project_page_num">
|
||||||
|
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_project('<%= user_projects4show_user_path(user.id)%>');"></a>
|
||||||
|
</li>
|
||||||
|
<% end%>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue