From 908254b911517a9a1c7a258cde3847324f5cb96b Mon Sep 17 00:00:00 2001 From: nwb Date: Sat, 19 Jul 2014 09:39:48 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E3=80=81=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E9=A6=96=E9=A1=B5=E6=8F=8F=E8=BF=B0=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E9=BC=A0=E6=A0=87=E6=82=AC=E5=81=9C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 2 +- app/views/welcome/contest.html.erb | 2 +- app/views/welcome/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/course.rb b/app/models/course.rb index 45830c719..75bac905c 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -36,7 +36,7 @@ class Course < ActiveRecord::Base validates_presence_of :password, :term,:name validates_format_of :class_period, :with =>/^[1-9]\d*$/ - #validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ + validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ before_save :self_validate after_create :create_board_sync diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index b48b5828a..ce2450268 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -166,7 +166,7 @@
- ><%=contest.description.to_s%> + <%=contest.description.truncate(100, omission: '...')%>

diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 586817c40..deeacb322 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -73,7 +73,7 @@ (<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
- ><%=project.description%> + <%=project.description.truncate(100, omission: '...')%>
<%# issue_count = project.issues.count %> From 74ff5d505d047e8531751b1e0a86d3900efdc2bc Mon Sep 17 00:00:00 2001 From: z9hang Date: Sat, 19 Jul 2014 10:36:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E5=88=9B=E5=BB=BA=E9=A1=B9=E7=9B=AE=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E5=9F=9F=E5=90=8D=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/show_attendingcontest.html.erb | 2 +- app/views/courses/new.html.erb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index ab619e8ae..6430a7c9a 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -131,7 +131,7 @@ <%= l(:label_work_deposit_project) %>: <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %> - <%= link_to l(:label_create_new_projects), new_project_path(course: 0, project_type: 0), :target => '_blank' %> + <%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0} , :target => '_blank',host:Setting.project_domain %>

diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 81e6ec37a..55f515a11 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -1,3 +1,7 @@ +<% @nav_dispaly_course_all_label = 1 + @nav_dispaly_forum_label = 1 + @nav_dispaly_course_label = nil + @nav_dispaly_store_all_label = 1 %> <%= labelled_form_for @course do |f| %>

<%=l(:label_course_new)%>

From 6bced5106ebf72ef2841dc30029291672282968a Mon Sep 17 00:00:00 2001 From: nwb Date: Sat, 19 Jul 2014 10:55:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- public/stylesheets/application.css | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e3b2df048..4967505a3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -335,7 +335,7 @@ module ApplicationHelper # set the project environment to please macros. @course = course if (ancestors.empty? )#|| course.is_descendant_of?(ancestors.last)) - s << "
    \n" + s << "
      \n" else ancestors.pop s << "" diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index a8d030b6b..3b1e503c4 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -696,7 +696,6 @@ ul.user_course_sort li{list-style-type:none; height:auto;} - .info-break{ word-wrap: break-word; word-break: break-all; @@ -1765,6 +1764,22 @@ input#content_comments {width: 99%} p.pagination {margin-top:8px; font-size: 90%} + +ul.courses {margin:0px; padding-left:0em;} +ul.courses ul {padding-left:1.6em;} +ul.courses.root {margin:0; padding:0;} + +ul.courses li {list-style-type:none;} + +ul.courses li {list-style-type:none;} +#courses-index ul.courses ul.courses { border-left: 3px solid #e0e0e0; padding-left:1em;} +#courses-index ul.courses li.root {margin-bottom: 1em;} +#courses-index ul.courses li.child {margin-top: 1em;} +#courses-index ul.courses div.root a.course {font-family:'微软雅黑', "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 14px; margin: 0 0 10px 0; } +.my-course { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; } + + + /***** Tabular forms ******/ .tabular p{ margin: 0; From 206aeeccfb952ba67689dc04937b010e2e8df4d1 Mon Sep 17 00:00:00 2001 From: nwb Date: Sat, 19 Jul 2014 11:39:09 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BC=98=E5=8C=962=E7=BA=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_header.html.erb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 7e11d8357..17f0d1e60 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -41,6 +41,7 @@ <%=link_to_user(User.current)%>