From b318166c15df004e4675c70c02a4257e77a4f673 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Wed, 23 Apr 2014 09:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=8F=82=E4=B8=8E=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E7=9A=84=E5=BA=94=E7=94=A8=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._base_softapplication_top_content.html.erb | 20 ++++++++++++ app/views/layouts/base_contest.html.erb | 30 ++++++++--------- app/views/layouts/base_newcontest.html.erb | 32 +++++++++---------- app/views/softapplications/show.html.erb | 1 + 4 files changed, 52 insertions(+), 31 deletions(-) create mode 100644 app/views/layouts/_base_softapplication_top_content.html.erb diff --git a/app/views/layouts/_base_softapplication_top_content.html.erb b/app/views/layouts/_base_softapplication_top_content.html.erb new file mode 100644 index 000000000..064e84cf0 --- /dev/null +++ b/app/views/layouts/_base_softapplication_top_content.html.erb @@ -0,0 +1,20 @@ +
+ + + + + + + + + + + +
创新竞赛社区<%= l(:label_user_location) %> :
<%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %><%=link_to l(:field_homepage), home_path %> > + <%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> > + + <% contest = @softapplication.contests.first %><%= contest ? link_to(contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%> + + +
+
\ No newline at end of file diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index b4ba3dd4b..2bda701fe 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -26,23 +26,23 @@
- - - + + + - - + +
创新竞赛社区<%= l(:label_user_location) %> : - - 创新竞赛社区<%= l(:label_user_location) %> : + +
<%=link_to request.host()+"/contest", :controller => 'bids', :action => 'contest' %><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %> > - <%= link_to @bid.name, bid_path %><%=link_to request.host()+"/contest", :controller => 'bids', :action => 'contest' %><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %> > + <%= link_to @bid.name, bid_path %>
diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index ba78cefea..147df5245 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -27,24 +27,24 @@
- - - + + + - - + +
创新竞赛社区<%= l(:label_user_location) %> : - - 创新竞赛社区<%= l(:label_user_location) %> : + +
<%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %><%=link_to l(:field_homepage), home_path %> > - <%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> > - <%= link_to @contest.name, show_contest_contest_path %> - <%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %><%=link_to l(:field_homepage), home_path %> > + <%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> > + <%= link_to @contest.name, show_contest_contest_path %> +
diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb index 51195dfcf..b39ab6c61 100644 --- a/app/views/softapplications/show.html.erb +++ b/app/views/softapplications/show.html.erb @@ -1,3 +1,4 @@ +<%=render :partial => 'layouts/base_softapplication_top_content'%>