From 01120d063d4eb011f6dee2ecb35d77697cae75ef Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 27 Oct 2014 17:14:34 +0800 Subject: [PATCH 01/13] =?UTF-8?q?#1127=E4=BF=AE=E5=A4=8D=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=97=B6=EF=BC=8C=E8=8F=9C=E5=8D=95=E6=A0=8F?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=88=B6=E8=8F=9C=E5=8D=95=E5=8F=98=E8=89=B2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 + app/views/layouts/base_courses.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 8402c05f0..8a5bfd9fb 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -8,6 +8,7 @@ class CoursesController < ApplicationController menu_item :overview menu_item :feedback, :only => :feedback menu_item :homework, :only => :homework + menu_item :new_homework menu_item l(:label_sort_by_time), :only => :index menu_item l(:label_sort_by_active), :only => :index diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index b7b832fb5..fd21b97a0 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -153,7 +153,7 @@
- |
--<%= label_tag('add_filter_select', l(:label_filter_add)) %> -<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %> - | -
+ |
+ + <%= label_tag('add_filter_select', l(:label_filter_add)) %> + <%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %> + | +
- (<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo| - link_to h(repo.name), - {:controller => 'repositories', :action => 'show', - :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil}, - :class => 'repository' + (repo == @repository ? ' selected' : '') - }.join(' | ').html_safe %>)
-git init
-git add *
-git commit -m "first commit"
-git remote add origin <%= @repos_url%>
-git config http.postBuffer 524288000 #设置本地post缓存为500MB
-git push -u origin master:master
-git remote add origin <%= @repos_url%>
-git add .
++ (<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo| + link_to h(repo.name), + {:controller => 'repositories', :action => 'show', + :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil}, + :class => 'repository' + (repo == @repository ? ' selected' : '') + }.join(' | ').html_safe %>) +
+git init
+git add *
git commit -m "first commit"
+git remote add origin + <%= @repos_url%> +
git config http.postBuffer 524288000 #设置本地post缓存为500MB
-git push -u origin master:master
-git remote add trustie <%= @repos_url%>
+git push -u origin master:master
+git remote add origin <%= @repos_url%>
git add .
git commit -m "first commit"
git config http.postBuffer 524288000 #设置本地post缓存为500MB
-git push -u trustie master:master
-<%= link_to "李海提供", user_path(646)%>
-git push -u origin master:master
+git clone <%= @repos_url%>
+git push
+git checkout -b branch_name
+git push origin branch_name
+git remote add trustie + <%= @repos_url%> +
+git add .
+git commit -m "first commit"
+git config http.postBuffer 524288000 #设置本地post缓存为500MB
+git push -u trustie master:master
+<%= link_to "李海", user_path(646)%>提供
+- <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) - sep = '' %> - <% if @repository.supports_all_revisions? && @path.blank? %> - <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project, - :repository_id => @repository.identifier_param %> - <% sep = '|' %> - <% end %> - <% if @repository.supports_directory_revisions? && - ( has_branches || !@path.blank? || !@rev.blank? ) %> - <%= sep %> - <%= link_to l(:label_view_revisions), - :action => 'changes', - :path => to_path_param(@path), - :id => @project, - :repository_id => @repository.identifier_param, - :rev => @rev %> - <% end %> + <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) + sep = '' %> + <% if @repository.supports_all_revisions? && @path.blank? %> + <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project, + :repository_id => @repository.identifier_param %> + <% sep = '|' %> + <% end %> + <% if @repository.supports_directory_revisions? && ( has_branches || !@path.blank? || !@rev.blank? ) %> + <%= sep %> + <%= link_to l(:label_view_revisions), + :action => 'changes', + :path => to_path_param(@path), + :id => @project, + :repository_id => @repository.identifier_param, + :rev => @rev %> + <% end %>
<% if @repository.supports_all_revisions? %> <% content_for :header_tags do %> @@ -99,7 +113,15 @@ <% end %> -<%= l(:label_how_commit_code) %> <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "usage")%> | <%= link_to('English', en_usage_path, :class => "usage")%> + + + <%= l(:label_how_commit_code) %> + + + +<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "usage")%> + | +<%= link_to('English', en_usage_path, :class => "usage")%> From 8cbc4eb938bb6173d1dd6a6d9b823d029a0cb835 Mon Sep 17 00:00:00 2001 From: z9hang<%= l(:label_course_practice) %> | +<%= l(:label_course_practice) %> | <%= l(:label_user_location) %> : |
<% if User.current.logged?%>
@@ -33,7 +33,7 @@
<% else %>
|