diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 7df93f48..e475bbd5 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 d4f1aa73..ec836d32 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 %> |
+