Merge branch 'szzh' into develop
This commit is contained in:
commit
693c5878a5
|
@ -397,19 +397,10 @@ class AdminController < ApplicationController
|
||||||
|
|
||||||
#留言列表
|
#留言列表
|
||||||
def leave_messages
|
def leave_messages
|
||||||
@jour = JournalsForMessage.where("jour_type = 'Principal' or jour_type = 'Course'").reorder('created_on desc')
|
@jour = JournalsForMessage.find_by_sql("SELECT * FROM journals_for_messages AS j1
|
||||||
case params[:format]
|
WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) order by created_on desc")
|
||||||
when 'xml', 'json'
|
@jour = paginateHelper @jour,30
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 30})
|
@page = (params['page'] || 1).to_i - 1
|
||||||
else
|
|
||||||
@limit = 30#per_page_option
|
|
||||||
end
|
|
||||||
|
|
||||||
@jour_count = @jour.count
|
|
||||||
@jour_pages = Paginator.new @jour_count, @limit, params['page']
|
|
||||||
@offset ||= @jour_pages.offset
|
|
||||||
@jour = @jour.limit(@limit).offset(@offset).all
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
end
|
end
|
||||||
|
@ -418,21 +409,8 @@ class AdminController < ApplicationController
|
||||||
#帖子
|
#帖子
|
||||||
def messages_list
|
def messages_list
|
||||||
@memo = Memo.reorder("created_at desc")
|
@memo = Memo.reorder("created_at desc")
|
||||||
|
@memo = paginateHelper @memo,30
|
||||||
=begin
|
@page = (params['page'] || 1).to_i - 1
|
||||||
case params[:format]
|
|
||||||
when 'xml', 'json'
|
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 30})
|
|
||||||
else
|
|
||||||
@limit = 30#per_page_option
|
|
||||||
end
|
|
||||||
|
|
||||||
@memo_count = @memo.count
|
|
||||||
@memo_pages = Paginator.new @memo_count, @limit, params['page']
|
|
||||||
@offset ||= @memo_pages.offset
|
|
||||||
@memo = @memo.limit(@limit).offset(@offset).all
|
|
||||||
=end
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
end
|
end
|
||||||
|
@ -440,29 +418,55 @@ class AdminController < ApplicationController
|
||||||
|
|
||||||
#课程讨论区的帖子
|
#课程讨论区的帖子
|
||||||
def course_messages
|
def course_messages
|
||||||
#@boards=Board.where('course_id is NULL')
|
|
||||||
#@course_ms = Message.reorder('created_on desc')
|
|
||||||
@course_ms=Message.joins("join boards on messages.board_id=boards.id where boards.course_id is not NULL").reorder('created_on desc')
|
@course_ms=Message.joins("join boards on messages.board_id=boards.id where boards.course_id is not NULL").reorder('created_on desc')
|
||||||
|
@course_ms = paginateHelper @course_ms,30
|
||||||
|
@page = (params['page'] || 1).to_i - 1
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#项目讨论区的帖子
|
#项目讨论区的帖子
|
||||||
def project_messages
|
def project_messages
|
||||||
@project_ms=Message.joins("join boards on messages.board_id=boards.id where boards.project_id != -1").reorder('created_on desc')
|
@project_ms=Message.joins("join boards on messages.board_id=boards.id where boards.project_id != -1").reorder('created_on desc')
|
||||||
|
@project_ms = paginateHelper @project_ms,30
|
||||||
|
@page = (params['page'] || 1).to_i - 1
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#通知
|
#通知
|
||||||
def notices
|
def notices
|
||||||
@news = News.where('course_id is not NULL').order('created_on desc')
|
@news = News.where('course_id is not NULL').order('created_on desc')
|
||||||
|
@news = paginateHelper @news,30
|
||||||
|
@page = (params['page'] || 1).to_i - 1
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#最近登录用户列表
|
#最近登录用户列表
|
||||||
def latest_login_users
|
def latest_login_users
|
||||||
@user = User.order('last_login_on desc')
|
scope = User.order('last_login_on desc')
|
||||||
|
scope = scope.where("last_login_on>= '#{params[:startdate]} 00:00:00'") if params[:startdate].present?
|
||||||
|
scope =scope.where("last_login_on <= '#{params[:enddate]} 23:59:59'") if params[:enddate].present?
|
||||||
|
@user = scope
|
||||||
|
@user = paginateHelper @user,30
|
||||||
|
@page = (params['page'] || 1).to_i - 1
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#作业
|
#作业
|
||||||
def homework
|
def homework
|
||||||
@homework = HomeworkCommon.order('end_time desc')
|
@homework = HomeworkCommon.order('end_time desc')
|
||||||
|
@homework = paginateHelper @homework,30
|
||||||
|
@page = (params['page'] || 1).to_i - 1
|
||||||
|
respond_to do |format|
|
||||||
|
format.html
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -109,19 +109,19 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
if @user.course_messages
|
if @user.course_messages
|
||||||
if params[:type].nil?
|
if params[:type].nil?
|
||||||
@user_course_messages = @user.course_messages
|
@user_course_messages = @user.course_messages.reverse
|
||||||
@user_project_messges = @user.forge_messages
|
@user_project_messges = @user.forge_messages.reverse
|
||||||
else
|
else
|
||||||
case params[:type]
|
case params[:type]
|
||||||
when 'homework'
|
when 'homework'
|
||||||
@user_course_messages = @user.course_messages.select{|x| x.course_message_type == "HomeworkCommon"}
|
@user_course_messages = @user.course_messages.reverse.select{|x| x.course_message_type == "HomeworkCommon"}
|
||||||
#@user_course_messages = ForgeMessage.find_by_sql("select * from course_messages where user_id='#{@user.id}' and course_message_type = 'HomeworkCommon' order by created_at desc;")
|
#@user_course_messages = ForgeMessage.find_by_sql("select * from course_messages where user_id='#{@user.id}' and course_message_type = 'HomeworkCommon' order by created_at desc;")
|
||||||
when 'message'
|
when 'message'
|
||||||
@user_course_messages = @user.course_messages.select{|x| x.course_message_type == "Message"}
|
@user_course_messages = @user.course_messages.reverse.select{|x| x.course_message_type == "Message"}
|
||||||
when 'news'
|
when 'news'
|
||||||
@user_course_messages = @user.course_messages.select{|x| x.course_message_type == "News"}
|
@user_course_messages = @user.course_messages.reverse.select{|x| x.course_message_type == "News"}
|
||||||
when 'poll'
|
when 'poll'
|
||||||
@user_course_messages = @user.course_messages.select{|x| x.course_message_type == "Poll"}
|
@user_course_messages = @user.course_messages.reverse.select{|x| x.course_message_type == "Poll"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px;">
|
||||||
序号
|
序号
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(课程ID)">
|
||||||
来源
|
来源(课程ID)
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 50px;">
|
<th style="width: 50px;">
|
||||||
作者
|
作者
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=0%>
|
<% @count=@page*30%>
|
||||||
<% for course in @course_ms -%>
|
<% for course in @course_ms -%>
|
||||||
|
|
||||||
<% @count=@count + 1 %>
|
<% @count=@count + 1 %>
|
||||||
|
@ -51,10 +51,10 @@
|
||||||
<%= format_date(course.created_on) %>
|
<%= format_date(course.created_on) %>
|
||||||
</td>
|
</td>
|
||||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=course.subject %>'>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=course.subject %>'>
|
||||||
<%= course.subject %>
|
<%= link_to(course.subject, course_boards_path(Board.where('id=?',course.board_id).first.course_id)) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%=course.replies_count %>
|
<%= link_to(course.replies_count, course_boards_path(Board.where('id=?',course.board_id).first.course_id)) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -62,5 +62,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% html_title(l(:label_message_plural)) -%>
|
<% html_title(l(:label_message_plural)) -%>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<%@count=0 %>
|
<%@count=@page*30 %>
|
||||||
<% for homework in @homework do %>
|
<% for homework in @homework do %>
|
||||||
<% @count+=1 %>
|
<% @count+=1 %>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%=StudentWork.where('homework_common_id=?',homework.id).count %>
|
<%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%=format_date(homework.end_time) %>
|
<%=format_date(homework.end_time) %>
|
||||||
|
@ -59,4 +59,8 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% html_title(l(:label_user_homework)) -%>
|
<% html_title(l(:label_user_homework)) -%>
|
||||||
|
|
|
@ -1,7 +1,26 @@
|
||||||
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %>
|
||||||
<h3>
|
<h3>
|
||||||
<%=l(:label_latest_login_user_list)%>
|
<%=l(:label_latest_login_user_list)%>
|
||||||
</h3>
|
</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">
|
<div class="autoscroll">
|
||||||
<table class="list" style="width: 100%;table-layout: fixed">
|
<table class="list" style="width: 100%;table-layout: fixed">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -27,7 +46,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=0 %>
|
<% @count=@page * 30 %>
|
||||||
<% for user in @user do %>
|
<% for user in @user do %>
|
||||||
<tr>
|
<tr>
|
||||||
<% @count +=1 %>
|
<% @count +=1 %>
|
||||||
|
@ -70,4 +89,8 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% html_title(l(:label_latest_login_user_list)) -%>
|
<% html_title(l(:label_latest_login_user_list)) -%>
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
<th style="width: 50px;">
|
<th style="width: 50px;">
|
||||||
类型
|
类型
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(课程或用户ID)">
|
||||||
来源
|
来源(课程或用户ID)
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 50px;">
|
<th style="width: 50px;">
|
||||||
留言人
|
留言人
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=0%>
|
<% @count = @page * 30 %>
|
||||||
<% for journal in @jour -%>
|
<% for journal in @jour -%>
|
||||||
<% @count=@count + 1 %>
|
<% @count=@count + 1 %>
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
@ -49,20 +49,39 @@
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= journal.jour_id %>
|
<%= journal.jour_id %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center" title='<%= journal.try(:user).try(:realname)%>'>
|
<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 %>'>
|
||||||
<%= link_to(journal.try(:user).try(:realname).truncate(6, omission: '...'), user_path(journal.user)) %>
|
<% 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>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%= format_date(journal.created_on) %>
|
<%= format_date(journal.created_on) %>
|
||||||
</td>
|
</td>
|
||||||
<td title='<%=journal.notes %>'>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=journal.notes %>'>
|
||||||
<%= journal.notes.truncate(15, omission: '...') %>
|
<%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>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<% if(journal.m_reply_count) %>
|
<% if(journal.m_reply_count) %>
|
||||||
<%=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 %>
|
<% else %>
|
||||||
<%=0 %>
|
<%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 %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -71,9 +90,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<ul>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
<%= pagination_links_full @jour_pages, @jour_count %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% html_title(l(:label_leave_message_list)) -%>
|
<% html_title(l(:label_leave_message_list)) -%>
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px;">
|
||||||
序号
|
序号
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(贴吧ID)">
|
||||||
来源
|
来源(贴吧ID)
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 50px;">
|
<th style="width: 50px;">
|
||||||
作者
|
作者
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=0%>
|
<% @count=@page * 30%>
|
||||||
<% for memo in @memo -%>
|
<% for memo in @memo -%>
|
||||||
<% @count=@count + 1 %>
|
<% @count=@count + 1 %>
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
@ -50,20 +50,22 @@
|
||||||
<%= format_date(memo.created_at) %>
|
<%= format_date(memo.created_at) %>
|
||||||
</td>
|
</td>
|
||||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=memo.subject %>'>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=memo.subject %>'>
|
||||||
<%= 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>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%=memo.replies_count %>
|
<%= link_to(memo.replies_count, forum_memo_path(memo.forum, memo)) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="pagination">
|
<div class="pagination">
|
||||||
<ul>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
<#%= pagination_links_full @memo_pages, @memo_count %>
|
</div>
|
||||||
</ul>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
<% html_title(l(:label_message_plural)) -%>
|
<% html_title(l(:label_message_plural)) -%>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=0%>
|
<% @count=@page * 30%>
|
||||||
<% for news in @news -%>
|
<% for news in @news -%>
|
||||||
<% @count=@count + 1 %>
|
<% @count=@count + 1 %>
|
||||||
<tr class="<%= cycle("odd", "even") %>">
|
<tr class="<%= cycle("odd", "even") %>">
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
<%= link_to(news.title, news_path(news)) %>
|
<%= link_to(news.title, news_path(news)) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%=news.comments_count %>
|
<%= link_to(news.comments_count, news_path(news)) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -71,4 +71,8 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% html_title(l(:label_notification_list)) -%>
|
<% html_title(l(:label_notification_list)) -%>
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px;">
|
||||||
序号
|
序号
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 30px;">
|
<th style="width: 30px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="来源(项目ID)">
|
||||||
来源
|
来源(项目ID)
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 50px;">
|
<th style="width: 50px;">
|
||||||
作者
|
作者
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=0%>
|
<% @count=@page * 30 %>
|
||||||
<% for project in @project_ms -%>
|
<% for project in @project_ms -%>
|
||||||
|
|
||||||
<% @count=@count + 1 %>
|
<% @count=@count + 1 %>
|
||||||
|
@ -51,10 +51,10 @@
|
||||||
<%= format_date(project.created_on) %>
|
<%= format_date(project.created_on) %>
|
||||||
</td>
|
</td>
|
||||||
<td title='<%=project.subject %>' style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name">
|
<td title='<%=project.subject %>' style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name">
|
||||||
<%= project.subject %>
|
<%= link_to(project.subject, project_boards_path(Board.where('id=?',project.board_id).first.project_id)) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%=project.replies_count %>
|
<%= link_to(project.replies_count, project_boards_path(Board.where('id=?',project.board_id).first.project_id)) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -63,4 +63,8 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% html_title(l(:label_message_plural)) -%>
|
<% html_title(l(:label_message_plural)) -%>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ucm.course_message.author), :width => "30", :height => "30") %></a></li>
|
||||||
<li class="homepageNewsPublisher fl"><a href="javascript:void(0);" class="newsBlue"><%= ucm.course_message.author %></a></li>
|
<li class="homepageNewsPublisher fl"><a href="javascript:void(0);" class="newsBlue"><%= ucm.course_message.author %></a></li>
|
||||||
<li class="homepageNewsType fl">发布通知</li>
|
<li class="homepageNewsType fl">发布通知</li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to format_activity_title(" #{ucm.course_message.title}"), {:controller => 'news', :action => 'show', :id => ucm.course_message.id} %></a></li>
|
<%= link_to format_activity_title(" #{ucm.course_message.title}"), {:controller => 'news', :action => 'show', :id => ucm.course_message.id} %></a></li>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ucm.course_message.created_on).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ucm.course_message.created_on).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -474,13 +474,6 @@ ActiveRecord::Schema.define(:version => 20150815030833) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
create_table "discuss_demos", :force => true do |t|
|
|
||||||
t.string "title"
|
|
||||||
t.text "body"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "documents", :force => true do |t|
|
create_table "documents", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.integer "category_id", :default => 0, :null => false
|
t.integer "category_id", :default => 0, :null => false
|
||||||
|
@ -893,6 +886,7 @@ ActiveRecord::Schema.define(:version => 20150815030833) do
|
||||||
t.datetime "created_on"
|
t.datetime "created_on"
|
||||||
t.integer "comments_count", :default => 0, :null => false
|
t.integer "comments_count", :default => 0, :null => false
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
|
t.datetime "updated_on"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
||||||
|
|
Loading…
Reference in New Issue