首页页面改造
This commit is contained in:
parent
c10eeb1c01
commit
8f0fdbdb75
|
@ -42,7 +42,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="welcome_left" id="welcome_left">
|
<div class="welcome_left" id="welcome_left">
|
||||||
<% unless @first_page.nil? %>
|
<% unless @first_page.nil? %>
|
||||||
<!-- <span class="font_welcome_trustie"><#%= @first_page.title %></span> <span class="font_welcome_tdescription">, <#%= @first_page.description %></span> -->
|
|
||||||
<%= @first_page.description.html_safe %>
|
<%= @first_page.description.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,14 +56,23 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||||
<h3 style="margin-left: 5px; color: #e8770d;">
|
<h3 style="margin-left: 5px; color: #e8770d;">
|
||||||
<strong>热门项目</strong>
|
<strong><%= l(:lable_hot_projects)%></strong>
|
||||||
</h3>
|
</h3>
|
||||||
<span style="margin-top: -20px;float: right; display: block;">
|
<span style="margin-top: -20px;float: right; display: block;">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type =>( @project_type||=0)}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
||||||
|
:action => 'new',
|
||||||
|
:course => 0,
|
||||||
|
:project_type =>( @project_type||=0)},
|
||||||
|
:class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_to l(:label_more), { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
<%= link_to l(:label_more), { :controller => 'projects',
|
||||||
|
:action => 'index',
|
||||||
|
:project_type => 0,
|
||||||
|
:host => Setting.project_domain},
|
||||||
|
:target => "_blank" %>
|
||||||
|
</span>
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% #projects = find_miracle_project(10, 3) %>
|
<% #projects = find_miracle_project(10, 3) %>
|
||||||
|
@ -83,7 +91,9 @@
|
||||||
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
||||||
</div>
|
</div>
|
||||||
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;">
|
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||||
<span class='font_lighter' title ='<%=project.short_description%>'><%=project.description.truncate(100, omission: '...')%></span>
|
<span class='font_lighter' title ='<%=project.short_description%>'>
|
||||||
|
<%=project.description.truncate(100, omission: '...')%>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
<%= content_tag "span", l(:label_project_score)+ ":" + red_project_scores(project).to_i.to_s,
|
<%= content_tag "span", l(:label_project_score)+ ":" + red_project_scores(project).to_i.to_s,
|
||||||
|
@ -101,8 +111,8 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||||
<ul class="user-welcome-message-list">
|
<ul class="user-welcome-message-list">
|
||||||
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
<h3 style="color: rgb(21, 188, 207)"><strong><%= l(:lable_user_active)%></strong></h3>
|
||||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
|
||||||
<div class="user-message-box-list" style="margin-top: 10px;">
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
||||||
<%activities = find_all_activities%>
|
<%activities = find_all_activities%>
|
||||||
<% activities.each do |event| %>
|
<% activities.each do |event| %>
|
||||||
|
@ -113,11 +123,23 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
<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 %>
|
<span style="color: green;">
|
||||||
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
<%= 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>
|
||||||
|
|
||||||
|
<span style="float: right; color: rgb(172, 174, 177);">
|
||||||
|
<%= show_event_reply event %>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<!--<%#end %> --><!-- cache -->
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -128,35 +150,41 @@
|
||||||
<!--<%# cache 'forum_links' do %> -->
|
<!--<%# cache 'forum_links' do %> -->
|
||||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||||
<h3 style="color: rgb(21, 188, 207);">
|
<h3 style="color: rgb(21, 188, 207);">
|
||||||
<strong>贴吧动态</strong>
|
<strong><%= l(:lable_bar_active)%></strong>
|
||||||
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
<%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||||
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3>
|
<%= link_to l(:label_my_feedback) , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
</h3>
|
||||||
|
<span style="margin-top: -30px;float: right; display: block;"><%= link_to l(:label_more), forums_path %></span>
|
||||||
</div>
|
</div>
|
||||||
<!--<%#end %> -->
|
|
||||||
<div class="welcome-box-list-new memo_activity">
|
<div class="welcome-box-list-new memo_activity">
|
||||||
<% topics = find_new_forum_topics(7) %>
|
<% topics = find_new_forum_topics(7) %>
|
||||||
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||||
<!--<%# cache cache_key_for_topic(topic) do %> -->
|
<!--<%# cache cache_key_for_topic(topic) do %> -->
|
||||||
<li class="message-brief-intro">
|
<li class="message-brief-intro">
|
||||||
<div class='memo_title text_nowrap'>
|
<div class='memo_title text_nowrap'>
|
||||||
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
|
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
|
||||||
</div>
|
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
|
||||||
<div class='memo_attr'>
|
</div>
|
||||||
<span class='memo_timestamp'>
|
<div class='memo_attr'>
|
||||||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
<span class='memo_timestamp'>
|
||||||
</span>
|
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||||
<span class="memo_author">
|
</span>
|
||||||
楼主: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
<span class="memo_author">
|
||||||
</span>
|
<%= l(:label_question_sponsor)%>:
|
||||||
<span class="memo_last_person">
|
<%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||||
最后回复:<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
</span>
|
||||||
</span>
|
<span class="memo_last_person">
|
||||||
<span class="memo_reply">
|
<%= l(:label_final_reply)%>:
|
||||||
回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %>
|
||||||
</span>
|
<%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%>
|
||||||
</div>
|
<% end %>
|
||||||
</li>
|
</span>
|
||||||
|
<span class="memo_reply">
|
||||||
|
<%= l(:label_reply)%>
|
||||||
|
(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<!--<%#end %> --> <!-- cache -->
|
<!--<%#end %> --> <!-- cache -->
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -164,5 +192,4 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
<%= render partial: 'link_to_another' %>
|
<%= render partial: 'link_to_another' %>
|
|
@ -2121,4 +2121,7 @@ zh:
|
||||||
label_select_province: 请选择省份
|
label_select_province: 请选择省份
|
||||||
label_search_conditions_not_null: 搜索条件不能为空
|
label_search_conditions_not_null: 搜索条件不能为空
|
||||||
|
|
||||||
lable_hot_course: 活跃课程
|
lable_hot_course: 活跃课程
|
||||||
|
lable_hot_projects: 热门项目
|
||||||
|
lable_user_active: 用户动态
|
||||||
|
lable_bar_active: 贴吧动态
|
Loading…
Reference in New Issue