From 945ca3787a9a1e489a183460bc587533b34075a0 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Wed, 16 Apr 2014 09:52:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=AA=E4=BA=BA=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E4=B8=ADtop-menu=E8=B7=B3=E8=BD=AC=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E6=A8=A1=E5=9D=97=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_header.html.erb | 1 + app/views/welcome/contest.html.erb | 98 ++++++++++--------------- 2 files changed, 39 insertions(+), 60 deletions(-) diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 8a066d4f8..140ff92ba 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -5,6 +5,7 @@ @nav_dispaly_home_path_label = 1 @nav_dispaly_main_course_label = 1 @nav_dispaly_main_project_label = 1 + @nav_dispaly_contest_label = 1 elsif (realUrl.match(/contest/)) @nav_dispaly_contest_label = 1 elsif (realUrl.match(/calls/)) diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 1b265ade9..60aafd949 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -101,7 +101,7 @@ <%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %> , <%= l(:label_welcome_trustie_contest_description) %> -
+ + +
+ <%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %> + <%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:240px;'%> +   + <%= hidden_field_tag 'project_type', params[:project_type] %> + <%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%> + <% end %> +
+
- -
- - <%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %> - <%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:400px;'%> -   - <%= hidden_field_tag 'project_type', params[:project_type] %> - <%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%> - <% end %> -
竞赛相关内容搜索,如竞赛题目,参赛题目,参赛人名等。
-
+ @@ -138,7 +139,7 @@

最新热门竞赛

- <%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1, :host => Setting.contest_domain}, :target => "_blank" %> + <%= link_to "更多>>", {:controller => 'contests', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %>
    <% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[10]) %> @@ -157,29 +158,35 @@
-
    -

    用户动态

    - <%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %> -
    - <% find_all_activities.each do |event| %> -
  • -
    - <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> -
    - -
    - <%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %><%= show_user_content event %> -

    <%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

    +

    + 问题和反馈动态 + <%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> + <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> +

    + <%= link_to "更多>>", forums_path %> +
    +
      + <% find_new_forum_topics(10).each do |topic|%> +
    • +
      +       + <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %> + +
      + <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前 + + 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);" %> 发表 + + 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)
    • - <% end %> -
    + <% end %>
+
-

最新参赛应用

- <%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1, :host => Setting.contest_domain}, :target => "_blank" %> +

最新参赛应用

    <% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[10]) %> @@ -196,36 +203,7 @@
-
- -
- - +