This commit is contained in:
z9hang 2015-03-21 10:20:27 +08:00
commit 808d56d47b
2 changed files with 4 additions and 2 deletions

View File

@ -759,7 +759,7 @@ class CoursesController < ApplicationController
def homework
if @course.is_public != 0 || User.current.member_of_course?(@course) || User.current.admin?
@offset, @limit = api_offset_and_limit({:limit => 10})
@bids = @course.homeworks.order('deadline DESC')
@bids = @course.homeworks.order('deadline ASC')
@bids = @bids.like(params[:name]) if params[:name].present?
@bid_count = @bids.count
@bid_pages = Paginator.new @bid_count, @limit, params['page']

View File

@ -1,5 +1,7 @@
<!-- new repository new by xianbo-->
<h3><%= l(:label_repository_new_repos) %></h3>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_repository_new_repos) %></h2>
</div>
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form'} do |f| %>
<%= render :partial => 'form_create', :locals => {:f => f} %>