Merge branch 'Homework' of http://repository.trustie.net/xianbo/trustie2 into Homework

This commit is contained in:
sw 2014-11-05 10:14:24 +08:00
commit 0151caa00c
8 changed files with 21 additions and 19 deletions

View File

@ -672,10 +672,10 @@ class CoursesController < ApplicationController
page = 1 + offset / @limit page = 1 + offset / @limit
end end
@feedback_count = @jours.count #@feedback_count = @jours.count
@feedback_pages = Paginator.new @feedback_count, @limit, page #@feedback_pages = Paginator.new @feedback_count, @limit, page
@offset ||= @feedback_pages.offset #@offset ||= @feedback_pages.offset
@jour = @jours[@offset, @limit] @jour = paginateHelper @jours,10
@state = false @state = false
respond_to do |format| respond_to do |format|
format.html{render :layout => 'base_courses'} format.html{render :layout => 'base_courses'}

View File

@ -424,10 +424,10 @@ class ProjectsController < ApplicationController
end end
@feedback_count = @jours.count #@feedback_count = @jours.count
@feedback_pages = Paginator.new @feedback_count, @limit, @page #@feedback_pages = Paginator.new @feedback_count, @limit, @page
@offset ||= @feedback_pages.offset #@offset ||= @feedback_pages.offset
@jour = @jours[@offset, @limit] @jour = paginateHelper @jours,10
@state = false @state = false
@base_courses_tag = @project.project_type @base_courses_tag = @project.project_type

View File

@ -1,3 +1,4 @@
<div class="dis">
<div class="msg_box" id='leave-message'> <div class="msg_box" id='leave-message'>
<h4>留言内容</h4> <h4>留言内容</h4>
<%= render :partial => 'new', :locals => {:contest => @contest, :sta => @state} %> <%= render :partial => 'new', :locals => {:contest => @contest, :sta => @state} %>
@ -9,4 +10,5 @@
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %> <%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
</div> </div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true%></ul> <ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
</div>

View File

@ -1,3 +1,4 @@
<div class="dis">
<div class="msg_box" id='leave-message'> <div class="msg_box" id='leave-message'>
<% reply_allow = JournalsForMessage.create_by_user? User.current %> <% reply_allow = JournalsForMessage.create_by_user? User.current %>
@ -26,4 +27,5 @@
<div id="history"> <div id="history">
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %> <%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
</div> </div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
</div>

View File

@ -43,10 +43,4 @@ function checkMaxLength() {
} }
</script> </script>
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @feedback_pages %>
</ul>
</div>
<% html_title(l(:label_course_feedback)) -%> <% html_title(l(:label_course_feedback)) -%>

View File

@ -19,7 +19,9 @@
<span style="color:#a6a6a6; margin-right:20px; margin-left:10px;"><%= format_time(jour.created_on) %></span> <span style="color:#a6a6a6; margin-right:20px; margin-left:10px;"><%= format_time(jour.created_on) %></span>
<span style="font-weight:bold; color:#a6a6a6; "> <span style="font-weight:bold; color:#a6a6a6; ">
<% if show_score %> <% if show_score %>
<%= l(:label_work_rating) %> <span style="float:left">
<%= l(:label_work_rating) %>
</span>
<%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %> <%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
<% end %> <% end %>
</span> </span>

View File

@ -1,3 +1,4 @@
<div class="dis">
<div class="msg_box" id='leave-message'> <div class="msg_box" id='leave-message'>
<% reply_allow = JournalsForMessage.create_by_user? User.current %> <% reply_allow = JournalsForMessage.create_by_user? User.current %>
@ -26,4 +27,5 @@
<div id="history"> <div id="history">
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %> <%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
</div> </div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
</div>

View File

@ -110,7 +110,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_C{border-bottom:1px dashed #CCC; padding:5px;} .ping_C{border-bottom:1px dashed #CCC; padding:5px;}
.ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;} .ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;}
.ping_dispic img{ height:46px; width:46px;} .ping_dispic img{ height:46px; width:46px;}
.ping_discon{ float:left; width:372px; margin-left:15px;} .ping_discon{ float:left; width:350px; margin-left:15px;}
.ping_distop span{ float:left;} .ping_distop span{ float:left;}
.ping_distop p{ color:#5f5f5f;} .ping_distop p{ color:#5f5f5f;}
.ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;} .ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;}