commit
a38e91b3d3
@ -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,66 @@
|
||||
<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;">
|
||||
来源
|
||||
</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=0%>
|
||||
<% 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 %>'>
|
||||
<%= course.subject %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%=course.replies_count %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_message_plural)) -%>
|
@ -0,0 +1,62 @@
|
||||
<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=0 %>
|
||||
<% 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">
|
||||
<%=StudentWork.where('homework_common_id=?',homework.id).count %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%=format_date(homework.end_time) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_user_homework)) -%>
|
@ -0,0 +1,73 @@
|
||||
<h3>
|
||||
<%=l(:label_latest_login_user_list)%>
|
||||
</h3>
|
||||
|
||||
<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=0 %>
|
||||
<% 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>
|
||||
|
||||
<% html_title(l(:label_latest_login_user_list)) -%>
|
@ -0,0 +1,79 @@
|
||||
<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;">
|
||||
来源
|
||||
</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=0%>
|
||||
<% 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" title='<%= journal.try(:user).try(:realname)%>'>
|
||||
<%= link_to(journal.try(:user).try(:realname).truncate(6, omission: '...'), user_path(journal.user)) %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%= format_date(journal.created_on) %>
|
||||
</td>
|
||||
<td title='<%=journal.notes %>'>
|
||||
<%= journal.notes.truncate(15, omission: '...') %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<% if(journal.m_reply_count) %>
|
||||
<%=journal.m_reply_count%>
|
||||
<% else %>
|
||||
<%=0 %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<%= pagination_links_full @jour_pages, @jour_count %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_leave_message_list)) -%>
|
@ -0,0 +1,69 @@
|
||||
<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;">
|
||||
来源
|
||||
</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=0%>
|
||||
<% 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 %>'>
|
||||
<%= memo.subject %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%=memo.replies_count %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--<div class="pagination">
|
||||
<ul>
|
||||
<#%= pagination_links_full @memo_pages, @memo_count %>
|
||||
</ul>
|
||||
</div>-->
|
||||
|
||||
<% html_title(l(:label_message_plural)) -%>
|
@ -0,0 +1,74 @@
|
||||
<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=0%>
|
||||
<% 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">
|
||||
<%=news.comments_count %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_notification_list)) -%>
|
@ -0,0 +1,66 @@
|
||||
<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;">
|
||||
来源
|
||||
</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=0%>
|
||||
<% 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">
|
||||
<%= project.subject %>
|
||||
</td>
|
||||
<td class="center">
|
||||
<%=project.replies_count %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_message_plural)) -%>
|
@ -0,0 +1,8 @@
|
||||
class AddCreatedAtToActivities < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :activities, :created_at, :timestamp
|
||||
end
|
||||
def end
|
||||
remove_column :activities, :created_at
|
||||
end
|
||||
end
|
@ -0,0 +1,21 @@
|
||||
class UpdateActivitiesData < ActiveRecord::Migration
|
||||
def up
|
||||
count = Activity.all.count / 10 + 1
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
Activity.all.each do |activity|
|
||||
type = activity.act_type
|
||||
if type=='Contest' || type=='Message' || type=='News'|| type=='Journal'|| type=='Issue'|| type=='Principal'||type=='JournalsForMessage'
|
||||
activity.created_at = activity.act.created_on if activity.act
|
||||
elsif type=='Contestnotification' || type=='HomeworkCommon' || type=='Poll'
|
||||
activity.created_at = activity.act.created_at if activity.act
|
||||
end
|
||||
activity.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class AddSystemScoreToStudentWork < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :student_works,:system_score,:integer
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :student_works,:system_score
|
||||
end
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue