From f64ea263ca17ca5d0f245008dc7b02f0b75a4193 Mon Sep 17 00:00:00 2001 From: yanxd Date: Mon, 24 Feb 2014 16:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=B8=96=E5=AD=90=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E6=9D=A1=E8=BF=87=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base.html.erb | 17 +++++++++-------- app/views/memos/new.html.erb | 22 ++++++++++++++++++++-- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 7df93f487..e475bbd5f 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -1,22 +1,23 @@ <% request.headers['REQUEST_URI'] = "" if request.headers['REQUEST_URI'].nil? - if (request.headers['REQUEST_URI'].match(/project\/course/)) + realUrl = request.original_url + if (realUrl.match(/project\/course/)) @nav_dispaly_course_label = 1 - elsif (request.headers['REQUEST_URI'].match(/projects/)) + elsif (realUrl.match(/projects/)) @nav_dispaly_project_label = 1 - elsif (request.headers['REQUEST_URI'].match(/users/)) + elsif (realUrl.match(/users/)) @nav_dispaly_user_label = 1 - elsif (request.headers['REQUEST_URI'].match(/contest/)) + elsif (realUrl.match(/contest/)) @nav_dispaly_contest_label = 1 - elsif (request.headers['REQUEST_URI'].match(/calls/)) + elsif (realUrl.match(/calls/)) @nav_dispaly_bid_label = 1 - elsif (request.headers['REQUEST_URI'].match(/forums/)) + elsif (realUrl.match(/forums/)) @nav_dispaly_forum_label = 1 - elsif (request.headers['REQUEST_URI'].match(/[^projects]\/course[^\.]/)) + elsif (realUrl.match(/[^projects]\/course[^\.]/)) @nav_dispaly_course_label = 1 @nav_dispaly_project_label = 1 @nav_dispaly_contest_label = 1 - elsif (request.headers['REQUEST_URI'].match(/course\.trustie\.net/)) + elsif (realUrl.match(/course\.trustie\.net/)) @nav_dispaly_course_all_label = 1 @nav_dispaly_teacher_all_label = 1 @nav_dispaly_forum_label = 1 diff --git a/app/views/memos/new.html.erb b/app/views/memos/new.html.erb index d4f1aa734..ec836d32b 100644 --- a/app/views/memos/new.html.erb +++ b/app/views/memos/new.html.erb @@ -1,8 +1,26 @@ <%= javascript_include_tag "ckeditor/ckeditor.js" %> +
+ + + + + + + + + + +
软件项目托管社区<%= l(:label_user_location) %> : + +
<%= link_to "forge.trustie.net/forums", forums_path %>

<%=link_to l(:label_home),home_path %> > <%=link_to '公共贴吧', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name %>

+

<%=l(:label_memo_new)%>

-
-<%= render :partial => 'memos/topic_form' %> +
+
+ <%= render :partial => 'memos/topic_form' %> +
<%= link_to l(:button_back), forum_path(@forum) %>