调整个人主页中top-menu跳转菜单:增加跳转到竞赛模块首页

This commit is contained in:
wanglinchun 2014-04-16 09:52:36 +08:00
parent 6421f02ac8
commit 945ca3787a
2 changed files with 39 additions and 60 deletions

View File

@ -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/))

View File

@ -101,7 +101,7 @@
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_contest_description) %></span>
</div>
<!--网站状态-->
<div class="contest_count">
<!-- <div class="contest_count">
<tr>
<td>竞赛总量:</td>
<td></td>
@ -114,22 +114,23 @@
<td>竞赛项目或应用总数:</td>
<td></td>
</tr>
</div> -->
<!--搜索框-->
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %>
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:240px;'%>
&nbsp;
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%>
<% end %>
<!-- <div class='font_lighter' style="display: inline-block; margin-top:3px;">竞赛相关内容搜索,如竞赛题目,参赛题目,参赛人名等。</div> -->
</div>
<div style="clear: both;"></div>
</div>
</div>
<!--搜索框-->
<div style="width: 57%;margin: 10px auto;">
<%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %>
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:400px;'%>
&nbsp;
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%>
<% end %>
<div class='font_lighter' style="display: inline-block; margin-top:3px;">竞赛相关内容搜索,如竞赛题目,参赛题目,参赛人名等。</div>
</div>
<!-- <div class="search-bar">
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
</div> -->
@ -138,7 +139,7 @@
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>最新热门竞赛</strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1, :host => Setting.contest_domain}, :target => "_blank" %></span>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'contests', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[10]) %>
@ -157,29 +158,35 @@
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<ul class="user-welcome-message-list">
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
<div class="user-message-box-list" style="margin-top: 10px;">
<% find_all_activities.each do |event| %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
</div>
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
<span style="color: green;"><%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %></span><%= show_user_content event %>
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
<h3 style="padding-bottom:px ;margin-left: 5px; color: #e8770d;">
<strong>问题和反馈动态</strong>
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
</h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_new_forum_topics(10).each do |topic|%>
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; ">
<div style="display: inline-block; width: 100%;">
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
</span>
<br>
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size 9pt !important;;"><%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前</span>
<span style="margin-left: 8px; margin-bottom: 0px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
由&nbsp;<%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);" %>&nbsp;发表
</span>
<span style="float: right; color: rgb(172, 174, 177); white-space: nowrap; font-size 9pt !important;;">回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)</span>
</div>
</li>
<% end %>
</div>
<% end %>
</ul>
</div>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>最新参赛应用</strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1, :host => Setting.contest_domain}, :target => "_blank" %></span>
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>最新参赛应用</strong></h3>
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[10]) %>
@ -196,36 +203,7 @@
</ul>
</div>
</div>
<div class="right" style="float: right; width: 48%; ">
<ul class="welcome-message-list">
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
<h3 style="color: rgb(21, 188, 207);">
<strong>贴吧动态</strong>
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3>
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
</div>
<div class="welcome-box-list-new">
<% find_new_forum_topics(7).each do |topic|%>
<li class="message-brief-intro" style="line-height: 1.63em;padding-bottom:3px;">
<div style="display: inline-block; width: 100%;">
<span style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %>
</span>
<br>
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size 9pt !important;;"><%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前</span>
<span style="margin-left: 8px; margin-bottom: 0px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
由&nbsp;<%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);", :target => "_blank" %>&nbsp;发表
</span>
<span style="float: right; color: rgb(172, 174, 177); white-space: nowrap; font-size 9pt !important;;">回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url, :target => "_blank" %>)</span>
</div>
</li>
<% end %>
</div>
</ul>
</div>
<div class="clr">
</div>